Answer prose round 1: 0 🔴, 1 🟡; list no kinds of rejected reply in the changelog, say rejected throughout, and rewrap the help paragraph

This commit is contained in:
2026-10-16 23:27:24 +02:00
parent 3be800cb46
commit d9d007fa7a
6 changed files with 11 additions and 12 deletions
+1 -1
View File
@@ -2,7 +2,6 @@
## Unreleased ## Unreleased
- `loop-claude` archives each judge reply it rejects in the chunk's `<sha256>.outcomes.md`, with why and the reply as json: a reply that misses or mistypes a field, or whose passage the transcript does not hold. Before, such a reply reached only stderr, so a run that exited 1 overnight could not say what the judge had returned. stderr no longer repeats the reply after its reason. If archiving fails, `loop-claude` exits 1, as for any archive.
- `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. - `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. - 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.
- Reshape every project's `todo.md` to the new shape below: until it is reshaped, that is the project's only work, as it is while README.md lacks Goals and Audience, and `rank_todo.py` says so. First move every machine to this release: an older release rejects the new formula, so it fails on every reshaped `todo.md`. Then mark the README's goals `**Maintain:**` or `**Achieve:**`, score each item's L, E and I, and set a bar on the new scale below the score of every item to keep, since the old bar would drop most items. Until then, an old-shape `todo.md` still ranks by its own formula and weights. - Reshape every project's `todo.md` to the new shape below: until it is reshaped, that is the project's only work, as it is while README.md lacks Goals and Audience, and `rank_todo.py` says so. First move every machine to this release: an older release rejects the new formula, so it fails on every reshaped `todo.md`. Then mark the README's goals `**Maintain:**` or `**Achieve:**`, score each item's L, E and I, and set a bar on the new scale below the score of every item to keep, since the old bar would drop most items. Until then, an old-shape `todo.md` still ranks by its own formula and weights.
@@ -14,6 +13,7 @@
- larv-review's principles audit is a pass of its own, and runs on every chunk that changes code, config or tests, not only on one with an architectural decision. A chunk of prose or planning alone skips it. - larv-review's principles audit is a pass of its own, and runs on every chunk that changes code, config or tests, not only on one with an architectural decision. A chunk of prose or planning alone skips it.
- `rule-hook` refuses an Agent call that launches a reviewer, a comprehension seat or the security pass on a rung below the one `loop-claude` names for it, and takes no override: pass the model and effort the refusal names. - `rule-hook` refuses an Agent call that launches a reviewer, a comprehension seat or the security pass on a rung below the one `loop-claude` names for it, and takes no override: pass the model and effort the refusal names.
- `score-outcomes` lists a project's score anchors: the shipped items its `docs/score-anchors.md` names for each level of L, E and I, each with what its chunk measured. `rules/todo-items.md` has a scorer compare a new item with them, and says how to choose two or three per level. Add the file to each project that merges with merge commits; elsewhere, score by the level descriptions in `rules/todo-items.md`. - `score-outcomes` lists a project's score anchors: the shipped items its `docs/score-anchors.md` names for each level of L, E and I, each with what its chunk measured. `rules/todo-items.md` has a scorer compare a new item with them, and says how to choose two or three per level. Add the file to each project that merges with merge commits; elsewhere, score by the level descriptions in `rules/todo-items.md`.
- `loop-claude` archives each judge reply it rejects in the chunk's `<sha256>.outcomes.md`, with the reason and the reply as json. Before, such a reply reached only stderr, so a run that exited 1 overnight could not say what the judge had returned. stderr now prints only the reason; the reply is in outcomes.md. If archiving fails, `loop-claude` exits 1.
## 0.1.0 ## 0.1.0
+1 -2
View File
@@ -76,7 +76,7 @@ JUDGE_SCHEMA = {
@dataclasses.dataclass(frozen=True) @dataclasses.dataclass(frozen=True)
class Rejected(Failure): class Rejected(Failure):
"""The judge replied, and loop-claude refused the reply for the reason; reply is what the judge returned, as json.""" """A judge reply loop-claude rejected: reason says why, reply holds the reply as json."""
reply: str reply: str
@@ -134,7 +134,6 @@ def verdict_from(output: object) -> Verdict | Failure:
def judge(root: str, task: str, premises: str, records: str, rendered_transcript: str, rung: Rung, effects: Effects, keep: typing.Callable[[Rejected], Stop | None]) -> Verdict | Stop: def judge(root: str, task: str, premises: str, records: str, rendered_transcript: str, rung: Rung, effects: Effects, keep: typing.Callable[[Rejected], Stop | None]) -> Verdict | Stop:
"""keep sees each reply loop-claude rejected, the last of three included; a Stop from it ends the retrying."""
return retried("judge", lambda: judge_once(root, task, premises, records, rendered_transcript, rung, effects), effects, lambda failure: keep(failure) if isinstance(failure, Rejected) else None) return retried("judge", lambda: judge_once(root, task, premises, records, rendered_transcript, rung, effects), effects, lambda failure: keep(failure) if isinstance(failure, Rejected) else None)
+1 -1
View File
@@ -15,7 +15,7 @@ UNKNOWN_RESET_POLL = 600
def retried(who: str, attempt: typing.Callable[[], T | Failure | Limited], effects: Effects, keep: typing.Callable[[Failure], Stop | None] = lambda failure: None) -> T | Stop: def retried(who: str, attempt: typing.Callable[[], T | Failure | Limited], effects: Effects, keep: typing.Callable[[Failure], Stop | None] = lambda failure: None) -> T | Stop:
"""The attempt's result, retried on a failure; keep sees each failure, the last of three included, and a Stop from it ends the retrying.""" """The attempt's result, retried on a failure. keep sees each failure, the third running included; a Stop from keep ends the retrying."""
failures = 0 failures = 0
while True: while True:
result = attempt() result = attempt()
+1 -1
View File
@@ -120,7 +120,7 @@ def rule(cycle: Cycle, transcript_path: str) -> Ruled | Stop:
def keep_rejection(cycle: Cycle, transcript_path: str, rejected: Rejected) -> Stop | None: def keep_rejection(cycle: Cycle, transcript_path: str, rejected: Rejected) -> Stop | None:
"""Archives a judge reply that loop-claude refused, so the archive answers why a run exited 1 or a verdict took a retry.""" """Archives a judge reply loop-claude rejected, so the archive shows what the judge returned before a retry or an exit 1."""
if unkept := archive(cycle.project_archive, transcript_path, cycle.task, outcomes.rejected(rejected.reason, rejected.reply, str(judge_of(cycle))), cycle.effects.now()): if unkept := archive(cycle.project_archive, transcript_path, cycle.task, outcomes.rejected(rejected.reason, rejected.reply, str(judge_of(cycle))), cycle.effects.now()):
return Stop(1, unkept.reason) return Stop(1, unkept.reason)
return None return None
+6 -6
View File
@@ -30,12 +30,12 @@ copied to $LOOP_CLAUDE_TRANSCRIPTS/<key>/<chunk>/<sha256>.jsonl (default
line with a timestamp, the same for every cycle of a chunk. Beside the copy, <sha256>.outcomes.md line with a timestamp, the same for every cycle of a chunk. Beside the copy, <sha256>.outcomes.md
holds the verdict, with the transcript passage the judge rested it on, any passage it quoted to holds the verdict, with the transcript passage the judge rested it on, any passage it quoted to
show an escalation trigger fired, and the judge's rung; each answer the judge quoted, with the show an escalation trigger fired, and the judge's rung; each answer the judge quoted, with the
question it answers; each judge reply the loop rejected, with why and the reply as json; and why question it answers; each judge reply the loop rejected, with the reason and the reply as json;
the loop stopped. Each of these opens with its UTC time. Claude Code keeps a folder per session and why the loop stopped. Each of these opens with its UTC time. Claude Code keeps a folder per
beside its transcript, holding the subagents' session beside its transcript, holding the subagents' transcripts among other files; that folder,
transcripts among other files; that folder, and every other file named after the session except and every other file named after the session except the transcript, are copied into
the transcript, are copied into <chunk>/session/. A file there is replaced only by a version that <chunk>/session/. A file there is replaced only by a version that grew from it. A file Claude Code
grew from it. A file Claude Code rewrote lands beside its copy as <name>.<hash of its content>. rewrote lands beside its copy as <name>.<hash of its content>.
Every claude loop-claude starts runs the project's model, saved per <key> in 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, ~/.claude/loop-claude-models.json and read each cycle, unless routing, below, puts the worker,
+1 -1
View File
@@ -43,7 +43,7 @@ def answered(question: str, sources: str, answer: str, evidence: str, judge: str
def rejected(why: str, reply: str, judge: str) -> str: def rejected(why: str, reply: str, judge: str) -> str:
"""A judge reply that loop-claude refused: why, and the reply as the judge returned it, as json.""" """A judge reply loop-claude rejected, with the reason and the reply as json."""
return f"{REJECTED}: {why}\n\nReply:\n{quoted(reply)}\n\n{JUDGE}{judge}" return f"{REJECTED}: {why}\n\nReply:\n{quoted(reply)}\n\n{JUDGE}{judge}"