memory-capturelisted
Install: claude install-skill NITISH-R-G/agent-memory-protocol
# Memory Capture
**The core discipline this exists to prevent**: a memory system that only writes at a clean session end doesn't survive an unclean one — and per [ARCHITECTURE.md](../../ARCHITECTURE.md)'s honest framing, there is no way to guarantee a graceful final write when a session ends abruptly. The only real answer is writing *continuously*, so the gap between "last written state" and "actual current state" stays small regardless of when the session ends.
## What counts as capture-worthy
Not everything — capturing every tool call would flood memory with noise. Capture-worthy events, roughly matched to where they land in `.memory/`:
- **A decision was made** — an architectural choice, a tradeoff accepted, an approach rejected and why → `decisions/` (see `decision-log` for the specific format)
- **A task's state changed** — started, blocked, completed, scope changed → the relevant file in `tasks/`
- **Something was learned the hard way** — a bug's actual root cause, an approach that didn't work and why → append to the current session's file in `episodes/`
- **A durable fact was established** — a convention adopted, a constraint discovered, a preference stated by the user → `semantic/project-facts.md` or `semantic/preferences.md`
## The discipline: write it when it happens, not when you remember to
The failure mode isn't forgetting *that* something should be written — it's deferring the write until "later" (end of session, when things calm down) and then losing it t