Answer prose round 1: 0 🔴, 6 🟡 (0 misread); reword the round-title help, Count rule, refusal and docstrings
This commit is contained in:
@@ -182,7 +182,7 @@ Install puts only `loop-claude` on `PATH`; call the others by their path, such a
|
||||
- `compress-archives` gzips each transcript in loop-claude's archive and each file in the review folders 30 days after it last changed, keeping all of them; Install's crontab line runs it daily.
|
||||
- `deploy-release [--cut] [<checkout>]` moves `~/.claude`, or the checkout named, to the newest release, as Update says; with `--cut`, run in the development clone, it first cuts the next release, as Release says.
|
||||
- `judge-replay <model>` replays loop-claude's judge on archived verdicts of the projects run on the model, and prints what each rung a review climbs to misses, and the lowest rung below them that, like each candidate above it, returns them; `judge-replay --help` states the replay.
|
||||
- `larv-review <command>` holds larv-review's mechanical rules: the chunk's review folder, the paired ruling's base and vote count, each pass's round count and the opening of its round commit's title, counted from the round's report, the scoring run's trigger and setup; the comprehension history's format, its latest places and its count of how often seats agree; and each reviewer's prompt header. `larv-review --help` states them. `settings.json` → `hooks` runs `larv-review reviewer-context` as each subagent starts. A reviewer under `agents/` whose frontmatter has `omitClaudeMd: true` starts without `CLAUDE.md`, and the command hands it that file's "Shared goal", "Prose" and "Vocabulary" sections.
|
||||
- `larv-review <command>` holds larv-review's mechanical rules: the chunk's review folder, the paired ruling's base and vote count, each pass's round count and the opening of its round commit's title, the scoring run's trigger and setup; the comprehension history's format, its latest places and its count of how often seats agree; and each reviewer's prompt header. `larv-review --help` states them. `settings.json` → `hooks` runs `larv-review reviewer-context` as each subagent starts. A reviewer under `agents/` whose frontmatter has `omitClaudeMd: true` starts without `CLAUDE.md`, and the command hands it that file's "Shared goal", "Prose" and "Vocabulary" sections.
|
||||
- `loop-claude <task>` runs a project's next chunks, each in its own tmux window, cycle after cycle; `loop-claude --help` states its contract.
|
||||
- `metric-bench [history]` benches cheap static metrics of a project's Python against the places its comprehension history names as hardest; `metric-bench --help` states the metrics and the scores.
|
||||
- `mutate-changes [--base <ref>] [--prefix <shell text>] [--jobs <n>]` mutation-tests the lines a branch changes and prints each mutant its tests don't kill; `mutate-changes --help` says which tool it runs for each language.
|
||||
|
||||
@@ -142,13 +142,14 @@ it. It exits 1 when the pass takes no more rounds, when `project-config` fails i
|
||||
the principles or standards folder is not a folder with a file in it, or, with --rerun, when the
|
||||
report that asked is missing.
|
||||
|
||||
round-title takes a pass as reviewer-header does, and prints how the commit that answers the pass's
|
||||
next round opens its title, up to and including the `;` before the summary, such as `Answer prose
|
||||
round 1: 0 🔴, 2 🟡 (0 misread);`. It counts the findings in the round's report in the review
|
||||
folder, or in its rerun's where there is one: each line that opens `### 🔴` or `### 🟡`, and of
|
||||
them each whose mark is followed by ` [misread]`. rule-hook's round-title-counts refuses a round
|
||||
title whose counts differ from it. It exits 1 when the pass takes no more rounds or the report is
|
||||
missing.
|
||||
round-title takes a pass as reviewer-header does. It prints how the commit that answers the pass's
|
||||
unanswered round opens its title, after any prefix the project's commit-title template adds, up to
|
||||
and including the `;` before the summary, such as `Answer prose round 1: 0 🔴, 2 🟡 (0 misread);`. It
|
||||
counts the findings in the round's report in the review folder, or in its rerun's where there is
|
||||
one: each line that opens `### 🔴` or `### 🟡`, and of them each whose mark is followed by
|
||||
`[misread]`. rule-hook's round-title-counts refuses a round title whose counts differ from that
|
||||
report's. It exits 1 when the pass takes no more rounds, or the report is missing, unreadable or
|
||||
says BLOCK without such a line.
|
||||
|
||||
reviewer-context is the SubagentStart hook. It reads the hook's input on stdin. For a reviewer
|
||||
whose definition under ~/.claude/agents/ has `omitClaudeMd: true`, and so starts without CLAUDE.md,
|
||||
|
||||
@@ -33,7 +33,7 @@ def round_report(folder: pathlib.Path, pass_: str, round_: int) -> pathlib.Path:
|
||||
|
||||
|
||||
def rerun_report(asked: pathlib.Path) -> pathlib.Path:
|
||||
"""The report of the rerun one rung up that the report asked asks for, which stands in its place."""
|
||||
"""The report of the rerun one rung up that `asked` asks for. It stands in place of `asked`."""
|
||||
return asked.with_name(asked.stem + "-rerun.md")
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"""The titles of larv-review's round commits, `Answer <pass> round <n>: <k> 🔴, <m> 🟡 (<j> misread); <summary>`: each pass's round count against its cap, and the findings the rounds reported, as titled and as the round's report gives them. <j> counts the 🔴 and 🟡 findings a reviewer marked `[misread]`."""
|
||||
"""The titles of larv-review's round commits, `Answer <pass> round <n>: <k> 🔴, <m> 🟡 (<j> misread); <summary>`: each pass's round count against its cap, and the findings each round reported, as its title counts them and as its report does. <j> counts the 🔴 and 🟡 findings a reviewer marked `[misread]`."""
|
||||
import dataclasses
|
||||
import re
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ from project_config.templates import Titles
|
||||
|
||||
|
||||
def round_report_breaches(commit: CommitCall, titles: Titles, home: pathlib.Path) -> list[Breach]:
|
||||
"""A breach for each round title, read as its summary in titles, whose counts differ from those its round's report gives. A title without all three counts is title_breaches' to refuse. A round whose report is missing goes through, as does every round where git cannot name the commit's checkout within 5 seconds."""
|
||||
"""A breach for each round title whose counts differ from those its round's report gives. The round title is the commit title's summary, as `titles` cuts it. A title without all three counts is title_breaches' to refuse. A round whose report is missing or unreadable goes through, as does every round where git cannot name the commit's checkout within 5 seconds."""
|
||||
summaries = [titles.summary(message.strip()) for message in commit.messages]
|
||||
rounds = [(named, counts) for summary in summaries if (named := ROUND.match(summary)) and (counts := title_counts(summary)) and counts.misread is not None]
|
||||
if not rounds:
|
||||
@@ -26,5 +26,5 @@ def round_report_breaches(commit: CommitCall, titles: Titles, home: pathlib.Path
|
||||
report = standing_report(folder, pass_, round_)
|
||||
found = findings_in(report)
|
||||
if not isinstance(found, Failure) and found != counts:
|
||||
breaches.append(Breach("round-title-counts", f"{report} reports `{round_prefix(pass_, round_, found)}`; open the title so, as `larv-review round-title {pass_}` prints it before the round's commit", commit.directory))
|
||||
breaches.append(Breach("round-title-counts", f"{report} counts `{round_prefix(pass_, round_, found)}`; open the title with that, which `larv-review round-title {pass_}` prints", commit.directory))
|
||||
return breaches
|
||||
|
||||
@@ -1067,7 +1067,7 @@ class Hook(unittest.TestCase):
|
||||
|
||||
wrong = commit("Answer stability round 1: 1 🔴, 2 🟡 (0 misread); fix")
|
||||
self.assertEqual(wrong.returncode, 2)
|
||||
self.assertIn(f"Blocked by rule round-title-counts: {folder}/stability-round-1.md reports `Answer stability round 1: 1 🔴, 1 🟡 (1 misread);`", wrong.stderr)
|
||||
self.assertIn(f"Blocked by rule round-title-counts: {folder}/stability-round-1.md counts `Answer stability round 1: 1 🔴, 1 🟡 (1 misread);`", wrong.stderr)
|
||||
self.assertEqual(commit("Answer stability round 1: 1 🔴, 1 🟡 (1 misread); fix").returncode, 0)
|
||||
self.assertEqual(commit("Answer prose round 1: 0 🔴, 3 🟡 (0 misread); fix").returncode, 0, "a round whose report is missing goes through")
|
||||
self.assertEqual(commit("Answer stability round 1: 1 🔴, 2 🟡 (0 misread); fix # rule-override round-title-counts: the reviewer wrote its findings as a list").returncode, 0)
|
||||
|
||||
@@ -83,7 +83,7 @@ Give a reviewer without Bash `git ls-files`'s output in its prompt, since some h
|
||||
|
||||
- **Round.** A round is one review by a pass's reviewer: the first and each re-entry. The rerun after the architect returns Stage 0 questions ("Architecture" below) and a relaunch one rung up ("Rung up" below) stay in their round.
|
||||
- **Auto-reviewer.** The external auto-reviewer (§4) is a pass of its own, each review it posts, up to the cap, a round. Its count is the number of its reviews on the PR, less its reviews of a `Record the comprehension check:` commit, and `round-count` doesn't list it. A commit that answers one of its rounds takes an ordinary title, not an `Answer <pass> round` one, and a round that didn't change anything gets no commit.
|
||||
- **Count.** Close each round of a pass other than the auto-reviewer with one commit that holds the round's fixes. Title it `Answer <pass> round <n>: <k> 🔴, <m> 🟡 (<j> misread); …`: `<pass>` is the pass's name in lower case, such as `full scan`, `<k>` and `<m>` are the 🔴 and 🟡 findings all the round's reviewers reported, and `<j>` is how many of those they marked `[misread]` (review-findings.md → "Misread"); a reviewer that marks none, such as `/security-review`, adds 0. Example: `Answer stability round 1: 1 🔴, 2 🟡 (1 misread); flag a deleted test`. For a pass an agent under `~/.claude/agents/` reviews, `~/.claude/bin/larv-review round-title <pass>` prints the title up to and including its `;`, counted from the round's report, and rule-hook's `round-title-counts` refuses a title whose counts differ from it; write only the summary after it. A round that didn't change anything gets an empty commit (`git commit --allow-empty`). Push the commits when §4 runs next, where there is a remote. `~/.claude/bin/larv-review round-count` prints each pass's count and marks a pass at the cap.
|
||||
- **Count.** Close each round of a pass other than the auto-reviewer with one commit that holds the round's fixes. Title it `Answer <pass> round <n>: <k> 🔴, <m> 🟡 (<j> misread); …`: `<pass>` is the pass's name in lower case, such as `full scan`, `<k>` and `<m>` are the 🔴 and 🟡 findings all the round's reviewers reported, and `<j>` is how many of those they marked `[misread]` (review-findings.md → "Misread"); a reviewer that marks none, such as `/security-review`, adds 0. Example: `Answer stability round 1: 1 🔴, 2 🟡 (1 misread); flag a deleted test`. For a pass an agent under `~/.claude/agents/` reviews, run `~/.claude/bin/larv-review round-title <pass>` and write only the summary after what it prints: the title up to and including its `;`, counted from the round's report. rule-hook's `round-title-counts` refuses a title whose counts differ from that report's. A round that didn't change anything gets an empty commit (`git commit --allow-empty`). Push the commits when §4 runs next, where there is a remote. `~/.claude/bin/larv-review round-count` prints each pass's count and marks a pass at the cap.
|
||||
- **Done.** A pass is done when its latest round leaves no 🔴 or 🟡 standing: none was reported, or each was shown factually wrong, declined, filed, or named under the bar per "Findings", or settled in the PR summary per "Comprehension check" → "Places", or, for the prose pass and a pass at its cap, fixed. A stability pass whose round's fixes skip the next round per "Re-entry" → "Mechanical answers" is done once that rule's run is clean. Resolve that round's 🟢s and ❓s per "Findings" too.
|
||||
- **Cap.** A pass takes at most two rounds per chunk, and the release review's architecture and principles passes five; don't ask the user for more. Answer its last round's findings per "Findings": those fixes merge once the gate passes, unreviewed by that pass. rule-hook's `round-cap` refuses a round commit that would take a pass past its cap, and no override waives it. A review the auto-reviewer posts after its second isn't a round: fix none of it and rerun no pass for it, but file a security finding it raises per `~/.claude/CLAUDE.md` → "Working loop", and any other 🔴 in `todo.md`.
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ Where your report holds a finding against `quality.md`, or you are systems-archi
|
||||
|
||||
## Report
|
||||
|
||||
Write your full report with the Write tool to the file your prompt names. The file is the worker's input, which it searches for each finding's entry, so write it even where your harness says to return findings directly. It holds the verdict, then every finding with its place, its evidence and its fix, as your agent file shapes them. Open each finding with a `###` heading: its severity mark, `[misread]` where you marked it so, then its place, as in ``### 🔴 [misread] `bin/example.py:42` `parse`: an empty line raises IndexError``. `larv-review round-title` counts the round's 🔴 and 🟡 findings by these headings, so no other line of the report may open with `### 🔴` or `### 🟡`. Then return only:
|
||||
Write your full report with the Write tool to the file your prompt names. The file is the worker's input, which it searches for each finding's entry, so write it even where your harness says to return findings directly. It holds the verdict, then every finding with its place, its evidence and its fix, as your agent file shapes them. Open each finding with a `###` heading: its severity mark, `[misread]` where you marked it so, its place, then what is wrong, as in ``### 🔴 [misread] `bin/example.py:42` `parse`: an empty line raises IndexError``. `larv-review round-title` counts the round's 🔴 and 🟡 findings by these headings, so no other line of the report may open with `### 🔴` or `### 🟡`. Then return only:
|
||||
|
||||
- the verdict line
|
||||
- one line per finding, in this order: its severity mark, `[misread]` where you marked the finding so, its place, and what is wrong, in one sentence. Where the finding breaks the review standards' `quality.md` or a file in the config's principles folder, end the line with that file's name. For a 🔀, end it with the reviewer it names. Example: ``🟡 `bin/example.py:42` `parse`: an empty line raises IndexError (technical-principles.md)``
|
||||
|
||||
Reference in New Issue
Block a user