@@ -30,6 +30,12 @@ freestyle.sh remote execution), see [`../CLAUDE.md`](../CLAUDE.md).
3030 from the root ` CLAUDE.md ` . Allowlist with the same shrink-wrap/consent semantics as file-length. See § Docs reachable.
3131- ** ` docs-reachable-allowlist.json ` ** : Allowlist for docs-reachable: ` { "files": { "path": reason } } ` of docs
3232 intentionally unreachable. Goal is empty. Shrink-wraps gone/now-reachable entries; adding one needs David's OK.
33+ - ** ` claude-md-details-sibling.go ` ** : Errors (not warn-only) when any non-root ` CLAUDE.md ` lacks a sibling ` DETAILS.md `
34+ in its directory or doesn't reference a ` DETAILS.md ` . Mandates the C/D pair so the "should this area have a
35+ ` DETAILS.md ` ?" decision never recurs. No allowlist. See § CLAUDE.md / DETAILS.md sibling.
36+ - ** ` resident-doc-budget.go ` ** : Warn-only metric capping the unconditionally-resident agent-doc bundle (the repo-root
37+ ` CLAUDE.md ` , its transitive ` @ ` -imports, and ` .claude/rules/*.md ` ). The cap is a hardcoded constant that ratchets down
38+ only. See § Resident doc budget.
3339- ** ` e2e-durations.go ` ** : E2E test duration flagger (warn-only): parses the Playwright JSON reports after each E2E run
3440 and flags tests over the 2 s budget. Embedded in both E2E checks, not a registry check. See § E2E test duration
3541 flagger.
@@ -239,6 +245,32 @@ connect docs rather than exempt them. Shrink-wrap drops entries whose file is go
239245keeping one needs David's OK (` .claude/rules/file-length-allowlist.md ` ). To inspect the whole tree and spot
240246deeply-nested or orphaned docs visually, run ` pnpm check --docs-graph ` .
241247
248+ ## CLAUDE.md / DETAILS.md sibling
249+
250+ ` claude-md-details-sibling ` (` IsFast ` , an ** error** like ` docs-reachable ` : the C/D pair is structural) enforces that
251+ every non-root ` CLAUDE.md ` both has a sibling ` DETAILS.md ` in its directory and references a ` DETAILS.md ` (a Markdown
252+ link or a backtick path, syntax-agnostic like ` docs-reachable ` ). This makes the "should this area have a ` DETAILS.md ` ?"
253+ decision a one-time yes so it never recurs per area: the pull tier always exists, and the push-tier doc acknowledges it.
254+ The repo-root ` CLAUDE.md ` is exempt: it's the ` @ ` -import manifest (its only content is the ` @ ` -imports), not an area
255+ doc, and has no area ` DETAILS.md ` . The reference check accepts a link to any ` DETAILS.md ` , not strictly the sibling: the
256+ sibling-exists half is the structural guarantee, the reference half only confirms the author knows the pull tier exists.
257+ No allowlist: a missing ` DETAILS.md ` is always fixable by creating the file (the depth lives somewhere, so write it
258+ down), so there's nothing to exempt. Reuses ` findClaudeMdFiles ` (the same walk as ` claude-md-length ` and
259+ ` claude-md-reminder ` ).
260+
261+ ## Resident doc budget
262+
263+ ` resident-doc-budget ` (warn-only, ` IsFast ` ) caps the unconditionally-resident agent-doc bundle: the repo-root
264+ ` CLAUDE.md ` , every file it transitively ` @ ` -imports, and every project rule in ` .claude/rules/*.md ` . Unlike a colocated
265+ ` CLAUDE.md ` (resident only in sessions that touch its directory), this bundle loads in ** every** session, worktree, and
266+ subagent, so each word is paid on every turn of every session. The check sums word counts (via ` countWords ` , matching
267+ ` wc -w ` ) and warns when the total exceeds ` residentDocBudgetWords ` , a hardcoded constant seeded at the measured total at
268+ creation time. The cap must only ever ratchet ** down** as the docs are trimmed, never up; raising it needs explicit user
269+ consent (same discipline as the allowlists). ` @ ` -imports are resolved against the filesystem (relative to the importing
270+ file's dir first, then the repo root), which naturally drops ` @ ` -prefixed non-imports that share the syntax: npm package
271+ names (` @iconify-json/lucide ` ), JSDoc tags (` @param ` ), and emails (` @example.com ` ). No allowlist file: a single constant
272+ is the whole contract, and the fix for over-budget is to trim a doc, not to bump the number.
273+
242274## E2E test duration flagger
243275
244276The E2E suites were hard-won down to under 2 s per test; ` e2e-durations.go ` defends that. After a successful E2E run,
@@ -307,16 +339,16 @@ RUSTSEC ignores — that's a quarterly task in `docs/maintenance.md`.
307339
308340## Apps and check counts
309341
310- | App | Tech | Checks |
311- | ---------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
312- | Desktop | Rust | rustfmt, clippy, cargo-audit, cargo-deny, cargo-machete, cargo-udeps (CI-only), jscpd, log-error-macro, error-string-match, lock-poison, bindings-fresh, ipc-enum-camelcase, tests, integration-tests (Docker SMB), tests-linux (slow) |
313- | Desktop | Svelte | prettier, eslint, svelte-kit-sync, eslint-typecheck-svelte, eslint-typecheck-typescript, stylelint, css-unused, a11y-contrast, btn-restyle, bare-poll, svelte-check, import-cycles, knip, type-drift, tests, e2e-linux-typecheck, e2e-linux (slow), e2e-playwright (slow) |
314- | Website | Astro | prettier, eslint, typecheck, build, html-validate, bundle-size (warn-only), e2e |
315- | Website | Docker | docker-build |
316- | API server | TS | oxfmt, eslint, typecheck, tests |
317- | Scripts | Go | gofmt, go-vet, staticcheck, ineffassign, misspell, gocyclo, nilaway, deadcode, go-tests, govulncheck |
318- | Other | Metrics | file-length (warn-only), CLAUDE.md-reminder (warn-only), claude-md-length (warn-only), docs-reachable (errors when a CLAUDE.md/DETAILS.md/docs file isn't reachable from the root CLAUDE.md), docs-no-two-col-tables (errors on any 2-column table in agent-facing docs), changelog-commit-links, workflows-rustup (forbids ` rustup target/component add ` in workflows), ci-coverage (registry-to-workflows contract) |
319- | Other | Security | workflows-hardening (SHA-pinning, no ` pull_request_target ` , job-scoped ` id-token: write ` ) |
342+ | App | Tech | Checks |
343+ | ---------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
344+ | Desktop | Rust | rustfmt, clippy, cargo-audit, cargo-deny, cargo-machete, cargo-udeps (CI-only), jscpd, log-error-macro, error-string-match, lock-poison, bindings-fresh, ipc-enum-camelcase, tests, integration-tests (Docker SMB), tests-linux (slow) |
345+ | Desktop | Svelte | prettier, eslint, svelte-kit-sync, eslint-typecheck-svelte, eslint-typecheck-typescript, stylelint, css-unused, a11y-contrast, btn-restyle, bare-poll, svelte-check, import-cycles, knip, type-drift, tests, e2e-linux-typecheck, e2e-linux (slow), e2e-playwright (slow) |
346+ | Website | Astro | prettier, eslint, typecheck, build, html-validate, bundle-size (warn-only), e2e |
347+ | Website | Docker | docker-build |
348+ | API server | TS | oxfmt, eslint, typecheck, tests |
349+ | Scripts | Go | gofmt, go-vet, staticcheck, ineffassign, misspell, gocyclo, nilaway, deadcode, go-tests, govulncheck |
350+ | Other | Metrics | file-length (warn-only), CLAUDE.md-reminder (warn-only), claude-md-length (warn-only), resident-doc-budget (warn-only; caps the always-resident root-CLAUDE.md + @-imports + rules bundle), docs-reachable (errors when a CLAUDE.md/DETAILS.md/docs file isn't reachable from the root CLAUDE.md), claude-md-details-sibling (errors when a non-root CLAUDE.md lacks/doesn't reference a sibling DETAILS .md), docs-no-two-col-tables (errors on any 2-column table in agent-facing docs), changelog-commit-links, workflows-rustup (forbids ` rustup target/component add ` in workflows), ci-coverage (registry-to-workflows contract) |
351+ | Other | Security | workflows-hardening (SHA-pinning, no ` pull_request_target ` , job-scoped ` id-token: write ` ) |
320352
321353## Key decisions
322354
0 commit comments