File items 591 to 593: keep decision logs small enough for the judge
CI / tests (pull_request) Failing after 4m40s

This commit is contained in:
2026-12-04 10:27:07 +01:00
parent eb354ab3ea
commit 9d6df6526d
+29 -1
View File
@@ -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.