buildRouter held the real set and baselineGrammars in eval_test.go restated it
by hand, in the daemon's order, with its own comment saying so. Three test files
score against the fixture and nothing compared the two lists. They had already
drifted: BareCaptureGrammar went into the daemon with V-557 and never into the
fixture, so every routing measurement since has scored a set nobody runs. That
is the failure CLAUDE.md warns about by name, and a diff test would have caught
it one grammar late.
The list moves to router.StageZeroGrammars in internal/router/stagezero.go, with
the ordering comments, which are the load-bearing part. buildRouter and the
fixture both call it. One list cannot drift from itself.
Measured before and after on the 96-case fixture: classifier+onnx 72/96, 75.0%
intent, 33.3% destination, identical either way, and the deterministic claim and
reach hash ratchets do not move. So the missing grammar cost no measurable
accuracy. That is the point rather than a reprieve: the fixture had been scoring
the wrong set for four days and nothing could say so.
The invariants caveat is deleted, both entries, since V-692 landed the other
guard in the previous commit. The reasoning for both now sits in docs/routing.md
beside the subsystem, which is where a fix's durable record belongs.
Unrelated and pre-existing: TestONNXPersonalBoundary fails on "я рассказывал
тебе про байкал?" (personal 0.9068, world 0.9413) at the merge base too.
490 lines still loads into every session, and most of them explained a
subsystem rather than constraining an agent. The owner's cap is 200. This
lands at exactly 200.
Four new living docs take what left:
docs/deployment.md the two boxes, the resident model, the embedder, STT,
the daemon table, who is in compose, the voice wire,
mavwaked on workpc, the web UI conventions
docs/world.md what replaced "never phones home", why Response.Empty()
is the whole gate, the timeouts, Kiwix
docs/language.md the LLM output contract and the three Russian mechanisms
docs/workflow.md the five stores, the doc tiers, Vikunja, the guards
CLAUDE.md keeps the pointer table and the rules. Every "do not do X", every
path and every owner's call stayed. What went is the before-and-after
narrative behind each one, which is what a living doc is for.
Verified rather than trusted. Every backticked literal in the old file was
diffed against the union of the new ones. Twenty-four came up missing and
three groups were facts rather than narrative, so they were restored:
- the ecosystem client table (nexusClient, praxisClient, the vendored hexis
client, the three config keys and their default URLs) into
docs/ecosystem.md, which did not carry it
- TestOnlyAGrammarMayDropTheBoundary and TestNamingRecallKeepsTheBoundary
into docs/routing.md, since they pin the boundary rule in both directions
- the ipc.Dial vs voice.Dial trap and docs/plans/17 into docs/deployment.md
diff-budget.sh blocked on the changed-line count again. It counts markdown,
which the repo's own pre-commit hook exempts, and this commit touches
nothing else.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013ptwopxyo3Z2kwFckHkLvN
CLAUDE.md was 805 lines and it is loaded into every session, so every line
costs. The routing section alone was 412 of them, and it was a chronological
log of every measurement since 2026-07-31: four re-measurements of the same
fixture, the history of each of the four routing heads, and the reasoning
behind every grammar.
None of that is a rule. An agent about to edit the router needs to know that
the classifier is the floor, that queryWalk only takes sources out, and that
heads_path must never point at model_path. It does not need the seed spread of
the third head to read the file at all.
So docs/routing.md is a living doc under the tier convention, and it carries
the reasoning and the numbers. CLAUDE.md keeps the constraints and points at
it. 805 lines to 490, with the routing section at 60.
The same cut is applied to the header block and to the world chain under
non-goals: the current fact and the eval filename stay, the "measured on date
D it went from A to B" narrative moves out or is dropped.
Nothing was deleted without checking. Every backticked literal in the old file
was diffed against the two new ones, and the forty that fell out were reviewed
one by one. Nine were facts rather than narrative and are restored: the
ecosystem default URLs, the voice.llm_router flag and pickLLMRouter, the four
head eval filenames, handlePraxisAct, SourceAccuracy, and the rule that
calendar-query names the calendar where the possessive agenda rules do not.
A closing section states the file's own contract, so the next agent adds a
measurement to docs/evals/ instead of a paragraph here.
diff-budget.sh blocked on 1544 changed lines. It counts markdown, which the
repo's own pre-commit hook exempts, and this commit touches nothing else.