Skip to content

Move three oversized paragraphs out of root AGENTS.md into nested AGENTS.md files - #909

Merged
derek73 merged 6 commits into
masterfrom
docs/agents-md-relocation
Oct 27, 2026
Merged

derek73 merged 6 commits into
masterfrom
docs/agents-md-relocation

Conversation

@derek73

@derek73 derek73 commented Oct 27, 2026

Copy link
Copy Markdown
Owner

Follow-up to #907. Root AGENTS.md is loaded by every session. This PR moves its three largest paragraphs to files that load only when a session works where they apply. Root goes from 25,337 to about 21,800 words. One commit per move, plus one for review fixes.

Paragraph Words Now lives in Loads when
Ambiguities are emitted at the DECISION site 1,488 nameparser/_pipeline/AGENTS.md (new) a session reads a pipeline stage
Design philosophy 1,458 root keeps the doctrine and an index pointing to each script rule; facts no doc held → decisions/W2 (2026-10-27 entry) —
Then sweep the spellings 1,326 nameparser/AGENTS.md (new) a session reads anything under nameparser/, including vocab TOML

How it was checked

  • Nothing lost: both moved passages are word-for-word apart from their lead sentences and new subheadings. A script and the design-docs reviewer both checked this.
  • New claims re-run: every parse stated in the new decisions/W2 entry and the root index bullets was re-run on this tree. The reviewer re-ran them independently.
  • Pointers retargeted:
  • The nested files actually load: reading a file under docs/ pulled in docs/AGENTS.md and docs/design/AGENTS.md, and the reviewer saw nameparser/_pipeline/AGENTS.md load on reading _assemble.py.

Review findings fixed in the last commit

  • A segment_scripts=() → frozenset() replacement had also changed Warn at construction when activated scripts can never divide #337's history line in the validation bullet, which records () as the spelling that shipped wrong. That line is restored.
  • Three stale pointers.
  • The katakana reason had been narrowed; restored.
  • Two rule citations corrected.
  • A few dropped facts recovered into decisions/W2.

Not done here: the comma sweep (879 words) and the encoding paragraph (469 words) are the other two steps of the same sweep sequence and could join nameparser/AGENTS.md next. The Perf and "Adding a word" paragraphs are also still in root.

Test plan

  • uv run pytest: 31,621 passed.
  • uv run ruff check
  • Doc tests (design_docs, doc_citations, doc_spellings, rules_doc, cases) pass after the review fixes.

🤖 Generated with Claude Code

derek73 and others added 4 commits October 27, 2026 01:09
…ne/AGENTS.md

The Ambiguities bullet had grown to 1,488 words in the root file, which
every session loads. It is guidance for work inside the pipeline stages,
so it moves, unchanged in substance and split under subheadings, into a
nested AGENTS.md that loads when a session reads a stage. Root keeps the
principle and pointers to it and to mechanisms.md's contract entry; the
two test comments quoting "Pin the decision, not the vocabulary" now
name the new file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…dex of the script rules

The paragraph had reached 1,458 words, most of it the glued-honorific
peel's comma reach (#312, #319, #613) restated from code. Root keeps the
positional, never-detect-language doctrine, the script-itself exception
and its three-way test, and lists each behavior it licenses with the rule
that states it.

The facts no rule or decisions entry held move to decisions/W2 as a dated
entry, every parse re-run today: the reach and second-condition examples,
where the credential lands by spelling, why the run predicate is not the
token predicate pluralized, what lenient_comma_suffixes=False does, the
four drifts that made the peel ask _comma.decide, and that neither policy
opt-out reaches the peel. The #760 entry, which deferred two of those
facts to this paragraph, now says where they went. The opt-out example is
spelled segment_scripts=frozenset(), the denylist having refused the ()
spelling (#334).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The spelling sweep (1,326 words) is needed by any change to a word class,
vocabulary-only changes included, so it moves to a nested AGENTS.md at
nameparser/ rather than under _pipeline/: reading a vocab TOML loads it
too. The text moves unchanged in substance, split under a subheading per
class (numerals, credentials and titles, separators, full stops inside a
word, capitals, adjacent pairs). Root keeps the lead and a pointer; the
Workflow paragraph, which says where a missed shape is recorded, and the
two cases.py notes that cite the sweep now name the new file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Restore #337's `Policy(segment_scripts=())` in the validation bullet:
  the frozenset() replacement meant for the new opt-out example also hit
  this history line, which records () as the spelling that shipped wrong.
- Retarget the stale pointers: decisions/C14 (honorific-peel paragraph),
  _pieces.py and cases.py:2859 (the spelling sweep's #603 example and
  separator spacing).
- Root index: restore the katakana reason (its script settles nothing,
  not "foreign"), cite W1's interpunct Except for "never segments", name
  decisions/T3 as the nakaguro's history, keep 高橋+一郎.
- decisions/W2: the #760 entry's last pointer, and the facts the cut left
  only in usage.rst or nowhere (#319's failure mechanism, the pre-#319
  readings, why 博士/殿/君 are spaced-only), re-run 2026-10-27.
- nameparser/AGENTS.md: give the moved "That holds" sentence an antecedent.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@derek73 derek73 added the docs Documentation fixes and updates label Oct 27, 2026
@derek73 derek73 self-assigned this Oct 27, 2026
derek73 and others added 2 commits October 27, 2026 01:20
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…909)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@derek73
derek73 merged commit 79a4111 into master Oct 27, 2026
12 checks passed
@derek73
derek73 deleted the docs/agents-md-relocation branch October 27, 2026 08:57
derek73 added a commit that referenced this pull request Oct 27, 2026
* Move the comma-shape and name_order sweep from AGENTS.md to nameparser/AGENTS.md

The comma sweep (879 words) joins the spelling sweep #909 moved, so the
sweep sequence the Workflow paragraph names (comma shapes, then
name_order, then spellings) lives in one file again, which loads for
vocabulary and pipeline work alike. The text moves unchanged in
substance under a subheading per lesson; three openings that leaned on
the sentence before them now stand alone.

Root keeps the four comma paths and a pointer. Every pointer to the sweep
is retargeted: seven cases.py notes, test_parser.py, test_properties.py,
decisions/A1 and H5, and the vocabulary-model RFC; plus the two
decisions pointers to the spelling sweep that #909 missed (C13, S2).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Move the encoding sweep from AGENTS.md to nameparser/AGENTS.md

The combining-mark paragraph (469 words) is the last of the four sweeps
and joins the other three in nameparser/AGENTS.md, unchanged in substance
under a subheading per lesson (the #652 families, widths and the initial
shape, composing the whole predicate, what is deliberately uncovered, the
guards). Root keeps the blind spot itself and a pointer; the Workflow
paragraph names the encoding as the fourth sweep. Nothing outside AGENTS.md
pointed at the paragraph.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Fix what the design-docs review found in the sweep move

- Root's comma stub kept "every row runs under all three orders" and
  dropped the warning beside it; it now says test_cases.py asserts only
  R2's partition there, so a change must parse each comma shape AND each
  order itself (the vacuous-coverage trap #394 found).
- nameparser/AGENTS.md: the #614 kinds-not-fields gap moves next to the
  "A report's field" check it motivates, and the opening no longer calls
  it a shape.
- nameparser/AGENTS.md intro: the vocabulary-only reason fits the
  spelling sweep, not the encoding sweep, whose vocabulary path NFC-folds;
  say so.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@derek73 derek73 added this to the 2.7 milestone Oct 27, 2026
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