Skip to content

docs(claude): update memory-hygiene rules for the split index#373

Open
xmap wants to merge 1 commit into
mainfrom
chore/memory-split-hygiene
Open

docs(claude): update memory-hygiene rules for the split index#373
xmap wants to merge 1 commit into
mainfrom
chore/memory-split-hygiene

Conversation

@xmap

@xmap xmap commented Jun 25, 2026

Copy link
Copy Markdown
Owner

What

Updates the Memory hygiene section of CLAUDE.md to match the now-split auto-memory index.

Why

The auto-memory index had grown to ~112 KB while only the first ~24 KB auto-loads each session, so the entire Active shelf (the most current work) was silently dropped from context. The index is now split:

  • MEMORY.md (auto-loaded, ~17.5 KB): User + Feedback + Durable shelves only, plus pointers.
  • MEMORY_ACTIVE.md (on-demand): the in-flight work-ledger (175 threads).
  • MEMORY_REFERENCE.md (on-demand): superseded / 30d-shipped memos (70), kept for provenance.

The existing rules assumed one file ("move its index entry to ## Reference in the same edit") and would route future sessions to a section that no longer exists. The updated rules:

  • route a new pointer by shelf (durable/user/feedback -> MEMORY.md; in-flight -> MEMORY_ACTIVE.md),
  • demote SUPERSEDED / 30d-shipped from MEMORY_ACTIVE.md to MEMORY_REFERENCE.md,
  • grep all three index files before creating a memo,
  • keep MEMORY.md under ~17 KB so it never truncates on load.

Docs-only; no code paths touched. (The memory files themselves live under ~/.claude and are not part of the repo.)

🤖 Generated with Claude Code

The auto-memory index grew past the always-loaded budget (~112KB; only the
first ~24KB loads), so the Active shelf was silently dropped every session.
The index is now split: MEMORY.md (auto-loaded) carries only User + Feedback +
Durable; the work-ledger shelves moved to on-demand siblings MEMORY_ACTIVE.md
and MEMORY_REFERENCE.md.

These rules governed a single-file index ("move to ## Reference in the same
edit") and would now send future sessions to a section that no longer exists.
Update them to route by shelf: new in-flight pointers to MEMORY_ACTIVE.md,
SUPERSEDED / 30d-shipped demotions from MEMORY_ACTIVE.md to MEMORY_REFERENCE.md,
durable/user/feedback to MEMORY.md, and keep MEMORY.md under ~17KB so it never
truncates on load.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Coverage report

This PR does not seem to contain any modification to coverable code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant