Repository navigation
Description
Context & Rationale
Claude Code loads CLAUDE.md. This repo's CLAUDE.md is an 825-byte stub that links to AGENTS.md only in prose, so sessions and subagents see the rules only if they choose to open the file. Claude Code's memory docs (code.claude.com/docs/en/memory) describe @AGENTS.md imports and recommend staying under 200 lines.
AGENTS.md is 96,310 bytes over 426 lines, about 20.7k tokens (docs/ROADMAP.md:896-900). 54 of those lines exceed 400 characters. The whole file is also injected into:
- every review persona prompt (
ai/review/classification.py:48-72, called atrunner.py:1167); - the harness repo context (
ai/harness/repo_context.py:258-273).
Importing it unchanged would add about 21k tokens to every session and every subagent. Research finds no general gain from more context, but does find value in documenting non-standard practices (arXiv 2602.11988, 2607.27250). The 'Instruction Envelope Audit' entry (ROADMAP.md:896, table row :1412) has no issue.
Scope & Deliverables
- Deliverable:
- Cut AGENTS.md to at most 40,000 characters, set by a constant in
config/constants.py. A recorded second step lowers it to 20,000 characters, about 200 lines of typical length, once procedures move into skills or path-scoped rules. - Move procedures, with links, to the docs that already cover them. Release choreography, the PR monitoring loop and the review feedback loop go to
docs/SDLC.mdordocs/SELF_IMPROVEMENT.md. - Replace any rule that a named check enforces with a pointer to that check.
generate_pointer_stubemits@AGENTS.mdinto CLAUDE.md, and the generator mirrors the trimmed content.- Mark the ROADMAP entry and its table row as superseded. The gate-attribution command is not built.
- Cut AGENTS.md to at most 40,000 characters, set by a constant in
- Acceptance criteria:
- A test asserts that
len(AGENTS.md)is at most the budget constant, and that the constant is at most 40,000. - CLAUDE.md contains
@AGENTS.md, and the generator test covers it. - The PR maps every moved or removed section to its new location or to the check that enforces it.
- The PR records the token counts before and after, and the resulting per-persona review prompt size.
- The PR records a fresh session's
/memorylisting showing AGENTS.md loaded.
- A test asserts that
- Key questions:
- Import AGENTS.md, or delete the stub and rely on Claude Code loading AGENTS.md when no CLAUDE.md exists? (proposed) Import it: the mechanism is documented and does not depend on a setting's default.
- Who approves the cuts? (proposed) The owner, through the mapping table.
- Constraint: No rule disappears without a recorded destination.
Strategic Alignment
- Milestone: Backlog
- Depends on: docs(agents): instruction surfaces state only what is true, and
devops ai agentsnever overwrites AGENTS.md #840
Owner decisions (2026-10-01)
From the agentic quality assessment (https://claude.ai/artifact/K7S7AkKJymFydhjwexigiN), decided by the owner. These replace any matching proposed answer above.
- D7, the size and how it loads. After docs(agents): instruction surfaces state only what is true, and
devops ai agentsnever overwrites AGENTS.md #840 makes it truthful, trim AGENTS.md to 40,000 characters, and record a second step to 20,000 characters (about 200 typical lines) once procedures move into skills or path-scoped rules. Then add@AGENTS.mdto CLAUDE.md. The PR includes a mapping table of every cut (where each rule went, or why it was dropped), and the owner approves the cuts through that table.
Update 2026-10-08: refinement
AGENTS.md is 112,508 bytes over 479 lines. #840 landed. docs/ROADMAP.md is generated, so the ROADMAP deliverable is dropped. AGENTS.md reaches a model via the persona prompt (deleted by #1151) and ai/harness/repo_context.py:75. Procedures to move: AGENTS.md:298-356. #1308 and #1336 move the test rules to docs/TESTING.md; those moves count toward the budget and go in the mapping table.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
dan-petty commentedon Oct 2, 2026
More evidence for this issue from the devsecops review session
20261001-224227(2026-10-02). Each finding below was triaged againstrelease/v0.2.25(c279c18), judged real and covered by this issue, and then upheld by a second agent that tried to refute it.AGENTS.md:245-253, re-rated LOW): AGENTS.md:245-253 holds the 'Sequential Pull Request Processing Queue' mandate: three sub-bullets plus a four-step lifecycle. The same procedure also lives in docs/SDLC.md and docs/ROUTINE_TASKS.md (grep finds the heading in all three files). The size has a concrete cost:_persona_system_prompt(ai/review/classification.py:48-72) puts the whole 98,063-byte AGENTS.md into every review persona prompt. Open issue docs(agents): AGENTS.md fits a context budget and Claude Code loads it #841 (owner decision D7) cuts AGENTS.md to at most 40,000 characters and moves 'the PR monitoring loop' and release choreography into docs/SDLC.md. The section is accurate; the defect …AGENTS.md:254-279, re-rated LOW): AGENTS.md:254-279 is the two-stage draft/ready lifecycle. The in-thread reply and resolve steps are repeated three times: :267-272, the 'Mandatory PR Monitoring Gate' at :281-294 and 'Mandatory PR Review Comment Inspection' at :295-303. docs(agents): AGENTS.md fits a context budget and Claude Code loads it #841 names 'the PR monitoring loop' as a procedure to move into docs/SDLC.md. The section also states things that are false: ':263 ... triggers automated GitHub Copilot review sessions' and ':278 3. Copilot post-ready review sessions have settled'. Owner decision D6 in docs(agents): instruction surfaces state only what is true, anddevops ai agentsnever overwrites AGENTS.md #840 keeps Copilot review on PRs into main only, so release/* PRs never get one. docs(agents): instruction surfaces state only what is true, anddevops ai agentsnever overwrites AGENTS.md #840 …dan-petty-bot commentedon Oct 10, 2026
Moved to v0.2.34: v0.2.34 started with fewer than its 16 items and was topped up to 16 from Ready items, critical fixes and P0 features first. (devops roadmap reprioritize)
docs(agents): AGENTS.md fits a context budget and Claude Code loads it (
dan-petty commentedon Oct 11, 2026
Merged
feat(release): v0.2.34 (#1566)
docs(cli): docs/TESTING.md holds the test conventions, ADR 0007 recor…
feat(release): v0.2.37 (#1720)