Answer principles round 1: 0 🔴, 3 🟡; lower a replayed pass only while the worker runs no higher than the project's rung, confine every agent under agents/ again, type REPLAYED's keys as passes and test its rungs, and state why the other passes are not replayed

This commit is contained in:
2026-10-18 18:07:36 +02:00
parent ec2a16b371
commit bc242b2998
10 changed files with 54 additions and 44 deletions
+5 -2
View File
@@ -1,15 +1,18 @@
"""Refuse a reviewer's file call other than a Write of its report into the reports folder: skills/larv-review/review-findings.md → "Report"."""
import os
import pathlib
from rule_hook.rules import Breach
from rule_hook.call import Call
from rule_hook.reviewer_rung import PASS_OF
from review_folder import REPORTS
# A reviewer is an agent under agents/, as CLAUDE.md → "Vocabulary" defines it; read from the folder, so an agent the routing tables miss is still confined.
REVIEWERS = frozenset(path.stem for path in (pathlib.Path(__file__).resolve().parents[2] / "agents").glob("*.md"))
def report_breaches(call: Call, path: str, home: str) -> list[Breach]:
"""The breach of a file call from a reviewer that is not a Write under REPORTS in home; none from any other agent."""
if call.agent not in PASS_OF:
if call.agent not in REVIEWERS:
return []
written = os.path.realpath(os.path.join(call.cwd, path))
reports = os.path.realpath(os.path.join(home, REPORTS))