Skip to content

CLAUDE.md is a router, not a manual: 22.9 KB to 8.3 KB - #725

Open
lmoresi wants to merge 1 commit into
docs/audit-2026-09from
docs/claude-md-trim
Open

CLAUDE.md is a router, not a manual: 22.9 KB to 8.3 KB#725
lmoresi wants to merge 1 commit into
docs/audit-2026-09from
docs/claude-md-trim

Conversation

@lmoresi

@lmoresi lmoresi commented Sep 10, 2026

Copy link
Copy Markdown
Member

Stacked on #723 — it references scripts/check_test_coverage.py, which lands
there. Retarget to development once #723 merges.

Why

Every session loads CLAUDE.md verbatim before it loads anything else. It had
grown to 22.9 KB — more than twice the Style Charter it defers to. That is the
wrong way round: the file whose job is to point at the governing documents had
become the bulkiest thing in the context, competing for attention with the rules
it exists to route to.

This came out of the 2026-09 audit, which started from the observation that
adversarial review of the advection/particle PRs was turning up Charter
violations that nobody had been reminded of.

What was actually in there

Mostly duplication of documents that already govern their topic.

guides/branching-strategy.md already carries the branch roles, the
API-versus-implementation discipline, the worktree lifecycle, the branch policy,
and a section addressed to AI assistants. CLAUDE.md restated 4.3 KB of it. The
"On-Demand Documentation References" section restated the authority map in
docs/developer/index.md. Both are now one pointer each.

The build constraints move to guides/development-setup.md — which was a stub
that still told developers to run pixi run underworld-build, a command the
tooling replaced with ./uw build. It now carries the rebuild rule, the
editable-install prohibition with its recovery recipe, the PETSc
non-relocatability warning, and how worktree environments work. CLAUDE.md keeps
those four as one line each, because they are the ones that cost an hour when
broken.

What stayed

What a session needs before it knows where to look: the Charter mandate,
session bootstrap and the external planning protocol, the hard constraints,
where files go, the rulings that are non-obvious and easy to get wrong (rotated
free-slip over Nitsche, the data-access contract, unwrap-before-atoms, the
ambiguous model), solver-stability, the test markers, and the pointer to the
authority map.

Nothing normative was dropped — checked rule by rule against the previous
version — and every path the file names was verified to resolve.

Underworld development team with AI support from Claude Code

Every session loads this file verbatim before it loads anything else, and it had
grown to more than twice the size of the Style Charter it defers to. That is the
wrong way round: the file whose job is to point at the governing documents was
the bulkiest thing in the context, and the 2026-09 audit found it competing for
attention with the rules it exists to route to.

Most of the bulk was duplication of documents that already govern their topic.
`docs/developer/guides/branching-strategy.md` already carries the branch roles,
the API-versus-implementation discipline, the worktree lifecycle, the branch
policy and a section addressed to AI assistants; CLAUDE.md restated 4.3 KB of it.
The on-demand documentation list restated the authority map in
`docs/developer/index.md`. Both are now one pointer each.

The build constraints move to `guides/development-setup.md`, which was a stub
that still told developers to run `pixi run underworld-build` — a command the
tooling replaced with `./uw build`. It now carries the rebuild rule, the
editable-install prohibition and its recovery recipe, the PETSc
non-relocatability warning, and how worktree environments work. CLAUDE.md keeps
the four hard rules as one line each.

Nothing normative was dropped. What remains is what a session needs before it
knows where to look: the Charter mandate, session bootstrap and the external
planning protocol, the hard constraints, where files go, the rulings that are
non-obvious and easy to get wrong (rotated free-slip over Nitsche, the data
access contract, unwrap-before-atoms, the ambiguous `model`), the test
markers, and the pointer to the authority map.

Every path this file names was checked to resolve.

Underworld development team with AI support from Claude Code
@lmoresi
lmoresi force-pushed the docs/claude-md-trim branch from 6db41b3 to 2118b12 Compare September 11, 2026 18:13
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