@rtorcato/repo-tooling 3.13.1 → 3.13.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 +56 -13
package/package.json
CHANGED
|
@@ -60,6 +60,8 @@ header names the agent *and* says why it is wearing a human's face:
|
|
|
60
60
|
| `ai-wip` | issue | Claimed; a worktree exists. |
|
|
61
61
|
| `ai-blocked` | issue | Agent gave up; needs a human. |
|
|
62
62
|
| `ai-review` | PR | Awaiting agent review. |
|
|
63
|
+
| `ai-reviewing-code` | PR | `code-reviewer` claimed and running. Cleared with its verdict. |
|
|
64
|
+
| `ai-reviewing-sec` | PR | `security-expert` claimed and running. Cleared with its verdict. |
|
|
63
65
|
| `ai-ok-code` | PR | `code-reviewer` passed. |
|
|
64
66
|
| `ai-ok-sec` | PR | `security-expert` passed. |
|
|
65
67
|
| `ai-changes` | PR | A reviewer requested changes. |
|
|
@@ -86,6 +88,8 @@ gh label create ai-ready -c '#0e8a16' -d 'Eligible for an AI agent to impleme
|
|
|
86
88
|
gh label create ai-wip -c '#fbca04' -d 'Claimed by an agent; worktree exists'
|
|
87
89
|
gh label create ai-blocked -c '#b60205' -d 'Agent gave up; needs a human'
|
|
88
90
|
gh label create ai-review -c '#1d76db' -d 'PR awaiting agent review'
|
|
91
|
+
gh label create ai-reviewing-code -c '#c5def5' -d 'code-reviewer claimed and running'
|
|
92
|
+
gh label create ai-reviewing-sec -c '#c5def5' -d 'security-expert claimed and running'
|
|
89
93
|
gh label create ai-ok-code -c '#0e8a16' -d 'code-reviewer passed'
|
|
90
94
|
gh label create ai-ok-sec -c '#0e8a16' -d 'security-expert passed'
|
|
91
95
|
gh label create ai-changes -c '#d93f0b' -d 'Reviewer requested changes'
|
|
@@ -100,14 +104,19 @@ grep -qxF '.claude/ai-loop-status' .gitignore || echo '.claude/ai-loop-status' >
|
|
|
100
104
|
|
|
101
105
|
```
|
|
102
106
|
issue: ai-ready ─pickup─> ai-wip ─> PR opened, labelled ai-review
|
|
103
|
-
PR: ai-review ─>
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
107
|
+
PR: ai-review ─> ai-reviewing-* ─┬─> ai-ok-code + ai-ok-sec ─┬─ issue PR ─> assigned to you, ai-review dropped
|
|
108
|
+
│ (± ai-notes) │ ─> YOU merge ─> worktree removed
|
|
109
|
+
│ └─ dependabot ─┬─ no ai-notes ─> auto-merge ─> worktree removed
|
|
110
|
+
│ └─ ai-notes ───> assigned to you
|
|
111
|
+
└─> ai-changes ─> fix round (max 2) ─> ai-review
|
|
112
|
+
└─ round 3 ─> ai-blocked
|
|
109
113
|
```
|
|
110
114
|
|
|
115
|
+
`ai-reviewing-code` / `ai-reviewing-sec` are the *claim* step: Pass 3 applies one
|
|
116
|
+
immediately before spawning that reviewer, and the reviewer clears its own
|
|
117
|
+
alongside its verdict label. They are transient — a claim outliving its reviewer
|
|
118
|
+
means the agent died, which is Pass 2's stall reaping, not a state of the PR.
|
|
119
|
+
|
|
111
120
|
Only the Dependabot arm merges itself, and only when no reviewer left `ai-notes`.
|
|
112
121
|
An issue PR ends at *assigned to you* and waits there — `ai-ok-code, ai-ok-sec`
|
|
113
122
|
with no `ai-review` is the loop's way of saying done. Add `ai-notes` and it means
|
|
@@ -374,7 +383,7 @@ work must never be reaped out from under itself.
|
|
|
374
383
|
| Stalled | Condition | Do |
|
|
375
384
|
|---|---|---|
|
|
376
385
|
| Implementer died | issue `ai-wip` ≥45min, **and no PR exists** for `ai-<N>-<slug>` | `gh issue edit <N> --add-label ai-blocked --remove-label ai-wip --add-assignee @me`, comment, remove the worktree |
|
|
377
|
-
| Reviewer died | PR `ai-
|
|
386
|
+
| Reviewer died | PR `ai-reviewing-code` (or `ai-reviewing-sec`) ≥45min with no matching `ai-ok-*` and no `ai-changes` | `gh pr edit <N> --remove-label <the claim that stalled>` — drop **that** label, not a fixed one; a stalled `ai-reviewing-sec` cleared as `ai-reviewing-code` leaves the dead claim in place and the reviewer never re-spawns. Dropping the claim is what lets Pass 3 re-spawn it, and they're cheap and diff-scoped. If that claim has been applied ≥3 times, `ai-blocked` instead |
|
|
378
387
|
| Orphan worktree | `"$WT_ROOT"/ai-<N>-*` whose issue is not `ai-wip` and has no open PR | remove the worktree and branch |
|
|
379
388
|
|
|
380
389
|
The **no PR exists** condition on the first row is what makes reaping safe. An
|
|
@@ -404,8 +413,34 @@ means *a human must look*; do not spend it on a claim you already understand.
|
|
|
404
413
|
|
|
405
414
|
**PRs labelled `ai-review`.** For each, spawn *in background* only the reviewers
|
|
406
415
|
whose pass-label is missing — `code-reviewer` if no `ai-ok-code`,
|
|
407
|
-
`security-expert` if no `ai-ok-sec
|
|
408
|
-
|
|
416
|
+
`security-expert` if no `ai-ok-sec` — and **only those not already claimed**: skip
|
|
417
|
+
`code-reviewer` if the PR carries `ai-reviewing-code`, `security-expert` if it
|
|
418
|
+
carries `ai-reviewing-sec`. Both can run concurrently; launch them in a single
|
|
419
|
+
message.
|
|
420
|
+
|
|
421
|
+
**Claim first, then spawn** — the same shape Pass 4 uses before picking up an
|
|
422
|
+
issue. Apply the label immediately before the spawn, not after:
|
|
423
|
+
|
|
424
|
+
```bash
|
|
425
|
+
gh pr edit <N> --add-label ai-reviewing-code # then spawn code-reviewer
|
|
426
|
+
gh pr edit <N> --add-label ai-reviewing-sec # then spawn security-expert
|
|
427
|
+
```
|
|
428
|
+
|
|
429
|
+
Without the claim there is no window in which "a reviewer is running" is visible.
|
|
430
|
+
A reviewer applies its verdict label only at the *end*, after reading the diff and
|
|
431
|
+
posting its comment, so from spawn until then the labels are indistinguishable
|
|
432
|
+
from "nobody has started" — and a 15-minute tick is comfortably shorter than a
|
|
433
|
+
review. A tick landing in that gap spawns a duplicate of every reviewer in flight:
|
|
434
|
+
two agents read the same diff and post two review comments under the owner's
|
|
435
|
+
avatar, and the verdicts race, one applying `ai-ok-code` while the other applies
|
|
436
|
+
`ai-changes` and leaves the PR contradictory for Pass 1 to interpret. On a 4-PR
|
|
437
|
+
queue that is 8 duplicated reviewers against the monthly cap the limits section
|
|
438
|
+
exists to protect.
|
|
439
|
+
|
|
440
|
+
Two labels rather than one, because the reviewers are spawned independently and a
|
|
441
|
+
single flag could not say *which* was already running. The reviewer clears its own
|
|
442
|
+
claim alongside its verdict, so a claim never outlives its run; if one does, the
|
|
443
|
+
agent died and Pass 2's stall reaping drops it.
|
|
409
444
|
|
|
410
445
|
Reviewer prompt template:
|
|
411
446
|
|
|
@@ -452,9 +487,14 @@ Reviewer prompt template:
|
|
|
452
487
|
> restating the diff. Writing `Nothing.` is a real verdict and the common one —
|
|
453
488
|
> say it plainly rather than padding the section to look thorough.
|
|
454
489
|
>
|
|
455
|
-
> Then apply exactly one verdict label
|
|
456
|
-
>
|
|
457
|
-
> -
|
|
490
|
+
> Then apply exactly one verdict label, **clearing your claim label in the same
|
|
491
|
+
> command**:
|
|
492
|
+
> - Clean, or only nit-level suggestions → `gh pr edit <N> --add-label <ai-ok-code|ai-ok-sec> --remove-label <ai-reviewing-code|ai-reviewing-sec>`
|
|
493
|
+
> - A real defect a maintainer would block on → `gh pr edit <N> --add-label ai-changes --remove-label ai-review --remove-label <ai-reviewing-code|ai-reviewing-sec>`
|
|
494
|
+
>
|
|
495
|
+
> Pass 3 applied that claim label immediately before spawning you, and skips
|
|
496
|
+
> spawning a second of you for as long as it is set. Leaving it behind wedges your
|
|
497
|
+
> half of the review until Pass 2 reaps it as a dead reviewer.
|
|
458
498
|
>
|
|
459
499
|
> And **additionally**, if and only if your `### Before merging` section is not
|
|
460
500
|
> `Nothing.`:
|
|
@@ -537,7 +577,10 @@ package/from/to table survives because it sits at the top; classify from that.
|
|
|
537
577
|
> State in your comment which rule fired, name the packages that tripped it, and say
|
|
538
578
|
> whether the body was truncated so the reader knows what you could and couldn't see.
|
|
539
579
|
> Same `🤖 *Automated review — …*` header line, same closing `### Before merging`
|
|
540
|
-
> section, and same one-verdict-label rule as above
|
|
580
|
+
> section, and same one-verdict-label rule as above — **including clearing your
|
|
581
|
+
> `<ai-reviewing-code|ai-reviewing-sec>` claim label in the same `gh pr edit`**.
|
|
582
|
+
> Pass 3 claimed you with it before spawning you, and a claim left behind wedges
|
|
583
|
+
> your half of the review until Pass 2 reaps it.
|
|
541
584
|
>
|
|
542
585
|
> Be sparing with `ai-notes` here specifically: it suppresses auto-merge, so a
|
|
543
586
|
> reflexive note on every dependency bump wedges the one path that runs
|