Repository navigation
perf(planning): cut the interview's repeated loop.md reads and plugin-file listing - #18340
Closed
kyle-sexton wants to merge 2 commits into
Closed
kyle-sexton wants to merge 2 commits into
kyle-sexton wants to merge 2 commits into
Conversation
…ery spoke path
Eval traces showed loop.md read whole 12 times plus 14 range rereads, and
48 ls, 6 wc and 6 sed calls over the plugin's own files. loop.md was 80,169
bytes (27,561 tokens), past what one Read returns, so every whole read came
back partial and was finished in ranges. Rounds that needed only the
engineering defaults or the glossary fallback loaded all of it.
- context/survey.md now holds loop.md's "Step 1. Survey before you ask" and
"Engineering defaults" sections, moved verbatim (two "below" pointers now
name loop.md "Unattended path"). loop.md drops to 70,368 bytes and reads
in one call; SKILL.md Purpose, Stance item 4 and nfr-prompts.md point at
survey.md.
- SKILL.md "Spoke paths" moves under Variables and maps every link form and
the four bare script names to exact ${CLAUDE_PLUGIN_ROOT} paths, with one
rule: read each file once per session and keep it.
Re-pin (plugins/planning/tests/interview-defenses.test.sh):
- "SKILL.md Stance section is unchanged (the in-round no-silent-resolve rule
lives here)": 3186a92e888b864d54c9226e7a4144772ce7932e69eb27f7a2cd705f5a0469ce
-> 52931addcf0b17d61e97cb03a8971e3c659486cd97ad1a5f2198265780ceb313.
The only change in the section is Stance item 4's pointer for the glossary
fallback, from loop.md to context/survey.md, which holds the same text
verbatim. No rule in the section is added, removed or qualified, so the
no-silent-resolve defense and every phrase pin in it are unchanged.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015XWwmeDkiEnVmSx4dtkkfh
SKILL.md "Routing by size and fog" and routing.md's preamble told the model to read routing.md at entry and again at every round boundary, which contradicts the read-once rule in "Spoke paths". Both now say read it once at entry and apply it at every round boundary; the boundary checks are unchanged. Neither line is inside a digest-pinned region. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_015XWwmeDkiEnVmSx4dtkkfh
Member
Author
|
Closing by the owner's Q4 decision ("fix or close by the result"). Bisect on quality-bar-stated-prototype: base 555ae87 3/3; this PR 0/6; without the two read rules 0/3; with loop.md kept whole (survey split reverted, spoke-paths block and read-once rules kept) 1/3. No variant restores the base result, and the PR measured no saving (median turns 29 -> 27, cost per run 1.38 -> 1.50 USD). The efficiency idea can return as a new change measured in CI compare mode (docs/review/evals.md). |
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.
No related issue: follow-up to #17965's efficiency findings (owner: "I want all variants and forms of this skill to be operating as efficiently as possible").
Hold: eval regressions on the touched cases (below); not to merge until they are fixed or the owner decides.
Summary
In the redesign's eval traces the interview skill spent turns on avoidable reads: 48
ls, 6wc, 6sedandgrepover its own plugin directory (one voided a run), andcontext/loop.mdread whole 12 times plus 14 chunked rereads, because loop.md (80 KB) exceeded one Read. This change aims to remove both.Fix
context/survey.md: loop.md's "Step 1. Survey before you ask" and "Engineering defaults" sections, moved verbatim (only the "Unattended path" pointers re-aimed). loop.md drops from 80 KB to 70 KB and comes back from one Read.${CLAUDE_PLUGIN_ROOT}path, with a rule not to list, count or grep the plugin and to read each file once per session; SKILL.md and routing.md say "read once at entry, apply at every round boundary".Verification
Eval runs on this head (opus-5-5, sonnet judge), the 9 cases whose graded behavior reads the edited text, against the latest new-skill runs before the change:
answerable-without-session)Single runs on the 9: median turns 29 -> 27, median cost 1.38 -> 1.50 USD (list price): no cost saving shown.
Bisect and baseline, 3 runs each, all VALID:
555ae87eb1c783b51481(later main, includes #18236)efcfdb4f7conly (survey split + path map, no routing read-once)coded-terms-round-answerable fails on main too: not caused by this PR; filed as planning: interview-coded-terms-round-answerable fails on both the old and new interview skill #18343.
quality-bar-stated-prototype is this PR's regression (base 3 of 3, this PR 0 of 6 across two builds), from
efcfdb4f7c(the routing read-once commit is not the cause). Its failing runs take the skip-the-interview route at 5-6 turns, or ask a round whose depth does not fit a prototype.efcfdb4f7cwith its two new rule paragraphs removed ("never list, count or grep the plugin" and "read each file once"): quality-bar-stated-prototype 0 of 3 still. The cause is the survey split out of loop.md or the moved spoke-paths block, not those rules.coded-terms-round-answerable also fails 0 of 3 on the old skill (planning: interview-coded-terms-round-answerable fails on both the old and new interview skill #18343): not a regression of this PR or of the redesign.
Next step: rerun quality-bar-stated-prototype with the survey split reverted (loop.md whole again, the moved path block kept) to tell those two apart.
Related
🤖 Generated with Claude Code
https://claude.ai/code/session_015XWwmeDkiEnVmSx4dtkkfh