@rtorcato/repo-tooling 3.16.1 → 3.16.2
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/package.json +1 -1
- package/skills/ai-issue-loop/SKILL.md +32 -11
package/package.json
CHANGED
|
@@ -70,9 +70,9 @@ drift with a second copy to maintain.
|
|
|
70
70
|
|
|
71
71
|
| Label | On | Meaning |
|
|
72
72
|
|---|---|---|
|
|
73
|
-
| `ai-ready` | issue | Eligible for an agent. The hard gate
|
|
74
|
-
| `ai-wip` | issue | Claimed; a worktree exists. |
|
|
75
|
-
| `ai-blocked` | issue | Agent gave up; needs a human. |
|
|
73
|
+
| `ai-ready` | issue | Eligible for an agent. The hard gate; **cleared on pickup**. |
|
|
74
|
+
| `ai-wip` | issue | Claimed; a worktree exists. Never rides alongside `ai-ready`. |
|
|
75
|
+
| `ai-blocked` | issue | Agent gave up; needs a human. Only a human re-adds `ai-ready`. |
|
|
76
76
|
| `ai-review` | PR | Awaiting agent review. |
|
|
77
77
|
| `ai-reviewing-code` | PR | `code-reviewer` claimed and running. Cleared with its verdict. |
|
|
78
78
|
| `ai-reviewing-sec` | PR | `security-expert` claimed and running. Cleared with its verdict. |
|
|
@@ -400,13 +400,21 @@ Only then:
|
|
|
400
400
|
git -C "$ROOT" worktree remove --force "$WT_DIR" # the path found above, not a rebuilt one
|
|
401
401
|
git -C "$ROOT" branch -D "$BRANCH" 2>/dev/null
|
|
402
402
|
gh issue edit <N> --remove-label ai-wip 2>/dev/null
|
|
403
|
+
# Still OPEN means the PR said only `Refs #N`; a `Closes #N` issue is already closed.
|
|
404
|
+
if [ "$(gh issue view <N> --json state -q .state)" = OPEN ]; then
|
|
405
|
+
gh issue edit <N> --add-assignee @me
|
|
406
|
+
fi
|
|
403
407
|
```
|
|
404
408
|
|
|
405
409
|
A closed-unmerged PR is the exception: there is no squash to find, so skip the
|
|
406
410
|
confirmation and remove — the work was abandoned deliberately.
|
|
407
411
|
|
|
408
|
-
The issue itself closes from the PR body's `Closes #N
|
|
409
|
-
|
|
412
|
+
The issue itself closes from the PR body's `Closes #N`, so both edits are normally
|
|
413
|
+
no-ops on a closed issue. A PR that said only `Refs #N` leaves it **open**, which is
|
|
414
|
+
what the state check catches. The work has landed, so it must not go back in
|
|
415
|
+
the queue; pickup already dropped `ai-ready`, and assigning it is what stops a
|
|
416
|
+
merged issue sitting unowned instead (#429 had to be moved to `holding` by hand).
|
|
417
|
+
This pass is what frees concurrency slots, so it must run before Pass 4.
|
|
410
418
|
|
|
411
419
|
**Then reap the stalled.** Nothing can time out an agent: the Agent tool takes no
|
|
412
420
|
timeout, and an agent whose session died leaves its labels behind with no process
|
|
@@ -432,8 +440,10 @@ work must never be reaped out from under itself.
|
|
|
432
440
|
The **no PR exists** condition on the first row is what makes reaping safe. An
|
|
433
441
|
agent that got as far as opening a PR has handed off to the label state machine
|
|
434
442
|
and is no longer the thing being waited on; only a run that produced nothing is
|
|
435
|
-
presumed dead.
|
|
436
|
-
|
|
443
|
+
presumed dead. Reaping deliberately does **not** restore `ai-ready` — `ai-blocked`
|
|
444
|
+
means a human decides when the issue re-enters the queue, and the removed worktree
|
|
445
|
+
means their re-label starts clean. The other two `ai-blocked` exits, Pass 3's
|
|
446
|
+
ping-pong stop and an implementer handing back, leave it off for the same reason.
|
|
437
447
|
|
|
438
448
|
**Every `ai-blocked` must say why, and land in front of a human.** So reaping always
|
|
439
449
|
does three things together — label, assign, comment — and the comment opens with
|
|
@@ -448,9 +458,12 @@ puts it in the statusline and fires a notification with a sound.
|
|
|
448
458
|
**Reaping is not always the right call — say so when it isn't.** The rule assumes a
|
|
449
459
|
dead agent, but a stale `ai-wip` can also come from a run that was cancelled
|
|
450
460
|
deliberately, in which case the work is fine and only the claim is stale. If you know
|
|
451
|
-
the cause and it is benign,
|
|
452
|
-
|
|
453
|
-
|
|
461
|
+
the cause and it is benign, **return it to the queue** — `gh issue edit <N> --add-label
|
|
462
|
+
ai-ready --remove-label ai-wip`, no `ai-blocked` — so Pass 4 picks it straight back up,
|
|
463
|
+
and say in the comment that you re-queued it, that you deviated, and why. Re-adding
|
|
464
|
+
`ai-ready` is not optional: pickup cleared it, so clearing `ai-wip` alone drops the
|
|
465
|
+
issue out of the queue silently, which is the worse failure. `ai-blocked` means *a
|
|
466
|
+
human must look*; do not spend it on a claim you already understand.
|
|
454
467
|
|
|
455
468
|
### Pass 3 — review
|
|
456
469
|
|
|
@@ -769,9 +782,17 @@ Take the first `slots` issues. For each, **claim it first** so a concurrent tick
|
|
|
769
782
|
can't double-pick:
|
|
770
783
|
|
|
771
784
|
```bash
|
|
772
|
-
gh issue edit <N> --add-label ai-wip
|
|
785
|
+
gh issue edit <N> --add-label ai-wip --remove-label ai-ready
|
|
773
786
|
```
|
|
774
787
|
|
|
788
|
+
Dropping `ai-ready` is half the claim, not tidiness — the diagram above is a
|
|
789
|
+
transition, not an accumulation. An issue left carrying both re-enters the queue
|
|
790
|
+
the instant `ai-wip` clears for any reason other than the PR closing it, and the
|
|
791
|
+
next tick spawns an agent to re-implement work already sitting in an open PR
|
|
792
|
+
(#458, #467, #461, #452, all in one session). Every path that legitimately returns
|
|
793
|
+
an issue to the queue therefore re-adds `ai-ready` explicitly; Pass 2's benign-stall
|
|
794
|
+
path is the only one, and a human does the rest.
|
|
795
|
+
|
|
775
796
|
**Then create the worktree yourself**, before spawning anything. `<slug>` is 3–4
|
|
776
797
|
kebab-case words from the title:
|
|
777
798
|
|