Skip to content

docs: give docs/design/ its own AGENTS.md - #389

Merged
derek73 merged 1 commit into
masterfrom
docs/nested-design-agents
Aug 17, 2026
Merged

docs: give docs/design/ its own AGENTS.md#389
derek73 merged 1 commit into
masterfrom
docs/nested-design-agents

Conversation

@derek73

@derek73 derek73 commented Aug 17, 2026

Copy link
Copy Markdown
Owner

Documentation only. Splits the rules-documentation conventions out of
root AGENTS.md into a nested docs/design/AGENTS.md.

Why, and the sorting rule

Root AGENTS.md is loaded into every session at ~28,300 tokens
regardless of what that session is doing; docs/design/ is read on
demand. So the question for each convention isn't where it belongs
topically — it's whether a session that never touches that area
still needs it
.

Claude Code loads a nested AGENTS.md when a session reads or edits
anything in that subtree, so the moved conventions arrive exactly when
relevant and cost nothing otherwise. That also closes a gap a plain
doc plus a "see also" would leave: the review axes only work if
someone remembers to look, and the thing that lost §5 for a month was
exactly a pointer nobody followed.

root AGENTS.md          105,755 → 97,416 chars   (~2,254 tokens/session)
docs/design/AGENTS.md             8,274 chars

What moved

Fires only when working on these documents:

  • Landing a design (the spec-residue distillation checklist)
  • A count in a dated entry is evidence, not a live fact
  • Primary-source review
  • Reviewing a docs/design change: the nine axes

What stayed, and why that's the interesting half

Six conventions stay in root because their trigger is elsewhere:

  • Same-PR amendment rule — entirely about rules.md, and still
    belongs in root, because the session that needs it is editing Python
    and would never load a file under docs/design/. Sorting by subject
    would have moved it and quietly broken the rule that keeps docs and
    code in step.
  • Counting claims — prose anywhere: tests, release notes, comments.
  • Release-log claims, backlog triage, markdown line width
    (it names root AGENTS.md itself), guard-test negative controls.

Over half the section by weight had to stay, which is why the saving
is 2,254 tokens rather than the 3,500 the section's size suggested.

Verification

  • Lossless: concatenating the two files and comparing the word
    multiset against the original leaves zero words missing.
  • uv run --frozen pytest — 3459 passed, 20 skipped, 11 xfailed.
  • The pointer left in root is imperative, not "see also", and tells
    you to read the file directly if your tool doesn't do nested
    discovery — AGENTS.md is a cross-tool convention and only Claude
    Code's recursive loading is confirmed here.

docs/design/AGENTS.md is now itself subject to the nine axes it
contains.

🤖 Generated with Claude Code

Root AGENTS.md is loaded into every session at ~28,300 tokens
regardless of what the session is doing; docs/design/ is read on
demand. So the sorting question for a convention is not where it
belongs topically but whether a session that never touches that area
still needs it.

Four fire only when working on these documents and move: the
landing-a-design distillation checklist, the dated-count convention,
the primary-source review rule, and the nine review axes. Claude Code
loads a nested AGENTS.md when a session reads or edits anything in
that subtree, so they arrive exactly when relevant and cost nothing
otherwise -- which also closes the gap a plain doc plus a "see also"
would leave, since the axes only work if someone remembers them.

  root AGENTS.md   105,755 -> 97,416 chars  (~2,254 tokens per session)
  docs/design/AGENTS.md       8,274 chars

Six stay, and the reason is the point: their trigger is elsewhere.
The same-PR amendment rule is entirely ABOUT rules.md and still
belongs in root, because the session that needs it is editing Python
and would never load a file under docs/design/. Sorting by subject
would have moved it and quietly broken the rule that keeps docs and
code in step. Likewise prose counting claims, release-log claims,
backlog triage, the markdown line width (it names root AGENTS.md
itself), and guard-test negative controls.

Verified lossless: concatenating the two files and comparing the word
multiset against the original leaves nothing missing. The pointer left
in root is imperative rather than "see also", and says to read the
file directly if your tool does not do nested discovery -- AGENTS.md
is a cross-tool convention and only Claude Code's recursive loading is
confirmed here.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@derek73 derek73 added the docs Documentation fixes and updates label Aug 17, 2026
@derek73 derek73 self-assigned this Aug 17, 2026
@codecov

codecov Bot commented Aug 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.51%. Comparing base (5351289) to head (b03ec4c).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #389   +/-   ##
=======================================
  Coverage   98.51%   98.51%           
=======================================
  Files          44       44           
  Lines        2895     2895           
=======================================
  Hits         2852     2852           
  Misses         43       43           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@derek73
derek73 merged commit 7e8c8f5 into master Aug 17, 2026
11 checks passed
@derek73
derek73 deleted the docs/nested-design-agents branch August 17, 2026 04:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation fixes and updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant