From 57fc6cedc79ae0dd4552473333d11719627ec651 Mon Sep 17 00:00:00 2001 From: Doga Gursoy Date: Tue, 2 Jun 2026 13:36:30 +0300 Subject: [PATCH] docs(claude-md): add Memory hygiene section with six rules curbing auto-memory drift Auto-memory grows monotonically. Without explicit rules, SUPERSEDED entries keep their index slot, terminal status leaks into descriptions, and the same concept gets saved twice (Federation BC was duplicated until 2026-06-02). Six rules cover the load-bearing gaps: pre-write dedup grep, SUPERSEDED demotion in the same edit, SHIPPED demotion after 30 days, verify-before- citing for index lines with counts/phase-tags/old-dates, durable-claim-only in the index, and split-at-300-lines for memo files. Lives in CLAUDE.md so future-Claude reads the rules every session without having to recall a meta-memory. Co-Authored-By: Claude Opus 4.7 --- CLAUDE.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CLAUDE.md b/CLAUDE.md index e27d1b325..3815361d2 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -17,6 +17,17 @@ This file is read by Claude Code (and other agents that respect `CLAUDE.md`). Ke - Default to no `#` comments. Add one only when the WHY is non-obvious. - Test names carry scenarios (`test___`); per-test docstrings stay rare. +## Memory hygiene + +Auto-memory grows monotonically without a forcing function. These rules curb drift between sessions. They apply to `~/.claude/projects/-Users-dgursoy-Documents-Github-cora/memory/`. + +- Before creating a new memo, grep MEMORY.md for the topic; prefer edit-in-place over a new file. +- When tagging a memo SUPERSEDED, move its index entry to `## Reference` in the same edit. +- After a memo's content reaches SHIPPED and the work has been on main for 30+ days, demote its index entry to `## Reference`. +- Any index description containing a count, phase tag, or date older than 7 days requires a Read of the underlying file before quoting in chat. +- Mutable phase status does not belong in index descriptions; the index carries the durable claim, the file carries the status. +- Memo files over ~300 lines: split into 2-3 sibling files linked from the first. + ## Commits One-line subject, body explains WHY. Recent commits set the tone — `git log --oneline -10`.