debug-memory

Solid

Reproduce observational-memory bugs (reflection, recall, observer, freshness, eviction) by dumping the live `~/.duet/memory.db` into a fixture and driving an eval against it. Use whenever the agent's memory misbehaves — wrong observations, bad reflections, missing recall, runaway tokens — or whenever the user asks to debug, repro, audit, or tune memory.

Code & Development 41 stars 4 forks Updated 2 days ago Apache-2.0

Install

View on GitHub

Quality Score: 87/100

Stars 20%
54
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Debug Memory The standard operating procedure when memory misbehaves is: dump the live store, narrow to the smallest reproducing slice, seed it into a `MemorySession` fixture, write the failing eval, then iterate on the prompt or code until it goes green. Never tune against the user's running database — every dump is a fixture. ## 1. Dump the live store `scripts/dump-memory.ts` reads any PGlite memory store and writes JSON. Default source is `~/.duet/memory.db`, default destination is stdout. ```bash # Everything bun run scripts/dump-memory.ts --pretty --stats --out /tmp/memory.json # Only raw observations from the last 7 days bun run scripts/dump-memory.ts --kind observation --since 7d --pretty \ --out evals/fixtures/global-reflect/recent-pool.json --stats # Only reflection rows (to inspect what global prune produced) bun run scripts/dump-memory.ts --kind reflection --pretty --stats # A specific session's tail bun run scripts/dump-memory.ts --session <session_id> --limit 50 --pretty # High-priority cross-session reflections older than 30 days bun run scripts/dump-memory.ts --kind reflection --priority high --until 30d --pretty ``` Filters compose with AND. Repeat `--session`, `--priority`, and `--tag` for OR-within / AND-across semantics. `--limit` keeps the newest N rows. ## 2. Place the dump as a fixture - Eval fixtures live under `evals/fixtures/`. The global-reflect set is the model: `recent-pool.json` (raw dump) + `recent-pool.ts` (typed `SeedObservation[...

Details

Author
dzhng
Repository
dzhng/duet-agent
Created
3 months ago
Last Updated
2 days ago
Language
TypeScript
License
Apache-2.0

Similar Skills

Semantically similar based on skill content — not just same category