Answer product-owner round 1: 0 🔴, 4 🟡 (0 misread); leave a stopped chunk to the human, name the task that didn't start, refuse another checkout's session and ask to stop old loops before upgrading
This commit is contained in:
+1
-1
@@ -7,7 +7,7 @@
|
||||
- A release someone else cut while it still held plan items no longer stops the loop: those items count as the next release's, `chunk-preflight` tells the worker to move them there, and `loop-claude` routes on them. Where the plan names no later release and `todo.md` named none since the cut, the loop still asks which release they belong to.
|
||||
- `project-record open` now writes the copy of a record kept outside a file under a folder of the worktree that ran it, `~/.local/state/project-record/<key>/<worktree>/`, so two chunks of one project no longer overwrite each other's unsaved edit. It also removes the folders of worktrees git no longer lists.
|
||||
- `chunk-pr merge` merges the chunks of one project on a machine one at a time, and `--finish <ID>` finishes each plan item in the chunk's turn, so `todo.md` and `CHANGELOG.md` no longer conflict between open chunks. A pull request that waits for an approval leaves the queue while it waits, and merge stops where a reviewer's comment waits for an answer.
|
||||
- Two loop-claude runs in one project now work side by side, each on its own chunk. Each loop holds a slot of the project, a locked file under `~/.local/state/loop-claude/<key>/`, and names its session after it: the first loop's session keeps its name, `A <key> loop-claude`, and the second's is `A <key> loop-claude 2`. A rerun resumes a chunk left open first. A commit in the config's folder now takes only the file it changed, as `git commit -m <title> -- <file>`.
|
||||
- `loop-claude` runs each chunk in its own window of one tmux session per project, `loop-<key>`, and needs tmux 3.2 or later. Up to the config's new optional `parallel-chunks` chunks run at once, 1 by default; a chunk starts beside the others only where its item's `Touches:` prediction overlaps none of theirs. `loop-claude <task>` starts the windows and attaches to the session, and as a chunk finishes, its loop starts the next. A window whose chunk waits for you ends its name in ` ?` and rings the bell, and the question's DM names the window. A stopped chunk keeps its window and its items until you run `loop-claude <task>` again. A chunk's claude session is named after its window, as `A <key> loop-claude item-372`. A commit in the config's folder now takes only the file it changed, as `git commit -m <title> -- <file>`. To upgrade, finish or stop every running loop-claude before `deploy-release` moves `~/.claude` to this release: a loop that reloads into it starts its project's windows afresh, and leaves its chunk's open claude session in the session picker.
|
||||
- `todo-item finish` finishes an item of a plan kept in a Jira epic: it moves the item's issue by the workflow transition, and to the status, that the config's new optional settings `jira-finish-transition` and `jira-finish-status` name, both as Jira shows them. It refuses a transition that leads to another status, or to one Jira doesn't count as done, and fails where the config sets neither.
|
||||
- Reviewers and loop-claude's judge read the review standards from the folder a project's config sets as `standards`, in place of `~/.claude/skills/larv-review/standards/`. The setting is required. To upgrade, add `standards = "~/.claude/skills/larv-review/standards"` to every config under `~/.claude-projects/` right after `deploy-release` moves `~/.claude` to this release, and not before.
|
||||
- A project's config may keep each of its five records on a Confluence Cloud page: set, for example, `decisions = "confluence:https://<site>/wiki/spaces/<space>/pages/<page ID>"`, with the credentials in the config's `env-file`. `decisions` and `comprehension-history` may name a page only where `plan` names a Jira epic. The loop reads and writes the page as markdown, so a save replaces a mention or a macro on it with plain text. It never overwrites a teammate's edit: where someone saved the page since the loop read it, `project-record save` refuses and the loop asks you.
|
||||
|
||||
@@ -22,50 +22,58 @@ asked again after its answer. A question the human answered earlier in the chunk
|
||||
worker with that answer, unless the question quotes the words of the answer that leave it open. The
|
||||
fourth question they answer in one cycle goes to the human too, with the quote. An unfinished chunk
|
||||
resumes its session next cycle, and the worker is shown the passage the judge quoted as the work
|
||||
remaining. The next chunk starts a fresh session. Cycles continue until an exit below or Ctrl-C.
|
||||
remaining. The next chunk starts a fresh session. Cycles continue until an exit below or Ctrl-C,
|
||||
either of which stops that one chunk.
|
||||
Words: ~/.claude/CLAUDE.md → "Vocabulary".
|
||||
|
||||
loop-claude needs tmux 3.2 or later, and checks it before it starts anything. Each chunk runs in its
|
||||
own window of one tmux session per project, named loop-<key>, such as loop-claude-config. <key> is
|
||||
the checkout's path relative to ~/code, or to / outside it, with a dash for each character other
|
||||
than a letter, a digit, _ or -. The tmux session's @loop-root option names its checkout, and a
|
||||
checkout whose key maps to a tmux session another checkout runs is refused. loop-claude <task>
|
||||
starts the chunks that may start now, then attaches to the tmux session, or switches to it inside
|
||||
tmux; detaching leaves the chunks running. Off a terminal it prints the command that attaches. Where
|
||||
no chunk may start, it says so, and the task starts in no new window. At most parallel-chunks chunks
|
||||
run at once, a whole number the project's config sets, 1 by default. The first starts from the
|
||||
plan's next item, and each other from an item whose `Touches:` prediction overlaps neither one
|
||||
before it nor an item another chunk holds (touch-predictions --help). A window is named for the item
|
||||
its chunk starts from, as item-372; a chunk without a plan item, such as planning a release or its
|
||||
release review, runs alone in the window no-item.
|
||||
|
||||
Each window runs a loop-claude for that one chunk, started with --chunk <window>, which nobody
|
||||
types. As a chunk finishes, its loop starts each chunk that may start then, with the task it ran
|
||||
itself, and exits, which closes its window. A loop that stops, by Ctrl-C, an exit below or a
|
||||
failure, keeps its window, with its last lines, and its chunk keeps its items; the next loop-claude
|
||||
<task> starts it again before any other. To stop every chunk, press Ctrl-C in each window. A chunk's
|
||||
claude session is named "A <key> loop-claude <window>", so a rerun resumes a chunk left open, and is
|
||||
deleted when the chunk finishes. A fresh worker is told the items the project's other chunks hold,
|
||||
running or stopped: each one's own and those on its latest `Chunk items:` line, and leaves them out.
|
||||
|
||||
A question only the human can answer is an interrupt (bin/loop_claude/cycle/interrupt.py).
|
||||
loop-claude prints the question in the chunk's window and rings its bell. Until it is answered the
|
||||
window's name ends in " ?", as in "item-372 ?", which tmux's status bar shows. The human answers
|
||||
it there:
|
||||
window's name ends in " ?", as in "item-372 ?", which tmux's status bar shows. The human answers it
|
||||
there:
|
||||
- A line of text: the worker resumes headless with it. The judge reads it as the human's, so the
|
||||
chunk stays unfinished until the answer is recorded.
|
||||
- /talk: opens the worker's session with `claude --resume` on the terminal, to read the diff or
|
||||
discuss first. Once that claude exits, the judge rules on what was typed there.
|
||||
- /talk: opens the worker's claude session with `claude --resume` on the terminal, to read the diff
|
||||
or discuss first. Once that claude exits, the judge rules on what was typed there.
|
||||
- Enter alone: stops the loop.
|
||||
A release ready to cut opens that session on the terminal at once, since only the human may cut it.
|
||||
While claude is open, Ctrl-C reaches it alone, and the loop goes on.
|
||||
Where the project's config sets notifier, loop-claude also sends the human each question, naming
|
||||
its window as <session>:<window>, each release ready to cut and each stop as a DM, as bin/notify
|
||||
sends it. Four stops are left out: Ctrl-C, printing this help, the loop-claude that started the
|
||||
windows, and a loop whose chunk finished. A DM that fails is said on stderr, and the loop goes on.
|
||||
A release ready to cut opens that claude session on the terminal at once, since only the human may
|
||||
cut it. While claude is open, Ctrl-C reaches it alone, and the loop goes on. Where the project's
|
||||
config sets notifier, loop-claude also sends the human each question, naming its tmux window as
|
||||
<session>:<window>, each release ready to cut and each stop as a DM, as bin/notify sends it. Four
|
||||
stops are left out: Ctrl-C, printing this help, the loop-claude that started the windows once it
|
||||
attaches or prints how to, and a loop whose chunk finished once it started the next chunks. A DM
|
||||
that fails is said on stderr, and the loop goes on.
|
||||
|
||||
As a chunk starts, before it is routed, loop-claude runs bin/chunk-preflight --worktree and quotes
|
||||
what it prints in the first prompt (prompts.preflight_facts in bin/loop_claude/cycle/prompts.py);
|
||||
chunk-preflight --help says what it finds and makes. For a window named for an item it adds
|
||||
--item <ID>. A preflight that fails, or is still running
|
||||
after 600 s and is stopped, leaves the worker to find the facts itself.
|
||||
As a chunk starts, before it is routed, loop-claude runs bin/chunk-preflight --worktree, adding
|
||||
--item <ID> in a window named for an item, and quotes what it prints in the first prompt
|
||||
(prompts.preflight_facts in bin/loop_claude/cycle/prompts.py); chunk-preflight --help says what it
|
||||
finds and makes. A preflight that fails, or is still running after 600 s and is stopped, leaves the
|
||||
worker to find the facts itself.
|
||||
|
||||
Each chunk runs in its own window of one tmux session per project, named loop-<key>, such as
|
||||
loop-claude-config. <key> is the checkout's path relative to ~/code, or to / outside it, with a
|
||||
dash for each character tmux reads as a separator. loop-claude <task> starts the chunks that may
|
||||
start now, then attaches to the session, or switches to it inside tmux; detaching leaves the chunks
|
||||
running. Off a terminal it prints the command that attaches. Up to parallel-chunks chunks run at
|
||||
once, a whole number the project's config sets, 1 by default. The first starts from the plan's next
|
||||
item, and each other from an item whose `Touches:` prediction overlaps none before it
|
||||
(touch-predictions --help). A window is named for the item its chunk starts from, as item-372; a
|
||||
chunk without a plan item, such as planning a release or its release review, runs alone in the
|
||||
window no-item. Each window runs a loop-claude for that one chunk, started with --chunk <window>,
|
||||
which nobody types. As a chunk finishes, its loop starts each chunk that may start then and exits,
|
||||
which closes its window. The window of a loop that failed stays, with its last lines, until its
|
||||
chunk starts again. A chunk's session is named "A <key> loop-claude <window>", so a rerun resumes a
|
||||
chunk left open. A fresh worker is told the items the other running chunks hold, each chunk's own
|
||||
and those on its latest `Chunk items:` line, and leaves them out. loop-claude needs tmux 3.2 or
|
||||
later, and checks it before it starts anything.
|
||||
The session is deleted when its chunk finishes. At every
|
||||
interrupt, and as every cycle ends, Ctrl-C and a failure included, the session's transcript is
|
||||
copied into a folder per chunk under $LOOP_CLAUDE_TRANSCRIPTS/<key> (default root
|
||||
At every interrupt, and as every cycle ends, Ctrl-C and a failure included, the claude session's
|
||||
transcript is copied into a folder per chunk under $LOOP_CLAUDE_TRANSCRIPTS/<key> (default root
|
||||
~/.claude/loop-claude-transcripts), named by its hash, with an outcomes file beside it: the task,
|
||||
then each verdict, quoted answer, rejected judge reply, step-up and stop, each opened by its UTC
|
||||
time. The layout, and when a copy is replaced, are in bin/transcript_archive/__init__.py.
|
||||
@@ -133,7 +141,8 @@ Exit 1, saying why, when:
|
||||
- git cannot start or finds no checkout
|
||||
- tmux is missing or older than 3.2
|
||||
- --chunk is given outside a tmux window
|
||||
- a chunk's window cannot be started, as when the plan or the project's config cannot be read
|
||||
- a chunk's window cannot be started, as when the project's config cannot be read, or the tmux
|
||||
session runs another checkout's chunks
|
||||
- the tmux session cannot be put on the terminal
|
||||
- the goals file, or AGENTS.md, docs/decisions.md, ~/.claude/CLAUDE.md, ~/.claude/rules/*.md or
|
||||
the project's review standards where they exist, cannot be read or is not UTF-8
|
||||
@@ -164,4 +173,5 @@ Exit 2, when the human is needed to go on:
|
||||
- the claude opened for /talk, or for a release ready to cut, ends without
|
||||
anything typed
|
||||
- the judge rules a chunk unfinished 6 cycles running; rerun to give it 6 more
|
||||
Rerunning resumes an open session that no running loop holds, the lowest one first."""
|
||||
Rerunning loop-claude <task> starts the chunks that may start, a stopped one first, and each
|
||||
resumes its claude session where it is open."""
|
||||
|
||||
+6
-5
@@ -168,11 +168,12 @@ Valid while `~/.claude` is a checkout of this repo.
|
||||
|
||||
2026-11-16, lilleman's second call of 2026-11-13 splitting item 361: lilleman knows tmux and prefers it. Each chunk runs in its own window of one tmux session per project, `loop-<key>`, up to the number the config's `parallel-chunks` sets, 1 by default. tmux runs even at 1, so every project runs the same workflow (goal 1.3). A window waiting for the human ends its name in ` ?` and rings the bell, and the DM names `<session>:<window>`. The worker's choices, for what the call left open (`bin/loop_claude/tmux.py`, `bin/loop_claude/loop/chunk_windows.py`):
|
||||
|
||||
- **The window, not a slot, names the claude session**, as `A <key> loop-claude item-372`, which replaces item 372's slots. The loop-claude the human runs starts the windows and attaches; each window runs `loop-claude --chunk <window>`, so a loop knows its chunk before it names its session, and a rerun still resumes the chunk left open.
|
||||
- **A finishing chunk starts the next.** As its chunk finishes, a window's loop starts each chunk that may start then and exits, so its window closes. `remain-on-exit failed` keeps the window of a loop that failed, with its last lines, until its chunk starts again. One flock under `~/.local/state/loop-claude/<key>/` serializes the starts, so two chunks finishing together don't start one chunk twice.
|
||||
- **The other chunks' items are told, not locked.** A fresh worker is told the items each other running chunk holds, its window's item and those on its latest `Chunk items:` line, and leaves them out.
|
||||
- **tmux 3.2 is the oldest that has every command and option used.** tmux's `CHANGES` dates the newest two to "CHANGES FROM 3.1c TO 3.2": `new-session -e`, and the `remain-on-exit` value that keeps only a failed program's pane. loop-claude checks `tmux -V` before it starts a worktree, a session or a window.
|
||||
- **The config key is `parallel-chunks`**, which three readers seated as the README's audience picked 2–1.
|
||||
- **The window, in place of item 372's lock-file slot, names the claude session**, as `A <key> loop-claude item-372`. The loop-claude the human runs starts the windows and attaches; each window runs `loop-claude --chunk <window>`, so a loop knows its chunk before it names its claude session, and a rerun still resumes the chunk left open.
|
||||
- **A finishing chunk starts the next; only the human restarts a stopped one.** As its chunk finishes, a window's loop starts each chunk that may start then and exits, so its window closes. `remain-on-exit failed` keeps the window of a loop that stopped any other way, Ctrl-C included, with its last lines, and its chunk keeps its items. A finishing chunk never restarts it, since the human may have stopped it on purpose; the next `loop-claude <task>` starts it again before any other chunk. One flock under `~/.local/state/loop-claude/<key>/` serializes the starts, so two chunks finishing together don't start one chunk twice.
|
||||
- **The other chunks' items are told, not locked.** A fresh worker is told the items each other chunk holds, running or stopped: its window's item and those on its latest `Chunk items:` line. A chunk starts beside the others only where its item's `Touches:` prediction overlaps none of those items' predictions, since the plan's next item, which chunk-preflight's pick checks against, may already have merged.
|
||||
- **The tmux session names its checkout.** Two checkouts whose keys differ only in a character other than a letter, a digit, `_` or `-` map to one session name, so the session's `@loop-root` option names the checkout that made it, and another checkout's loop-claude refuses it.
|
||||
- **tmux 3.2 is the oldest that has every command and option used.** tmux's `CHANGES` dates the newest two to "CHANGES FROM 3.1c TO 3.2": `new-session -e`, and the `remain-on-exit` value that keeps only a failed program's pane.
|
||||
- **A loop started before this release isn't moved into a window.** One that reloads into this release starts its project's windows afresh, and leaves its chunk's open claude session, named for its slot, in the session picker. Carrying a slot's session into a window is not worth the code for a one-human audience, so the changelog asks the human to finish or stop every running loop before taking the release.
|
||||
|
||||
Valid while claude takes `--session-id` and resumes by it, and the human runs loop-claude where tmux is installed.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user