@rallycry/conveyor-skills 1.0.11 → 1.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -0
- package/bin/checkout-claim.mjs +524 -0
- package/bin/cli.mjs +11 -1
- package/package.json +5 -1
- package/skills/conveyor-build/SKILL.md +34 -10
- package/skills/conveyor-build/references/checkout-claim.md +98 -0
- package/skills/conveyor-build/references/pack-path.md +20 -3
- package/skills/conveyor-build/references/task-path.md +15 -5
- package/skills/conveyor-local-loop/SKILL.md +41 -18
- package/skills/conveyor-release-review/SKILL.md +399 -0
- package/skills/conveyor-release-review/references/dimensions.md +295 -0
- package/skills/conveyor-release-review/references/fan-out.md +130 -0
- package/skills/conveyor-release-review/references/report-and-cards.md +183 -0
- package/skills/conveyor-review/SKILL.md +6 -0
- package/skills/conveyor-workflows/SKILL.md +8 -0
|
@@ -102,6 +102,12 @@ task binding and no user account.
|
|
|
102
102
|
stack) is the entire value of local execution, and worktrees have none of it.
|
|
103
103
|
A dirty `git status` before any branch switch is a hard stop: report and let
|
|
104
104
|
the user commit or stash. Do not solve it with a second checkout.
|
|
105
|
+
- **Take turns on the checkout.** Another local session can share this
|
|
106
|
+
checkout, and a clean tree does not prove it is idle. Hold the checkout
|
|
107
|
+
claim from before the card claim until the finish line, and never switch
|
|
108
|
+
branches while another session holds it — the protocol, commands, and what
|
|
109
|
+
each result means are in
|
|
110
|
+
[references/checkout-claim.md](references/checkout-claim.md). A pod skips it.
|
|
105
111
|
- The dev database and dev-server ports are shared with the user's own
|
|
106
112
|
sessions. No destructive experiments, never reset the dev DB, and reuse a
|
|
107
113
|
running dev stack rather than fighting over ports.
|
|
@@ -149,10 +155,13 @@ say why.
|
|
|
149
155
|
|
|
150
156
|
## Claim
|
|
151
157
|
|
|
152
|
-
Re-confirm the card is still claimable
|
|
158
|
+
Re-confirm the card is still claimable. **Locally**, take the checkout claim
|
|
159
|
+
first (`checkout acquire --card <slug>`,
|
|
160
|
+
[references/checkout-claim.md](references/checkout-claim.md)); `held` means
|
|
161
|
+
flag and wait, not claim. Then `mcp__conveyor__update_task` →
|
|
153
162
|
`status: "InProgress"`, then `mcp__conveyor__post_to_chat` with a claim marker
|
|
154
163
|
naming where you are running. Status changed under you → someone else took it;
|
|
155
|
-
stop.
|
|
164
|
+
release the checkout claim and stop.
|
|
156
165
|
|
|
157
166
|
**A pack parent is claimed differently** — see the pack path. The parent stays
|
|
158
167
|
parked and the chat marker IS the claim.
|
|
@@ -204,7 +213,14 @@ runner: the pod can sleep mid-run and nothing will wake you.
|
|
|
204
213
|
**A UI-visible change needs visual proof before the PR**, in both environments:
|
|
205
214
|
capture a screenshot (static) or a short recording (interaction) with the host
|
|
206
215
|
repo's own tooling and attach it with `mcp__conveyor__upload_attachment`, then
|
|
207
|
-
embed the returned URL in the PR body. A UI PR without it is incomplete.
|
|
216
|
+
embed the returned URL in the PR body. A UI PR without it is incomplete. Pass
|
|
217
|
+
`showcase: true` for the capture that shows the finished result (the after
|
|
218
|
+
shot, the final recording); leave it off for before shots and scoping captures.
|
|
219
|
+
Showcase files post to chat, render first on the card, and land in the PR body
|
|
220
|
+
under `## Showcase`. A re-capture of something already on the card (a new cut
|
|
221
|
+
of the same recording) passes `supersedes: "<old fileId>"` from
|
|
222
|
+
`list_task_files`: the new file takes the old one's star and tags, and the old
|
|
223
|
+
one collapses under it as history instead of showing twice.
|
|
208
224
|
|
|
209
225
|
**Manual tests are for human eyes, and few.** Before the PR, record with
|
|
210
226
|
`mcp__conveyor__set_manual_tests` only what a person must see in the running
|
|
@@ -262,10 +278,12 @@ Instead: post the answer, config, or findings with
|
|
|
262
278
|
`mcp__conveyor__upload_attachment` (any file type, up to 25MB), and complete
|
|
263
279
|
the card directly with `force_update_task_status("Complete")` — there is no PR
|
|
264
280
|
or review step for a no-code task. Never publish a deliverable as an off-card
|
|
265
|
-
link; the card is where it belongs. When a revision
|
|
266
|
-
upload,
|
|
267
|
-
`
|
|
268
|
-
|
|
281
|
+
link; the card is where it belongs. When a revision replaces an earlier
|
|
282
|
+
upload, upload it with `supersedes: "<old fileId>"` (the id from
|
|
283
|
+
`list_task_files`) so the card shows one current version of each deliverable
|
|
284
|
+
with the history collapsed under it. Reach for
|
|
285
|
+
`mcp__conveyor__delete_attachment` (permanent) only for a copy that should not
|
|
286
|
+
survive at all.
|
|
269
287
|
|
|
270
288
|
When unsure, check the diff: a real diff means open a PR, no diff means finish
|
|
271
289
|
in chat and mark it Complete.
|
|
@@ -276,7 +294,10 @@ Refresh against the card's base first, then gate, then open — in that order, s
|
|
|
276
294
|
nothing invalidates the verification you just did:
|
|
277
295
|
|
|
278
296
|
1. `git fetch origin <base> && git merge origin/<base> --no-edit`
|
|
279
|
-
2. One verification pass, scoped to the diff.
|
|
297
|
+
2. One verification pass, scoped to the diff. **Locally**, run
|
|
298
|
+
`checkout verify --card <slug>` before the pass, each commit and push, and
|
|
299
|
+
the PR call; anything but `ok` means stop (see
|
|
300
|
+
[references/checkout-claim.md](references/checkout-claim.md)).
|
|
280
301
|
3. `mcp__conveyor__create_pull_request`, naming the base branch **explicitly**.
|
|
281
302
|
**The two surfaces spell these differently and unknown keys are silently
|
|
282
303
|
dropped, not rejected** — locally it is `head:` / `base:`; in a pod it is
|
|
@@ -289,6 +310,8 @@ nothing invalidates the verification you just did:
|
|
|
289
310
|
should look at, and anything you did NOT do.
|
|
290
311
|
|
|
291
312
|
Then confirm CI actually started (read-only `gh pr checks`). Do not wait on it.
|
|
313
|
+
**Locally**, that is the finish line for the checkout too:
|
|
314
|
+
`checkout release --card <slug>`.
|
|
292
315
|
|
|
293
316
|
**Do not re-merge the base and do not re-run a gate that already passed.** If
|
|
294
317
|
the base moved while the gates ran, open the PR anyway — CI validates against
|
|
@@ -323,8 +346,9 @@ After two genuinely different failed approaches, or on a decision only the user
|
|
|
323
346
|
can make: post the reason AND the specific question to chat, set the card back
|
|
324
347
|
to `"Open"`, restore the tree (locally, `git checkout dev` — leaving a shared
|
|
325
348
|
checkout parked on an abandoned feature branch is how the next session starts
|
|
326
|
-
from the wrong base),
|
|
327
|
-
|
|
349
|
+
from the wrong base), release the checkout claim locally
|
|
350
|
+
(`checkout release --card <slug>`), and stop. A vague "this is hard" is not a
|
|
351
|
+
handoff; the question is what makes it one.
|
|
328
352
|
|
|
329
353
|
**A thin plan is a different case, and it does not stop a pack.** A card whose
|
|
330
354
|
plan fails the context-free-reader bar: post what is missing to its chat and
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# Checkout claim — local sessions take turns on one checkout
|
|
2
|
+
|
|
3
|
+
The protocol behind every "hold the checkout claim" line in
|
|
4
|
+
[conveyor-build](../SKILL.md), its [task path](task-path.md) and
|
|
5
|
+
[pack path](pack-path.md), [conveyor-local-loop](../../conveyor-local-loop/SKILL.md),
|
|
6
|
+
and local fixes in [conveyor-review](../../conveyor-review/SKILL.md).
|
|
7
|
+
|
|
8
|
+
**Why.** The card claim (`InProgress` plus a chat marker) stops two sessions
|
|
9
|
+
working ONE card. It does nothing about two sessions working two cards in ONE
|
|
10
|
+
checkout. A clean tree passes the "dirty `git status` → stop" rule even while
|
|
11
|
+
another session is mid-task, so `git checkout -B <branch>` succeeds and switches
|
|
12
|
+
the branch underneath it. The checkout claim closes that gap: one session holds
|
|
13
|
+
the working tree at a time, and every other session waits.
|
|
14
|
+
|
|
15
|
+
**Scope: local only.** A pod has its own checkout and never runs this. Skip
|
|
16
|
+
every checkout-claim step when you are in a pod.
|
|
17
|
+
|
|
18
|
+
## How to call it
|
|
19
|
+
|
|
20
|
+
The helper is the `checkout` subcommand of the `conveyor-skills` bin. Pick the
|
|
21
|
+
form once per session:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
[ -x node_modules/.bin/conveyor-skills ] && echo local || echo npx
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
- `local` → `node_modules/.bin/conveyor-skills checkout <command> …`
|
|
28
|
+
- `npx` → `npx -y -p @rallycry/conveyor-skills@latest conveyor-skills checkout <command> …`
|
|
29
|
+
- The local bin answers `unknown command 'checkout'` (an older branch or an old
|
|
30
|
+
install) → use the `npx` form.
|
|
31
|
+
|
|
32
|
+
Write the chosen form out literally in every call. Never store it in a shell
|
|
33
|
+
variable and run `$VAR checkout …`: zsh does not word-split it.
|
|
34
|
+
|
|
35
|
+
`--card` is the card you are working. Inside a pack it is ALWAYS the pack
|
|
36
|
+
parent's slug, for the whole run. Identity comes from `CONVEYOR_SESSION_ID`, then
|
|
37
|
+
`CLAUDE_CODE_SESSION_ID`. A runtime that sets neither passes a stable
|
|
38
|
+
`--session <id>` on every call; without it the identity falls back to
|
|
39
|
+
`card:<slug>`, which still works but frees a dead holder only after the TTL.
|
|
40
|
+
|
|
41
|
+
The claim is one file, `<git dir>/conveyor-checkout-claim.json`. It is never
|
|
42
|
+
committed and never shows in `git status`. Each command prints ONE line of
|
|
43
|
+
JSON on stdout (`{"command","state","head","dirty",…}`) and a hint on stderr.
|
|
44
|
+
|
|
45
|
+
## When
|
|
46
|
+
|
|
47
|
+
| Moment | Command |
|
|
48
|
+
| --- | --- |
|
|
49
|
+
| Before the first git write or card status write (before the claiming `update_task`) | `acquire --card <slug>` |
|
|
50
|
+
| After every branch create or switch | `acquire --card <slug> --branch <branch>` |
|
|
51
|
+
| Before each gate, commit, push, and `create_pull_request`; at the start of every wake while you hold the claim | `verify --card <slug>` (also refreshes the heartbeat) |
|
|
52
|
+
| Finish line reached (PR open, CI started), parked, blocked, or the card claim lost — after restoring the tree | `release --card <slug>` |
|
|
53
|
+
|
|
54
|
+
## What each result means
|
|
55
|
+
|
|
56
|
+
| Command | State (exit) | Do this |
|
|
57
|
+
| --- | --- | --- |
|
|
58
|
+
| `acquire` | `acquired`, `refreshed` (0) | Carry on. |
|
|
59
|
+
| `acquire` | `took-over` (0) | The previous holder was dead or stale. If `dirty` is true, the tree holds that claim's unfinished work for THIS card: audit it before you continue. |
|
|
60
|
+
| `acquire` | `held` (3) | Another session holds the checkout. Touch nothing — no checkout, no status write, no commit. Flag it (below), then wait. |
|
|
61
|
+
| `acquire` | `dirty` (5) | The tree is dirty and no live claim covers it. Hard stop: report it. The user commits or stashes, never you. |
|
|
62
|
+
| `verify` | `ok` (0) | Carry on. |
|
|
63
|
+
| `verify` | `branch-moved` (4) | HEAD is not the claimed branch — someone switched it, or your own checkout failed and left you on the previous branch. Do not commit or push. Report it and stop. |
|
|
64
|
+
| `verify` | `lost` (3) | You no longer hold the claim. Stop touching the tree and `acquire` again, then follow that result. |
|
|
65
|
+
| `release` | `released`, `none` (0) | Done. |
|
|
66
|
+
| `release` | `held` (3) | The claim is not yours. Leave it. |
|
|
67
|
+
| any | `error` (1) | Usage error or not a git repo. Read the stderr line. |
|
|
68
|
+
|
|
69
|
+
**Flag, then wait.** On `held`, tell the user which card, branch and host hold
|
|
70
|
+
the checkout (the `holder` field has all three). A standalone build also posts
|
|
71
|
+
one line to its card's chat, for example
|
|
72
|
+
`[build] waiting — checkout held by <card> on <branch>`. Then wait:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
node_modules/.bin/conveyor-skills checkout wait --timeout 1740 # or the npx form
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
In Claude Code, launch it with Bash `run_in_background: true` and end the
|
|
79
|
+
turn. Its completion notification is the wake. In Codex, hold the command
|
|
80
|
+
session open until it returns. The result is advisory, like `conveyor-wait`:
|
|
81
|
+
`free`, `stale`, or `own` → run `acquire` again; `timeout` → arm ONE new wait.
|
|
82
|
+
Never arm a second wait while one is running.
|
|
83
|
+
|
|
84
|
+
## Rules that go with the claim
|
|
85
|
+
|
|
86
|
+
- **Stage by path, never `git add -A`.** In a shared checkout an untracked file
|
|
87
|
+
can belong to another session.
|
|
88
|
+
- **No claim, dirty tree → refuse.** `acquire` enforces the old "dirty tree is
|
|
89
|
+
a hard stop" rule deterministically. It also covers ad-hoc sessions that
|
|
90
|
+
never take a claim.
|
|
91
|
+
- **A stale claim is taken over only on a clean tree, or when it names the
|
|
92
|
+
same card.** A holder is stale when its pid is dead on this host, when the
|
|
93
|
+
same pid now runs a different session (a `/clear`), or when its heartbeat is
|
|
94
|
+
older than the TTL (7200s; `CONVEYOR_CHECKOUT_CLAIM_TTL_SECONDS` or `--ttl`
|
|
95
|
+
overrides it).
|
|
96
|
+
- **Human override.** `checkout status` shows the holder and never changes
|
|
97
|
+
anything. `checkout release --force` drops someone else's claim, or a claim
|
|
98
|
+
file that does not parse. Run it only when the user tells you to.
|
|
@@ -24,6 +24,13 @@ alternative is where pack incidents come from.
|
|
|
24
24
|
IMMEDIATELY record it: `mcp__conveyor__update_task` with
|
|
25
25
|
`githubBranch: <branch>`.
|
|
26
26
|
|
|
27
|
+
**Locally, take the checkout claim before any of this** —
|
|
28
|
+
`checkout acquire --card <parent-slug>` before you cut or check out the
|
|
29
|
+
pack branch, then `acquire --card <parent-slug> --branch <pack>` once you
|
|
30
|
+
are on it ([checkout-claim.md](checkout-claim.md)). The pack holds the
|
|
31
|
+
claim for the WHOLE run: `--card` stays the parent's slug through every
|
|
32
|
+
child, and `--branch` follows each child-branch and pack-branch switch.
|
|
33
|
+
|
|
27
34
|
That write is load-bearing, not bookkeeping. Identification mints a
|
|
28
35
|
competing `conveyor/*` branch name onto any branchless card it processes,
|
|
29
36
|
and every pack-child merge handler keys on the card's recorded branch
|
|
@@ -121,6 +128,10 @@ state and is a no-op. This is NOT the "insurance wakeup" the pod prompt
|
|
|
121
128
|
forbids: that rule is about a background job's own completion notification,
|
|
122
129
|
which does fire. Nothing at all notifies a pack between children, so the
|
|
123
130
|
heartbeat is the only guaranteed wake a Claude pack has. Do not delete it.
|
|
131
|
+
Locally, every wake — heartbeat or not — starts with
|
|
132
|
+
`checkout verify --card <parent-slug>` before it touches the tree, and a
|
|
133
|
+
result other than `ok` stops the pack (see
|
|
134
|
+
[checkout-claim.md](checkout-claim.md)).
|
|
124
135
|
|
|
125
136
|
**Codex CLI.** There is no `ScheduleWakeup` and no `/loop`. The thread goal
|
|
126
137
|
created per the SKILL.md *Goal and finish line* section is the continuation:
|
|
@@ -153,7 +164,10 @@ parent chat, skip that child, and take the next ready one.
|
|
|
153
164
|
Then follow [task-path.md](task-path.md), with one substitution: the child
|
|
154
165
|
branches from the **pack branch**, not `dev`, and its PR's base is the pack
|
|
155
166
|
branch. Name that base explicitly — the default is `dev`, and the two surfaces
|
|
156
|
-
spell the argument differently (`base:` locally, `baseBranch:` in a pod).
|
|
167
|
+
spell the argument differently (`base:` locally, `baseBranch:` in a pod). The
|
|
168
|
+
pack already holds the checkout claim, so the task path's claim steps become
|
|
169
|
+
`acquire --card <parent-slug> --branch <child-branch>` after you cut the child
|
|
170
|
+
branch, and there is no release at the child's finish line.
|
|
157
171
|
|
|
158
172
|
> **Environment — a pod has no child branches and no child PRs.** Everything
|
|
159
173
|
> above describes the LOCAL model, where each child gets its own branch and its
|
|
@@ -261,7 +275,8 @@ leave the branch pushed, and stop.
|
|
|
261
275
|
`base:` `dev`. The parent moves to ReviewPR. Post the pack summary: what
|
|
262
276
|
shipped per child, how it was verified, what reviewers should look at.
|
|
263
277
|
4. Confirm CI started. **Never approve or merge this PR** — it is the one that
|
|
264
|
-
gets independent review.
|
|
278
|
+
gets independent review. Locally, release the checkout:
|
|
279
|
+
`checkout release --card <parent-slug>`.
|
|
265
280
|
|
|
266
281
|
## Parked protocol
|
|
267
282
|
|
|
@@ -269,4 +284,6 @@ After two genuinely different failed approaches on a child, or a decision only
|
|
|
269
284
|
the user can make: post the reason and the specific question to the child AND
|
|
270
285
|
parent chats, set the child back to `Open`, restore the tree, and take the next
|
|
271
286
|
child whose dependency chain does not run through the parked one. Everything
|
|
272
|
-
remaining blocked →
|
|
287
|
+
remaining blocked → restore the tree, release the checkout claim locally
|
|
288
|
+
(`checkout release --card <parent-slug>`), report, and stop; the user's reply
|
|
289
|
+
is the un-park signal, and the resumed run acquires again.
|
|
@@ -13,11 +13,14 @@ Re-confirm via `mcp__conveyor__get_task` that the card is still claimable —
|
|
|
13
13
|
`Open` (or whatever status the user explicitly overrode), no assignee you do
|
|
14
14
|
not expect, no active session. Then:
|
|
15
15
|
|
|
16
|
-
1.
|
|
17
|
-
|
|
16
|
+
1. **Locally only:** `checkout acquire --card <slug>` — the checkout claim from
|
|
17
|
+
[checkout-claim.md](checkout-claim.md). `held` → touch nothing, flag it, and
|
|
18
|
+
wait; `dirty` → hard stop. A pod skips this step.
|
|
19
|
+
2. `mcp__conveyor__update_task` → `status: "InProgress"`
|
|
20
|
+
3. `mcp__conveyor__post_to_chat` → `[build] claimed — <where you are running>`
|
|
18
21
|
|
|
19
22
|
If the status changed under you between the read and the write, someone else
|
|
20
|
-
took it.
|
|
23
|
+
took it. Release the checkout claim and stop rather than compete.
|
|
21
24
|
|
|
22
25
|
## 2. Branch from the card's base — never blindly `dev`
|
|
23
26
|
|
|
@@ -29,6 +32,10 @@ git fetch origin <base>
|
|
|
29
32
|
git checkout -B <feat|fix|chore>/<slug> origin/<base>
|
|
30
33
|
```
|
|
31
34
|
|
|
35
|
+
Locally, record the branch on the checkout claim straight after the checkout:
|
|
36
|
+
`checkout acquire --card <slug> --branch <feat|fix|chore>/<slug>`. Do the
|
|
37
|
+
same after any later branch switch.
|
|
38
|
+
|
|
32
39
|
Two cases that are not a fresh branch:
|
|
33
40
|
|
|
34
41
|
- **The card already has a `githubBranch` with commits on origin.** Resume THAT
|
|
@@ -39,7 +46,8 @@ Two cases that are not a fresh branch:
|
|
|
39
46
|
absent even though the branch exists on the remote. Fetch it explicitly
|
|
40
47
|
(`git fetch origin <branch>`) rather than concluding the branch is missing —
|
|
41
48
|
and note that a failed `checkout` leaves you on your PREVIOUS branch, where a
|
|
42
|
-
follow-up `git push` will push the wrong thing.
|
|
49
|
+
follow-up `git push` will push the wrong thing. Locally, `checkout verify`
|
|
50
|
+
reports exactly that as `branch-moved`.
|
|
43
51
|
|
|
44
52
|
Reinstall dependencies if the lockfile changed.
|
|
45
53
|
|
|
@@ -62,6 +70,8 @@ Chat at milestones, not per step.
|
|
|
62
70
|
These are identical to the SKILL.md sections of the same names. In particular:
|
|
63
71
|
sync the base BEFORE the verification pass, pass `base:` explicitly to
|
|
64
72
|
`mcp__conveyor__create_pull_request`, and confirm CI started without waiting on
|
|
65
|
-
it.
|
|
73
|
+
it. Locally, `checkout verify --card <slug>` before the gate, each commit and
|
|
74
|
+
push, and the PR call.
|
|
66
75
|
|
|
67
76
|
Finish line: the card in ReviewPR with CI started. You do not merge it.
|
|
77
|
+
Locally, `checkout release --card <slug>` once CI has started.
|
|
@@ -47,12 +47,27 @@ adds only selection, claiming, cadence, and local-machine hygiene.
|
|
|
47
47
|
Clean tree before any branch switch is still a hard rule: dirty
|
|
48
48
|
`git status` at iteration start → touch nothing, report, and idle — the
|
|
49
49
|
resolution is the user committing or stashing, not a second checkout.
|
|
50
|
+
- **Hold the checkout claim while you use the tree.** WIP = 1 is per loop,
|
|
51
|
+
not per checkout: two loops, or a loop plus an interactive session, can
|
|
52
|
+
share this checkout, and a clean tree does not prove it is idle. Every tier
|
|
53
|
+
that touches git takes the claim first and gives it back at the finish line —
|
|
54
|
+
protocol in [conveyor-build's checkout-claim reference](../conveyor-build/references/checkout-claim.md).
|
|
50
55
|
- **Push early.** There is no pod WIP-autosync locally; committed-and-pushed is
|
|
51
56
|
the only durable state. Push the branch (`-u origin`) as soon as it exists.
|
|
52
57
|
|
|
53
58
|
## Iteration order
|
|
54
59
|
|
|
55
|
-
Each invocation does the FIRST of these that produces work, then paces
|
|
60
|
+
Each invocation does the FIRST of these that produces work, then paces.
|
|
61
|
+
|
|
62
|
+
**Checkout first.** Start every iteration with `checkout status`. `live` or
|
|
63
|
+
`corrupt` means another session holds this checkout: skip Recover, Babysit
|
|
64
|
+
fixes, and Claim (all three touch the tree), arm ONE background
|
|
65
|
+
`checkout wait` (see *Waking on board events*), and pace. Otherwise, each tier
|
|
66
|
+
below runs `checkout acquire --card <slug>` for its card before its first git
|
|
67
|
+
command or status write; `held` → stop that tier and arm the wait. The chat
|
|
68
|
+
marker names only the host, so a second loop on this host also matches
|
|
69
|
+
"my" marker in Recover — the checkout claim is what keeps it off a card another
|
|
70
|
+
live loop is still working.
|
|
56
71
|
|
|
57
72
|
1. **Recover** — a card with my `[local-loop] claimed` chat marker still
|
|
58
73
|
InProgress without a PR? Resume it. The branch may already exist locally or
|
|
@@ -89,13 +104,14 @@ Each invocation does the FIRST of these that produces work, then paces:
|
|
|
89
104
|
Skip `followParentStatus` mirror children. A blocker counts as met only
|
|
90
105
|
when merged-or-beyond (ReviewDev/ReviewLive/Complete) or Cancelled — a
|
|
91
106
|
blocker sitting in ReviewPR is NOT met until its PR merges.
|
|
92
|
-
2. Claim: re-confirm via `get_task` it is still Open,
|
|
93
|
-
`
|
|
107
|
+
2. Claim: re-confirm via `get_task` it is still Open, take the checkout claim
|
|
108
|
+
(`checkout acquire --card <slug>`; `held` → do not claim, arm the wait),
|
|
109
|
+
then `mcp__conveyor__update_task` → `status: "InProgress"`, then
|
|
94
110
|
`mcp__conveyor__post_to_chat`: `[local-loop] claimed — working locally on
|
|
95
111
|
<hostname>`. Claiming a PACK is different — never set the parent
|
|
96
112
|
InProgress: leave it Open and post the pack claim marker instead (see Pack
|
|
97
|
-
mode). Status changed under you → someone else took it;
|
|
98
|
-
candidate.
|
|
113
|
+
mode). Status changed under you → someone else took it; release the
|
|
114
|
+
checkout claim and take the next candidate.
|
|
99
115
|
3. Plan missing or failing the context-free-reader bar → don't wing it: post
|
|
100
116
|
what's missing to chat, leave the card Open, skip it.
|
|
101
117
|
|
|
@@ -115,15 +131,18 @@ This section adds only what the LOOP changes:
|
|
|
115
131
|
re-check the parent's status; if it went InProgress or ReviewPR, post
|
|
116
132
|
`[local-loop] parked: pack coordinator active — yielding`, leave the branch
|
|
117
133
|
pushed, and let the coordinator take over.
|
|
118
|
-
- **Do not wait on CI.** Confirm it started (read-only `gh pr checks`)
|
|
119
|
-
|
|
120
|
-
|
|
134
|
+
- **Do not wait on CI.** Confirm it started (read-only `gh pr checks`),
|
|
135
|
+
`checkout release --card <slug>`, and end the iteration — the Babysit tier
|
|
136
|
+
owns it from there. This is the loop's one real departure from a standalone
|
|
137
|
+
build, which stays with its PR. A Babysit fix re-acquires with that card and
|
|
138
|
+
releases again once the fix is pushed. A pack child's PR is the exception:
|
|
139
|
+
the pack keeps the claim until its finale PR opens.
|
|
121
140
|
|
|
122
141
|
**Parked protocol** — after 2 genuinely different failed approaches, or on a
|
|
123
142
|
decision only the user can make: post `[local-loop] parked: <reason + the
|
|
124
143
|
specific question>`, set status back to `"Open"`, restore the tree
|
|
125
|
-
(`git checkout dev`), move on. The user's
|
|
126
|
-
signal.
|
|
144
|
+
(`git checkout dev`), `checkout release --card <slug>`, move on. The user's
|
|
145
|
+
next chat reply is the un-park signal.
|
|
127
146
|
|
|
128
147
|
## Pack mode
|
|
129
148
|
|
|
@@ -136,9 +155,9 @@ dev→pack sync after every merge, cross-reference, then the finale parent PR
|
|
|
136
155
|
into dev. That reference is the source of truth for the procedure; this section
|
|
137
156
|
only defines how it embeds in the loop:
|
|
138
157
|
|
|
139
|
-
- The pack occupies the loop's single WIP slot
|
|
140
|
-
|
|
141
|
-
state.
|
|
158
|
+
- The pack occupies the loop's single WIP slot — and holds the checkout
|
|
159
|
+
claim under the parent's slug — from claim until the finale PR opens. Do not
|
|
160
|
+
interleave unrelated cards mid-pack — that thrashes branch state.
|
|
142
161
|
- Claim marker goes to the PARENT chat: `[local-loop] claimed — driving this
|
|
143
162
|
pack locally on <hostname>, pack branch <branch>`. The parent's status
|
|
144
163
|
stays Open (parked); the marker is the claim.
|
|
@@ -208,9 +227,12 @@ On wake, run a normal iteration and re-enumerate with
|
|
|
208
227
|
`mcp__conveyor__list_tasks`. By then the card may be claimed, cancelled, or
|
|
209
228
|
blocked by a dependency — never claim straight from the wait payload.
|
|
210
229
|
|
|
211
|
-
**Never arm a second wait.**
|
|
212
|
-
|
|
213
|
-
|
|
230
|
+
**Never arm a second wait.** At most ONE background wait of either kind —
|
|
231
|
+
`conveyor-wait` or `checkout wait` — runs at a time. On a wake where a wait
|
|
232
|
+
process is still in flight and nothing else changed, re-arm the fallback
|
|
233
|
+
`ScheduleWakeup` and end the turn. When the checkout is held, the
|
|
234
|
+
`checkout wait` is the one to arm: the board wait cannot tell you when the
|
|
235
|
+
checkout frees up.
|
|
214
236
|
|
|
215
237
|
## Pacing (dynamic /loop only)
|
|
216
238
|
|
|
@@ -219,7 +241,7 @@ Under `/loop` with no interval, end EVERY iteration with exactly one
|
|
|
219
241
|
|
|
220
242
|
| State | Delay | Reason should say |
|
|
221
243
|
|-------|-------|-------------------|
|
|
222
|
-
| A background gate/agent/conveyor-wait is in flight — its completion notification is the real wake | 1200–1800s fallback | "fallback while <gate> runs — its notification wakes me sooner" |
|
|
244
|
+
| A background gate/agent/conveyor-wait/checkout wait is in flight — its completion notification is the real wake | 1200–1800s fallback | "fallback while <gate> runs — its notification wakes me sooner" |
|
|
223
245
|
| ANY actionable work exists: claimable cards or packs, a pack child to implement/merge, a PR still to open, red/pending CI, review comments | 60–90s | queue depth / which item is next |
|
|
224
246
|
| Queue enumerated as empty THIS iteration, all loop PRs green and quiet | 1200–1800s | queue empty; conveyor-wait armed, so this is only the fallback |
|
|
225
247
|
| Loop-fatal: MCP dead after 2 tries, dirty tree, broken repo | notify the user (PushNotification if available), then 1800s — or `stop: true` if continuing is unsafe | what is wrong |
|
|
@@ -249,7 +271,8 @@ depth each iteration so the user can offload manually.
|
|
|
249
271
|
- Not a pod: no sandbox, no WIP snapshots, and the dev DB + dev-server ports
|
|
250
272
|
are shared with the user's interactive sessions — no destructive
|
|
251
273
|
experiments, never reset the dev DB, reuse a running dev stack rather than
|
|
252
|
-
fighting over ports.
|
|
274
|
+
fighting over ports. The git checkout is shared the same way, which is why
|
|
275
|
+
the loop takes turns on it through the checkout claim.
|
|
253
276
|
- Not a parallel executor: one card (or one pack) at a time is the point (the
|
|
254
277
|
full machine per gate). Backlogged? That is what claudespaces — or the
|
|
255
278
|
offload valve — are for.
|