diff --git a/AGENTS.md b/AGENTS.md index c0cb7139..4e315081 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -31,3 +31,4 @@ Decisions live in `docs/decisions.md`: - review: an ask no user answers leaves the PR unmerged - review: the architecture pass audits every principle and goal over the whole project, and a release's last chunk fires it - loop-claude: every claude it starts bypasses permissions inside its sandbox +- stats: a chunk's cost and review numbers are kept in the transcript archive diff --git a/docs/decisions.md b/docs/decisions.md index cbd3c56e..593cddfb 100644 --- a/docs/decisions.md +++ b/docs/decisions.md @@ -107,3 +107,7 @@ ## loop-claude: every claude it starts bypasses permissions inside its sandbox 2026-09-30, lilleman. Applies "Always grant explicit access to data": the sandbox `loop-claude` runs in is where access is granted, so the worker and the interrupt run with `bypassPermissions`. The worker may read `~/.claude/.credentials.json`: it holds Claude Code's own credentials, which claude reads to run anyway. Its one seam to production is the forge: what it pushes or merges can publish through CI. Valid while `loop-claude` runs only in the sandbox README → Install names. + +## stats: a chunk's cost and review numbers are kept in the transcript archive + +2026-10-01, lilleman. Serves goals 3 and 4.4. The numbers show whether a change to the workflow raised quality or only cost. Each line names another project and its chunk, so the file stays off this repo's remote. `loop-claude` writes the line: the tokens, cycles and interrupts it counts, and the review's numbers from the summary larv-review ends with. Valid while the transcript archive stays off the remote. diff --git a/todo.md b/todo.md index 5a9b1c19..623b285f 100644 --- a/todo.md +++ b/todo.md @@ -35,3 +35,7 @@ The rebuild lifts every dimension, one chunk per item, until the last item opens - **Archive the transcript as each cycle ends, so a failed exit or Ctrl-C loses nothing.** Today only an interrupt or a finish archives, against goal 2. - **Key a project on its checkout's full path — its session, archive folder and models entry — and refuse to start while another session on that id is active.** `checkout.py:22` drops the leading `/`, so `~/code/a` and `/a` share a session, an archive folder and a models entry, and one loop can resume or delete the other's session. - **Move what `loop-claude` writes out of `~/.claude.json`, and bring each case that must stay to the human.** Claude Code owns and writes that file, and `trust`'s read-modify-write loses a write landing in its window. +- **Have `loop-claude` write one stats line per finished chunk, in 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 chunk's stats 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. +- **Bench about one chunk in ten: redo it under an open PR that changes the workflow, from the commit it started from, and have a claude blind to which run is which rule which outcome better serves this repo's goal 4.** `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 its benches rule it better; how many benches that takes is asked when this item starts. The ruling and both runs' numbers go on the chunk's stats line. Start from the 2026-09-30 bench's scripts: `~/code/claude-handoffs/claude-config/2026-09-30/bench/`.