agent_debugger
CLAUDE.md9 starsChanged 7 months agoMITView on GitHub
This repo is Peaky Peek, a local-first AI agent debugger. The product has three connected surfaces: Primary loop: instrument an agent with the SDK, persist/query it through the API, inspect and replay it in the frontend. Before changing shared shapes, inspect both sides of the boundary. Check together: If sessions, events, replay payloads, analysis payloads, or live summaries change, update these together. If event capture or event fields change, inspect: If changing auto-patching or adapters, inspect: If changing a UI…
In this repository3 other files it gives its agents.
- codebase-to-courseSkill
- release-checkSkill
- sssfSkill
The file
Show its rules and text
We split this CLAUDE.md into the rules it gives an agent
30 rules. About 0 are common, 14 are distinctive, and 16 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈14
Distinctive · estimate
This author's own choices. Worth a look.
16
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 51
Prefer targeted reads over broad scans.
- Very specific: line 52
Prefer rg and rg --files.
- Very specific: line 53
Use python3, not python, for module commands in this environment.
- Distinctive: line 54
Do not touch unrelated user changes in the worktree.
- Very specific: line 55
Avoid noisy directories unless directly relevant: .venv*, frontend/node_modules, frontend/dist, dist, .pytest_cache, .ruff_cache, …
- Very specific: line 57
Playwright MCP: Use mcp__plugin_playwright_playwright__* tools, NOT mcp__playwright__*.
- Distinctive: line 61
Before changing shared shapes, inspect both sides of the boundary.
- Distinctive: line 71
If sessions, events, replay payloads, analysis payloads, or live summaries change, update these together.
- Distinctive: line 75
If event capture or event fields change, inspect:
- Distinctive: line 84
If changing auto-patching or adapters, inspect:
- Distinctive: line 92
If changing a UI panel, inspect:
- Distinctive: line 119
Run the smallest meaningful validation for the area you changed.
- Distinctive: line 130
Use targeted tests when possible, for example:
- Distinctive: line 165
Use git status --short when you need a fast read on the working tree before making changes or committing.
- Very specific: line 166
Use rg --files agent_debugger_sdk api frontend/src tests when you are orienting to the repo or locating the narrowest set of relevant files.
- Distinctive: line 167
Use git diff --stat when you want a quick size and scope summary of current edits before deeper review.
- Very specific: line 168
Use ruff check . after Python, API, storage, auth, redaction, or SDK changes.
- Very specific: line 169
Use python3 -m pytest -q after meaningful backend or SDK changes, especially when behavior or contracts changed.
- Very specific: line 170
Use a targeted pytest command such as python3 -m pytest -q tests/test_api_contract.py -k sessions when you changed one area and want fast …
- Very specific: line 171
Do not chase per-file coverage numbers for api/*_routes.py locally: coverage.py under-records FastAPI handler bodies exercised through …
- Very specific: line 172
Use cd frontend && npm run build after any TypeScript, React, or UI contract change.
- Very specific: line 173
Use make server when you need the FastAPI app running locally for API or integration checks.
- Very specific: line 174
Use make frontend when you need the Vite UI running for manual inspection.
- Very specific: line 175
Use make demo-seed before demo recording or when you need example session data in the system.
- Very specific: line 176
Use make demo-live, make demo-safety, or make demo-research when validating the demo flows or generating showcase traces.
- Distinctive: line 180
If you change event types or event payload fields, assume backend schema, frontend types, and tests may all need updates.
- Very specific: line 181
If you change an API route, inspect the route module, api/services.py, schema definitions, and frontend callers.
- Distinctive: line 182
If you change storage or collector behavior, inspect ingestion flow and any tests covering persistence and replay.
- Distinctive: line 183
If you change UI logic, validate with a frontend build even if the change looks type-local.
- Very specific: line 184
If you change packaging or release logic, inspect both pyproject.toml and pyproject-server.toml.
≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md
Purpose
This repo is Peaky Peek, a local-first AI agent debugger.
The product has three connected surfaces:
agent_debugger_sdk/: Python SDK for capturing sessions, events, decisions, checkpoints, and adaptersapi/: FastAPI server for query, replay, streaming, auth, and packaged UI servingfrontend/: React + TypeScript + Vite UI for trace inspection
Primary loop: instrument an agent with the SDK, persist/query it through the API, inspect and replay it in the frontend.
Repo Map
SDK and tracing
agent_debugger_sdk/core/: tracing primitives, contexts, emitters, recorders, session/event logicagent_debugger_sdk/checkpoints/: checkpoint schemas and validationagent_debugger_sdk/adapters/: framework integrationsagent_debugger_sdk/auto_patch/: auto-instrumentation registry and transport bridgeagent_debugger_sdk/config.py,transport.py,pricing.py: runtime config, delivery, pricing metadata
Server and storage
api/: app factory, routes, schemas, services, UI/static hookscollector/: ingestion and event pipeline integrationstorage/: database engine, migrations, repositoriesauth/: auth and API key supportredaction/: security/privacy filterspyproject-server.toml: package definition forpeaky-peek-server
Frontend
frontend/src/App.tsx: app composition rootfrontend/src/components/: inspection panels and visualizationsfrontend/src/api/client.ts: API boundaryfrontend/src/types/index.ts: frontend contract mirrorfrontend/src/hooks/,frontend/src/stores/: data flow and statefrontend/src/App.css: main styling surface
Tests and demos
tests/: main Python test suitetests/auto_patch/: auto-instrumentation coverageexamples/,scripts/: demo flows and seed scripts
Agent Rules
- Prefer targeted reads over broad scans.
- Prefer
rgandrg --files. - Use
python3, notpython, for module commands in this environment. - Do not touch unrelated user changes in the worktree.
- Avoid noisy directories unless directly relevant:
.venv*,frontend/node_modules,frontend/dist,dist,.pytest_cache,.ruff_cache,__pycache__,traces/. traces/may emit permission noise during naive filesystem scans.- Playwright MCP: Use
mcp__plugin_playwright_playwright__*tools, NOTmcp__playwright__*. The officialmcp__playwright__*tools are misconfigured for Chrome instead of Chromium and will fail.
High-Risk Boundaries
Before changing shared shapes, inspect both sides of the boundary.
API ↔ frontend contract
Check together:
api/schemas.pyfrontend/src/types/index.tsfrontend/src/api/client.ts
If sessions, events, replay payloads, analysis payloads, or live summaries change, update these together.
SDK ↔ API contract
If event capture or event fields change, inspect:
agent_debugger_sdk/core/agent_debugger_sdk/checkpoints/api/schemas.py- related route/service code in
api/
Auto-instrumentation
If changing auto-patching or adapters, inspect:
agent_debugger_sdk/auto_patch/agent_debugger_sdk/adapters/tests/auto_patch/
Frontend behavior
If changing a UI panel, inspect:
frontend/src/App.tsx- the target component
- any related hooks/store files
frontend/src/types/index.tsfrontend/src/api/client.tswhen data shape assumptions are involved
Default Workflow
1. Orient
Start with:
git status --short
rg --files agent_debugger_sdk api frontend/src testsThen read the smallest set of files that defines the target path and its adjacent boundary.
2. Change
Make the narrowest safe edit that solves the problem.
3. Validate
Run the smallest meaningful validation for the area you changed.
Validation Defaults
Python and server changes
ruff check .
python3 -m pytest -qUse targeted tests when possible, for example:
python3 -m pytest -q tests/test_api_contract.py -k sessionsFull-stack scenario tests live in tests/e2e/ (marker e2e): they start a
real uvicorn subprocess with a temp SQLite database and drive the SDK over
real HTTP. They run as part of the default suite; opt out with
-m 'not e2e'. Run them alone with python3 -m pytest -q tests/e2e.
Frontend changes
cd frontend && npm run buildDev servers
make server
make frontendDemo flows
make demo-seed
make demo-live
make demo-safety
make demo-researchWhen To Use Which Command
- Use
git status --shortwhen you need a fast read on the working tree before making changes or committing. - Use
rg --files agent_debugger_sdk api frontend/src testswhen you are orienting to the repo or locating the narrowest set of relevant files. - Use
git diff --statwhen you want a quick size and scope summary of current edits before deeper review. - Use
ruff check .after Python, API, storage, auth, redaction, or SDK changes. - Use
python3 -m pytest -qafter meaningful backend or SDK changes, especially when behavior or contracts changed. - Use a targeted pytest command such as
python3 -m pytest -q tests/test_api_contract.py -k sessionswhen you changed one area and want fast feedback before running the full suite. - Do not chase per-file coverage numbers for
api/*_routes.pylocally: coverage.py under-records FastAPI handler bodies exercised through httpxASGITransportin some environments (verified with a manualsys.settraceprobe — the lines do execute). Trust passing response assertions; CI measures coverage independently. - Use
cd frontend && npm run buildafter any TypeScript, React, or UI contract change. - Use
make serverwhen you need the FastAPI app running locally for API or integration checks. - Use
make frontendwhen you need the Vite UI running for manual inspection. - Use
make demo-seedbefore demo recording or when you need example session data in the system. - Use
make demo-live,make demo-safety, ormake demo-researchwhen validating the demo flows or generating showcase traces.
Change Heuristics
- If you change event types or event payload fields, assume backend schema, frontend types, and tests may all need updates.
- If you change an API route, inspect the route module,
api/services.py, schema definitions, and frontend callers. - If you change storage or collector behavior, inspect ingestion flow and any tests covering persistence and replay.
- If you change UI logic, validate with a frontend build even if the change looks type-local.
- If you change packaging or release logic, inspect both
pyproject.tomlandpyproject-server.toml.
CI and Release Facts
- CI in
.github/workflows/ci.ymlrunsruff check .andpytest -qon Python 3.10, 3.11, and 3.12. - Frontend build is not part of the main CI job, but it is part of local validation and the server publish flow.
- Publishing is tag-driven in
.github/workflows/publish.yml:sdk-vX.Y.Zpublishespeaky-peekserver-vX.Y.Zpublishespeaky-peek-servervX.Y.Zpublishes both
- The publish workflow derives package versions from the tag and rewrites package metadata during CI.
Quick Commands
git status --short
git diff --stat
ruff check .
python3 -m pytest -q
cd frontend && npm run build
make server
make frontendPre-Commit Hooks
Install hooks with pre-commit install after setting up the dev environment.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

