File what the architecture round found outside the chunk

This commit is contained in:
2026-10-01 23:29:50 +02:00
parent 8e221712cb
commit fa53ae6137
+25
View File
@@ -8,6 +8,10 @@ The first two items are the places the panel on `rebuild` at 8585257 named under
- **Split `written_by_human`'s boolean into one named check per entry shape.** `formats.py:42` packs three tests into one line, one seat learnt the cases only from `HumanTurns` in the tests, and another could not confirm them without `HumanTurns`. Three seats named it the unit they least wanted to modify, and the architect named it where the project rots first.
- **Annotate the parameter types in `bin/loop_claude/`.** Whether `root` or `path` is a `str` or a `Path` is learnt by tracing callers back to `bin/loop-claude`.
- **Make a failed session delete stop the loop, and give the session one owner.** `delete_session` (`session.py:32`) only prints a failed removal, so `close` reports `Archived` and the next chunk resumes the finished chunk's session without its own task prompt. Return a `Failure` and stop on it; move `session_open` into `session.py`; have `transcript_file` return `str | None`. Raised by the 2026-10-01 panel's inherited architect and the logging and technical-principles audits. Goal 4.1.
- **Give larv-review §3's rules one home per rule.** Every seat of the 2026-10-01 panel needed `SKILL.md`, `review-findings.md` and `CLAUDE.md` open to apply one rule of "Round cap" or "Re-entry". Goal 4.1.
- **Name `loop_claude`'s modules by what they hold.** The 2026-10-01 panel misread `formats.py` (it holds every Claude Code shape, `mark_trusted` and `models_in` included), `steps.py`, `outcome.py` and `human_needed.py`. "Project", "transcripts", "verdict" and "model" each name two or three things. Goal 4.1.
- **State in `reload.py` why a loop reloads its own script, and tie each exit-1 clause of `--help` to the `Stop` that produces it.** Two seats found the reload's purpose nowhere in the code, and one could keep the exit contract true only by grepping every `Stop(1`. Goal 4.1.
- **Archive the transcript as each cycle ends.** Today only an interrupt or a finished chunk archives it, so a failed exit or Ctrl-C loses the transcript. Goal 2.
- **Key a project on its checkout's full path, and refuse to start while another session uses that key.** The key names the project's session, archive folder and models entry. `checkout.py:28` drops the leading `/`, so `~/code/a` and `/a` share all three, and one loop can resume or delete the other's session. Goal 4.1.
- **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.
@@ -23,6 +27,27 @@ The first two items are the places the panel on `rebuild` at 8585257 named under
- `comprehension-panel`: cut the run history and the restated description. They carry nothing the instructions need.
- `systems-architect.md`: cut the "one home" line, and break Reasonability Review's steps 4 and 5 into shorter points each.
- **Sort `bin/`'s imports on their first binding, and say in `principles/technical-principles.md` → "Deterministic order" how case sorts and which groups Python has.** Today they sort by path, so moving a module reorders unchanged lines. The principle's "host packages" names no Python group. Goal 4.1.
- **Make the small fixes filed by the 2026-10-01 principles audit against `bin/`.** Goal 4.1.
- Prefix each diagnostic `loop-claude` prints with its level, `warning:` at the least, so a run's output can be grepped for what needs fixing.
- Have `make_private` return a `Failure` like `replace_file` beside it.
- Check the catalog `name` in `models_in` as well as `id`.
- Name `part_line`'s limits 160 and 400, rename `Popened`, and give `human_needed.stop(to, but)` and `TO` names that read without the caller.
- Sort `worker_args`' flags and the globs in `catalog.py` and `session.py`.
- Write `"bypassPermissions"` once for every claude `loop-claude` starts.
- Keep the judge's evidence and model in each archived `.verdict.md`.
- Move the test helpers `ROOT` and `readme_floor` out of `test_python_floor.py`, which two other tests import them from.
- **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.
- **Read transcript and stream entries into typed values where they are read.** `transcript.read` and `run_worker` pass raw `dict`s, so about ten accessors in `formats.py` re-check shapes deep inside and mypy cannot check `render`, `human_turns` or `run_worker`. 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.
- **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.
- **Add a test that `.gitignore` keeps credentials, transcripts and memory files out.** `test_gitignore.py` checks only that every tracked file is allowlisted; a widened negation such as `!*.json` would un-ignore `.credentials.json`. Goal 3.
- **Archive a finished chunk's subagent transcripts before `delete_session` removes them.** Today only `<id>.jsonl` is copied, so every reviewer's full run in an unattended chunk is lost. Goal 2.
- **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.
- **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.
- **Give `settings.json`'s model one writer.** 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.
- **Rewrite `statusline.sh` in Python, and test it.** It needs `jq` and GNU `date` on every machine, `eval`s jq output, has three near-identical usage blocks and no test. Goal 1.
- **Move what the plan and the decision log point at under `~/code/claude-handoffs/` into the repo.** The design sketches, the judges' verdicts and the bench scripts are unreachable from another machine's checkout. Goal 1.
- **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.
- **Judge a cycle on more than the transcript's last 40,000 characters.** `judge.py:82` cuts the transcript there. The session spans every cycle of the chunk, so a decision made early in a long run is never judged, and the human is not interrupted for it. Larger chunks make runs longer. Goal 4.2.
- **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.