From 4734167be6c384edd294950767d4fefe11e0a5ed Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Tue, 13 Oct 2026 01:30:25 +0200 Subject: [PATCH] Answer stability round 1: restate why a write to the human's rules records no answer, and name HUMAN_RULES_FILE for what it holds --- bin/loop_claude/project/records.py | 6 +++--- docs/decisions.md | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/loop_claude/project/records.py b/bin/loop_claude/project/records.py index ebb28277..c3fa7cea 100644 --- a/bin/loop_claude/project/records.py +++ b/bin/loop_claude/project/records.py @@ -6,14 +6,14 @@ from loop_claude.stop import Stop # The records: these project files and the human's rules; the judge reads them beside the README's premises. RECORD_FILES = ("AGENTS.md", "docs/decisions.md") # The human's rules for every project, under ~/.claude: CLAUDE.md, then each .md file in these folders. -HUMAN_RULES = "CLAUDE.md" +HUMAN_RULES_FILE = "CLAUDE.md" HUMAN_RULE_DIRS = ("rules", "skills/larv-review/standards") -HUMAN_RULE_NAMES = tuple(f"~/.claude/{name}" for name in (HUMAN_RULES, *(f"{folder}/" for folder in HUMAN_RULE_DIRS))) +HUMAN_RULE_NAMES = tuple(f"~/.claude/{name}" for name in (HUMAN_RULES_FILE, *(f"{folder}/" for folder in HUMAN_RULE_DIRS))) def read_records(root: str, claude_dir: pathlib.Path) -> str | Stop: """The project's record files, then the human's rules for every project, CLAUDE.md first, each headed by its name; a file that does not exist is left out.""" - rules = [claude_dir / HUMAN_RULES] + [rule for folder in HUMAN_RULE_DIRS for rule in sorted((claude_dir / folder).glob("*.md"))] + rules = [claude_dir / HUMAN_RULES_FILE] + [rule for folder in HUMAN_RULE_DIRS for rule in sorted((claude_dir / folder).glob("*.md"))] sources = [(root, name, name) for name in RECORD_FILES] sources += [(str(rule.parent), rule.name, f"~/.claude/{rule.relative_to(claude_dir)}") for rule in rules] records = [] diff --git a/docs/decisions.md b/docs/decisions.md index 7e015b8e..b4600c04 100644 --- a/docs/decisions.md +++ b/docs/decisions.md @@ -12,7 +12,7 @@ 2026-10-03, lilleman: the judge is to read `~/.claude/CLAUDE.md` whole too. The worker follows that file, so a question it answers should not reach the human (goal 1.2). Reading the whole file is safe, because the judge may quote only words that appear in it. A list of sections would need keeping current. Implemented the same day. -2026-10-03, lilleman: the judge rules a chunk finished only once every answer the human typed in it is recorded. A finished chunk's session is deleted, and its answers with it, so an answer recorded nowhere would be asked again in a later chunk (goal 1.2). Implemented the same day by claude, which settled two choices the ruling left open. First, an answer counts as recorded where the files the judge reads hold it, `~/.claude/CLAUDE.md` included, or where the transcript shows the worker writing it into `README.md`'s premises, `AGENTS.md`, `docs/decisions.md`, `todo.md` or a code comment. A worker's write to `~/.claude/CLAUDE.md` does not count: the rules for every project are the human's. The judge cannot read a code comment or `todo.md`. Yet `CLAUDE.md` → "Working loop", "Ask, don't guess" puts a standing choice made in one place in a comment there. And the human's approval of a release's items, which "Working loop" requires, is the set of rows `todo.md` names for that release. The judge also reads the records once a cycle from the main checkout. That checkout may not yet hold an answer the worker wrote and merged. A judge that refused any of these would hold the chunk open every cycle. Second, only an answer a later chunk could need must be recorded, so an approval such as "merge it" holds nothing open. The worker's resume prompt states the rule, so a worker whose chunk is held open knows it. +2026-10-03, lilleman: the judge rules a chunk finished only once every answer the human typed in it is recorded. A finished chunk's session is deleted, and its answers with it, so an answer recorded nowhere would be asked again in a later chunk (goal 1.2). Implemented the same day by claude, which settled two choices the ruling left open. First, an answer counts as recorded where the files the judge reads hold it, `~/.claude/CLAUDE.md` included, or where the transcript shows the worker writing it into `README.md`'s premises, `AGENTS.md`, `docs/decisions.md`, `todo.md` or a code comment. A worker's write to `~/.claude/CLAUDE.md` does not count: the judge reads the live `~/.claude`, which holds the write only once it merges and the checkout is pulled, and a worker in any other project cannot commit there. The judge cannot read a code comment or `todo.md`. Yet `CLAUDE.md` → "Working loop", "Ask, don't guess" puts a standing choice made in one place in a comment there. And the human's approval of a release's items, which "Working loop" requires, is the set of rows `todo.md` names for that release. The judge also reads the records once a cycle from the main checkout. That checkout may not yet hold an answer the worker wrote and merged. A judge that refused any of these would hold the chunk open every cycle. Second, only an answer a later chunk could need must be recorded, so an approval such as "merge it" holds nothing open. The worker's resume prompt states the rule, so a worker whose chunk is held open knows it. 2026-10-13, implementing todo item 95: the judge reads each file under `~/.claude/rules/` whole too, as the `rules/:` decision moved topic rules there, for the reason it reads `CLAUDE.md` whole, and a worker's write to one does not count as recording an answer, as a write to `CLAUDE.md` does not.