Write, update, or sweep persistent memory. Enforces list caps, TTLs, and staleness criteria.
Persistent memory lives at $CLAUDE_MEMORY_DIR/MEMORY.md.
/celebrate (save only, no sweep)/end-session (full sweep: stale check + rule cross-reference)project_*.md files: delete if complete or superseded.| Section type | Cap |
|---|---|
| Feedback entries | 5 — older feedback should be distilled into rule changes |
| Project-state entries | 3 — stale project state belongs in git history |
| Named scripts or output files | 10 |
| Memory type | TTL | Action on expiry |
|---|---|---|
| "X needed" / "X blocked" | 14 days | File ticket or delete |
| Performance benchmarks | 60 days | Re-run or delete |
| Remote machine config | 90 days | Confirm or delete |
No TTL (stable until contradicted): workflow preferences, feedback, naming conventions, architectural decisions.
An entry is stale if: