Docs: CLAUDE.md is 4,000 lines; split the architecture narrative into docs/architecture/ #256

Closed
opened 2026-09-25 12:25:37 +00:00 by yonlu · 2 comments
Owner

CLAUDE.md is 4,046 lines / ~39k words, and it is loaded into every agent session in full (and AGENTS.md is a symlink to it). The Architecture section alone is ~3,300 lines of per-feature "why" narrative. Most of it is relevant only when touching that one area, but every session pays for all of it, and the rules that apply to every change (tracker workflow, commit grammar, codegen, test tiers) are buried.

Direction

  • Move the per-area "why" sections verbatim into docs/architecture/<area>.md (lifecycle, database, explore catalog, frontend shell/navigation, menus/touch/a11y, layout/responsive, events/performance, CI/release/packaging). Nothing is deleted; the arguments survive where someone working in that area will look.
  • Rewrite CLAUDE.md as a short entry point: project, tracker rules, commands, test tiers, package map, the cross-cutting rules as terse bullets, and a pointer per topic into docs/architecture/.
  • Extend scripts/skill-check.sh to scan docs/architecture/*.md, so moved make-target mentions stay checked.
  • Update in-code references that cite a CLAUDE.md section by name (main.go, e2e/specs/phone-search.spec.ts, progress-line.test.ts, check-css-literals.mjs) to the new location.
CLAUDE.md is 4,046 lines / ~39k words, and it is loaded into every agent session in full (and AGENTS.md is a symlink to it). The Architecture section alone is ~3,300 lines of per-feature "why" narrative. Most of it is relevant only when touching that one area, but every session pays for all of it, and the rules that apply to *every* change (tracker workflow, commit grammar, codegen, test tiers) are buried. ## Direction - Move the per-area "why" sections **verbatim** into `docs/architecture/<area>.md` (lifecycle, database, explore catalog, frontend shell/navigation, menus/touch/a11y, layout/responsive, events/performance, CI/release/packaging). Nothing is deleted; the arguments survive where someone working in that area will look. - Rewrite CLAUDE.md as a short entry point: project, tracker rules, commands, test tiers, package map, the cross-cutting rules as terse bullets, and a pointer per topic into `docs/architecture/`. - Extend `scripts/skill-check.sh` to scan `docs/architecture/*.md`, so moved make-target mentions stay checked. - Update in-code references that cite a CLAUDE.md section by name (`main.go`, `e2e/specs/phone-search.spec.ts`, `progress-line.test.ts`, `check-css-literals.mjs`) to the new location.
yonlu added the Kind/Documentation
Priority
Medium
3
labels 2026-09-25 12:25:37 +00:00
yonlu self-assigned this 2026-09-25 12:25:41 +00:00
yonlu added the
Status
In Progress
label 2026-09-25 12:25:41 +00:00
Author
Owner

Starting work on this on docs/256-claude-md-split.

Starting work on this on `docs/256-claude-md-split`.
Author
Owner

Approach changed after triage: the per-component sections were already duplicated as comments at the code (every issue number they cite also appears in a code comment), so they are deleted rather than moved to docs/architecture/. CLAUDE.md is rewritten as ~370 lines of broad engineering rules; the three declined decisions recorded nowhere else went to NOTES.md. NOTES.md staleness found along the way is #257.

Approach changed after triage: the per-component sections were already duplicated as comments at the code (every issue number they cite also appears in a code comment), so they are deleted rather than moved to docs/architecture/. CLAUDE.md is rewritten as ~370 lines of broad engineering rules; the three declined decisions recorded nowhere else went to NOTES.md. NOTES.md staleness found along the way is #257.
yonlu closed this issue 2026-09-27 01:45:21 +00:00
gitea-actions bot removed the
Status
In Progress
label 2026-09-27 01:46:18 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: yonlu/yellowjacket#256