Plan task routing: a complexity score per item, one model-and-effort ladder, and routes for the judge, reviewers, worker and subagents

This commit is contained in:
2026-10-12 21:02:06 +02:00
parent 1ce34e2084
commit dcd4dad0eb
+41 -1
View File
@@ -6,7 +6,7 @@
`Bar = 9`
`Next ID = 87`
`Next ID = 93`
| Goal | W |
|---|---|
@@ -48,7 +48,13 @@
| 81 | 0.1.0 | principle | **Have `workflow-bench/bench.py` return each run's failure as a value, so one failed clone does not hide the later runs' results.** | 2 | 2 | 3 | 4 | 4 | 9.9 |
| 4 | 0.1.0 | | **Name each chunk's archive folder by the chunk's start time, so `<key>/` lists chunks in the order they ran.** | 3 | 2 | 4 | 3 | 3 | 9.6 |
| 52 | 0.1.0 | principle | **Record why this checkout lives in Claude Code's own directory, or move it out and link it in.** | 6 | 6 | 3 | 5 | 2 | 7.5 |
| 87 | 0.2.0 | | **Score every `todo.md` item's complexity C from 1 to 10, and have `rank_todo.py` fail on an item without one.** | 3 | 4 | 6 | 7 | 1.1, 1.4 | 21.9 |
| 88 | 0.2.0 | | **Define one routing ladder of (model, effort) rungs ordered by sourced competence, and map a task's R + C to a rung relative to the project's model.** | 3 | 4 | 6 | 7 | 1.4 | 21.4 |
| 77 | 0.2.0 | | **Teach `bin/metric-bench` Go and TypeScript, rerun it once two projects' comprehension histories name places, and bring into review only a metric that tracks the panel.** | 3 | 6 | 6 | 7 | 1.1, 1.4 | 21.4 |
| 90 | 0.2.0 | | **Route each reviewer by the chunk's R + C, once a replay of past chunks shows the routed reviewer finds the same 🔴 and 🟡 findings.** | 4 | 5 | 6 | 7 | 1.4 | 20.2 |
| 91 | 0.2.0 | | **Start each chunk's worker on the rung its item's R + C picks, and step it one rung up after two unfinished verdicts on one chunk.** | 4 | 5 | 6 | 7 | 1.4 | 20.2 |
| 92 | 0.2.0 | | **Have the worker route each subagent by its task's R + C, and delegate a task only when the worker needs just its conclusion.** | 2 | 2 | 5 | 6 | 1.4 | 19.0 |
| 89 | 0.2.0 | | **Run the judge on its routed rung, once a replay of archived transcripts shows it returns the verdicts on record.** | 3 | 4 | 5 | 6 | 1.4 | 17.5 |
## Details
@@ -171,6 +177,16 @@ Today the folder is the SHA-256 of the transcript's first timestamped line, whic
"One owner per value" and "Prefer the vendor-neutral option", in `principles/technical-principles.md`: git, Claude Code and loop-claude all write `~/.claude`, kept apart only by the `.gitignore` allowlist, and the repo's records live in a vendor directory.
### 87. Score every `todo.md` item's complexity C from 1 to 10, and have `rank_todo.py` fail on an item without one.
C is how hard the change is to get right: novel design, subtle invariants, many interacting parts. It differs from R, the chance the change creates serious bugs, and from S, its size: a huge rename is low C, a ten-line lock fix can be high C. C routes work (items 88–92) and stays out of the Score formula. Add the column to `rank_todo.py`'s valid shape and its `--help`, backfill every item in this repo, and state in `CLAUDE.md` → "Todo items" that C is scored when an item is filed, like R, S, A and G, so no chunk starts on an unscored item.
### 88. Define one routing ladder of (model, effort) rungs ordered by sourced competence, and map a task's R + C to a rung relative to the project's model.
One ladder, the same in every project (goal 1.3), read by loop-claude, larv-review and the worker. A rung is a model and an effort, such as Haiku low up to the strongest model at max. Order the rungs by a published source, cited in the decision recording the ladder; where no source orders two rungs, such as Sonnet at xhigh against Opus at medium, ask the human. The project's model at the default effort is the middle rung. R + C picks how many rungs to move from it: a low sum steps down, a high sum steps up, the thresholds set in the decision. S never moves a rung: a huge task with low R and C runs cheap, and S only counts towards budget. Leave out the comprehension panel and the security pass, which stay on the project model. Record each route in loop-claude's archive, so the outcomes can tune the thresholds.
Needs 87.
### 77. Teach `bin/metric-bench` Go and TypeScript, rerun it once two projects' comprehension histories name places, and bring into review only a metric that tracks the panel.
2026-10-08, lilleman: no metric enters review until a rerun on more data shows it tracking the panel.
@@ -200,3 +216,27 @@ Claude's misses ranked the named units at a coin toss. Top k scores 0.50 by chan
| Change spread | 0.57 | 0.54 |
Claude's answers overlapped the truth by a median Jaccard index of 0.76. A run took in 62,643 new input tokens and cost $0.70; it did not record which model answered. Grep answers these questions whatever the code's shape, so no question enters review; a new question bench would need questions that take understanding the code, not finding it.
### 90. Route each reviewer by the chunk's R + C, once a replay of past chunks shows the routed reviewer finds the same 🔴 and 🟡 findings.
larv-review passes the rung through the Agent tool's `model` and `effort`. A reviewer never steps down when the worker has stepped down on the same chunk, so a cheap worker always meets a reviewer on the project model or above. The comprehension panel and the security pass do not route.
Needs 88.
### 91. Start each chunk's worker on the rung its item's R + C picks, and step it one rung up after two unfinished verdicts on one chunk.
loop-claude reads the top item of the next release with `rank_todo.py` before starting a chunk's first cycle. Change the rung only when a chunk starts or steps up: every cycle resumes the chunk's session, and a model switch discards its prompt cache. When the worker bundles an item scoring a higher R + C than the one routed on, it says so, and the next cycle steps up. Ship stepping up first; step down only once the archive shows chunks on a lower rung passed review without extra rounds (goal 1.1).
Needs 88.
### 92. Have the worker route each subagent by its task's R + C, and delegate a task only when the worker needs just its conclusion.
State in `CLAUDE.md` when the worker delegates: a search or read that spans many files whose conclusion is all it needs, and work independent enough to run in parallel. Edits and anything the worker must verify line by line stay in the main thread, since a delegated diff is read again to check it. Subagent reports filled 8% of the worker's peak context on 2026-10-08 (item 73's detail), while `sed -n` and `grep` output filled 41% of its Bash results, so searches are where delegation keeps a cycle's context down. The Agent tool sets a subagent's effort only when instructions ask, so the rule names both model and effort.
Needs 88.
### 89. Run the judge on its routed rung, once a replay of archived transcripts shows it returns the verdicts on record.
loop-claude starts the judge itself (`bin/loop_claude/cycle/judge.py`), so it routes without any skill change. Replay the judge on archived cycles at the candidate rung, and switch only when its interrupts and verdicts match those on record.
Needs 88.