Answer the architecture pass's first round

This commit is contained in:
2026-10-02 12:16:33 +02:00
parent f51900106f
commit e1707183fd
3 changed files with 92 additions and 40 deletions
+10
View File
@@ -15,19 +15,29 @@
- **Give principles-auditor and prose-reviewer a way to list the project's files.** In the 2026-09-30 audit run their `tools: Read, Grep, Glob` gave them only Read. Each read the files that imports and `.gitignore` named, and listed the files it could not reach. Goal 4.1.
- **Give the reviewer agents only the tools they need.** `systems-architect.md`, `product-owner-reviewer.md` and `stability-reviewer.md` have no `tools:` line, so each can edit the branch it reviews; `review-findings.md` says a reviewer edits nothing. Goal 4.1.
- **Measure test coverage in the suite, and fail on a drop.** Nothing measures it, so "Test coverage should not decline" cannot be held. Goal 4.1.
- **Run the test suite in CI on every PR, or record in `docs/decisions.md` why the local run is enough.** The repo has no CI, so larv-review's gate is the local run, and §4 rule 1 skips even that when the last stability round left the suite green: an unattended chunk can merge on the worker's own word. Goal 4.1.
- **Make larv-review §3 applicable on its own, cite its rules by name, and say where a pass's round count is recorded.** Applying one rule of "Round cap", "Re-entry" or "Findings" takes `review-findings.md`, `CLAUDE.md` → "Vocabulary" and the decision log open beside it. The rules cite each other by number ("Round cap" rule 6), so a renumbering breaks a citation silently. Nothing says where a pass's round count is recorded, so a resumed or compacted session loses it. Goal 4.1.
- **Read transcript and stream entries into typed values where they are read.** `read_transcript` and `run_worker` pass raw `dict`s, so about ten accessors in `entries.py` re-check shapes deep inside and mypy cannot check `render`, `human_turns` or `run_worker`. Goal 4.1.
- **Inject output and storage into `Effects`, and test what each step prints.** `print` and `open` are called directly across `bin/loop_claude/`, so the stderr lines of the CLI contract can be checked only through the black-box tests. Goal 4.1.
- **Move the judge's transcript rendering from `claude_code/transcript.py` into `cycle/`.** `render`, `part_line` and `JUDGED_TOOL_INPUT` shape what the judge sees, so its input is split from `JUDGED_TRANSCRIPT_TAIL` across two packages, and `claude_code/` no longer holds only Claude Code's shapes as its docstring says. Goal 4.1.
- **Give each cycle phase one name across its state, step and event.** Today `Judging` runs `rule` and yields `Ruled`, and `Finishing` runs `close`, which also deletes the session, and yields `Archived`. Goal 4.1.
- **Enable the `claude-security` plugin in `settings.json`, or drop larv-review's full-scan row.** No machine has it enabled, so every chunk that fires the pass skips it. Goal 4.1.
- **Give `settings.json`'s model one writer, and sort its keys.** Claude Code rewrites `"model"` in this tracked file whenever a model is picked, so one `/model` dirties the checkout and overrides the synced choice. Goal 4.3.
- **Say in `systems-architect.md` that a REST API's `/v1/` prefix is not versioning machinery to defer.** Its "defer the versioning story" can be read against `principles/rest-apis.md`, which requires the prefix from the start. Goal 4.3.
- **Launch a principles auditor only for a principles file the project shows applies, and rerun only the reviewer whose finding a fix answers.** On this repo the frontend, REST and logging auditors each read the whole project to report "does not apply", and one 🟢 fix reruns ten whole-project reads. Goal 4.4.
- **Cut `systems-architect.md`'s, `stability-reviewer.md`'s and `product-owner-reviewer.md`'s descriptions to one line.** Claude Code loads every agent description into every session; larv-review launches these agents by name, so their worked examples cost tokens in every project and buy nothing. Goal 4.4.
- **Record each finished chunk's cost and review numbers on one stats line.** Goal 4.4.
- Have `loop-claude` write the line to one file at the root of the transcript archive. The line names the project, the commit the chunk started from and the archived transcript's hash. It holds the worker's tokens from the transcript, the judge's from its JSON output, and the chunk's cycles and interrupts, which the loop counts.
- End larv-review with a machine-readable summary, and have `loop-claude` copy it from the transcript onto the line: agents launched and rounds per pass; findings per pass by severity, inside the chunk's diff and outside it; and the comprehension scores when the panel ran.
- **Write a `workflow-review` skill that reads the stats and files each change it proposes to the workflow as a plan item, and have `AGENTS.md` run it on the chunk shipping a release's last item.** The workflow is `CLAUDE.md`, `principles/`, the skills, the agents and `loop-claude`. The skill's signals: findings outside the chunk's diff and comprehension scores per release, both from the stats; fixes after merge, from git; and the human's corrections, from the archived transcripts. Goal 4.4.
- **Bench about one chunk in ten against an open PR that changes the workflow, and have a blind claude rule which run better serves this repo's goal 4.** Redo the chunk under the PR, from the commit it started from. The ruling claude is not told which run is which. `loop-claude` picks the chunk at random, small diffs and big ones alike; with no such PR open, no bench runs. The same outcome with less code and prose, in the chunk or in the workflow, also counts as better. The PR merges only once three benches rule it better. A bench that rules it worse closes the PR and records, in `docs/workflow-learnings.md`, what the PR changed and why it lost. The ruling and both runs' numbers go on the chunk's stats line. Start from `workflow-bench/`, written for the 2026-09-30 bench's four fixed cases. Needs the stats line. Goals 4.1 and 4.4.
- **Make the small fixes filed by the 2026-10-02 principles audit against `workflow-bench/`.** The bench item starts from it. Goals 2 and 4.1.
- Test `judge.py`'s `blind` and `bench.py`'s rate-limit parsing, and run mypy on both.
- Let `judge.py` import `bench` without `BENCH_SOURCES` set; today reading it at import raises a bare `KeyError`.
- Key `CASES`, `PREFIX` and `TRUTH_END` in one table, sorted.
- Report a failed `git` per run; today `check=True` aborts `main` and drops every other run's result.
- Take the model from a flag or env var, and inject the clock, sleep and shuffle.
- Keep the bench's run logs where the transcript archive's backup reaches them.
- **Make the small changes filed against the review's rules.** Goals 4.1 and 4.4.
- Make the contributor a standing member of every project's audience. A project drops them only where its `## Audience` says maintainability does not matter. State that in `CLAUDE.md`'s goals-and-audience rule, and have larv-review's comprehension floor name the contributor as the reader it serves. The floor then gates every chunk while the contributor stands, and a project that drops them skips it.
- **Make the small fixes filed by the 2026-10-01 principles audit against `bin/`.** Goal 4.1.