Have larv-review round-title print a round commit's counts from its report, and rule-hook refuse a title that differs
This commit is contained in:
+13
-3
@@ -1,4 +1,4 @@
|
||||
"""Hold larv-review's mechanical rules: the chunk's review folder, the paired ruling's base and vote count, each pass's rounds, the scoring run's trigger and setup; the comprehension history's format, its latest places and its count of how often seats agree; and the header of each reviewer's prompt.
|
||||
"""Hold larv-review's mechanical rules: the chunk's review folder, the paired ruling's base and vote count, each pass's rounds and 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 the header of each reviewer's prompt.
|
||||
|
||||
usage: larv-review {commands}
|
||||
|
||||
@@ -10,8 +10,8 @@ to 10. Each seat names the places it found hard.
|
||||
Run it inside a project checkout or one of its worktrees. Each command but review-folder,
|
||||
record-ruling, places and agreement first fetches origin, when the checkout has that remote, and
|
||||
takes origin's default branch, or else the local main or master, as the default branch. When the
|
||||
fetch fails, round-count and reviewer-header read origin as last fetched and say so on stderr; the
|
||||
other four exit 1.
|
||||
fetch fails, round-count, reviewer-header and round-title read origin as last fetched and say so on
|
||||
stderr; the other four exit 1.
|
||||
The history is docs/comprehension-history.md in the checkout.
|
||||
|
||||
review-folder makes the chunk's review folder, where each reviewer writes its report, and prints its
|
||||
@@ -142,6 +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.
|
||||
|
||||
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,
|
||||
it prints the hook reply that hands the agent the Shared goal, Prose and Vocabulary sections of
|
||||
@@ -176,6 +184,7 @@ from larv_review.plan import plan_reasons
|
||||
from larv_review.scoring_setup import prepare_scoring
|
||||
from larv_review.history_commands import read_agreement, read_places, record_ruling, record_scoring
|
||||
from larv_review.reviewer_header import reviewer_header
|
||||
from larv_review.round_title import round_title
|
||||
from project_config.main import title_templates
|
||||
|
||||
|
||||
@@ -231,6 +240,7 @@ COMMANDS = {
|
||||
"places": Command("places", no_arguments, lambda given: printed(read_places(pathlib.Path.home()))),
|
||||
"agreement": Command("agreement", no_arguments, lambda given: printed(read_agreement(pathlib.Path.home()))),
|
||||
"reviewer-header": Command("reviewer-header <pass> [--rerun]", fits_reviewer_header, run_reviewer_header),
|
||||
"round-title": Command("round-title <pass>", lambda given: len(given) == 1 and given[0] in REVIEWERS, lambda given: with_default_branch(lambda default: printed(round_title(default, given[0], pathlib.Path.home())), stale_ok=True)),
|
||||
"reviewer-context": Command("reviewer-context", no_arguments, lambda given: printed(hook_reply(sys.stdin.read(), pathlib.Path.home()))),
|
||||
}
|
||||
SHAPES = " | ".join(command.shape for command in COMMANDS.values())
|
||||
|
||||
Reference in New Issue
Block a user