open-index/open-npm huggingface dataset:
npm package: @ktlian/tracerit
Description: Agent replay and memory for Claude Code
Latest version: 1.0.0

# Tracer — Agent Replay & Diff Memory

Tracer is a missing infrastructure layer for AI coding agents.

Agents repeat the same mistakes across sessions because they have no memory 
of what they tried, what failed, and what the correct action was.
Tracer closes that loop.

## How it works

1. **Records** every action an agent takes during a session (reads, writes, commands)
2. **Diffs** what the agent wrote against what the developer actually committed to git
3. **Surfaces** deviations in a dashboard where developers annotate corrections
4. **Injects** those corrections as context before the next session starts

The agent never makes the same mistake twice.

## Stack

- MCP server (Node.js + TypeScript) — intercepts Claude Code tool calls
- Supabase — stores sessions, diffs, corrections
- Next.js dashboard — view deviations, publish corrections

## Setup

### 1. Install dependencies
cd agent-tracer && npm install

### 2. Add Supabase credentials to .env
SUPABASE_URL=your_url
SUPABASE_ANON_KEY=your_key

### 3. Register as MCP server in ~/.claude.json
Add tracer to your mcpServers config pointing to src/server/index.ts

### 4. Run the dashboard
cd tracer-dashboard && npm run dev

## MCP Tools

| Tool | What it does |
|------|-------------|
| `get_context` | Returns past corrections before a session starts |
| `read_file` | Reads a file and logs the action |
| `write_file` | Writes a file and logs the action |
| `run_command` | Runs a shell command and logs the action |
| `close_session` | Computes git diff and saves deviations to Supabase |

## Dashboard

Open http://localhost:3000 to:
- See all recorded sessions
- View deviations (what the agent wrote vs what was committed)
- Publish corrections that get injected into the next session

## Why this matters

Nia by Nozomio solves external context — giving agents the right docs to read.
Tracer solves execution memory — giving agents the right corrections from past runs.

They are complementary layers. Nia tells agents what to read.
Tracer tells agents what not to do.

## Built by

Nursultan Orynbassar