fix(routing): routing tables are trigger lists; setup no longer says read the whole runbook - #183
Merged
Merged
Conversation
…e, not on every build It was in the Stage 5 baseline pack and mdl-agent's always-read rows, so every build session and MDL helper agent carried ~4,900 tokens of MCP rules, including cloud sessions where MCP does not exist. The write-mode choice is Step 0 of learned-mdl-preflight.md, which stays always-on. Stage 5 pack 74,055 -> 71,443 words; baseline 79,752 -> 77,140. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
…read the whole runbook The rule line above every baseline table told a session to read every row of its stage (23 files, ~121k tokens at Stage 5), agent templates were headed 'must load', and init-project/sync-project told sessions to read the runbook first and in full, although the runbook says not whole. Now a row's file is opened when its trigger happens; the runbook is read as §1b plus the stage's own section. No tier changes, so every trigger stays visible. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
…eleased lines) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
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.
What changed and why (one paragraph)
Two instructions made sessions load far more than their task needed. (1) The rule line above every baseline routing table said "read a row when its Stage(s) cell names your stage", so a Stage 5 session was told to read all 23 files, about 121k tokens, before touching the project, and every agent template was headed "Skills this agent must load". (2) The runbook says "How to read this file: not whole", but the
CLAUDE.local.mdthatinit-project.shwrites said "Read conversion-runbook.md FIRST — every session", and the ritualsync-project.shappends said "re-read it in full" (about 24k tokens, carried on every later call). Now the rule line and the agent templates say to open a row's file when its trigger happens in this session and stage, never the table ahead, and that a page task never opens the microflow rows. The runbook row,init-project.shand the ritual say "§1b plus your own stage's section, not the whole file" (gate-check already prints the spans). No row changed tier, so every trigger stays visible to the main session and to each agent; this changes when files are opened, not which files are routed. Stacked on #182 (same branch base); merge #182 first.Field evidence
render-routing.sh --check: 22 files, 71k words (after fix(routing): learned-mcp-patterns.md loads before the first MCP write, not on every build #182). That was the instructed upfront read; after this PR the instructed upfront read is the runbook's §1b and stage section, plus whatever the task's triggers open.bin/context-audit.sh(new(bin/context-audit.sh): which files fill the context window, from real transcripts #181) read the runbook in 6 pages, 2 of them repeated, because it was told to read the whole file.bin/context-audit.shon the machine that holds the transcripts.Checklist
render-routing.sh --checkclean;test-routing-tier.shasserts file names inside the rendered blocks, not the rule line; no fixture greps the changed headings or wording🤖 Generated with Claude Code
https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
Generated by Claude Code