| name | memory-prune |
| description | Prune this project's memory files: route each worth-keeping fact to its durable home — a comment, CLAUDE.md tier, rule, ARCHITECTURE.md, command, or skill — then dispose of the source memory. TRIGGER when: user says 'prune my memories', 'clean up memory', 'what memories should be promoted', 'review my memory dir'. SKIP when: routing one already-extracted fact (place-fact), or auditing a single instruction file or CLAUDE.md (refine-file). |
Memory Prune
Primitive: WORTH + PLACE + SHAPE over this project's memory dir, plus source disposition.
Input
- Memory dir.
~/.claude/projects/<slug>/memory/, where <slug> is the absolute cwd with every non-alphanumeric character replaced by -. Resolve with ls ~/.claude/projects/ | grep -Fx -- "$(pwd | sed 's|[^a-zA-Z0-9]|-|g')". On zero or multiple matches, print the candidates and ask the user to pick.
- Memory files. Every
*.md in that dir except MEMORY.md (the index). If none, stop.
Protocol
Step 0 — Load lenses
Invoke the Skill tool to load vet-fact (WORTH — promote, keep-as-memory, or cut), place-fact (PLACE — which durable home), and tighten-instruction (SHAPE — how the promoted line reads). The trio judges each memory in Step 2 and shapes each promoted line in Step 4 — don't restate their criteria here.
Step 1 — Read
Read each memory's frontmatter (incl. metadata.type: user / feedback / project / reference) and body.
Step 2 — Judge each memory
Run every memory through the lenses in WORTH → PLACE → SHAPE order, then set the source's disposition.
- WORTH (
vet-fact). Interpret its keep/cut verdict in the memory context: