0.5.2: README for #9-#12

116 tests; all 21 mutations for #9-#12 and the 16 for #7 caught.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MdqPWvuDpbpRvDEdURoAwo
This commit is contained in:
2026-11-24 02:08:24 +00:00
co-authored by Claude Opus 5.5
parent fade3b8bba
commit 0f71da45f4
2 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "model-router",
"version": "0.5.1",
"version": "0.5.2",
"description": "Routes each subagent to Haiku, Sonnet or Opus by how well-defined its brief is, verifies dev work below Opus in its own clone on a different model, sends failures back to the same agent then a stronger one, and estimates the savings against Opus.",
"author": {
"name": "Glenn Schrooyen"
+5 -5
View File
@@ -6,12 +6,12 @@ A Claude Code plugin that picks a model for every subagent, checks dev work on a
| Step | Behaviour |
|---|---|
| Route | Dev agents run on **Sonnet** when the brief decides the approach (Expected / acceptance criteria), on **Opus** when the design is still open. Review and test agents keep the model they are given (Opus when none). Other non-dev agents (a `test-design` role, or the `test-designer` / `release-reviewer` agent types) do too, but never Haiku. None of them get a hand-back line or verification. |
| Route | Dev agents run on **Sonnet** when the brief decides the approach (Expected / acceptance criteria), on **Opus** when the design is still open. Sections a tool adds to every brief (`## Standing constraints`, `Constraints`, `Rules`, `Pipeline guard`) are not read for this. Review and test agents keep the model they are given (Opus when none). Other non-dev agents (a `test-design` role, or the `test-designer` / `release-reviewer` agent types) do too, but never Haiku. None of them get a hand-back line or verification. |
| Rerun reported files | With `testFileCommand` set, every file the full run reports as `TIMEOUT` or `FAIL` is rerun alone in the clone. A file that still fails or times out alone runs again on the base branch, in a worktree next to the clone (`<clone>-verifier-base`, removed afterwards). The verifier gets a table: a file that passes alone does not count, one that also fails on base is not caused by the change. |
| Later instructions | Every message sent to a dev agent after its brief (a SendMessage, or the message that resumes it) reaches the verifier as part of the task, so scope added later is judged as in scope. A resumed agent keeps its task number, routing and failure count. |
| Verify | When a dev agent below Opus finishes a round, the router diffs its clone against the merge base, runs the test command in that clone, and has **Opus** judge the change. |
| Hand-back line | Only dev agents get `T` numbers and lines; other agents are logged as `A1`, `A2`, ... Every dev hand-back gets one line at once: `[model-router] Tn verifying on Opus...` (a verdict follows), or `[model-router] Tn no verification: dev ran on Opus. Go straight to review.` Only the real hand-back counts: an interim stop while the dev waits on its own background work (e.g. a long test suite) posts nothing and starts no verifier. Decided by the model the run actually used, not only the routing choice; a difference is shown as `(routed to X, ran on Y)`. |
| On FAIL | 1st: resume the same agent with the issues. 2nd: a new agent one model up, in the same clone. After that: handed back to the manager. |
| Verify | When a dev agent below Opus finishes a round, the router diffs its clone against the merge base, runs the test command in that clone, and has **Opus** judge the change. The next round diffs from the tree this round read, so work done while tests and the verifier run is verified next time. "No changes" names the trees it compared; after a FAIL it says the FAIL stands. |
| Hand-back line | Only dev agents get `T` numbers and lines; other agents are logged as `A1`, `A2`, ... Every dev hand-back gets one line at once: `[model-router] Tn verifying on Opus...` (a verdict follows), or `[model-router] Tn no verification: dev ran on Opus. Go straight to review.` Only the real hand-back counts: an interim stop while the dev waits on its own background work (e.g. a long test suite) posts nothing and starts no verifier. A dev that stays `idle` (waiting for a message) for 2 minutes has handed back. Watches survive a plugin reload; `/router` lists the agents still waiting for a hand-back. Decided by the model the run actually used, not only the routing choice; a difference is shown as `(routed to X, ran on Y)`. |
| On FAIL | 1st: resume the same agent with the issues. 2nd: a new agent one model up, in the same clone, started with `[router-rewrite Tn]` (also below header lines a hook adds); its prompt carries the issues. After that: handed back to the manager. |
| Not verified | A test timeout, a test command that cannot run, a missing clone or merge base, or a verdict that cannot be read even after asking once more: reported as NOT VERIFIED, never as a FAIL. |
| Savings | `/router savings` prices every run on the model it ran on and compares it with the same tokens on Opus 5.5. |
@@ -67,7 +67,7 @@ claude plugin validate .
claude plugin test .
```
102 tests. Every routing, verification, cost and timeout rule was also checked by breaking it on purpose (66 mutations in v0.4.4, plus 13 for the verdict reader in v0.4.5 12 for the hand-back line in v0.4.6 10 for interim stops in v0.4.7 14 for resumes, later instructions and rewrites in v0.4.8 23 for file reruns in v0.4.9 and 16 for non-dev roles and gate agent types in v0.5.1; all caught by a test).
116 tests. Every routing, verification, cost and timeout rule was also checked by breaking it on purpose (66 mutations in v0.4.4, plus 13 for the verdict reader in v0.4.5 12 for the hand-back line in v0.4.6 10 for interim stops in v0.4.7 14 for resumes, later instructions and rewrites in v0.4.8 23 for file reruns in v0.4.9 16 for non-dev roles and gate agent types in v0.5.1 and 21 for #9-#12 in v0.5.2; all caught by a test).
## Known limits