Skip to content

Split rules/S2 and decisions/S2 into one rule per piece of evidence - #716

Merged
derek73 merged 5 commits into
masterfrom
claude/s2-rule-splitting-db9443
Oct 18, 2026
Merged

derek73 merged 5 commits into
masterfrom
claude/s2-rule-splitting-db9443

Conversation

@derek73

@derek73 derek73 commented Oct 18, 2026 •

Copy link
Copy Markdown
Owner

Closes #682.

rules/S2 had grown to 324 lines holding seven rules, each with its own evidence. This splits it with no behavior change: the 89 example lines are the same set, corpus_rules.jsonl rebuilds byte-identical, and the snapshot matches.

ID Rule
S2 a suffix word ends a name and never opens the string (also keeps the trailing read-once clause the others rely on)
S3 credentials written with interior periods (unchanged, keeps its ID)
S4 the ambiguous acronym needs words to spare, and the slots that report
S5 the given part's trailing slot after a family comma
S6 the case signal at the suffix slot
S7 the company of an unambiguous credential
S8 the credential's trailing run (#602)
S9 unlisted words that join the ambiguous class by shape

The issue's open question is answered by the repo's own constraints: rule keys are letter+digits (design_docs._RULE_KEY_RE) and IDs are never renumbered, so S3 stays put and the new rules take S4–S9.

Commits

  1. Rules split. Each statement piece, example and Accepted clause moves to the rule it witnesses. Every rules/S2, bare S2 and in-rule (S2) reference in code, tests, other rules and AGENTS.md is retargeted by what it meant. Four pointer citations became quoted ones, so S5, S6, S7 and S9 each have an implemented: list the citation check holds.

  2. decisions/S2 split. The 40 entries go to the rule each one decided:

    Entry text is unchanged except 16 positional references the move broke, which are now key-form pointers. Each file ends with a dated note on the split.

  3. Design-docs review fixes:

    • nine #S2 / "under S2" short-form pointers to moved entries
    • R4's caps credential points at S9
    • S4 now states that case gives way to the count at the first slot after a comma
    • S4's rationale is scoped to the count by position
    • C2 and R5 pointers
  4. Lesson recorded in docs/design/AGENTS.md: an ID split must grep all five citation spellings, not only the three the citation check reads.

  5. PR review fixes (comment analyzer + AGENTS.md reviewer): decisions/S3's closing note (S3 only shared S2's log, it was never part of it), the test_design_docs fixture now pairs the case-signal name with S6 and probes S99 as missing, two count-and-case comments cite S4 and S6, one citation moves to decisions/S6.

Verification

  • Full suite: 20,897 passed. mypy and ruff are clean.
  • Snapshot matches.
  • The design-docs reviewer ran axes 1–6, 9 and 10, and skipped 7, 8 and 11 as inapplicable. It confirmed nothing was dropped or duplicated in the statement, the examples or the decisions entries. Its six findings are fixed in commit 3.

🤖 Generated with Claude Code

derek73 and others added 4 commits October 17, 2026 22:06
S2 had grown to 324 lines holding seven rules. Each piece now has its
own ID, statement, examples and Accepted clauses; no behavior moves
(the 89 example lines are the same set, and corpus_rules.jsonl rebuilds
byte-identical).

- S2 a suffix word ends a name and never opens the string (keeps the
  trailing read-once clause the others rely on)
- S4 the ambiguous acronym needs words to spare
- S5 the given part's trailing slot after a family comma
- S6 the case signal at the suffix slot
- S7 the company of an unambiguous credential
- S8 the credential's trailing run (#602)
- S9 unlisted words that join the ambiguous class by shape

S3 keeps its ID: rule IDs are never renumbered. Every citation in code,
tests, other rules and AGENTS.md is retargeted by what it meant; four
pointer citations became quoted ones so S5, S6, S7 and S9 have an
implemented: list the citation check can hold. decisions/S2 stays the
history of all seven until it is split in the next commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The 40 entries go to the rule each one decided: S2 keeps the trailing
read (#614, #620, #625); S3 takes the roman-chunk retirement and the
digit-dotted tokens, whose history had been filed under S2 too; S4 the
count and the slots that report; S5 the given part's trailing slot
(#531, #573, #578); S6 written case and the #289 + #516 arc's review and
measurement rounds; S7 company (#544); S8 the credential's run (#602,
#627, #679); S9 the by-shape class (#516's switches, #563, #564).

Entry text moves unchanged except the 16 positional references the move
broke ("the bullet above", "this section's item (ii)"), now key-form
pointers, and one already stale before the move (the `### M2 above`
left by #713). Each file closes with a dated note on the split, and
every decisions/S2 pointer in code, tests and other entries is
retargeted to the file now holding what it meant.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Short-form #S2 and 'under S2' pointers that located entries now in
decisions/S3, S5, S6, S7 and S9 become key-form pointers; R4's caps-shape
credential points at S9, not S6; S4 states that the case gives way to
the count at the first slot after a comma (S6, C1), and its rationale
scopes the words-to-spare claim to position; C2 names S7's report beside
S8's; R5 interacts with S6.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@derek73 derek73 added the docs Documentation fixes and updates label Oct 18, 2026
@derek73 derek73 self-assigned this Oct 18, 2026
@derek73 derek73 added this to the 2.5 milestone Oct 18, 2026
@codecov

codecov Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.03%. Comparing base (d791bb6) to head (36b86a1).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #716   +/-   ##
=======================================
  Coverage   99.03%   99.03%           
=======================================
  Files          46       46           
  Lines        4557     4557           
=======================================
  Hits         4513     4513           
  Misses         44       44           

☔ 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.

decisions/S3's closing note no longer says S3 was part of rules/S2 (it
only shared S2's log), and decisions/S2's note says so too. The
test_design_docs fixture now pairs the case-signal name with S6, as
the tree does, and probes S99 rather than the now-real S9 as missing.
Two comments covering both the count and the case cite S4 and S6;
test_render's #S2 becomes decisions/S6, where the judged-token decision
lives; two comments the retarget overflowed are rewrapped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@derek73
derek73 merged commit c325bed into master Oct 18, 2026
12 checks passed
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.

Split rules.md#S2 into the six rules it holds: 324 lines is too long to review as one

1 participant