Repository navigation
Bring AGENTS.md under the 32 KiB instruction limit so every agent sees every catalogue rule #626
Description
🤖 Generated by the Agentic Engineer (interactive Claude Code session)
Evidence
AGENTS.mdis 70,748 bytes and 751 lines, measured onmainat945434bon 2026-10-17. Codex reads an instruction file only up to 32 KiB; the monorepo enforces that limit on its ownAGENTS.mdwith.claude/scripts/agent-instructions-layout-contract.test.sh. Here the cut falls at line 403, inside#### Test jobs. A Codex session in this repository therefore never sees the feature-flag-first convention, the authentication patterns, the validation commands, or the whole Maintaining the catalogue section: the blast-radius rule, every tested invariant and the task menu.- The file has drifted from the repository. The
### Layoutblock names 8 workflows as belonging to this repository;.github/workflows/holds 15 of them. The### Validation Commandsheading is followed by paragraphs about to-do forwarding, verified publication and recovery before the commands themselves appear. - Many paragraphs narrate delivery history: issue numbers, "proven live" dates, superseded behaviour. The portfolio's documentation rule is to describe present behaviour and its rationale, not the journey.
- The root
README.mdis 103 KB. It is the catalogue's only consumer-facing reference.
Audience and problem
Every agent and contributor who changes the shared catalogue reads this file first. The blast radius is every consumer repository. Rules an agent cannot see, or rules it cannot find among history, are rules it will break. Among those already invisible to Codex: keep the vulnerability-scan allowlist guard, never move a write credential into a fixer lane, and prefer additive, backward-compatible changes.
Hypothesis
A core AGENTS.md under 32 KiB, holding the repository's rules, with each workflow's detailed invariants moved beside the code they govern, lets every agent see every rule. It also makes the next change cheaper to review. Candidate homes for that detail are a per-workflow section in docs/ or the workflow's README section.
Success signal
AGENTS.md is at most 32,768 bytes and a test keeps it there. No rule is lost: each invariant paragraph removed from AGENTS.md exists verbatim or as a stricter statement in the file it moved to, checked by a one-time inventory recorded in the pull request. Measured at merge.
Direction
- Inventory every rule-bearing paragraph and classify it: a repository rule (stays), a workflow-specific invariant (moves beside its workflow, with a one-line pointer), or history (removed, because the issue or PR is its record).
- Fix the drift found while classifying: the Layout list and the Validation Commands section.
- Add a size guard to required CI in the same style as the monorepo's layout contract test.
Acceptance criteria
-
AGENTS.mdis at most 32 KiB, and required CI fails above that. - The rule inventory is attached to the pull request and shows each paragraph's new home.
-
### Layoutmatches the files in.github/workflows/, and### Validation Commandsholds only commands. - Moved content keeps its tests' references valid;
lint-readme-parityand the README parity check stay green.
Priority rationale: every change to the catalogue depends on this file. More than half of its rules are invisible to one of the two engineering lanes today. Effort: medium, mostly careful editing, with very little CI cost. Prerequisites: none.
Rough size: M.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Effort
Projects
- StatusShow more project fields✅ Done
Activity
devantler commentedon Oct 17, 2026
Refined for implementation: High priority, Medium effort. At current main, the 70,748-byte root exceeds the instruction read budget and hides catalogue safety rules. The source and inbound-link inventory supports an additive, rule-preserving split into ordinary linked topic guides. Root anchors for maintenance, conventions and test jobs will remain available. Every rule-bearing paragraph will be accounted for against the exact base; history cleanup is deliberately excluded from the first mechanical move to avoid changing rules during relocation.
The required size and guide-target guard will run in the existing always-on documentation gate, without allocating another runner. Its controls must reject oversized roots, missing guide pointers/targets and incomplete workflow layout documentation. The existing validation commands, credential guards and selector/reducer gates remain mandatory. The maintainer waived WIP limits for this round; no competing claim, matching branch or PR was found at admission.
chore: agent-claim #626 nonce=ea5e60fd014d658ab644d1f29b0d87d6
chore: agent-claim #626 nonce=93a73d94ec8597559d8fba36cfa7f568
devantler commentedon Oct 17, 2026
Delivered in #632 at squash merge
a0a678be70458d8325789a7e6a8b9ea2407f5e0d. Its tree55b77429106d56aad518017e7bd48503056245eeexactly matches the reviewed head and native CI merge candidate. The ordinary protected merge preserved the evaluated source head4de8d877a833851f4972542857e32feb00d456ab.Full hosted CI passed, Codex completed its authenticated current-head review with no findings, and complete review/thread/conversation reads were clear. Post-merge verification extracted the exact merged source and again passed the real layout checker and all 20 negative controls. The root remains 23,873 bytes, with the retained anchors and four discoverable guides; all 113 original paragraphs are accounted for in the preservation inventory above.
The release workflow then succeeded at the merge commit and published v7.12.5. The published, non-prerelease tag resolves directly to that commit. #626 acceptance is complete; both clean implementation worktrees from this round have been removed. Automatic compliance by every agent runtime is not claimed by the structural guard.