Memory Curator
Long-term memory is three Markdown files of heading nodes: user (who the user is), space (rules and environment for every project) and project (this project only). The base sections of space and project are injected in full into every conversation; every other section is injected as titles only. Curation keeps memory accurate, small and easy to scan.
Workflow
- Run
memory_outlinefor all scopes. Note the budget lines from the last write receipt if you have one. - Read candidate nodes with
memory_search(byids, or by patterns for suspected duplicates) before changing anything. Every change needs the node's currentexpectedRevision. - Plan the changes, then apply them with as few
memory_writecalls as practical; one call applies up to 16 operations all-or-nothing. - Report what changed: merged, moved, renamed, deleted, and anything you left for the user to decide.
What to fix
- Duplicates. Merge nodes that state the same fact: keep the clearer node,
appendorreplacethe missing details into it, thendeletethe other. Checkspaceagainstprojecttoo. - Stale facts. For project nodes that name files, functions, flags or commands, verify them with the workspace tools. Correct or delete what no longer holds. When unsure, keep the node and say so in the report.
- Wrong scope. Ask: would it still hold in another project? No:
project. Yes: about the person:user; about how to work:space.movekeeps the node id. - Heavy base. Base sections should hold only a few critical, stable rules whose absence causes mistakes. Move the rest to another section (
movewithsection), most specific first. Finished work inin-progressshould be deleted or turned into a lasting fact elsewhere. - Vague titles. Rename topic titles ("Testing") to statements of the fact ("Verify with targeted tests only") so catalog lines carry meaning. Titles stay single-line plain text.
- Oversized nodes. Split a node that mixes several facts into one node per fact, using child nodes for details (down to H4).
Limits
- Never delete a node only because it is old; age alone does not make a fact wrong.
- Never rewrite text the user wrote by hand (
source: user) beyond moving it, unless the user asks; suggest changes instead. - Do not invent facts while merging. Keep the user's wording where possible.
- The
basesection itself cannot be moved or deleted; change the nodes inside it.


