diff --git a/AGENTS.md b/AGENTS.md index bc9f36c2..ae69cce9 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -36,9 +36,10 @@ Decisions live in `docs/decisions.md`: - review: stability and product-owner report only a defect, a broken requirement of the plan or the goals, a breach of a technical principle, or for stability a hard place the change touches; each architect finding names a later change the PR makes harder; prose runs only on a chunk that changes prose - review: the stability pass mutation-tests the lines a chunk changes, in place of measuring test coverage - routing: one ladder of (model, effort) rungs, ordered by the Artificial Analysis Intelligence Index with Fable 5.1 at max on top; a task's R + C picks a rung by fixed bands, counted from the cheapest rung of the project's model -- routing: a chunk's worker runs on the rung its item picks, below the project's rung too; the seats and the security pass run on the project's rung, the other reviewers on whichever of the worker's and the project's rung is higher; and the worker changes rung only at a chunk's start, after a second unfinished verdict, or on the judge's word -- routing: loop-claude measures review rounds and unfinished verdicts per rung every 20 cycles, and calls for a routing change when a rung with 5 or more chunks took more of either than the rung above, or when 5 or more subagents of one type had reports longer than the tool results they read -- routing: a worker delegates a task only where it needs just the task's conclusion, and a subagent runs on the rung its task's R + C picks from the project's rung, never below it when it files or scores todo.md items +- routing: a chunk's worker runs on the rung its item picks, below the project's rung too; its reviewers run on the higher of the worker's rung and the project's, the seats and the security pass always on the project's +- routing: the worker changes rung only as a chunk starts, after every second unfinished verdict, or when the judge reports a taken-in item that picks a higher rung or an escalation trigger the worker cites +- routing: loop-claude measures review rounds and unfinished verdicts per rung every 20 cycles, and calls for a routing change when, of two rungs with 5 or more chunks each, the lower took more of either than the one above, or when 5 or more subagents of one type had reports longer than the tool results they read +- routing: a worker delegates a task only where it needs just the task's conclusion, and each subagent runs on the rung its task's R + C picks from the project's rung, never below the project's rung when it files or scores todo.md items - routing: a worker hands a task one rung up on each escalation trigger, up to two rungs above the rung its item picks unless the human agrees, and opens the subagent's prompt with the trigger so the routing figures count it - routing: a worker whose run ends asking for a higher rung, citing an escalation trigger the judge finds in the transcript, resumes one rung up next cycle, up to two rungs above the rung its item picks - routing: on a model judge-replay covered, the judge runs on the rung its chunk's item picks, never below the project's rung diff --git a/docs/decisions.md b/docs/decisions.md index 0d7d355c..826e1dd4 100644 --- a/docs/decisions.md +++ b/docs/decisions.md @@ -208,27 +208,39 @@ A project's rung is its model's cheapest rung, which for Opus 5.5 is its default Valid while the index ranks these models, and while no newer model joins the catalog. -## routing: a chunk's worker runs on the rung its item picks, below the project's rung too; the seats and the security pass run on the project's rung, the other reviewers on whichever of the worker's and the project's rung is higher; and the worker changes rung only at a chunk's start, after a second unfinished verdict, or on the judge's word +## routing: a chunk's worker runs on the rung its item picks, below the project's rung too; its reviewers run on the higher of the worker's rung and the project's, the seats and the security pass always on the project's 2026-10-14, lilleman. Serves goals 1.1 and 1.4. -A chunk's worker runs on the rung its item picks, below the project's rung too. Only chunks run below the project's rung can prove that a cheaper worker holds quality (goal 1.1). So on 2026-10-14 lilleman chose a trial on real chunks: a replay of past chunks spends on work nothing ships (goal 1.4). Review holds quality meanwhile. While the worker runs below the project's rung, loop-claude's prompt has it launch each reviewer, each comprehension seat and the security pass's subagent on the project's rung, through the Agent tool's model and effort. It runs a full scan only from such a subagent, because the `claude-security` plugin's researchers and verifiers inherit the model that starts them. A subagent that cannot run the scan leaves it unavailable, so larv-review runs `/security-review` in its place. lilleman chose medium knowing `settings.json` runs Opus 5.5 at xhigh, so a routed worker runs below the effort an interactive session takes. +Only chunks run below the project's rung can prove that a cheaper worker holds quality (goal 1.1). So on 2026-10-14 lilleman chose a trial on real chunks: a replay of past chunks would spend on work that never ships (goal 1.4). Review holds quality meanwhile. While the worker runs below the project's rung, loop-claude's prompt has it launch each reviewer, each comprehension seat and the security pass's subagent on the project's rung, through the Agent tool's model and effort. The worker runs a full scan only from such a subagent, because the `claude-security` plugin's researchers and verifiers inherit the model that starts them. A subagent that cannot run the scan leaves it unavailable, so larv-review runs `/security-review` in its place. lilleman chose the project's rung, medium, knowing `settings.json` runs Opus 5.5 at xhigh, so a routed worker runs below the effort an interactive session takes. While the worker runs above the project's rung, loop-claude's prompt has it launch the comprehension seats and the security pass's subagent on the project's rung too. So the seats score every chunk on one rung, and the security pass spends no more than the project chose. The prompt after each unfinished verdict repeats this, since a step-up may have taken the worker above the project's rung. The other reviewers inherit the worker's higher rung. On 2026-10-15 lilleman dropped routing them by R + C instead: a worker climbs because its chunk proved harder than its score said, which is when a cheaper reviewer is the bigger risk. A reviewer or seat that rules the work below standard may rerun one rung up: `review: a reviewer or comprehension seat that rules the work below standard`. +Valid until the trial on real chunks shows whether a worker below the project's rung holds quality. + +## routing: the worker changes rung only as a chunk starts, after every second unfinished verdict, or when the judge reports a taken-in item that picks a higher rung or an escalation trigger the worker cites + +2026-10-14, lilleman. Serves goal 1.4. + Because a model switch inside a session discards its prompt cache, the worker changes rung only as the chunk starts, after every second unfinished verdict, when the judge reports a taken-in item whose R + C picks a higher rung, or when the judge finds the escalation trigger a worker cites in asking for a higher rung (`routing: a worker whose run ends asking for a higher rung`). loop-claude routes on the first row of the next release in `todo.md`'s table that does not wait: an item waits while it is marked `question` or a blocker of it is still in the table. Since `todo.md` holds no order but its table's (`todo.md: one table`), that row is the item the worker takes. An item the worker takes in beyond that row lifts the worker's rung once the judge reports it, after the first cycle. -## routing: loop-claude measures review rounds and unfinished verdicts per rung every 20 cycles, and calls for a routing change when a rung with 5 or more chunks took more of either than the rung above, or when 5 or more subagents of one type had reports longer than the tool results they read +Valid while a model switch inside a session discards its prompt cache. -2026-10-14, lilleman. Serves goals 1.4 and 1.2. +## routing: loop-claude measures review rounds and unfinished verdicts per rung every 20 cycles, and calls for a routing change when, of two rungs with 5 or more chunks each, the lower took more of either than the one above, or when 5 or more subagents of one type had reports longer than the tool results they read + +2026-10-15, lilleman. Serves goals 1.2 and 1.4. The cost of a cheaper worker shows as extra review rounds and unfinished verdicts. Every 20 cycles across the archive, loop-claude measures them in code, with no model run (goal 1.4), and interrupts lilleman with the calls not raised before, when chunks routed onto a rung took more of either than chunks routed onto the next rung up, each rung with 5 chunks or more. Five keeps one odd chunk from calling for a change (goal 1.2). It also calls when the reports of 5 or more subagents of one type were longer than the tool results they read, so a delegated search cost the worker more context than it saved. `bin/routing_figures/` measures and words the calls. A loop on another project cannot commit here, so it writes the figures and the calls raised at the archive's root, and this repo's next chunk files the plan item, as `AGENTS.md` says. Off a terminal, a call is said on stderr and the loop goes on: it is about this setup, not the running project's chunk. A reset line in the calls file restarts the figures after a routing change, so they show whether the change worked. -## routing: a worker delegates a task only where it needs just the task's conclusion, and a subagent runs on the rung its task's R + C picks from the project's rung, never below it when it files or scores todo.md items +Valid while loop-claude's archive holds every finished chunk's review rounds and unfinished verdicts. -2026-10-14, lilleman. Serves goal 1.4. The floor for plan-filing subagents, set by `todo.md: only a session or subagent on the project's rung or above scores or reshapes the plan`, serves goal 1.1. +## routing: a worker delegates a task only where it needs just the task's conclusion, and each subagent runs on the rung its task's R + C picks from the project's rung, never below the project's rung when it files or scores todo.md items -The worker delegates a task only when it needs just the task's conclusion: a search or read across many files, or work independent enough to run in parallel. Edits, and whatever it must check line by line, stay in its own thread, since it would read a delegated diff again to check it. Measured over archived worker transcripts, subagent reports cost a median 8% of the worker's peak context, and `sed -n` and `grep` output made up 41% of its Bash results, so delegated searches save the most context. It scores each delegated task's R and C as for an item, and `bin/subagent-rung` turns them into the Agent tool's model and effort, counted from the project's rung. The rule names both, because the Agent tool sets a subagent's effort only when instructions ask. `CLAUDE.md` states the rule, since it holds in every session. A subagent that files or scores `todo.md` items takes `bin/subagent-rung --plan`, which never prints a rung below the project's. A task that proves too hard for the worker's rung goes one rung up instead: `routing: a worker hands a task one rung up`. +2026-10-15, lilleman. Serves goals 1.1 and 1.4. + +The worker delegates a task only when it needs just the task's conclusion: a search or read across many files, or work independent enough to run in parallel. Edits, and whatever it must check line by line, stay in its own thread, since it would read a delegated diff again to check it. Measured over archived worker transcripts, subagent reports cost a median 8% of the worker's peak context, and `sed -n` and `grep` output made up 41% of its Bash results, so delegated searches save the most context. It scores each delegated task's R and C as for an item, and `bin/subagent-rung` turns them into the Agent tool's model and effort, counted from the project's rung. The rule names both, because the Agent tool sets a subagent's effort only when instructions ask. `CLAUDE.md` states the rule, since it holds in every session. A subagent that files or scores `todo.md` items takes `bin/subagent-rung --plan`, which never prints a rung below the project's, the floor `todo.md: only a session or subagent on the project's rung or above scores or reshapes the plan` sets. A task that proves too hard for the worker's rung goes one rung up instead: `routing: a worker hands a task one rung up`. + +Valid while delegated searches save more context than their reports cost. ## routing: a worker hands a task one rung up on each escalation trigger, up to two rungs above the rung its item picks unless the human agrees, and opens the subagent's prompt with the trigger so the routing figures count it