Skip to content

S0308-submodule-agent-doc-budgets: split CLAUDE.md into documentation/ - #49

Open
NSchatz wants to merge 2 commits into
mainfrom
sdd/S0308-submodule-agent-doc-budgets-transform
Open

NSchatz wants to merge 2 commits into
mainfrom
sdd/S0308-submodule-agent-doc-budgets-transform

Conversation

@NSchatz

@NSchatz NSchatz commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Spec: pipeline/active/S0308-submodule-agent-doc-budgets/children/transform.md in the umbrella
repository (parent spec pipeline/active/S0308-submodule-agent-doc-budgets/spec.md).

What this is

CLAUDE.md measured 24516 bytes against the fleet ceiling of 16200 for a submodule agent
doc, and 316 lines against the 300-line agent-doc shape rule the estate drift manifest
declares. This change brings it back under both by splitting it, never by deleting from it.

Five whole sections move into documentation/, byte for byte, each under the heading it already
had:

section new file
## Status documentation/status.md
## Tech Stack (the shared @cosyte/* standard) documentation/tech-stack.md
### The attw gate documentation/guardrail-attw.md
### The PHI scanner documentation/guardrail-phi-scanner.md
### The agent-instruction contract gate documentation/guardrail-agent-notes-gate.md

Every heading stays in CLAUDE.md above a short pointer at the file its body left for. Nothing is
deleted, nothing is retitled, and no mapping, parser, fixture or published file is touched.

CLAUDE.md is now 11816 bytes over 174 lines.

Why the pointers carry anchors

scripts/check-agent-notes.ts rule R5 refuses a ## section of documentation/agent-notes.md
that nothing in CLAUDE.md points at. Three archive anchors travelled with ## Status and one
each with the three guardrail subsections, so each pointer restates the anchors that left with its
section. The gate is green.

Evidence

  • pnpm check:agent-notes green (3 files opened, reconciled against 188 tracked).
  • pnpm check:no-emdash green (185 tracked files, 188 filenames).
  • pnpm check:no-internal-refs green (documentation/ is out of that gate's scan surface by its
    own stated boundary; the moved text carries decision-record citations that belong on the inside).
  • pnpm format:check, pnpm typecheck, pnpm lint green.
  • pnpm test green (952 tests). Two conformance cases time out intermittently under full-suite
    parallelism in the sandbox and pass on their own; they read no markdown.
  • A mechanical check confirmed every line of the previous CLAUDE.md is still present byte for
    byte, either in the reduced file or in exactly one of the new files, and that each moved block is
    an unbroken run under its original heading.
  • pnpm pack --dry-run lists the same tarball contents as before (dist, README.md, LICENSE,
    CHANGELOG.md, package.json): nothing under documentation/ is published, and
    scripts/build-docs-artifacts.sh builds from docs-content/, src/, package.json and
    tsconfig.json only.

CLAUDE.md measured 24516 bytes against the 16200-byte ceiling for a submodule agent doc, and 316 lines against the 300-line agent-doc shape rule the estate drift manifest declares. Five whole sections move into documentation/, byte for byte, each under the heading it already had: Status to documentation/status.md, Tech Stack to documentation/tech-stack.md, the attw gate to documentation/guardrail-attw.md, the PHI scanner to documentation/guardrail-phi-scanner.md, and the agent-instruction contract gate to documentation/guardrail-agent-notes-gate.md.

Every heading stays in CLAUDE.md above a pointer at the file its body left for, so nothing is deleted and nothing is retitled. The pointers also keep every documentation/agent-notes.md anchor that travelled with a moved section, so the agent-instruction contract gate still finds a pointer at each archive section. CLAUDE.md is now 11816 bytes over 174 lines. No mapping, parser, fixture or published file is touched.

Evidence: pnpm check:agent-notes, check:no-emdash, check:no-internal-refs, format:check, typecheck, lint and vitest are green, and every line of the previous CLAUDE.md is still present byte for byte either in the reduced file or in exactly one of the new files.
… relocation preambles

Each new file opened with the section name wrapped in backticks that the name already carried, so the attw and Tech Stack headings rendered a broken code span. The relocated bodies are untouched.
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