Skip to content

docs: trim derivable content from CLAUDE.md and lazy-load release + checklist guidance - #737

Merged
johnleider merged 1 commit into
masterfrom
worktree-doctor-claude-md-trim
Jul 28, 2026
Merged

docs: trim derivable content from CLAUDE.md and lazy-load release + checklist guidance#737
johnleider merged 1 commit into
masterfrom
worktree-doctor-claude-md-trim

Conversation

@johnleider

Copy link
Copy Markdown
Member

Problem

Three memory files load into context on every turn and carry content a session can reconstruct from the codebase itself:

File Before After Scope
CLAUDE.md 9,691 ch 5,554 ch always
.claude/rules/new-feature-checklist.md 13,982 ch, always-loaded path-scoped was always, now scoped
apps/docs/CLAUDE.md 8,839 ch 5,584 ch nested (apps/docs)

new-feature-checklist.md was the only file in .claude/rules/ without paths: frontmatter, despite its own first line reading "Applies to: Adding any new component or composable to packages/0/." It loaded while answering questions, editing docs, or triaging issues.

The root CLAUDE.md was also self-contradictory: line 45 stated "The skill is the source of truth; this file does not duplicate the inventory" — directly below 33 lines duplicating exactly that inventory.

What changed

CLAUDE.md

  • Cut the #v0/utilities / #v0/types / #v0/constants/globals tables, replaced with a 3-line pointer to the barrels. The vuetify0 skill remains the inventory source of truth.
  • Cut the Apps list (ls), Requirements (engines), and Build Tooling (package.json).
  • Collapsed the script dump to the five non-guessable entries, keeping lint:fix over lint, repo:check, and metrics after a .bench.ts edit.
  • Moved the changeset content contract, the two version domains, and the beta pre-exit steps into a new releasing skill. The branch-model table stays resident — base-branch routing applies to every PR and must not depend on a skill being invoked.
  • Added new-feature-checklist.md to the Detailed Rules index now that it is scoped.

.claude/rules/new-feature-checklist.md — added paths: frontmatter covering packages/0/src/components/**, packages/0/src/composables/**, maturity.json, surface.test.ts, both READMEs, and the docs pages/examples it instructs you to create.

apps/docs/CLAUDE.md — cut the Stack list, src/ tree, Key Components table, and Virtual Modules table (all derivable; several already covered by the path-scoped .claude/rules/docs.md). Preserved the useMarkdown "only runtime markdown pipeline, never instantiate Marked in a component" rule, which was buried inside the App Composables table.

.claude/skills/releasing/SKILL.md — new, holds the migrated release content.

Not changed

No behavior, no source, no CI. Every "never do X" prohibition was kept. Path aliases and the UnoCSS theme block stayed despite being technically derivable — short, high-traffic, and cheap.

Result

~7.4k characters (~1.9k est. tokens) off always-loaded context per session, plus ~3.5k est. tokens no longer loaded outside new-feature work.

…hecklist guidance

The root CLAUDE.md, apps/docs/CLAUDE.md, and new-feature-checklist.md all
loaded into context on every turn, carrying content a session can derive
from the codebase itself.

- CLAUDE.md: drop the #v0/utilities, #v0/types, and #v0/constants inventory
  tables (the file already states the vuetify0 skill is the source of truth
  and that it does not duplicate the inventory), the Apps list, Requirements,
  Build Tooling, and the package.json script dump. Keep the non-guessable
  directives (lint:fix over lint, repo:check, metrics after a .bench.ts edit).
- CLAUDE.md: move the changeset content contract, the two version domains,
  and the beta pre-exit steps into a new 'releasing' skill. The branch-model
  table stays resident since it applies to every PR.
- apps/docs/CLAUDE.md: drop the Stack list, src/ tree, Key Components table,
  and Virtual Modules table. Preserve the useMarkdown 'only runtime markdown
  pipeline' rule, which was buried in the composables table.
- new-feature-checklist.md: add paths frontmatter so it loads when adding a
  component or composable instead of on every turn. It was the only rules
  file without scoping despite self-declaring a narrow scope.

Net: ~7.4k characters off always-loaded context.
@johnleider johnleider added this to the v1.0.x milestone Jul 28, 2026
@johnleider johnleider added the documentation Improvements or additions to documentation label Jul 28, 2026
@johnleider johnleider self-assigned this Jul 28, 2026
@johnleider
johnleider marked this pull request as ready for review July 28, 2026 18:16
@johnleider
johnleider merged commit 3c26e1c into master Jul 28, 2026
21 checks passed
@johnleider
johnleider deleted the worktree-doctor-claude-md-trim branch July 28, 2026 18:16
johnleider added a commit that referenced this pull request Jul 28, 2026
#737 lazy-loaded release guidance but kept present-tense "repo is in
pre mode" after the 1.0.0 cut (#687). Correct that, and land the rest
of the review follow-ups:

- CLAUDE.md / releasing skill: drop false pre/beta state; reframe as
  optional pre-channel re-entry; point at skill path explicitly
- CLAUDE.md: metrics is CI-only (local: test:bench); keep isThenable
  in the utilities pointer; note checklist is path-scoped
- releasing skill: add changeset / release:prepare commands
- new-feature-checklist: match sibling single-line paths frontmatter
- apps/docs/CLAUDE.md: gn-example is canonical for feature pages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant