From 8b8d1d12bff8528535bf23822de9866e5678060c Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Fri, 25 Sep 2026 00:19:02 +0200 Subject: [PATCH] Prefix the model overrides LOOP_CLAUDE_; name the session-id cause in the fixed-id decision --- CHANGELOG.md | 4 ++-- bin/loop-claude | 12 ++++++------ docs/decisions.md | 2 +- todo.md | 1 + 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c1942922..c355a4a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,9 +6,9 @@ - `loop-claude ` runs a project's next chunk cycle after cycle, interrupting only for a decision that is yours or a release ready to cut. - `loop-claude` exits 1 when the judge fails three times running; a verdict missing a field or quoting nothing in the transcript is a failure. - `loop-claude` exits 2 when an interrupt gets no answer, saying why: stdin or stdout is not a terminal, or nothing was typed. Rerunning resumes the session. -- `loop-claude` archives each session's transcript under `~/.claude/loop-claude-transcripts//`; `LOOP_CLAUDE_TRANSCRIPTS` overrides the root. +- `loop-claude` archives each session's transcript under `~/.claude/loop-claude-transcripts/`, one folder per project; `LOOP_CLAUDE_TRANSCRIPTS` overrides the root. - `loop-claude --help` names the Claude Code version its transcript, session and trust handling were observed on; check it first when an upgrade breaks a cycle. -- `loop-claude` runs the model each project's settings pick; `WORKER_MODEL` and `JUDGE_MODEL` override it. This repo runs on Fable 5.1. +- `loop-claude` runs the model each project's settings pick; `LOOP_CLAUDE_WORKER_MODEL` and `LOOP_CLAUDE_JUDGE_MODEL` override it. This repo runs on Fable 5.1. - Reviewers share one protocol for verdicts, severities, rounds and declines: `agents/review-protocol.md`. - Skills and agents cite `CLAUDE.md` by heading; the comment and documentation bar lives there alone. - Update a main checkout with `git pull --ff-only`, never `--autostash`. diff --git a/bin/loop-claude b/bin/loop-claude index 80150888..8f611926 100755 --- a/bin/loop-claude +++ b/bin/loop-claude @@ -17,10 +17,10 @@ worktree is marked trusted in ~/.claude.json. Each project has one session, "A loop-claude", being the checkout relative to ~/code, or to / outside it, deleted when the chunk finishes. Its transcript is archived under -$LOOP_CLAUDE_TRANSCRIPTS (default ~/.claude/loop-claude-transcripts//) whenever the human is -asked and when the chunk finishes. -JUDGE_MODEL and WORKER_MODEL override the model the project's Claude Code settings pick. A change to -this file takes effect at the next cycle boundary, once the new file answers --help. +$LOOP_CLAUDE_TRANSCRIPTS// (default ~/.claude/loop-claude-transcripts) whenever the human is +asked and when the chunk finishes. LOOP_CLAUDE_JUDGE_MODEL and LOOP_CLAUDE_WORKER_MODEL override the +model the project's Claude Code settings pick. A change to this file takes effect at the next cycle +boundary, once the new file answers --help. Claude Code internals this rests on, observed on 2.1.282: - The transcript is ~/.claude/projects/*/.jsonl, one JSON object per line. A / @@ -239,7 +239,7 @@ def worker_args(task, name, session_id, resuming): "--output-format", "stream-json", "--permission-mode", "bypassPermissions", "--verbose", - *model("WORKER_MODEL"), + *model("LOOP_CLAUDE_WORKER_MODEL"), ] @@ -278,7 +278,7 @@ def judge(task, premises, transcript): args = [ "-p", "--json-schema", json.dumps(JUDGE_SCHEMA), - *model("JUDGE_MODEL"), + *model("LOOP_CLAUDE_JUDGE_MODEL"), "--no-session-persistence", "--output-format", "json", "--permission-mode", "bypassPermissions", diff --git a/docs/decisions.md b/docs/decisions.md index 6eee52e5..257534d7 100644 --- a/docs/decisions.md +++ b/docs/decisions.md @@ -6,7 +6,7 @@ ## loop-claude: one session per project, at a fixed id -2026-09-21, lilleman; the rename and mirrored-path costs accepted 2026-09-25 by larv-review. Serves goal 4. One fixed id per project keeps the session picker at one entry per project and makes any transcript under that id the script's own to delete. The id derives from the checkout's path, so a rename migrates nothing: transcripts open under the old id stay in the picker until the human deletes them, a one-human audience not being worth the code. A checkout outside `~/code` mirroring a path inside it would share its id; none does. Valid while the picker lists sessions by id. +2026-09-21, lilleman; the rename and mirrored-path costs accepted 2026-09-25 by larv-review. Serves goal 4. One fixed id per project keeps the session picker at one entry per project and makes any transcript under that id the script's own to delete. The id is uuid5 of the session name, "A loop-claude", so moving the checkout or changing that name orphans open sessions: they stay in the picker until the human deletes them, migration code not being worth a one-human audience. A checkout outside `~/code` mirroring a path inside it would share its id. Valid while claude takes `--session-id` and resumes by it, and no checkout outside `~/code` mirrors a path inside it. ## loop-claude: the trust file is rewritten before an interrupt diff --git a/todo.md b/todo.md index b2d777c5..1e83dcb2 100644 --- a/todo.md +++ b/todo.md @@ -13,4 +13,5 @@ Ordered by how many seats of the 2026-09-24 scoring panel (`docs/decisions.md`) - Cut what `review-protocol.md` → "Documenting decisions" restates from `CLAUDE.md`: the decision kinds, the create-or-fix line and the record-nothing default. - Make the missing-premises exit name what is missing: `README.md` itself, a `## Goals` or `## Audience` heading, or a body under one; today all three print the same line. - Spell the false-claim rule once under `CLAUDE.md` → "Comments and documentation" with its tie-break, the doc corrected unless consumers rely on what it promises, and cite it from "Working with the codebase", "Working loop" and the README paragraph; today four spellings, two of which disagree on which side to fix. +- Derive `project()` from the checkout root, today `os.getcwd()`, so `loop-claude` run from a subdirectory joins the root's session. - Re-run the four-seat scoring panel and record the score in `docs/decisions.md`; the target is every dimension at 7.0 or above.