Skip to content

review: split method.md into a core plus two lazy references (43524 -> 29936 B) - #1954

Merged
remigiusz-antczak merged 1 commit into
mainfrom
feat/method-split-land2
Oct 23, 2026
Merged

remigiusz-antczak merged 1 commit into
mainfrom
feat/method-split-land2

Conversation

@remigiusz-antczak

Copy link
Copy Markdown
Collaborator

Summary

method.md is the phase procedure that every FILE, FULL and large or flagged DIFF review reads. This PR splits it into a core plus two lazy references (43,524 → 29,936 bytes in the core). The PR builds on the full-map.md split.

  • references/method-diff.md (7,872 bytes). A review reads it on a DIFF or FILE scope. It holds:
    • the hunk-kind depth and intent-conformance checks;
    • the count-invariant check;
    • the sweep-scope check;
    • the rewritten browser spec;
    • the fix-completeness sweeps.
  • references/method-lenses.md (7,743 bytes). A review reads it when a call site may bypass or re-derive a shared helper, or when a changed unit has no covering test. It holds comment-mining, the canonical-predicate diff and the Phase 3 disposable probe.

A lens cannot fire from a suspicion the agent does not yet have. The core therefore keeps two always-on stubs, each of which points to the full procedure:

  • the comment-mining grep, on FULL and FILE reviews of repos that have a shared component dir;
  • the canonical-predicate check.

Measurement (offline byte counts; no paid run)

method.md text

Case Bytes Change
FULL, no lens fired 29,936 −31.2%
FULL plus lens file 37,679 −13.4%
Large DIFF 37,808 −13.1%
Worst case, both lazy files 45,551 +4.7%

Whole instructed load (SKILL.md + full-map.md + method.md)

Case Bytes Change
FULL 64,083 → 50,711 −20.9%
Large DIFF 64,083 → 58,583 −8.6%

The whole-load figures were measured on a full-map.md core of 17,990 bytes. The landed core is 18,654 bytes, because principles 7 and 8 were restored, so each whole-load figure is 664 bytes higher (FULL 51,375, −19.8%; large DIFF 59,247, −7.5%). The typical cut holds only while the lens triggers stay unfired. Recall under the lazy lenses was not measured; a paid quality bench is waiting on owner approval.

Safety

test_method_split.py (8/8) pins:

  • that every old line survives (scripts/method-split-lines.txt);
  • the reworded and cut lines, each with a mutation check;
  • where each lens paragraph lives.

mustload floors are re-pinned to the core. Citations of moved text point to the new files.

Review

  • The first independent review found a 🟡 recall risk: the lens triggers fired only on suspicion.
  • The fix adds the core grep stubs and objective triggers.
  • The re-review, pinned to 80869bb12c69e9c8cd969e06938ef167d3e8240d, found 🔴0 🟡0 🔵1; the nit (a narrower grep in the core stub) is queued.
  • This branch is that commit cherry-picked onto main bb8c1cb7ad293f8e16a2c8a33e5b20e2bc7e6e75, which includes the full-map split (Split full-map.md into a lean core plus two lazy references #1953) and the test-flake fix (Stop the temp-repo git gc flake in tests #1952). The table conflicts are resolved: the full-map.md budget is 18,654 with its raise marker, mustload floors are 18,534 and 26,513, and INDEX.md is regenerated.

Tests

  • test_method_split 8/8.
  • test_fullmap_core_split, the slim and review ci-tests.d scripts, and the local gates pass.
  • CI on the exact SHA is the blocking gate.

🤖 Generated with Claude Code

…> 29936 B)

method.md is the phase procedure every FILE, FULL and large or flagged DIFF review
reads. It keeps the preface, Phases 0, 1, 3 (openers), 4 and the pointers. Two lazy
files take text a given review rarely needs, moved verbatim: method-diff.md (7872 B,
read on a DIFF or FILE: hunk-kind depth, intent-conformance, count-invariant,
sweep-scope issue, rewritten browser spec, fix-completeness sweeps) and
method-lenses.md (7743 B, read when a call site may bypass or re-derive a shared
helper or predicate, or a changed correctness-bearing unit has no covering test:
comment-mining, canonical-predicate diff, Phase 3 disposable probe). Each opens with
a "Read this when" line and is routed by path from the core and full-map.md.

Because a lens cannot fire from a suspicion the agent does not yet have, the core keeps
two always-on stubs: the comment-mining grep (instead of|not using|hand-rolled|workaround)
on a FULL or FILE review of a repo with a shared components/, ui/ or lib/ dir, and the
canonical-predicate check (a count, badge or percentage re-deriving a shared boolean
helper from a subset of its fields). Each points to method-lenses.md for the procedure.

Bytes per review, method.md text, before -> after: FULL with no lens trigger fired
43524 -> 29936 (-31.2%); FULL that also reads the lens file 37679 (-13.4%); large
DIFF 37808 (-13.1%); worst case, both lazy files 45551 (+4.7%). Whole instructed
load (SKILL.md + full-map.md + method.md): FULL 64083 -> 50711 (-20.9%), large DIFF
64083 -> 58583 (-8.6%). The typical cut holds only where the lens triggers stay
unfired; no paid bench was run, so recall under the lazy lenses is unmeasured.
These whole-load figures were measured on a full-map.md core of 17990 B; the landed core
is 18654 B (principles 7 and 8 restored), so each whole-load figure is 664 B higher.

Two old lines are reworded to cite method-diff.md for the intent-conformance lens
(fixture entries old:new); four long lines are cut at a sentence boundary and both
halves survive whole (scripts/method-split-lines.txt, test_method_split.py, with a
mutation check and a per-file placement pin for every lens paragraph).
review_load_bytes.py counts method-diff.md on the large-DIFF route. mustload floors
re-pin down (light 21877 -> 18534, full 29856 -> 26513 tokens); they hold the core
only, a DIFF or FILE review adds method-diff.md (1968 tokens), which the gate cannot
scope. Size rows move with size-budget-raise markers for six tiny citation repoints
plus the full-map routing line. Citations of moved text repoint;
check_section_pointers passes.

Tests: 8/8 test_method_split; test_fullmap_core_split, test_review_skips_index,
test_slim_skill_fast_path and all 13 review-*/slim-* ci-tests.d scripts OK; gates
size, size-ratchet --base 22f78ab9b, rules, mustload, routing, fragments,
check_section_pointers, skill_index --check ok; test_live_evals and full
test-ci-gates.sh not completed in sandbox

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@remigiusz-antczak
remigiusz-antczak merged commit 061e618 into main Oct 23, 2026
1 check passed
@remigiusz-antczak
remigiusz-antczak deleted the feat/method-split-land2 branch October 23, 2026 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant