Define worker and judge under Vocabulary and spell the interrupt one way

This commit is contained in:
2026-09-27 17:06:57 +02:00
parent d2401599a7
commit eba75e9fa7
5 changed files with 18 additions and 17 deletions
+3 -1
View File
@@ -8,14 +8,16 @@ Shorter is better, none is best — chat output, commit messages, comments, docs
- **cycle** — one worker run and the judge's verdict on it, in `loop-claude`.
- **gate** — the merge gate: the checks a PR passes before it merges.
- **interrupt** — `loop-claude` handing the terminal to the human, `claude --resume`, for a decision that is theirs.
- **judge** — the headless claude that reads a worker's transcript each cycle and decides whether to interrupt and whether the chunk is finished.
- **looping reviewer** — a reviewer rerun in rounds until no 🔴 and no 🟡 stand: stability, product-owner and a forge's auto-reviewer.
- **plan** — `todo.md`.
- **premises** — the goals and audience under `## Goals` and `## Audience` in the project's `README.md`.
- **release** — a semver version the human cuts.
- **reviewer** — a reporter of findings: an agent under `~/.claude/agents/`, `/security-review` or a forge's auto-reviewer.
- **round cap** — the rounds one loop of a looping reviewer may take; a 🔴 or 🟡 open past it stops the loop at `needs input`.
- **round cap** — the rounds one loop of a looping reviewer may take; a 🔴 or 🟡 open past it stops the loop on a question to the human.
- **session** — a Claude Code session: one id, what `claude --resume` continues.
- **trigger** — a sign that a change carries an architectural decision the decision log does not hold, so the architecture pass is warranted; `larv-review` §2 lists them.
- **worker** — the headless claude that runs the task in a cycle, in the chunk's session.
## Prose
+1 -1
View File
@@ -24,7 +24,7 @@ A review's first line, derived mechanically from the findings:
- Surface everything in one round.
- From round 2 the prompt carries the previous round's findings verbatim and what changed since. Verify each previous 🔴 and 🟡 is resolved — re-run the scenario, don't trust the claim — then pass over what changed. A fix spawns a new finding only where the fix itself introduced a real problem.
- The loop exits on no 🔴 and no 🟡. The 🟢 and ❓ left then are addressed in that same round — fixed, answered, declined or filed in `todo.md` — and trigger no further round. A nit whose fix changes behaviour is a fresh finding and takes a round.
- Round cap: 3; when it stops the loop, list what is open. Systems-architect gets one scoped re-check; still `BLOCK` → `needs input`.
- Round cap: 3; when it stops the loop, list what is open. Systems-architect gets one scoped re-check; still `BLOCK` → ask the human.
## Declining
+11 -11
View File
@@ -59,7 +59,7 @@ RELOAD_FLAG = "--reloaded"
SESSION_NAMESPACE = uuid.UUID("64fb586b-d926-4bb3-a44c-c903e86d3eec")
JUDGE_RULES = (
"Decide whether the human must now be interrupted. ask=true when any of these appear:\n"
"Decide whether the human must now be interrupted. interrupt=true when any of these appear:\n"
"- the agent asks the human anything, seeks approval, or says a decision is the human's\n"
"- it carried on under an assumption that decides the deliverable and that the human could "
"reasonably reject; a caveat about transient state it then handled is not one\n"
@@ -68,12 +68,12 @@ JUDGE_RULES = (
"- it flags that the goals, the plan or the task itself is unclear, missing or in need of change\n"
"- it chose between alternatives the README text does not discriminate between - it does not "
"rule the rejected one out - and the choice materially changes the deliverable\n"
"ask=false otherwise. A sensible preference is not a derivation. Bookkeeping the agent settled "
"interrupt=false otherwise. A sensible preference is not a derivation. Bookkeeping the agent settled "
"silently - what to document, wording, where a note goes - is not on its own a reason to "
"interrupt. The human may have replied inside the transcript, on a [human] line: judge only what "
"is still open, never a question they already answered there.\n"
"The question must be one the agent itself raised. Never construct a question from facts the agent "
"stated. When ask=true, quote the agent's own wording where it already framed the question.\n"
"stated. When interrupt=true, quote the agent's own wording where it already framed the question.\n"
"finished=true when the chunk is complete: merged, or nothing remains that the agent could do on "
"its own. finished=false when work remains that a further run can continue: an open PR, a review "
"not yet run, CI not yet reported."
@@ -81,12 +81,12 @@ JUDGE_RULES = (
JUDGE_SCHEMA = {
"properties": {
"ask": {"type": "boolean"},
"evidence": {"description": "A verbatim quote from the transcript of the line that raises the question. Empty when ask is false.", "type": "string"},
"evidence": {"description": "A verbatim quote from the transcript of the line that raises the question. Empty when interrupt is false.", "type": "string"},
"finished": {"type": "boolean"},
"question": {"description": "The single question to put to the human. Empty when ask is false.", "type": "string"},
"interrupt": {"type": "boolean"},
"question": {"description": "The single question to put to the human. Empty when interrupt is false.", "type": "string"},
},
"required": ["ask", "evidence", "finished", "question"],
"required": ["evidence", "finished", "interrupt", "question"],
"type": "object",
}
@@ -148,9 +148,9 @@ def run_cycle(root, task, premises, name, session_id, chosen):
verdict = judge(root, task, premises, render(entries(path)), chosen)
if isinstance(verdict, Stop):
return verdict
if not verdict["ask"]:
if not verdict["interrupt"]:
break
archive(root, path, f"Task: {task}\n\nVerdict: needs input\n\n{verdict['question']}")
archive(root, path, f"Task: {task}\n\nVerdict: interrupt\n\n{verdict['question']}")
if failure := interrupt(root, session_id, chosen, path, verdict["question"]):
return Stop(2, failure)
if verdict["finished"]:
@@ -512,7 +512,7 @@ def judge_prompt(task, premises, transcript):
return (
f"From README.md:\n{premises}\n\n"
f"The task an agent was given:\n{task}\n\n"
# The tail, where an ask or a finish lands; the session's transcript grows cycle over cycle.
# The tail, where an interrupt or a finish lands; the session's transcript grows cycle over cycle.
f"What the agent did and said, and what the human typed on [human] lines, latest last:\n{transcript[-40000:]}\n\n"
f"{JUDGE_RULES}"
)
@@ -523,7 +523,7 @@ def complete(verdict):
def grounded(verdict, transcript):
if not verdict["ask"]:
if not verdict["interrupt"]:
return True
evidence = verdict["evidence"]
return evidence.strip() != "" and evidence in transcript
+3 -3
View File
@@ -50,7 +50,7 @@ No signal fires → skip it, say so in the summary, don't ask. A signal fires wi
Launch **systems-architect**: review the system as a whole entered through this change; the decision log carries previously accepted decisions to honor, the README the goals and Stage 0 artifacts.
- **Stage 0 questions returned** (goals/audience/horizon unrecorded): relay them to the user, record the answers where the agent expects them (README), re-run once. No user → skip the pass, carry the questions into the summary.
- **BLOCK** → the restructure precedes everything below. Confirm with the user first when it materially reshapes their PR; apply it; re-run systems-architect once, scoped to verifying its own findings. Still BLOCK → stop and report: `needs input`.
- **BLOCK** → the restructure precedes everything below. Confirm with the user first when it materially reshapes their PR; apply it; re-run systems-architect once, scoped to verifying its own findings. Still BLOCK → stop and ask the human.
- **ALIGN** → apply what is cheap now; ask the user about the rest — each item becomes a fix, a ticket, or a documented decision, never a silent drop.
- **APPROVE** / **APPROVE WITH NITS** → proceed; nits per the protocol's rounds.
@@ -132,8 +132,8 @@ Marking the PR ready is what summons CodeRabbit and its kind, so this follows §
## 11. Goal alignment, then merge
1. Read the finished PR against the README goals: does anything in it work against one? Misaligned → do not merge; state the conflict and ask: `needs input`.
2. The item ships into a release later than one that is finished and uncut → leave the PR ready and unmerged; say that release is ready to cut: `needs input`.
1. Read the finished PR against the README goals: does anything in it work against one? Misaligned → do not merge; ask the human, stating the conflict.
2. The item ships into a release later than one that is finished and uncut → leave the PR ready and unmerged; tell the human that release is ready to cut.
3. Aligned, every loop exited and everything green → **merge**. Follow the repo's merge method (`AGENTS.md`; ff-only where that is the convention). A repo withholds this in its `AGENTS.md` → leave the PR ready and unmerged, and say which line withheld it.
4. Merged → tick the item off `todo.md` per `~/.claude/CLAUDE.md` → "Working loop". Ticking it off emptied its release → the summary says the release is ready to cut.
5. Stop. The next chunk gets a fresh session. A release is the human's — prepare it, never cut it.
-1
View File
@@ -6,7 +6,6 @@ Ships when a four-seat scoring run puts every dimension and the overall at 7.0 o
Self-sufficiency, 6.75:
- Give `worker` and `judge` Vocabulary entries, and the interrupt one spelling across `ask`, `needs input` and `interrupt`.
- Reword `CHANGELOG.md` → `## Unreleased` so no line restates `loop-claude --help`.
Shape, 7.0: