From 9d6df6526d5c4955099a2c31abeba5f4a90e0d6f Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Fri, 4 Dec 2026 10:27:07 +0100 Subject: [PATCH 1/4] File items 591 to 593: keep decision logs small enough for the judge --- todo.md | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/todo.md b/todo.md index 5bed8e4c..d8165074 100644 --- a/todo.md +++ b/todo.md @@ -6,7 +6,7 @@ `Bar = 0.1` -`Next ID = 591` +`Next ID = 594` ## Items @@ -20,6 +20,9 @@ | 487 | 0.20.0 | | owner | **Run larv-review's passes from a program that picks them from the diff and the item, counts rounds against the cap and decides each rerun, with each reviewer returning its findings as JSON against a schema.** | 4 | 2 | 3 | 7 | 8 | 1.1 by 5, 1.4 by 5 | 0.4 | | 498 | 0.20.0 | 487 | owner | **Drive each chunk as a state machine in `build-release`, from preflight through implementing, review, the pull request and the merge to finishing its items, with the worker as one model step that ends in a result that code checks.** | 4 | 2 | 3 | 7 | 8 | 1.1 by 4, 1.4 by 4 | 0.3 | | 488 | 0.20.0 | 498 | owner | **Cut the larv-review skill, `CLAUDE.md` and rule-hook down to what `build-release` doesn't own: the judgement the model makes and the safety guards.** | 2 | 2 | 3 | 5 | 5 | 1.4 by 4, code health by 2 | 2.3 | +| 592 | 0.20.0 | | | **Keep each project's decision log to decisions no principle covers and that govern more than one place, with few principles that state a rule and stop, and sweep the log at each release review.** | 2 | 2 | 3 | 5 | 4 | 1.2 by 5, 1.4 by 4 | 2.1 | +| 591 | 0.20.0 | | | **Have the judge read a project's principles and decision titles in place of every decision entry, so a growing log can't crowd the transcript out of its prompt.** | 3 | 2 | 3 | 6 | 5 | 1.5 by 6, 1.4 by 3 | 1.5 | +| 593 | 0.20.0 | 592 | | **Make the decision log's cleanup the next chunk in a project whose log holds a covered entry or outgrows a size budget, checked by `rank_todo.py --check` and named by `chunk-preflight`.** | 3 | 2 | 3 | 6 | 5 | 1.4 by 4, 1.5 by 4 | 1.4 | | 489 | 0.21.0 | 498 | owner | **Run every model step through a harness interface whose operations are a headless run, a one-shot reply, an interactive run, resume and reading a transcript, with each harness declaring what it supports and Claude Code as the first adapter.** | 4 | 2 | 3 | 7 | 8 | 1.3 by 4, 6 by 7, code health by 3 | 1.5 | | 492 | 0.21.0 | 489 | owner | **Refuse to run a harness without pre-tool hooks in a project that sets an `env-file`, unless it runs in a sandbox that cannot read that file.** | 3 | 2 | 4 | 7 | 5 | 5 by 5 | 3.9 | | 510 | 0.21.0 | 489 | owner | **Run `task-bench`, its gather step included, through the harness interface, in place of calling `claude -p` directly.** | 2 | 2 | 1 | 3 | 3 | code health by 2, 6 by 3 | 3.2 | @@ -187,6 +190,31 @@ Part of the standalone-install plan lilleman approved on 2026-11-20. Keep the wo Part of the standalone-install plan lilleman approved on 2026-11-20. The skill becomes a thin call of the program, so `/larv-review` still works by hand. rule-hook keeps its guards on secrets, destructive commands and writes outside the worktree, and drops the checks of step order the program now owns. +### 592. Keep each project's decision log to decisions no principle covers and that govern more than one place, with few principles that state a rule and stop, and sweep the log at each release review. + +Today `rules/decisions.md` lifts a rule shared by several decisions into a project principle, but only the covered titles leave `AGENTS.md`: the entries stay in `docs/decisions.md`, so the log only grows. In fejkdata it reached 263 KB and stopped the loops (item 591). + +Change the rules so that: +- **A covered entry is deleted** the moment the human approves the principle that covers it. Detail the principle leaves open, such as a per-table weight, moves to the one place it governs. Git history keeps the reasoning. +- **A choice that governs one place is recorded there**, in a comment, docstring or package doc, never in the log, as `CLAUDE.md` → "Ask, don't guess" already says. That covers data-import choices (one locale's source, one package's weighting) and code-layout facts. +- **A principle states one rule and stops.** No "Applied by …" list of the places that apply it: a principle must not grow with each place. Keep principles few: propose a new one only where it would remove at least three entries. +- **The release review sweeps the log** (`larv-review` §3 → "Release review"): it re-reads the entries that remain, lifts a principle where three or more apply one rule, and moves one-place entries to their place. A proposed principle is the human's to approve, as today. +- **The cleanup works on a project's existing log**, as fejkdata's did by hand in its `decisions-cleanup` chunk: delete covered entries, move one-place and code-layout entries, trim long entries to the decision, who, when, why and the "valid while" premise, and draft principles for the human. It must keep `bin/plan/citations.py` satisfied: where a moved entry cited a `todo.md` item marked `decision`, re-mark that item or keep the citation in the log. + +### 591. Have the judge read a project's principles and decision titles in place of every decision entry, so a growing log can't crowd the transcript out of its prompt. + +fejkdata's four build-release loops died on 2026-12-03, each right after its chunk merged. `bin/agent_cycle/judge.py` refused three judge runs in a row: the premises, the records and the rules left 45–49K of `JUDGE_PROMPT_CHARS` (400,000) for the transcript, under `TRANSCRIPT_FLOOR` (50,000). The records took 334–338K, of which `docs/decisions.md` was 263 KB with 185 entries. Each chunk adds about one entry, so trimming a log only buys time; the judge's input must stop growing with the log. + +`AGENTS.md` already lists the project principles and the title of each decision no principle covers, which is what governs the work. Have the judge's records hold `AGENTS.md` and the human's rules, and not the entries' bodies. Keep the quote check working: an answer the judge quotes must still be checkable against what it read, so either it quotes only titles and principles, or the judge fetches the one entry it needs and its quote is checked against that entry. Pick the simpler one and record why. + +A loop must not die on a budget it can predict: where the records still leave too little room, say so before the chunk starts (chunk-preflight), not after it merged. + +### 593. Make the decision log's cleanup the next chunk in a project whose log holds a covered entry or outgrows a size budget, checked by `rank_todo.py --check` and named by `chunk-preflight`. + +A tool catches a growing log every time; a reviewer only when it notices. fejkdata's `docs/decisions.md` grew to 263 KB before anything noticed, and then it was build-release's judge failing (item 591). + +Have `rank_todo.py --check` warn where `docs/decisions.md` holds an entry whose title `AGENTS.md` no longer lists (covered by a principle, so item 592 says to delete it), or where the log is over a size budget. Source the budget from the judge's room: what the records may take and still leave `TRANSCRIPT_FLOOR` for the transcript, with a margin. Where it warns, `chunk-preflight`'s facts make the cleanup item 592 describes the project's next chunk, as an unshaped `todo.md` makes reshaping it the only work. This is how the update cleans up a project that already has a big log, such as fejkdata's before its cleanup. + ### 489. Run every model step through a harness interface whose operations are a headless run, a one-shot reply, an interactive run, resume and reading a transcript, with each harness declaring what it supports and Claude Code as the first adapter. Part of the standalone-install plan lilleman approved on 2026-11-20. The `claude_code` package and the calls of `claude` in `bin/loop_effects/effects.py` move behind it. Capabilities to declare: subagents on their own model, pre-tool hooks, skills and path-scoped rules. From 01448eb5a09266e99645e30d82b81532321ceeef Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Fri, 4 Dec 2026 10:32:25 +0100 Subject: [PATCH 2/4] Cite the Working loop heading in item 592's detail --- todo.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/todo.md b/todo.md index d8165074..b4b005fd 100644 --- a/todo.md +++ b/todo.md @@ -196,7 +196,7 @@ Today `rules/decisions.md` lifts a rule shared by several decisions into a proje Change the rules so that: - **A covered entry is deleted** the moment the human approves the principle that covers it. Detail the principle leaves open, such as a per-table weight, moves to the one place it governs. Git history keeps the reasoning. -- **A choice that governs one place is recorded there**, in a comment, docstring or package doc, never in the log, as `CLAUDE.md` → "Ask, don't guess" already says. That covers data-import choices (one locale's source, one package's weighting) and code-layout facts. +- **A choice that governs one place is recorded there**, in a comment, docstring or package doc, never in the log, as `CLAUDE.md` → "Working loop", "Ask, don't guess" already says. That covers data-import choices (one locale's source, one package's weighting) and code-layout facts. - **A principle states one rule and stops.** No "Applied by …" list of the places that apply it: a principle must not grow with each place. Keep principles few: propose a new one only where it would remove at least three entries. - **The release review sweeps the log** (`larv-review` §3 → "Release review"): it re-reads the entries that remain, lifts a principle where three or more apply one rule, and moves one-place entries to their place. A proposed principle is the human's to approve, as today. - **The cleanup works on a project's existing log**, as fejkdata's did by hand in its `decisions-cleanup` chunk: delete covered entries, move one-place and code-layout entries, trim long entries to the decision, who, when, why and the "valid while" premise, and draft principles for the human. It must keep `bin/plan/citations.py` satisfied: where a moved entry cited a `todo.md` item marked `decision`, re-mark that item or keep the citation in the log. From 0ebb903e331c56880849726da88f70a50d1c335b Mon Sep 17 00:00:00 2001 From: Lilleman Date: Fri, 4 Dec 2026 11:06:31 +0100 Subject: [PATCH 3/4] Plan: make the prose reviewer verify changed claims against the code --- todo.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/todo.md b/todo.md index b4b005fd..0f37d5e5 100644 --- a/todo.md +++ b/todo.md @@ -6,7 +6,7 @@ `Bar = 0.1` -`Next ID = 594` +`Next ID = 595` ## Items @@ -15,6 +15,7 @@ | 586 | 0.19.0 | | | **Keep the person's own skills, agents and commands out of the loop's Claude home where `HOME` names the home folder through a symlink.** | 2 | 3 | 2 | 5 | 3 | 3 by 4 | 5.0 | | 585 | 0.19.0 | | | **Give this repo an `AGENTS.md` like any project, and drop the decision and the rule that say it keeps none.** | 3 | 1 | 3 | 5 | 4 | code health by 3 | 3.1 | | 580 | 0.19.0 | | | **Call no scoring run for a release already cut whose last item the chunk moved to a later release.** | 2 | 2 | 3 | 5 | 3 | 1.4 by 3, 1.5 by 3 | 1.6 | +| 594 | 0.19.0 | | | **Make the prose reviewer check each behavioural claim on a line the diff adds or rewrites against the code, script or sibling sentence it describes, and report a mismatch as a 🟡 at the changed line.** | 2 | 2 | 3 | 5 | 2 | 1.1 by 4 | 1.3 | | 589 | 0.19.0 | | | **Count every turn of a bench run in its figures: sum the tokens and turns of each `result` event in the stream, and time the run from its first event to its last.** | 2 | 2 | 1 | 3 | 2 | 1.1 by 3 | 1.0 | | 590 | 0.19.0 | 589 | | **Report beside each bench run how far its change reached: the files and lines it changed, the files it changed outside the bug's file, and, for a bug, whether it restored the line the mutant changed.** | 2 | 2 | 1 | 3 | 4 | 1.1 by 4 | 1.0 | | 487 | 0.20.0 | | owner | **Run larv-review's passes from a program that picks them from the diff and the item, counts rounds against the cap and decides each rerun, with each reviewer returning its findings as JSON against a schema.** | 4 | 2 | 3 | 7 | 8 | 1.1 by 5, 1.4 by 5 | 0.4 | @@ -149,6 +150,22 @@ Touches: - `bin/larv_review/test_larv_review.py`: `ScoringRunDue`, `LarvReviewTool` - `bin/larv_review/main.py`: `(module)` (small) +### 594. Make the prose reviewer check each behavioural claim on a line the diff adds or rewrites against the code, script or sibling sentence it describes, and report a mismatch as a 🟡 at the changed line. + +Gap: in a client repo, a Markdown-only chunk ran the prose pass alone, as `skills/larv-review/SKILL.md` → "Markdown only" says. A rewritten README bullet kept an older sentence stating how an unset or empty setting resolves. The same bullet, and the shell script it describes, showed that sentence false. The prose reviewer didn't report it; an outside reviewer did. `agents/prose-reviewer.md` names "a claim the code shows false" and "a sentence contradicting another" only in the "Also report" line after the four priority checks, so a reviewer working through the checks treats them as an afterthought and doesn't open the code. The review standards' `quality.md` → "A false claim is a bug" already holds the rule. + +Change: +- In `agents/prose-reviewer.md` → "Checks, in priority order", add a numbered check of its own: for each behavioural claim on a line the diff adds or rewrites, such as a command, a default, a path, a limit or a resolution rule, open the code, script or config it describes, and the sentences around it in the same item or section, and report a claim they show false as a 🟡 at the changed line, naming the code's `path:line` or the sentence that contradicts it. A line kept verbatim inside a rewritten bullet or paragraph counts as rewritten. Take "a sentence contradicting another" and "a claim the code shows false" out of the "Also report" line, so the rule is said once. Keep the check's place in the priority order consistent with the header's rule that a later check's fix never breaks an earlier one. +- Check `## Scopes`: its "read only what a finding needs checking against" must allow opening the code a changed claim describes; adjust its wording only if it doesn't. +- `skills/larv-review/SKILL.md`: change "Markdown only" or "### Prose" only if the launch doesn't already let prose-reviewer read the repo; its Read and Grep tools do, so the expected edit there is none or one clause. + +Test: no tool checks an agent's prompt; the chunk's own prose pass reads the new check. + +Touches: + +- `agents/prose-reviewer.md`: `## Checks, in priority order`, `## Scopes` (small) +- `skills/larv-review/SKILL.md`: `### Prose` (small) + ### 589. Count every turn of a bench run in its figures: sum the tokens and turns of each `result` event in the stream, and time the run from its first event to its last. Today `figures` in `bin/task_bench/figures/run_figures.py` reads only the last `result` event of a run's stream. Where Haiku starts a background task, such as a long `go test`, Claude Code ends the first turn with a result, then starts another turn when the task finishes and ends that with a second result. The bench then records only that second turn. From 7988138b2def0d3234303bc4ba6445f2bc40950b Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Fri, 4 Dec 2026 11:30:04 +0100 Subject: [PATCH 4/4] Have item 592 drop what the technical principles decide, and check moved text against code and source --- todo.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/todo.md b/todo.md index 0f37d5e5..39a6b158 100644 --- a/todo.md +++ b/todo.md @@ -217,6 +217,8 @@ Change the rules so that: - **A principle states one rule and stops.** No "Applied by …" list of the places that apply it: a principle must not grow with each place. Keep principles few: propose a new one only where it would remove at least three entries. - **The release review sweeps the log** (`larv-review` §3 → "Release review"): it re-reads the entries that remain, lifts a principle where three or more apply one rule, and moves one-place entries to their place. A proposed principle is the human's to approve, as today. - **The cleanup works on a project's existing log**, as fejkdata's did by hand in its `decisions-cleanup` chunk: delete covered entries, move one-place and code-layout entries, trim long entries to the decision, who, when, why and the "valid while" premise, and draft principles for the human. It must keep `bin/plan/citations.py` satisfied: where a moved entry cited a `todo.md` item marked `decision`, re-mark that item or keep the citation in the log. +- **An entry or a principle that restates a technical principle goes.** A project principle states only what the technical principles in the config's principles folder leave open, and an entry those principles already decide is deleted like a covered one. Before proposing a project principle, check it against them. In fejkdata, three of the five principles its cleanup drafted restated strict semver, inputs that change between runs taken as parameters, and validating data early. +- **Moved text is checked as new text.** The cleanup, and the reviewers of its pull request, hold each moved claim against the code and the source it names, not only against the log entry it came from. In fejkdata's cleanup no pass did this. An outside reviewer then found nine claims the old log stated wider than its source or the code: a name no register writes, and a fallback an import script doesn't have. Give the prose reviewer's brief the same check for any claim about code or a source that a change moves or rewords. ### 591. Have the judge read a project's principles and decision titles in place of every decision entry, so a growing log can't crowd the transcript out of its prompt.