Skip to content

docs(claude): state package roles instead of listing the tree - #375

Open
wshallwshall wants to merge 1 commit into
mainfrom
claudemd-trim
Open

docs(claude): state package roles instead of listing the tree#375
wshallwshall wants to merge 1 commit into
mainfrom
claudemd-trim

Conversation

@wshallwshall

Copy link
Copy Markdown
Collaborator

Trims the repo-layout listing in CLAUDE.md. One file, +5 -5.

Replaces the enumerated tree with a statement of package roles, dropping __main__.py,
logging_setup.py, scripts/service/, docs/ and tests/ from the listing on the grounds that their
names say what they hold.

Checked the one thing that would make this dangerous: it does NOT renumber. 13 numbered headings
before and after. Section numbers in this file are cited by 281 tracked files and nothing validates
them, so a renumbering trim would be a silent break -- this is not one.

Not armed. The authoring session offered it as optional. It removes concrete orientation from the
file that is loaded into every session's context, which is a judgement about what a newcomer needs
rather than a defect being fixed. Owner's taste, not the coordinator's.

CLAUDE.md is 608 lines against a documented 200-line target, and the entries
cut here are the only ones in section 3 that a reader could reconstruct from
the tree: `__main__.py` (the CLI entrypoint by Python convention),
`logging_setup.py`, `scripts/service/`, `tests/` ("pytest suite"), and a
`docs/` line enumerating four filenames that goes stale on every rename.

The rest of the tree stays, and the proposal to cut it wholesale is declined.
It is not a directory listing -- every remaining line states a package's ROLE,
which `ls` does not give you, and several carry the ADR that decided it.
`messagefoundry/auth/webauthn.py:7` cites "CLAUDE.md section 3" for exactly
that content ("the HTTP/cookie surface lives in api/"), and
tests/test_sds_rule_ids_are_stable.py:377 cites the trailing paragraph, so
section 3 has two live citations rather than the one a survey suggested.

Section numbers are unchanged and must stay that way: they are a namespace
roughly 500 references wide, read by gate code in scripts/seam_discovery.py
and scripts/asvs/scorecard.py, and renumbering is a migration rather than a
doc edit.

MEASURED, because the point of the change was size and it did not deliver any:
608 raw lines before and after, 528 to 526 non-blank, 44303 to 44258 bytes.
That is 0.1 percent, and five cut lines were replaced by five that say what
section 3 is for and why scripts/, docs/ and tests/ are absent -- worth having
so the enumeration does not grow back, but it is not a trim.

The honest conclusion is that CLAUDE.md's length is not fixable by cutting
derivable prose, because there is almost none: the file is long because it
carries decisions, and a decision is not derivable from the code that
implements it. Any real reduction means moving load-bearing content into
path-scoped rules under .claude/rules/, and that is blocked today -- /.claude/*
un-ignores settings.json alone, so a rules file would reach one checkout out of
sixty-five while appearing repo-wide. Measure adherence before assuming the
line count is the problem.
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