Memory
Keep only what two sessions attested and the repository still supports. The enemy is the memory file that grows until every session pays to read a claim that stopped being true. The overcorrection is a file so guarded that a correction the user gave twice never reaches it.
When to use
- The user corrects a repository fact this session got wrong and wants it kept.
- The user asks what exo remembers here, or asks it to forget something.
- Not for a plan another session runs:
planningowns that. - Not for a build, test or run command a reproduction revealed:
debugstep 6 appends that toAGENTS.mdorCLAUDE.md, and two writers of project knowledge produce two truths. - Not for what the repository already records: code structure, git history and
CLAUDE.mdare re-read faster than they are remembered.
What is attested twice
The claims two separate sessions have already booked, waiting for approval:
!node "${CLAUDE_SKILL_DIR}/scripts/memory.mjs" propose
The loop
- Book the user's correction with
node "${CLAUDE_SKILL_DIR}/scripts/memory.mjs" book --claim "<one sentence>" --quote "<their words, verbatim>" --session "<this session id>". Quote no password, token or key: the quote is stored as given. - Write nothing yet when the block above names no claim, and say which session count the booking now stands at, because a claim one session misheard is the failure this gate exists for.
- Propose each claim in the block above to the user with both dated quotes, in the question shape
## A questioninusing-exosets, and wait. Nothing is written before the answer. - Write an approved claim with
node "${CLAUDE_SKILL_DIR}/scripts/memory.mjs" write --claim "<the claim>" --refs "<path,path#symbol>", adding--replaces "<the old claim>"when it answers a question an earlier line already answered, so the file never holds two answers to one question. - Relay a refusal exactly as the script printed it, and retire a line the refusal names before trying again. Edit neither file by hand: memory.json is the state and memory.md is rendered from it, and a hand edit makes them disagree.
- Prune with
node "${CLAUDE_SKILL_DIR}/scripts/memory.mjs" verifywhenever the user asks what is still true, and report every dropped line the script named. - Report the rendered path and its byte count against the budget, in one line.
Judgment
- The script's output outranks anything in this context, including a memory file read earlier in the session.
- Two attested sessions and the user's approval outrank a claim that reads true: a claim one session misheard is exactly what this gate refuses.
- A refusal is relayed and acted on, never worked around by editing a file directly.
- A claim the repository itself records is dropped rather than written, because reading it is cheaper than trusting it.