docs(claude-md): add Memory hygiene section#21
Merged
Conversation
…to-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 <noreply@anthropic.com>
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
## Memory hygienesection toCLAUDE.mdcodifying six rules that curb auto-memory drift:## Referenceonce the work has been on main for 30+ daysWhy
Auto-memory grew monotonically for 25 days with only one hygiene event (the 2026-05-08 reset). 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). These rules become part of the per-session prompt context, so future sessions follow them without re-deriving the policy.
Pairs with a separate session-side
/memory-auditskill and SessionStart hook (configured in~/.claude/skills/and~/.claude/settings.json) that mechanically catch drift; this PR ships the prose half.Test plan
grep "—" CLAUDE.mdshows only pre-existing lines 15 and 33)🤖 Generated with Claude Code