Answer prose round 1: 0 🔴, 9 🟡 (0 misread); split the interrupt entry, unstack the decisions' lists, say why Cycle's fields and the package's modules stay at one level, name the import cycle, and say how the judge's quotes are checked

This commit is contained in:
2026-11-04 23:35:35 +01:00
parent c7e49983f7
commit 9fea1d8286
8 changed files with 15 additions and 13 deletions
+1 -1
View File
@@ -122,7 +122,7 @@ Claude Code reads this section by its heading when it compacts a conversation. K
- **chunk** — the unit of work, shipped as one PR; "Working loop" says what it holds.
- **cycle** — in `loop-claude`, worker runs and the judge's verdict on each, until the chunk closes or is left for the next cycle. In between, the human answers any interrupt, or the worker resumes with an answer the judge quoted from `README.md` or the judge's records.
- **gate** — the merge gate: the checks a PR passes before it merges.
- **interrupt** — `loop-claude` asking the human, on its terminal and in `loop-inbox`, for a decision that is theirs. They type a one-line answer in either, or `/talk` to open the worker's session with `claude --resume` where they typed it; a release ready to cut opens that session at once, and a routing call opens claude in the setup's development clone, `~/code/claude-config`, both on loop-claude's terminal.
- **interrupt** — `loop-claude` asking the human, on its terminal and in `loop-inbox`, for a decision that is theirs. They type a one-line answer in either, or `/talk` to open the worker's session with `claude --resume` where they typed it. A release ready to cut opens that session at once, on loop-claude's terminal. A routing call opens claude on that terminal too, in `~/code/claude-config`, the checkout where this setup is developed.
- **judge** — the headless claude that reads a worker's transcript each cycle and decides whether to interrupt and whether the chunk is finished.
- **judge's records** — the files the judge reads beside the README's premises: the project's `AGENTS.md` and `docs/decisions.md`, then the human's `~/.claude/CLAUDE.md` and the `.md` files in `~/.claude/rules/` and `~/.claude/skills/larv-review/standards/`.
- **paired ruling** — the seats vote whether the project reads better, the same or worse at the branch's head than at the base, the commit `larv-review ruling-base` prints; `larv-review --help` says how the votes make the ruling.
+1 -1
View File
@@ -1,4 +1,4 @@
"""loop-claude: headless claude cycles, judged, that interrupt the human only for a decision that is theirs (loop/main.py's help).
Its packages hold one concern each: cycle/ runs a cycle, loop/ runs the cycles, project/ reads a checkout's files, and waiting/ shows a question to loop-inbox. The modules at this level are those more than one of them imports, and loop-inbox imports several. A reader finds each by its name, so they stay at one level: docs/decisions.md → `principles: about seven things per level, …`.
Its packages hold one concern each: cycle/ runs a cycle, loop/ runs the cycles, project/ reads a checkout's files, and waiting/ shows a question to loop-inbox. Each module at this level is imported by more than one package, and loop-inbox imports several. A reader finds a module by its name, so the modules stay at one level. docs/decisions.md → `principles: about seven things per level, …` allows that.
"""
+3 -3
View File
@@ -97,7 +97,7 @@ class Rejected(Failure):
class Grounds(typing.NamedTuple):
"""The texts quotes_checked holds the judge's quotes to, word for word, since stitched fragments can say what their source does not."""
"""The texts quotes_checked checks the judge's quotes against. A quote must appear in its text as written, since a quote reworded or stitched together can say what its source does not; only the evidence may join passages with an ellipsis, each passage in order."""
# The transcript as the judge saw it.
shown: str
# The worker's own lines after the escalation mark, as escalation_mark.since_step renders them.
@@ -192,7 +192,7 @@ def cost_of(reply: dict) -> float:
def quotes_checked(verdict: Verdict, grounds: Grounds) -> Verdict | Failure:
"""The verdict with each quote it makes held to the text that must hold it, word for word:
"""The verdict with each of its quotes checked against the text it must appear in, as written:
| Quote | Must be in | Where it isn't |
|---|---|---|
@@ -200,7 +200,7 @@ def quotes_checked(verdict: Verdict, grounds: Grounds) -> Verdict | Failure:
| a quoted answer | grounds.quotable | the question goes to the human as an interrupt, which keeps the escalation the answer carried |
| the escalation | grounds.shown and grounds.since_step | the escalation is dropped, so the worker's rung holds, as escalation_mark.checked says |
Only a misquoted evidence fails: the other two misquotes would otherwise exit an unattended loop.
Only a misquoted evidence fails. A Failure for either of the other two would exit an unattended loop, so each changes the verdict instead.
"""
if not grounded(verdict.evidence, grounds.shown):
return Failure(f"the judge quoted {verdict.evidence!r}, which is not in the transcript" + (f", for the question: {verdict.question}" if isinstance(verdict, Interrupt | QuotedAnswer) else ""))
+4 -1
View File
@@ -24,7 +24,10 @@ from model_routing import worker_rungs
@dataclasses.dataclass(frozen=True)
class Cycle:
"""What a cycle runs on, which no step changes but the route. Each step reads the few fields it needs by name, so they stay at one level: docs/decisions.md → `principles: about seven things per level, …`, more where a reader finds them by name."""
"""What a cycle runs on. run_cycle replaces the route on a ruling's step-up; nothing changes the other fields.
Each step reads the few fields it needs by name, so the fields stay at one level. docs/decisions.md → `principles: about seven things per level, …` allows more than seven where a reader finds them by name.
"""
effects: Effects
# What chunk-preflight found, or why it could not run, for a fresh worker's prompt; empty when the session was open as the cycle began.
facts: str
+1 -1
View File
@@ -1,4 +1,4 @@
"""The effects loop-claude reaches the world through: its terminal, clock, processes and git. loop-inbox runs on them too (bin/loop_inbox/main.py), so a change here, such as to how input reads a line, changes both tools."""
"""The effects loop-claude reaches the world through, such as its terminal, clock, processes, git and the machine's memory. loop-inbox runs on them too, so a change here, such as to how input reads a line, changes both tools."""
import dataclasses
import os
import select
+2 -3
View File
@@ -80,9 +80,8 @@ loop to close one measures every finished chunk there, with no model run, and wr
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 the setup's development clone, ~/code/claude-config, asked to put the calls to
the human; loop-inbox lists it too. 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
the human; loop-inbox lists it too. 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
+1 -1
View File
@@ -7,7 +7,7 @@ worker took in, each listed once. loop-inbox lists a loop, and its question (wai
lock. So a killed loop drops off the list, though its files stay until loop-inbox removes them: <session>.running
through drop_ended_loops here, and the question through waiting.listing.drop_ended.
These files, waiting/ and session_lock.py are loop-claude's state, which loop-inbox reads. They stay in loop_claude/: they run on its effects and hand_over.py, so a package of their own would import loop_claude back.
This module, waiting/ and session_lock.py hold loop-claude's state, which loop-inbox reads. They stay in loop_claude/ because they import its effects.py and hand_over.py: a package of their own would import loop_claude, and loop_claude would import it, a cycle.
"""
import contextlib
import dataclasses
+2 -2
View File
@@ -294,7 +294,7 @@ On 2026-10-16 lilleman routed the reviewers on their item's E + I as well, on ei
Valid until the trial on real chunks shows whether a worker below the project's rung holds quality.
2026-10-29, lilleman. Serves goals 1.4 and 1.5. A branch that changes only Markdown no agent follows reviews on the project's rung, whatever its items' E + I. E + I scores an item before its chunk starts, by the change the item asks for, so one project's item, filed to build a control on a CI runner, kept its E + I of 7 when the chunk found no control the repo could build and shipped a README paragraph: five reviewers read prose on Opus 5.5 at xhigh. rule-hook's `reviewer-rung` reads the branch's files, committed or not, against the default branch as last fetched. Markdown an agent follows, `CLAUDE.md`, `AGENTS.md`, the bench's `workflow-bench/*-prompt.md` and files under `agents/`, `principles/`, `rules/` or `skills/`, counts as config; on 2026-11-04 lilleman added the bench's prompts, which an agent follows like a skill. `bin/review_passes.py` holds the lists, and the worker's prompt renders them. Valid while a README or docs defect costs a reader no more than review on the project's rung lets through.
2026-10-29, lilleman. Serves goals 1.4 and 1.5. A branch that changes only Markdown no agent follows reviews on the project's rung, whatever its items' E + I. E + I scores an item before its chunk starts, by the change the item asks for, so one project's item, filed to build a control on a CI runner, kept its E + I of 7 when the chunk found no control the repo could build and shipped a README paragraph: five reviewers read prose on Opus 5.5 at xhigh. rule-hook's `reviewer-rung` reads the branch's files, committed or not, against the default branch as last fetched. Markdown an agent follows counts as config: `CLAUDE.md`, `AGENTS.md`, `workflow-bench/*-prompt.md` and files under `agents/`, `principles/`, `rules/` or `skills/`. On 2026-11-04 lilleman added the workflow bench's prompts, which an agent follows like a skill. `bin/review_passes.py` holds the lists, and the worker's prompt renders them. Valid while a README or docs defect costs a reader no more than review on the project's rung lets through.
## routing: a review pass runs below the project's rung only on a rung that a replay of its rounds shows finding every 🔴 and 🟡 the project's rung finds, and only where the E + I steps no review up and the worker runs no higher than the project's rung, then even below the worker's; no pass has such a rung
@@ -302,7 +302,7 @@ Valid until the trial on real chunks shows whether a worker below the project's
`bin/review-replay <pass> <model>` replays a pass's archived rounds on the code each reviewed. It replays them first on the project's rung, then on each rung below it, highest first, down to the ladder's lowest. It stops at the first rung that misses a finding the project's rung found again. A rung qualifies only where it and each rung above it find every such 🔴 and 🟡.
A qualifying rung applies only where the chunk's E + I steps no review up and the worker runs no higher than the project's rung; there the pass runs on that rung, even below the worker's. Otherwise the pass runs where every other pass does: the replay compared reviews on the project's rung only, never reviews on a rung an E + I stepped up, nor of a chunk whose worker climbed above the project's rung. No code lowers a pass while no rung qualifies: on 2026-11-04 lilleman had the release review of 0.6.0 delete that code, which no chunk could reach. The chunk that first qualifies a rung, `todo.md` item 196's, adds it back in `bin/model_routing/`, with the rung by pass and project model, and names the lowered pass in the worker's prompt and in rule-hook's `reviewer-rung`.
A qualifying rung applies only where the chunk's E + I steps no review up and the worker runs no higher than the project's rung; there the pass runs on that rung, even below the worker's. Otherwise the pass runs where every other pass does: the replay compared reviews on the project's rung only, never reviews on a rung an E + I stepped up, nor of a chunk whose worker climbed above the project's rung. No code lowers a pass while no rung qualifies: on 2026-11-04 lilleman had the release review of 0.6.0 delete that code, which no chunk could reach. The chunk that first qualifies a rung, `todo.md` item 196's, writes that code again in `bin/model_routing/`. It records the qualifying rung for each pass and project model, and names the lowered pass in the worker's prompt and in rule-hook's `reviewer-rung`.
The runs, each on the latest 10 rounds of Opus 5.5 projects that hold a 🔴 or 🟡: