Skip to content

Move the module tour out of CLAUDE.md to free up context - #393

Merged
ramesh130 merged 2 commits into
mainfrom
trim-claude-md
Oct 14, 2026
Merged

ramesh130 merged 2 commits into
mainfrom
trim-claude-md

Conversation

@ramesh130

@ramesh130 ramesh130 commented Oct 7, 2026 •

Copy link
Copy Markdown
Owner

CLAUDE.md had grown to ~168 KB (~42k tokens), all of it loaded into every agent session. This cuts it to ~18 KB without deleting anything.

What moved

  • The per-module narrative (core through moq, plus benchmark/) moves verbatim to the new docs/codebase-tour.md, one ## section per module, so an agent can grep -n '^## ' and read only the slice it needs.
  • The long ADR paragraphs under Binding rules are kept as that file's appendix.

What CLAUDE.md now carries

  • A one-line-per-module map, with a pointer to read the module's tour section before changing it.
  • The conventions that recur across modules: friends and pay-nothing, schema and format versions moving on meaning, policy behind PlaybackPolicy.
  • Binding rules: one bullet that every ADR binds, pointing at docs/adr/README.md, with short reminders of the rules most often hit.
  • Orientation, Commands, the emulator pitfalls, the non-ADR binding rules and Agent skills are unchanged.

Also

  • docs/README.md gains a row for the tour.
  • A wrapped line in the offline section began with #245 and rendered as a heading; fixed in the move.

Not done

  • PlaybackHarness.kt:1607's comment points at a CLAUDE.md warning that now lives in the tour's core section. Comment-only, left as is.
  • The tour's ADR appendix duplicates the ADRs and could be pruned later.
  • Docs only, no code changed. I haven't run check locally; CI on this PR is the gate.

🤖 Generated with Claude Code

Updated 2026-10-14: the branch is merged with main and the split redone on today's CLAUDE.md (the iOS port, superplayer-effects and the android/ layout had landed since). docs/codebase-tour.md is rebuilt from main's text in whole line ranges, so no prose was retyped; the stale "every other module is a placeholder" paragraph is dropped, as before. Spotless and the license-header check pass locally.

ramesh130 and others added 2 commits October 7, 2026 21:32
CLAUDE.md had grown to ~168 KB, every byte of it loaded into every
session. The per-module narrative — what each module holds, the
decisions inside it, the traps — moves verbatim to
docs/codebase-tour.md, one `##` section per module, and CLAUDE.md keeps
a one-line-per-module map with a pointer to read the module's section
before changing it. The long ADR paragraphs under Binding rules become
one bullet pointing at docs/adr/README.md plus short reminders of the
rules most often hit; the paragraphs themselves are kept as the tour's
appendix. Orientation, Commands, the emulator pitfalls, the non-ADR
binding rules and Agent skills are unchanged.

Also fixes a wrapped line in the offline section that began with
`#245` and so rendered as a heading.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The conflict was resolved by redoing the move rather than merging text:
docs/codebase-tour.md is rebuilt from main's CLAUDE.md in whole line
ranges (adding superplayer-effects and the android/ paths), and CLAUDE.md
keeps the slim shape with the current orientation, commands and rules.
Two comments that cited the moved prose now name the tour.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MJAhQmFgdRRAKUaMHibQLe
@ramesh130
ramesh130 merged commit 00e9bdc into main Oct 14, 2026
4 checks passed
@ramesh130
ramesh130 deleted the trim-claude-md branch October 14, 2026 05:20
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