Answer prose round 1: 1 🔴, 9 🟡 (0 misread); count the home's six links everywhere, say that gather builds the home too, define the setup as the release the machine runs, and reword what the reviewer read twice

This commit is contained in:
2026-12-04 05:13:48 +01:00
parent bfa2ccaca4
commit 18fae1956e
12 changed files with 32 additions and 25 deletions
+4 -4
View File
@@ -18,8 +18,8 @@ HUMAN_RULE_DIR = "rules"
# How the judge's prompt names the records above, in the order it reads them.
RECORDS_NAMED = "the project's working rules and decisions, then the human's rules for every project"
# How prose names a file of the setup wherever its clone lies: the setup's CLAUDE.md → "Vocabulary", "setup".
SETUPS = "the setup's"
HUMAN_RULE_NAMES = (f"{SETUPS} {HUMAN_RULES_FILE}", f"{SETUPS} {HUMAN_RULE_DIR}/", "the project's review standards")
OF_THE_SETUP = "the setup's"
HUMAN_RULE_NAMES = (f"{OF_THE_SETUP} {HUMAN_RULES_FILE}", f"{OF_THE_SETUP} {HUMAN_RULE_DIR}/", "the project's review standards")
CONSEQUENCE = "the judge cannot read the records"
@@ -57,8 +57,8 @@ def file_text(path: pathlib.Path) -> str | Failure:
def named(rule: pathlib.Path, home: pathlib.Path, claude_dir: pathlib.Path) -> str:
"""rule's path as the human writes it: as the setup's where it lies in claude_dir, the loop's Claude home, or in the clone, or ~/ for the rest of home, or else in full."""
"""rule's path as the human writes it. A file in claude_dir, the loop's Claude home, or in the clone is the setup's. Any other is written from ~/ where it lies in home, else in full."""
for setup in (claude_dir, RELEASE_ROOT):
if rule.is_relative_to(setup):
return f"{SETUPS} {rule.relative_to(setup)}"
return f"{OF_THE_SETUP} {rule.relative_to(setup)}"
return f"~/{rule.relative_to(home)}" if rule.is_relative_to(home) else str(rule)
+12 -5
View File
@@ -11,6 +11,9 @@ from agent_cycle import judge
from chunk_driver.project import records
from loop_state.paths import RELEASE_ROOT
KIM = pathlib.Path("/home/kim")
CLAUDE_HOME = KIM / "share" / "claude-home"
class Records(unittest.TestCase):
def test_heads_each_record_by_its_name_the_humans_rules_last(self):
@@ -55,11 +58,15 @@ class Records(unittest.TestCase):
self.assertEqual(records.read_records(root, claude_md.parents[1], {}, claude_md.parent), Failure(f"no config names the checkout {root}: write {claude_md.parents[1]}/.config/build-release/<key>/config.toml, as `project-config --help` shows - the judge cannot read the records."))
def test_names_a_file_of_the_setup_alike_in_the_loops_home_and_in_the_clone(self):
home = pathlib.Path("/home/kim")
for rule in (home / "share" / "claude-home" / "rules" / "todo-items.md", RELEASE_ROOT / "rules" / "todo-items.md"):
self.assertEqual(records.named(rule, home, home / "share" / "claude-home"), "the setup's rules/todo-items.md")
self.assertEqual(records.named(home / "standards" / "prose.md", home, home / "share" / "claude-home"), "~/standards/prose.md")
self.assertEqual(records.named(pathlib.Path("/srv/standards/prose.md"), home, home / "share" / "claude-home"), "/srv/standards/prose.md")
for rule in (CLAUDE_HOME / "rules" / "todo-items.md", RELEASE_ROOT / "rules" / "todo-items.md"):
with self.subTest(rule):
self.assertEqual(records.named(rule, KIM, CLAUDE_HOME), "the setup's rules/todo-items.md")
def test_names_any_other_file_under_the_home_from_the_tilde(self):
self.assertEqual(records.named(KIM / "standards" / "prose.md", KIM, CLAUDE_HOME), "~/standards/prose.md")
def test_names_a_file_outside_the_home_in_full(self):
self.assertEqual(records.named(pathlib.Path("/srv/standards/prose.md"), KIM, CLAUDE_HOME), "/srv/standards/prose.md")
def test_puts_the_records_handed_in_first_and_reads_only_the_humans_rules_without_a_checkout(self):
with tempfile.TemporaryDirectory() as root: