From d9d007fa7a4b7488aa692bfb423d73b53b11d914 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Fri, 16 Oct 2026 23:27:24 +0200 Subject: [PATCH] =?UTF-8?q?Answer=20prose=20round=201:=200=20=F0=9F=94=B4,?= =?UTF-8?q?=201=20=F0=9F=9F=A1;=20list=20no=20kinds=20of=20rejected=20repl?= =?UTF-8?q?y=20in=20the=20changelog,=20say=20rejected=20throughout,=20and?= =?UTF-8?q?=20rewrap=20the=20help=20paragraph?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 2 +- bin/loop_claude/cycle/judge.py | 3 +-- bin/loop_claude/cycle/retry.py | 2 +- bin/loop_claude/cycle/run.py | 2 +- bin/loop_claude/loop/main.py | 12 ++++++------ bin/transcript_archive/outcomes.py | 2 +- 6 files changed, 11 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0311b096..0a35e41b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,6 @@ ## Unreleased -- `loop-claude` archives each judge reply it rejects in the chunk's `.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. - 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. @@ -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. - `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`. +- `loop-claude` archives each judge reply it rejects in the chunk's `.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 diff --git a/bin/loop_claude/cycle/judge.py b/bin/loop_claude/cycle/judge.py index b3f73c69..2b5350f6 100644 --- a/bin/loop_claude/cycle/judge.py +++ b/bin/loop_claude/cycle/judge.py @@ -76,7 +76,7 @@ JUDGE_SCHEMA = { @dataclasses.dataclass(frozen=True) 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 @@ -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: - """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) diff --git a/bin/loop_claude/cycle/retry.py b/bin/loop_claude/cycle/retry.py index 149d52d0..ca4ba056 100644 --- a/bin/loop_claude/cycle/retry.py +++ b/bin/loop_claude/cycle/retry.py @@ -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: - """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 while True: result = attempt() diff --git a/bin/loop_claude/cycle/run.py b/bin/loop_claude/cycle/run.py index 3fc69489..b2a8b13a 100644 --- a/bin/loop_claude/cycle/run.py +++ b/bin/loop_claude/cycle/run.py @@ -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: - """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()): return Stop(1, unkept.reason) return None diff --git a/bin/loop_claude/loop/main.py b/bin/loop_claude/loop/main.py index cce7eb34..0f8e2157 100644 --- a/bin/loop_claude/loop/main.py +++ b/bin/loop_claude/loop/main.py @@ -30,12 +30,12 @@ copied to $LOOP_CLAUDE_TRANSCRIPTS///.jsonl (default line with a timestamp, the same for every cycle of a chunk. Beside the copy, .outcomes.md 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 -question it answers; each judge reply the loop rejected, with why and the reply as json; and why -the loop stopped. Each of these opens with its UTC time. Claude Code keeps a folder per session -beside its transcript, holding the subagents' -transcripts among other files; that folder, and every other file named after the session except -the transcript, are copied into /session/. A file there is replaced only by a version that -grew from it. A file Claude Code rewrote lands beside its copy as .. +question it answers; each judge reply the loop rejected, with the reason and the reply as json; +and why the loop stopped. Each of these opens with its UTC time. Claude Code keeps a folder per +session beside its transcript, holding the subagents' transcripts among other files; that folder, +and every other file named after the session except the transcript, are copied into +/session/. A file there is replaced only by a version that grew from it. A file Claude Code +rewrote lands beside its copy as .. Every claude loop-claude starts runs the project's model, saved per in ~/.claude/loop-claude-models.json and read each cycle, unless routing, below, puts the worker, diff --git a/bin/transcript_archive/outcomes.py b/bin/transcript_archive/outcomes.py index 02c21757..d987f9da 100644 --- a/bin/transcript_archive/outcomes.py +++ b/bin/transcript_archive/outcomes.py @@ -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: - """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}"