From 7a30b818b7f33a88b6193b2b07063ddb685ae734 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Sat, 17 Oct 2026 22:15:59 +0200 Subject: [PATCH] =?UTF-8?q?Answer=20prose=20round=201:=200=20=F0=9F=94=B4,?= =?UTF-8?q?=203=20=F0=9F=9F=A1;=20state=20that=20a=20later=20ruling=20carr?= =?UTF-8?q?ies=20no=20second=20escalation,=20split=20the=20long=20sentence?= =?UTF-8?q?s,=20and=20say=20rung?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 2 +- bin/loop_claude/cycle/run.py | 6 +++--- bin/loop_claude/loop/main.py | 6 +++--- docs/decisions.md | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e7a098d..1b63650c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ ## Unreleased -- `loop-claude` steps the worker one rung up as the judge interrupts, when the run that asked the human also asked `loop-claude` for a higher rung and the judge quotes the escalation trigger it cites. Before, the step was lost, and the worker carried on from the human's answer on its old rung. The step obeys the same limits as before, and no later ruling in that cycle steps it again. The archive's interrupt outcome now names the worker's rung. +- `loop-claude` steps the worker one rung up as the judge interrupts, when the run that asked the human also asked `loop-claude` for a higher rung and the judge quotes the escalation trigger it cites. Before, the step was lost, and the worker carried on from the human's answer on its old rung. The step has the same limits as the step on an unfinished verdict, and no later ruling of that cycle carries a second escalation. The archive's interrupt outcome now names the worker's rung. - A scoring run due because a release's items ran out costs four more seats: it is done twice on one head. `larv-review agreement` compares how often Mid A and the inherited architect vote alike in paired rulings with how often their overall scores move the same way between the two runs. After 10 such pairs it gives a verdict, and on `Assumption fails:` larv-review asks you whether to keep the paired ruling. - `workflow-bench/bench.py` gives each run a fixed list of allowed tools. Before, it skipped every permission check. A run may launch agents, run `/security-review`, edit its clone (not the clone's `.git/` or `.claude/`) and its report, and read its clone and the copy of `~/.claude` it benches. For git it gets one command, `workflow-bench/review_git.py`, and no bare `git`. The wrapper runs `log`, `diff`, `show`, `status`, `ls-files`, `add` and `commit -m` on the run's clone, whatever the working directory. It allows only the options it lists for each, and refuses an argument that names a path outside the clone. git runs with no global or system config, hook, pager or editor. A run loads no settings or MCP servers from `~/.claude` or from the case's clone, so their hooks and extra directories do not apply to it. Every other call is denied. Expect a benched review that needs another git command, or to run a project's code or tests, to say in its report that it could not. - Every goal in `README.md` → Goals is marked `**Maintain:**`, a state to hold, or `**Achieve:**`, a direction to pursue. Each achieve goal has a signal, a counter-signal and a one-line reason under it. A change that breaks a maintain goal is redesigned or dropped, whatever it scores: `rules/todo-items.md` says so, and larv-review's goal alignment step no longer merges such a PR. `rules/goals-and-audience.md` states the form for every project's README. Expect larv-review to stop a PR on a maintain goal where it asked you before. diff --git a/bin/loop_claude/cycle/run.py b/bin/loop_claude/cycle/run.py index 0e93fae9..2a1998c8 100644 --- a/bin/loop_claude/cycle/run.py +++ b/bin/loop_claude/cycle/run.py @@ -40,7 +40,7 @@ class Cycle: anchor: Rung | None # Empty when the previous cycle's verdict was not Unfinished. unfinished_evidence: str - # The route changes within a cycle only as an interrupt carries an escalation, and no transition reads it or the fields below, so they stay out of the states. + # Only an interrupt's escalation changes the route within a cycle. No transition reads the route or the fields below, so they stay out of the states. # The route that interrupt left, for ask to archive; None unless the latest event stepped the route up. stepped_from: Route | None = None # Whether an interrupt of this cycle took an escalation, after which no ruling of the cycle carries one. @@ -144,7 +144,7 @@ def rule(cycle: Cycle, transcript_path: str) -> Ruled | Stop: def unspent(verdict: Verdict, spent: bool) -> Verdict: - """The verdict without its escalation once an interrupt of the cycle took one. The judge may quote another passage for the trigger that stepped the route, which no comparison of quotes can tell, so one trigger buys one step. It lives here, not in judge.quotes_checked, since it reads the cycle, and judge-replay replays the judge alone.""" + """The verdict without its escalation once an interrupt of the cycle took one. The judge may quote a different passage for the trigger that already stepped the route, and no comparison of quotes tells the two apart, so one trigger buys one step. It lives here, not in judge.quotes_checked, since it reads the cycle, and judge-replay replays the judge alone.""" if spent and isinstance(verdict, Interrupt | Unfinished) and verdict.escalation: return dataclasses.replace(verdict, escalation="") return verdict @@ -160,7 +160,7 @@ def keep_rejection(cycle: Cycle, transcript_path: str, rejected: Rejected) -> St def ask(cycle: Cycle, transcript_path: str, ruling: Interrupt | QuotedAnswer) -> HumanAnswered | Stop: question = question_for(ruling) # Archived now, so the transcript the question was asked on is kept with it; the human's answer then grows the transcript. - # The interrupt names the rung the worker ran on until it, and a step-up then the rung it runs on from it, so the figures charge each stretch to its own rung. + # The interrupt names the rung the worker ran on before it; a step-up archived after it names the stepped rung, so the figures charge each stretch to its own rung. interrupted = outcomes.interrupted(question, ruling.evidence, str(judge_of(cycle)), ruling.escalation if isinstance(ruling, Interrupt) else "", str(cycle.stepped_from or cycle.route)) for outcome in (interrupted, outcomes.stepped_up(str(cycle.route))) if cycle.stepped_from else (interrupted,): if failure := archive(cycle.project_archive, transcript_path, cycle.task, outcome, cycle.effects.now()): diff --git a/bin/loop_claude/loop/main.py b/bin/loop_claude/loop/main.py index a1de69eb..5a162fca 100644 --- a/bin/loop_claude/loop/main.py +++ b/bin/loop_claude/loop/main.py @@ -81,9 +81,9 @@ E + I, or the routed item's (Route.reviewed_on in bin/model_routing/route.py). A scale counts as none. Every second unfinished verdict on a chunk steps it up one rung (routing.stepped). So does an unfinished verdict on a worker that ended its run asking for a higher rung, once the judge quotes the transcript showing that the escalation trigger it named -fired (~/.claude/CLAUDE.md → "Working with the codebase" lists them); an interrupt with such a quote -steps the rung as it comes in, before the human is asked, and no later ruling of that cycle steps it -again (routing.stepped_by_interrupt). That step stops two rungs +fired (~/.claude/CLAUDE.md → "Working with the codebase" lists them). An interrupt with such a quote +steps the rung as it comes in, before the human is asked (routing.stepped_by_interrupt), and no later +ruling of that cycle carries a second escalation. Either step stops two rungs above the rung the chunk's item picks, and the worker's prompts offer it only while the worker is below that limit. Each finished or unfinished verdict, interrupt, stop and step-up in the archive names the worker's rung, with the item, L and E + I that routed the chunk, and any taken-in E + I that picks a diff --git a/docs/decisions.md b/docs/decisions.md index 53cc246e..fb1e291b 100644 --- a/docs/decisions.md +++ b/docs/decisions.md @@ -290,11 +290,11 @@ Valid while the ladder orders its rungs by competence. loop-claude's prompt offers the step beside the escalated subagent of `routing: a worker hands a task one rung up`, as long as the limit leaves a rung that subagent may take without the human's yes. The worker then ends its run asking loop-claude for a higher rung and naming the trigger. The judge quotes an earlier passage that shows the trigger fired, such as a review round's commit title or the worker's report of the failing test, never the request itself. The trigger must have fired since any earlier such request, so one trigger buys one step. The judge sees the worker's text and tool calls but no tool results, so the quote shows that the run recorded the trigger, not that a tool's output bears it out. loop-claude checks the quote word for word, as it checks a quoted answer, since stitched fragments can make up a trigger. Without such a quote, the rung holds. A misquote is no failure, since holding the rung is safe and three failures stop an unattended loop. The next prompt names the worker's rung, so the worker learns whether the step went through. -A run may also ask the human something only they can answer, so the judge's interrupt carries the quote too, checked the same way. loop-claude steps the rung as the interrupt comes in, before the human is asked, since the human's answer is followed by work the stepped rung should do: in the session the interrupt opens, and in whatever run resumes with the answer. The step starts from the rung an item the judge saw the worker take in picks, as below. An interrupt is no unfinished verdict, so it adds to no count. One trigger buys one step, but loop-claude cannot tell two passages that show one trigger fired apart, so once an interrupt has taken an escalation, no later ruling of that cycle carries one: the verdict the judge gives after the interrupt holds the rung. A trigger that fires after the human's answer waits for the next cycle. The limits are the same. +A run that asks for a higher rung may also ask the human something only they can answer. The judge then interrupts, and the interrupt carries the quote too, checked the same way. loop-claude steps the rung as the interrupt comes in, before the human is asked, since the human's answer is followed by work the stepped rung should do: in the session the interrupt opens, and in whatever run resumes with the answer. An interrupt is no unfinished verdict, so it adds to no count. The judge may quote a different passage for the trigger that already stepped the rung, and loop-claude cannot tell that from a new trigger. So once an interrupt has taken an escalation, no later ruling of that cycle carries one. A trigger that fires after the human's answer waits for the next cycle. The step is one rung up from the rung the worker would otherwise hold: its own, or the rung an item the judge saw it take in picks, whichever is higher. It resets the count of unfinished verdicts, so the step every second one takes counts afresh; when both steps fall on one verdict, the worker steps once. It stops at the limit escalated subagents stop at, two rungs above the rung the chunk started on. Past that limit the rung holds: loop-claude takes no yes from the human between cycles, so a worker there asks the human for an escalated subagent instead. The judge keeps its rung, as `routing: on a model judge-replay covered` says. -The archive quotes the judge's passage under `Escalation:` in the unfinished verdict or the interrupt. The step an unfinished verdict causes is archived after it. The step an interrupt causes is archived with it, at once: the interrupt names the rung the worker ran on until then and a step-up the rung it runs on from then, so the routing figures charge each stretch to its own rung, and a loop that dies while the human answers resumes on the stepped rung. `bin/routing_figures/` counts that verdict as unfinished, not as an escalation by trigger, which it counts only from subagent prompts. +The archive quotes the judge's passage under `Escalation:` in the unfinished verdict or the interrupt. The step an unfinished verdict causes is archived after it. The step an interrupt causes is archived with it, at once: the interrupt names the rung the worker ran on until then, and a step-up archived beside it names the rung it runs on from then. So the routing figures charge each stretch to its own rung, and a loop that dies while the human answers resumes on the stepped rung. `bin/routing_figures/` counts neither as an escalation by trigger, which it counts only from subagent prompts. Valid while the worker reports in its transcript the triggers that fired.