Spell the replay's flag --omit-claude-md, as a panel of three readers picked

This commit is contained in:
2026-11-12 05:51:12 +01:00
parent 9c11fefe45
commit 07aa4b9f83
3 changed files with 11 additions and 11 deletions
+7 -7
View File
@@ -1,6 +1,6 @@
"""Replay a review pass's archived rounds on the rungs below the project's, to find which rungs may run its reviewer: docs/decisions.md → `routing: a review pass runs below the project's rung only on a rung that a replay of its rounds shows finding every 🔴 and 🟡 the project's rung finds`.
usage: review-replay <pass> <model> [--without-claude-md]
usage: review-replay <pass> <model> [--omit-claude-md]
<pass> is one of architecture, principles, overrides, stability, product-owner or prose.
<model> is a project model on the routing ladder, such as claude-opus-5-5. The tool replays the
@@ -25,7 +25,7 @@ and counts a finding only where the report raises it as 🔴 or 🟡. The tool p
rung missed and the lowest rung that, like each rung above it, missed none. That rung is the
evidence for running the pass's reviewer on it; the decision above records each run.
With --without-claude-md it tests instead whether the pass's reviewer may start without CLAUDE.md:
With --omit-claude-md it tests instead whether the pass's reviewer may start without CLAUDE.md:
docs/decisions.md → `agents/: a reviewer starts without CLAUDE.md`. It replays every round three
times on the project's rung: twice as archived, then once without the instruction files. The
unchanged reviewer does not find the same findings twice, so the reviewer without CLAUDE.md is held
@@ -63,10 +63,10 @@ from review_rules.review_folder import REPORTS, review_folder
from review_rules.review_passes import ReviewedPass, REVIEWERS
TOOL = "review-replay"
WITHOUT = "--without-claude-md"
OMIT = "--omit-claude-md"
# Starts claude without its instruction files, as `omitClaudeMd` starts a subagent.
NO_CLAUDE_MD = ["--settings", json.dumps({"env": {"CLAUDE_CODE_DISABLE_CLAUDE_MDS": "1"}})]
USAGE = f"{TOOL} <pass> <model> [{WITHOUT}], <pass> one of {', '.join(REVIEWERS)} and <model> a model on the routing ladder"
USAGE = f"{TOOL} <pass> <model> [{OMIT}], <pass> one of {', '.join(REVIEWERS)} and <model> a model on the routing ladder"
LATEST = 10
MATCH_SCHEMA = {"type": "object", "properties": {"found": {"type": "array", "items": {"type": "integer"}}}, "required": ["found"], "additionalProperties": False}
@@ -123,12 +123,12 @@ def compared(reviewed: str, project: Rung, chosen: list[Round], found_on: typing
def pass_and_model(argv: list[str]) -> tuple[ReviewedPass, Rung, bool] | None:
"""The pass, the project's rung of the model, and whether WITHOUT follows, as argv names them in `<pass> <model> [--without-claude-md]`; None for any other argv."""
if argv[2:] not in ([], [WITHOUT]) or len(argv) < 2:
"""The pass, the project's rung of the model, and whether OMIT follows, as argv names them in `<pass> <model> [--omit-claude-md]`; None for any other argv."""
if argv[2:] not in ([], [OMIT]) or len(argv) < 2:
return None
reviewed = next((kind for kind in REVIEWERS if kind == argv[0]), None)
project = project_rung(argv[1])
return (reviewed, project, argv[2:] == [WITHOUT]) if reviewed and project else None
return (reviewed, project, argv[2:] == [OMIT]) if reviewed and project else None
def codes_found(rounds: list[Round], effects: Effects) -> dict[Round, Code]:
+3 -3
View File
@@ -262,7 +262,7 @@ class Main(unittest.TestCase):
def test_without_claude_md_replays_each_round_twice_with_it_and_once_without_on_the_project_rung(self):
finds = iter(([0, 1], [0], [1]))
code, out, err = self.run_main(["stability", "claude-opus-5-5", "--without-claude-md"], lambda rung: {"found": next(finds)})
code, out, err = self.run_main(["stability", "claude-opus-5-5", "--omit-claude-md"], lambda rung: {"found": next(finds)})
self.assertEqual(code, 0, err)
self.assertEqual([rung for rung, *_ in self.reviews], [REFERENCE] * 3)
context = reviewer_context(self.home)
@@ -275,7 +275,7 @@ class Main(unittest.TestCase):
))
def test_without_claude_md_stops_at_a_usage_limit(self):
code, out, _ = self.run_main(["stability", "claude-opus-5-5", "--without-claude-md"], lambda rung: {"type": "result", "api_error_status": 429, "result": "You've hit your limit"})
code, out, _ = self.run_main(["stability", "claude-opus-5-5", "--omit-claude-md"], lambda rung: {"type": "result", "api_error_status": 429, "result": "You've hit your limit"})
self.assertEqual((code, out), (1, ""))
self.assertEqual(len(self.reviews), 1)
@@ -470,7 +470,7 @@ class Main(unittest.TestCase):
def test_prints_the_help(self):
code, out, _ = self.run_main(["-h"], unused)
self.assertEqual((code, out.splitlines()[2]), (0, "usage: review-replay <pass> <model> [--without-claude-md]"))
self.assertEqual((code, out.splitlines()[2]), (0, "usage: review-replay <pass> <model> [--omit-claude-md]"))
self.assertIn(f"{', '.join(list(REVIEWERS)[:-1])} or {list(REVIEWERS)[-1]}.", " ".join(out.split()))
def test_the_launcher_prints_the_help(self):