docs: give docs/design/ its own AGENTS.md - #389
Merged
Conversation
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>
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Documentation only. Splits the rules-documentation conventions out of
root
AGENTS.mdinto a nesteddocs/design/AGENTS.md.Why, and the sorting rule
Root
AGENTS.mdis loaded into every session at ~28,300 tokensregardless of what that session is doing;
docs/design/is read ondemand. 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.mdwhen a session reads or editsanything 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.
What moved
Fires only when working on these documents:
What stayed, and why that's the interesting half
Six conventions stay in root because their trigger is elsewhere:
rules.md, and stillbelongs in root, because the session that needs it is editing Python
and would never load a file under
docs/design/. Sorting by subjectwould have moved it and quietly broken the rule that keeps docs and
code in step.
(it names root
AGENTS.mditself), 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
multiset against the original leaves zero words missing.
uv run --frozen pytest— 3459 passed, 20 skipped, 11 xfailed.you to read the file directly if your tool doesn't do nested
discovery —
AGENTS.mdis a cross-tool convention and only ClaudeCode's recursive loading is confirmed here.
docs/design/AGENTS.mdis now itself subject to the nine axes itcontains.
🤖 Generated with Claude Code