From 0fd8872f642da7af522ef69ddb8bf5e4a5e4eaae Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Fri, 25 Sep 2026 00:39:25 +0200 Subject: [PATCH 1/2] Define chunk, plan and release in the judge rules --- CHANGELOG.md | 1 + bin/loop-claude | 2 ++ bin/test_loop_claude.py | 7 +++++++ docs/decisions.md | 2 +- todo.md | 1 - 5 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 76300535..42e6bab5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ - `loop-claude` archives each session's transcript under `~/.claude/loop-claude-transcripts/`, one folder per project; `LOOP_CLAUDE_TRANSCRIPTS` overrides the root. - `loop-claude --help` names the Claude Code version its transcript, session and trust handling were observed on; check it first when an upgrade breaks a cycle. - `loop-claude` runs the model each project's settings pick; `LOOP_CLAUDE_WORKER_MODEL` and `LOOP_CLAUDE_JUDGE_MODEL` override it. This repo runs on Fable 5.1. +- `loop-claude`'s judge is told what chunk, plan and release mean, in the words of `CLAUDE.md` → "Vocabulary"; a test keeps the two in step. - Reviewers share one protocol for verdicts, severities, rounds and declines: `agents/review-protocol.md`. - Skills and agents cite `CLAUDE.md` by heading, and a test resolves each citation; the comment and documentation bar lives there alone. - Update a main checkout with `git pull --ff-only`, never `--autostash`. diff --git a/bin/loop-claude b/bin/loop-claude index 6d469e78..c22821ac 100755 --- a/bin/loop-claude +++ b/bin/loop-claude @@ -49,6 +49,8 @@ RELOAD_FAILURES = "LOOP_CLAUDE_FAILURES" SESSION_NAMESPACE = uuid.UUID("64fb586b-d926-4bb3-a44c-c903e86d3eec") JUDGE_RULES = ( + "Words: chunk: the unit of work: the smallest PR-able change. plan: `todo.md`. release: a semver version " + "the human cuts.\n" "Decide whether the human must now be interrupted. ask=true when any of these appear:\n" "- the agent asks the human anything, seeks approval, or says a decision is the human's\n" "- it carried on under an assumption that decides the deliverable and that the human could " diff --git a/bin/test_loop_claude.py b/bin/test_loop_claude.py index 9119a880..6ef16da0 100644 --- a/bin/test_loop_claude.py +++ b/bin/test_loop_claude.py @@ -3,6 +3,7 @@ import importlib.util import json import os import pathlib +import re import stat import tempfile import unittest @@ -91,6 +92,12 @@ class WorkerArgs(unittest.TestCase): class JudgePrompt(unittest.TestCase): + def test_defines_chunk_plan_and_release_as_claude_md_does(self): + vocabulary = pathlib.Path(__file__).resolve().parents[1] / "CLAUDE.md" + definitions = dict(re.findall(r"^- \*\*(\w+)\*\* — (.+)$", vocabulary.read_text(), re.MULTILINE)) + for word in ("chunk", "plan", "release"): + self.assertIn(f"{word}: {definitions[word]}", loop.JUDGE_RULES) + def test_hands_the_judge_the_tail_of_a_long_transcript(self): prompt = loop.judge_prompt("task", "## Goals\n1. g", "early " * 20000 + "LATE") self.assertIn("LATE", prompt) diff --git a/docs/decisions.md b/docs/decisions.md index 013e0775..50e7ea3b 100644 --- a/docs/decisions.md +++ b/docs/decisions.md @@ -22,7 +22,7 @@ ## vocabulary: the concept words are defined under `CLAUDE.md` → "Vocabulary" and cited by a bare link -2026-09-24, larv-review. Serves goal 4. Three seats of the 2026-09-24 panel found the words only in the changelog; a definition at each rule lands one reader and misses the next, so the section is the one landing place and each file using the words links it once, as skills already cite `CLAUDE.md` headings, and `bin/test_citations.py` fails on a citation no heading or bold lead answers, so the pointer's rot is visible. `loop-claude --help` restates cycle, interrupt and premises, since a terminal reader has no link to follow. Valid until the next scoring run. +2026-09-24, larv-review. Serves goal 4. Three seats of the 2026-09-24 panel found the words only in the changelog; a definition at each rule lands one reader and misses the next, so the section is the one landing place and each file using the words links it once, as skills already cite `CLAUDE.md` headings, and `bin/test_citations.py` fails on a citation no heading or bold lead answers, so the pointer's rot is visible. `loop-claude --help` restates cycle, interrupt and premises, since a terminal reader has no link to follow, and its judge prompt chunk, plan and release, since the judge reads nothing else. Valid until the next scoring run. ## larv-review: a re-entered loop takes a fresh round cap diff --git a/todo.md b/todo.md index 2a513204..dd0088e3 100644 --- a/todo.md +++ b/todo.md @@ -4,7 +4,6 @@ Ordered by how many seats of the 2026-09-24 scoring panel (`docs/decisions.md`) named the place; each is one chunk. -- Define chunk, plan and release inside `JUDGE_RULES`; the judge reads nothing else. - Name the `set -u` empty-array idiom and the `@sh` eval in `statusline.sh`, one line each. - Make `CLAUDE.md`'s comment rules say an invariant earns a line only where the code cannot show it, state the one-line rule once, and scope the docstring exemption to what a tool consumes; today a reviewer finds two sentences saying keep and one saying delete. - Open `CLAUDE.md` → "Comments and documentation", "Negation and history", with its scope, comments and docs beside code, and cut its two restatements of the section bar; today a reviewer cites it against a `CHANGELOG.md` line, which the next paragraph governs. -- 2.52.0 From dfab5b7e8359ebf86a42ec62bcc7a93bc1f7ec8e Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Fri, 25 Sep 2026 00:43:30 +0200 Subject: [PATCH 2/2] Record that the judge reads CLAUDE.md through claude -p auto-discovery --- CHANGELOG.md | 1 - bin/loop-claude | 3 +-- bin/test_loop_claude.py | 7 ------- docs/decisions.md | 2 +- 4 files changed, 2 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 42e6bab5..76300535 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,6 @@ - `loop-claude` archives each session's transcript under `~/.claude/loop-claude-transcripts/`, one folder per project; `LOOP_CLAUDE_TRANSCRIPTS` overrides the root. - `loop-claude --help` names the Claude Code version its transcript, session and trust handling were observed on; check it first when an upgrade breaks a cycle. - `loop-claude` runs the model each project's settings pick; `LOOP_CLAUDE_WORKER_MODEL` and `LOOP_CLAUDE_JUDGE_MODEL` override it. This repo runs on Fable 5.1. -- `loop-claude`'s judge is told what chunk, plan and release mean, in the words of `CLAUDE.md` → "Vocabulary"; a test keeps the two in step. - Reviewers share one protocol for verdicts, severities, rounds and declines: `agents/review-protocol.md`. - Skills and agents cite `CLAUDE.md` by heading, and a test resolves each citation; the comment and documentation bar lives there alone. - Update a main checkout with `git pull --ff-only`, never `--autostash`. diff --git a/bin/loop-claude b/bin/loop-claude index c22821ac..a922efdb 100755 --- a/bin/loop-claude +++ b/bin/loop-claude @@ -31,6 +31,7 @@ Claude Code internals this rests on, observed on 2.1.282: - An "assistant" entry, in the transcript and in --output-format stream-json, carries message.content parts of type "text" (text) and "tool_use" (name, input); stream-json ends with a "result" event. - `claude -p --output-format json --json-schema` returns the verdict under "structured_output". +- `claude -p` without --bare loads the project's and ~/.claude's CLAUDE.md, so the judge reads the words. - ~/.claude.json holds projects..hasTrustDialogAccepted per checkout. """ import glob @@ -49,8 +50,6 @@ RELOAD_FAILURES = "LOOP_CLAUDE_FAILURES" SESSION_NAMESPACE = uuid.UUID("64fb586b-d926-4bb3-a44c-c903e86d3eec") JUDGE_RULES = ( - "Words: chunk: the unit of work: the smallest PR-able change. plan: `todo.md`. release: a semver version " - "the human cuts.\n" "Decide whether the human must now be interrupted. ask=true when any of these appear:\n" "- the agent asks the human anything, seeks approval, or says a decision is the human's\n" "- it carried on under an assumption that decides the deliverable and that the human could " diff --git a/bin/test_loop_claude.py b/bin/test_loop_claude.py index 6ef16da0..9119a880 100644 --- a/bin/test_loop_claude.py +++ b/bin/test_loop_claude.py @@ -3,7 +3,6 @@ import importlib.util import json import os import pathlib -import re import stat import tempfile import unittest @@ -92,12 +91,6 @@ class WorkerArgs(unittest.TestCase): class JudgePrompt(unittest.TestCase): - def test_defines_chunk_plan_and_release_as_claude_md_does(self): - vocabulary = pathlib.Path(__file__).resolve().parents[1] / "CLAUDE.md" - definitions = dict(re.findall(r"^- \*\*(\w+)\*\* — (.+)$", vocabulary.read_text(), re.MULTILINE)) - for word in ("chunk", "plan", "release"): - self.assertIn(f"{word}: {definitions[word]}", loop.JUDGE_RULES) - def test_hands_the_judge_the_tail_of_a_long_transcript(self): prompt = loop.judge_prompt("task", "## Goals\n1. g", "early " * 20000 + "LATE") self.assertIn("LATE", prompt) diff --git a/docs/decisions.md b/docs/decisions.md index 50e7ea3b..013e0775 100644 --- a/docs/decisions.md +++ b/docs/decisions.md @@ -22,7 +22,7 @@ ## vocabulary: the concept words are defined under `CLAUDE.md` → "Vocabulary" and cited by a bare link -2026-09-24, larv-review. Serves goal 4. Three seats of the 2026-09-24 panel found the words only in the changelog; a definition at each rule lands one reader and misses the next, so the section is the one landing place and each file using the words links it once, as skills already cite `CLAUDE.md` headings, and `bin/test_citations.py` fails on a citation no heading or bold lead answers, so the pointer's rot is visible. `loop-claude --help` restates cycle, interrupt and premises, since a terminal reader has no link to follow, and its judge prompt chunk, plan and release, since the judge reads nothing else. Valid until the next scoring run. +2026-09-24, larv-review. Serves goal 4. Three seats of the 2026-09-24 panel found the words only in the changelog; a definition at each rule lands one reader and misses the next, so the section is the one landing place and each file using the words links it once, as skills already cite `CLAUDE.md` headings, and `bin/test_citations.py` fails on a citation no heading or bold lead answers, so the pointer's rot is visible. `loop-claude --help` restates cycle, interrupt and premises, since a terminal reader has no link to follow. Valid until the next scoring run. ## larv-review: a re-entered loop takes a fresh round cap -- 2.52.0