Repository navigation
review: split method.md into a core plus two lazy references (43524 -> 29936 B) - #1954
Merged
Merged
Conversation
…> 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>
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.
Summary
method.mdis 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 thefull-map.mdsplit.references/method-diff.md(7,872 bytes). A review reads it on a DIFF or FILE scope. It holds: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:
Measurement (offline byte counts; no paid run)
method.mdtextWhole instructed load (SKILL.md + full-map.md + method.md)
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:scripts/method-split-lines.txt);mustload floors are re-pinned to the core. Citations of moved text point to the new files.
Review
80869bb12c69e9c8cd969e06938ef167d3e8240d, found 🔴0 🟡0 🔵1; the nit (a narrower grep in the core stub) is queued.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
🤖 Generated with Claude Code