Answer prose round 1: 0 🔴, 1 🟡; state the help's step-up rule as the code holds it, and reword the docstrings and the changelog entry
This commit is contained in:
@@ -47,27 +47,29 @@ time. The layout, and when a copy is replaced, are in bin/transcript_archive/__i
|
||||
Every claude loop-claude starts runs the project's model, saved per <key> in
|
||||
~/.claude/loop-claude-models.json and read each cycle, unless routing, below, puts the worker,
|
||||
the session /talk opens and the judge on another rung, a model at an effort. A project without an
|
||||
entry, as on its first run, is asked for one. LOOP_CLAUDE_JUDGE_MODEL overrides it for the judge,
|
||||
LOOP_CLAUDE_WORKER_MODEL for the worker and the session /talk opens; with both set, nothing is
|
||||
asked.
|
||||
entry, as on its first run, is asked for one. LOOP_CLAUDE_JUDGE_MODEL overrides the model for the
|
||||
judge, LOOP_CLAUDE_WORKER_MODEL for the worker and the session /talk opens; with both set, nothing
|
||||
is asked.
|
||||
|
||||
Where the project's model is on the routing ladder (bin/model_routing/ladder.py), the worker and the
|
||||
session /talk opens run on the rung that the chunk's todo.md item picks, and the judge of some
|
||||
models on another. The worker's prompts name the rungs it launches its reviews on. The worker's
|
||||
rung steps up as a chunk stays unfinished or the worker asks for a higher one. The rules are in
|
||||
bin/loop_claude/routing.py, and the prompts' wording in bin/loop_claude/cycle/prompts.py. A
|
||||
models on another; a chunk no item routes runs on the project's model. The worker's prompts name the
|
||||
rungs it launches its reviews on. The worker's rung steps up as a chunk stays unfinished, or when
|
||||
the judge finds in the transcript an escalation trigger that fired and the worker asked for a higher
|
||||
rung. The rules are in bin/loop_claude/routing.py and bin/model_routing/ladder.py, and the prompts'
|
||||
wording in bin/loop_claude/cycle/prompts.py. Each verdict, interrupt, quoted answer, stop and
|
||||
step-up in the archive ends with a Worker: line, the route's JSON record (Route.record in
|
||||
bin/model_routing/route.py); a rerun resumes an open chunk on the latest route named there. A
|
||||
todo.md or an archive that cannot be read or parsed is said on stderr, and the chunk is routed
|
||||
without it. Each verdict, interrupt, quoted answer, stop and step-up in the archive ends with a
|
||||
Worker: line, the route's JSON record (Route.record in bin/model_routing/route.py); a rerun
|
||||
resumes an open chunk on the latest route named there.
|
||||
without it.
|
||||
|
||||
Every 20 cycles across all projects in the archive, the first loop to close one measures every
|
||||
finished chunk there, with no model run, and writes routing-figures.md at the archive's root
|
||||
(bin/routing_figures/measure.py). Each call the figures make for a routing change that was not
|
||||
raised before is an interrupt: claude, on the project's model, on the terminal in ~/.claude, asked
|
||||
to put the calls to the human. Once that claude ends, the calls are listed in
|
||||
routing-calls-raised.md beside the figures, and not raised again. Off a terminal, the calls are
|
||||
said on stderr, the loop goes on, and they are raised again at the next measurement.
|
||||
Once 20 cycles have closed across all projects in the archive since the last measurement, the next
|
||||
loop to close one measures every finished chunk there, with no model run, and writes
|
||||
routing-figures.md at the archive's root (bin/routing_figures/measure.py). Each call the figures
|
||||
make for a routing change, unless raised before, is an interrupt: claude, on the project's model,
|
||||
on the terminal in ~/.claude, asked to put the calls to the human. Once that claude ends, the calls
|
||||
are listed in routing-calls-raised.md beside the figures, and not raised again. Off a terminal, the
|
||||
calls are said on stderr, the loop goes on, and they are raised again at the next measurement.
|
||||
|
||||
A change to bin/loop-claude or any bin/**/*.py takes effect at the next cycle boundary, once
|
||||
loop-claude --help succeeds: the loop reloads into the edited script.
|
||||
@@ -198,7 +200,7 @@ def routed(route: Route | None, project: Rung | None, model: str, archived: typi
|
||||
|
||||
|
||||
def after_verdict(loop_run: LoopRun, project: Rung | None, concluded: Concluded) -> LoopRun:
|
||||
"""The loop run the next cycle starts from. A finished chunk drops its route; an unfinished one carries its route on, stepped_route's, and the evidence the judge gave for the verdict."""
|
||||
"""The loop run the next cycle starts from. A finished chunk drops its route. An unfinished one takes the route stepped_route makes, and the evidence the judge gave for the verdict."""
|
||||
verdict = concluded.verdict
|
||||
if isinstance(verdict, Finished):
|
||||
return dataclasses.replace(loop_run, route=None, unfinished_evidence="")
|
||||
@@ -206,7 +208,7 @@ def after_verdict(loop_run: LoopRun, project: Rung | None, concluded: Concluded)
|
||||
|
||||
|
||||
def stepped_route(project: Rung | None, ended_on: Route, verdict: Unfinished) -> Route:
|
||||
"""The route an unfinished chunk's next cycle starts on: after_unfinished's of the route its cycle ended on, which an interrupt's or a quoted answer's escalation may have raised. Off the ladder there is no rung to step, and it keeps that route."""
|
||||
"""The route an unfinished chunk's next cycle starts on: the route after_unfinished makes of the route its cycle ended on, which an interrupt's or a quoted answer's escalation may have raised. Off the ladder there is no rung to step, and it keeps that route."""
|
||||
return after_unfinished(project, ended_on, verdict) if project else ended_on
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user