From 3229f13b7a99db7ba6bd922c196c9133e872d72d Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Tue, 17 Nov 2026 10:56:35 +0100 Subject: [PATCH] =?UTF-8?q?Answer=20stability=20round=201:=201=20?= =?UTF-8?q?=F0=9F=94=B4,=203=20=F0=9F=9F=A1=20(0=20misread);=20define=20SE?= =?UTF-8?q?AT=5FAGENT=20once,=20drop=20the=20duplicate=20prepare-scoring?= =?UTF-8?q?=20check,=20restore=20the=20worktree=20assertion?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/larv_review/main.py | 6 +----- bin/larv_review/scoring_setup.py | 3 +-- bin/larv_review/test_scoring_setup.py | 2 +- bin/repo_checks/test_reviewer_launches.py | 4 ++-- bin/review_rules/review_passes.py | 2 ++ bin/review_rules/test_review_passes.py | 4 ++-- bin/rule_hook/reviewer_rung.py | 5 ++--- 7 files changed, 11 insertions(+), 15 deletions(-) diff --git a/bin/larv_review/main.py b/bin/larv_review/main.py index a96b52de..0080985b 100644 --- a/bin/larv_review/main.py +++ b/bin/larv_review/main.py @@ -211,10 +211,6 @@ def run_needs_scoring_run(given: list[str]) -> Failure | None: return with_default_branch(lambda default: needs_scoring_run(default, [int(id_) for id_ in given], pathlib.Path.home()), stale_ok=False) -def fits_prepare_scoring(given: list[str]) -> bool: - return not given - - def run_record_scoring(given: list[str]) -> Failure | None: return with_default_branch(lambda default: record_scoring(default, pathlib.Path(given[0]), [int(id_) for id_ in given[1:]], pathlib.Path.home(), time.time(), print, warn), stale_ok=False) @@ -235,7 +231,7 @@ COMMANDS = { "needs-scoring-run": Command("needs-scoring-run [...]", are_ids, run_needs_scoring_run, ids_from=0), "scoring-run-owed": Command("scoring-run-owed", no_arguments, lambda given: with_default_branch(lambda default: owed(default, pathlib.Path.home()), stale_ok=False)), "record-ruling": Command("record-ruling ", lambda given: len(given) == 1, lambda given: printed(record_ruling(pathlib.Path(given[0]), pathlib.Path.home(), time.time()))), - "prepare-scoring": Command("prepare-scoring", fits_prepare_scoring, lambda given: prepared_scoring()), + "prepare-scoring": Command("prepare-scoring", no_arguments, lambda given: prepared_scoring()), "record-scoring": Command("record-scoring [...]", lambda given: bool(given) and are_ids(given[1:]), run_record_scoring, ids_from=1), "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()))), diff --git a/bin/larv_review/scoring_setup.py b/bin/larv_review/scoring_setup.py index 16c4fb92..10aae6f8 100644 --- a/bin/larv_review/scoring_setup.py +++ b/bin/larv_review/scoring_setup.py @@ -10,6 +10,7 @@ from git_cli.git_repo import git from project_config.main import located from review_rules.review_folder import made_review_folder, review_folder from project_config.settings import ProjectConfig +from review_rules.review_passes import SEAT_AGENT from record_store.stores import store PANEL = pathlib.Path(__file__).resolve().parents[2] / "skills" / "comprehension-panel" @@ -22,8 +23,6 @@ SEATS = ( ) # The dimensions a seat scores beside the overall, which comes last in DIMENSIONS. PANEL_DIMENSIONS = DIMENSIONS[:-1] -# The agent under agents/ that runs each seat. -SEAT_AGENT = "comprehension-seat" VALUE_NAMES = ("language", "kind", "domain", "domain docs", "3am question") # The files no seat may open, by the setting that places each, and what each is. FORBIDDEN = (("plan", "the plan"), ("decisions", "the decision log"), ("comprehension-history", "past panels' records"), ("reading-cost", "past chunks' reading cost")) diff --git a/bin/larv_review/test_scoring_setup.py b/bin/larv_review/test_scoring_setup.py index 699d0f1a..38602a6e 100644 --- a/bin/larv_review/test_scoring_setup.py +++ b/bin/larv_review/test_scoring_setup.py @@ -181,7 +181,7 @@ class PrepareScoring(unittest.TestCase): unread = self.prepare() assert isinstance(unread, Failure), unread self.assertTrue(unread.reason.startswith(f"cannot read {self.checkout}/AGENTS.md: "), unread.reason) - + self.assertEqual(len(self.git("worktree", "list").splitlines()), 1) if __name__ == "__main__": diff --git a/bin/repo_checks/test_reviewer_launches.py b/bin/repo_checks/test_reviewer_launches.py index 7dd40cae..e6cc4a8d 100644 --- a/bin/repo_checks/test_reviewer_launches.py +++ b/bin/repo_checks/test_reviewer_launches.py @@ -5,9 +5,9 @@ import unittest sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[1])) -from review_rules.review_passes import PASS_AGENTS, PASSES +from review_rules.review_passes import PASS_AGENTS, PASSES, SEAT_AGENT from repo_checks import ROOT -from rule_hook.reviewer_rung import SEAT, SEAT_AGENT, SECURITY_OPENER +from rule_hook.reviewer_rung import SEAT, SECURITY_OPENER OPENING = re.compile(r"^## Opening\n+```\n([^\n]+?\.)(?: |\n)", re.MULTILINE) # An agent's name, as opposed to the skill or plugin that reviews a pass. diff --git a/bin/review_rules/review_passes.py b/bin/review_rules/review_passes.py index 7304b2ad..1acc35f0 100644 --- a/bin/review_rules/review_passes.py +++ b/bin/review_rules/review_passes.py @@ -13,6 +13,8 @@ def _reviewed(name: str) -> typing.TypeGuard[ReviewedPass]: return name in typing.get_args(ReviewedPass) +# The agent under agents/ that every comprehension seat runs as; it reviews no pass, so it is not in `PASS_AGENTS`: skills/larv-review/SKILL.md → "Comprehension check". +SEAT_AGENT = "comprehension-seat" # The passes that have an agent. A pass missing from `ReviewedPass` drops out of it, which test_review_passes fails on. REVIEWERS: dict[ReviewedPass, str] = {name: agent for name, agent in PASS_AGENTS.items() if agent and _reviewed(name)} diff --git a/bin/review_rules/test_review_passes.py b/bin/review_rules/test_review_passes.py index 85ba255b..47f4127e 100644 --- a/bin/review_rules/test_review_passes.py +++ b/bin/review_rules/test_review_passes.py @@ -5,7 +5,7 @@ import unittest sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[1])) -from review_rules.review_passes import PASS_AGENTS, PASSES, prose, ReviewedPass, REVIEWERS +from review_rules.review_passes import PASS_AGENTS, PASSES, prose, ReviewedPass, REVIEWERS, SEAT_AGENT class ReviewPasses(unittest.TestCase): @@ -15,7 +15,7 @@ class ReviewPasses(unittest.TestCase): def test_names_each_agent_under_agents_beside_the_comprehension_seat_that_reviews_no_pass(self): agents = pathlib.Path(__file__).resolve().parents[2] / "agents" - self.assertEqual(sorted([*REVIEWERS.values(), "comprehension-seat"]), sorted(path.stem for path in agents.glob("*.md"))) + self.assertEqual(sorted([*REVIEWERS.values(), SEAT_AGENT]), sorted(path.stem for path in agents.glob("*.md"))) def test_counts_markdown_an_agent_follows_as_config_and_the_rest_as_prose(self): for path in ("README.md", "docs/decisions.md", "todo.md", "workflow-bench/README.md"): diff --git a/bin/rule_hook/reviewer_rung.py b/bin/rule_hook/reviewer_rung.py index d3b3b39c..0f4859de 100644 --- a/bin/rule_hook/reviewer_rung.py +++ b/bin/rule_hook/reviewer_rung.py @@ -10,14 +10,13 @@ from rule_hook.git import guarded_git from model_routing.worker_rungs import handed, hands_rungs from model_routing.ladder import Ladder, ReviewKind, Rung from model_routing.ladder_file import project_ladder -from review_rules.review_passes import prose, REVIEWERS +from review_rules.review_passes import prose, REVIEWERS, SEAT_AGENT from claude_code.transcript import read_transcript from claude_code.entries import UserText # The pass each agent under agents/ reviews. PASS_OF = {agent: kind for kind, agent in REVIEWERS.items()} -# The agent under agents/ that every comprehension seat runs as, and the opening of every seat's prompt, which also marks a seat launched as another agent: skills/larv-review/SKILL.md → "Comprehension check", skills/comprehension-panel/seat-prompts.md → "Opening". -SEAT_AGENT = "comprehension-seat" +# The opening of every seat's prompt, which marks a seat launched as an agent other than SEAT_AGENT: skills/comprehension-panel/seat-prompts.md → "Opening". SEAT = "You are one seat of a comprehension panel." # The opening of the security pass's prompt: skills/larv-review/SKILL.md → "Security". SECURITY_OPENER = "You are the security pass for this chunk."