Answer prose round 1: 0 🔴, 8 🟡; state what rule-hook refuses, split the decision and credit it to item 73, order review-findings.md by first use, invert the report-naming sentence, and reword the changelog, the stability scratch line and the replay's comments

This commit is contained in:
2026-10-18 01:21:35 +02:00
parent 2b1d3707c8
commit f6f84e534b
10 changed files with 36 additions and 30 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
"""The chunk's review folder, where each reviewer writes its report: skills/larv-review/SKILL.md → "Reports"."""
import os
# Under the home folder: outside every checkout, so no project sees a report; kept across a reboot, so a resumed chunk still reads its rounds. A fixed path, since a headless session has no scratchpad.
# Why here: docs/decisions.md → `review: each reviewer under agents/ writes its full report into the chunk's review folder`.
REPORTS = ".local/state/larv-review"
+1 -1
View File
@@ -24,7 +24,7 @@ default branch lacks, and those logged under the branch's own name.
Run with no arguments in a terminal, it prints this help.
Exit 2 with the rule, why it holds and how to override it, when a rule blocks the call, or when an
Exit 2 with the rule, why it holds and, where the rule takes an override, how to write one, when a rule blocks the call, or when an
override cannot be logged; 0 otherwise. `rule-hook overrides` exits 1 when git cannot read the
checkout or the branch's reflog. Exit 1, a non-blocking error to Claude Code, on input it
cannot read.
+4 -4
View File
@@ -11,8 +11,8 @@ branch stands at the newest commit authored before the round's chunk began, so a
shows the chunk's change. The prompt names the clone in place of the worktree it named, which the
chunk has since removed. A round whose code it cannot find in this way is not replayed; stderr
names it and why. The prompt also names a copy of the chunk's review folder in place of that
folder, holding only the reports written after the chunk began and before the round did. A replay whose prompt still
names the review folder finds nothing.
folder, holding only the reports written after the chunk began and before the round did. A replay
whose prompt still names the review folder finds nothing.
It first replays every round on the project's rung, the reference reviewer. Findings on record
that the reference reviewer does not raise again may rest on code or rules that have changed
@@ -174,12 +174,12 @@ def review(found: Round, code: Code, rung: Rung, home: pathlib.Path, effects: Ef
def reviewed_in(found: Round, code: Code, rung: Rung, home: pathlib.Path, effects: Effects, clone: str, reports: str) -> str | Failure | Limited:
"""The report of found's reviewer on rung, replayed on code cloned into clone, with its review folder copied into reports."""
# The reviewer writes its report into a copy of the chunk's review folder, so it leaves the chunk's reports as they were and still reads the earlier rounds its prompt names. The copy holds only the reports written after the chunk began and before the round began: the round's own report, later ones, and an earlier attempt's at the item in the same worktree, would hand the reviewer the findings it is to find.
# The round's own report, any later one, and one from an earlier attempt at the item in the same worktree would each hand the reviewer the findings it is to find.
folder = pathlib.Path(review_folder(str(home), code.path))
for written in folder.iterdir() if folder.is_dir() else ():
if written.is_file() and found.began <= written.stat().st_mtime < found.seconds:
shutil.copy2(written, reports)
# The folder goes first: for a worktree outside home, its path holds the worktree's, which code.path would otherwise turn into the clone's.
# Replace the folder's path first: outside home it contains the worktree's path, which replacing code.path would otherwise turn into the clone's.
prompt = found.prompt.replace(str(folder), reports).replace(f"~/{folder.relative_to(home)}", reports).replace(code.path, clone)
# A spelling the rewrite misses, such as $HOME/, would leave the reviewer the live folder and the findings in it.
if REPORTS in prompt.replace(reports, ""):