From 6830500831203c9623bf147ef64aa0919207dd80 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Fri, 25 Sep 2026 00:12:45 +0200 Subject: [PATCH] Name the session, the archive folder and its env var loop-claude --- CHANGELOG.md | 1 + bin/loop-claude | 8 ++++---- bin/test_loop_claude.py | 4 ++-- docs/decisions.md | 2 +- todo.md | 1 - 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f7a4697f..c1942922 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - `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 --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. - Reviewers share one protocol for verdicts, severities, rounds and declines: `agents/review-protocol.md`. diff --git a/bin/loop-claude b/bin/loop-claude index baf685f3..dce58a49 100755 --- a/bin/loop-claude +++ b/bin/loop-claude @@ -15,9 +15,9 @@ Exit 2: the human is needed and stdin or stdout is not a terminal, or the interr them typing anything. Rerunning resumes the session after either exit. Before an interrupt every worktree is marked trusted in ~/.claude.json. -Each project has one session, "A auto-mode", being the checkout relative to ~/code, +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 -$AUTO_MODE_TRANSCRIPTS (default ~/.claude/auto-mode-transcripts//) whenever the human is asked +$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. @@ -42,7 +42,7 @@ import sys import time import uuid -ARCHIVE = os.path.expanduser(os.environ.get("AUTO_MODE_TRANSCRIPTS", "~/.claude/auto-mode-transcripts")) +ARCHIVE = os.path.expanduser(os.environ.get("LOOP_CLAUDE_TRANSCRIPTS", "~/.claude/loop-claude-transcripts")) RELOAD_BASELINE = open(__file__, encoding="utf-8").read() RELOAD_CYCLE = "LOOP_CLAUDE_CYCLE" RELOAD_FAILURES = "LOOP_CLAUDE_FAILURES" @@ -110,7 +110,7 @@ def project(): def session_name(): - return f"A {project()} auto-mode" + return f"A {project()} loop-claude" def session_file(session_id): diff --git a/bin/test_loop_claude.py b/bin/test_loop_claude.py index 941c54ed..105a9f93 100644 --- a/bin/test_loop_claude.py +++ b/bin/test_loop_claude.py @@ -60,12 +60,12 @@ class Project(unittest.TestCase): with unittest.mock.patch.dict(os.environ, {"HOME": "/h"}): with unittest.mock.patch("os.getcwd", return_value="/h/code/a/b"): self.assertEqual(loop.project(), "a/b") - self.assertEqual(loop.session_name(), "A a/b auto-mode") + self.assertEqual(loop.session_name(), "A a/b loop-claude") with unittest.mock.patch("os.getcwd", return_value="/h/code"): self.assertEqual(loop.project(), "h/code") with unittest.mock.patch("os.getcwd", return_value="/srv/x"): self.assertEqual(loop.project(), "srv/x") - self.assertEqual(loop.session_name(), "A srv/x auto-mode") + self.assertEqual(loop.session_name(), "A srv/x loop-claude") class WorkerArgs(unittest.TestCase): diff --git a/docs/decisions.md b/docs/decisions.md index 58ed9f40..6eee52e5 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, and the `auto-mode` → `loop-claude` rename in the plan ships on the same terms. 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 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. ## loop-claude: the trust file is rewritten before an interrupt diff --git a/todo.md b/todo.md index 7a6574f8..b2d777c5 100644 --- a/todo.md +++ b/todo.md @@ -4,7 +4,6 @@ Ordered by how many seats of the 2026-09-24 scoring panel (`docs/decisions.md`) named the place; each is one chunk. -- Name the session, the archive folder and its env var `loop-claude`; today they say `auto-mode`. - Pin every `CLAUDE.md` heading the agents and skills cite with a test that resolves each citation. - Define chunk, plan and release inside `JUDGE_RULES`; the judge reads nothing else. - Name the `set -u` empty-array idiom and the `@sh` eval in `statusline.sh`, one line each.