Skip to content

Commit 5cb11b4

Browse files
ship skill: mandatory post-cap architecture consultation
When a code-review session's final pass under its 3-pass cap completes without certifying (`fixed-await-push`, `no-accepted-findings`, or `session-cap-exhausted` at that final pass), the coordinator now automatically asks ChatGPT one holistic consultation in the same conversation before the merge gate: is the underlying approach sound, does the plan need to change, and does it still have any concern at all. A clean `VERDICT: SHIP` from that round is itself sufficient certification (same SHA/CI/branch-protection checks, no human step); `VERDICT: REVISE` or an unparseable answer proceeds to the existing FULL STOP. Observed live on /ship 592 (PR #672): this ad hoc consultation, improvised by hand twice, was the signal that let the human make a good call both times a formal review session exhausted its cap without converging. Also fixes three now-stale "drive the tab manually" prescriptions in review-loops.md (the pass-cap continuation, stalled-generation recovery, and the general ad hoc consultation) — the chatgpt-review skill's own current rule forbids manual DOM driving, and both loops' runner agents already retry stalled/incomplete generations automatically via `--session`, so no manual recovery step was ever actually needed. Replaced with the same `issue`-mode + `--seed-from-session` mechanism the new consultation uses. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LwFPT465eDJqYcRa8HGNLz
1 parent 39a7f62 commit 5cb11b4

2 files changed

Lines changed: 212 additions & 75 deletions

File tree

skills/ship/SKILL.md

Lines changed: 60 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: ship
3-
description: Ship altinity-sql-browser roadmap issues or phases end-to-end, autonomously — resolve scope into dependency-ordered units (a phase or a whole issue), then for each unit in turn author and approve its plan with the selected ChatGPT (default) or Fable planner workflow (max 5 review passes), implement code and tests, open that unit's own PR, iterate a ChatGPT code review loop to certification (max 3 passes), and merge automatically when every proof condition holds — auto-chaining to the next unit off the just-merged origin/main with no re-prompting. Stops the whole run only when a unit's plan or merge proof exhausts its review passes; stops only a gated unit's own spine — every other independent unit or spine still ships in the same run — when the issue explicitly gates further phases on a new decision. Invoke as `/ship ISSUE [--planner chatgpt|fable]`, `/ship ISSUE.PHASE`, or `/ship ISSUE1,ISSUE2`.
3+
description: Ship altinity-sql-browser roadmap issues or phases end-to-end, autonomously — resolve scope into dependency-ordered units (a phase or a whole issue), then for each unit in turn author and approve its plan with the selected ChatGPT (default) or Fable planner workflow (max 5 review passes), implement code and tests, open that unit's own PR, iterate a ChatGPT code review loop to certification (max 3 passes, with a mandatory post-cap architecture consultation as the last word before stopping), and merge automatically when every proof condition holds — auto-chaining to the next unit off the just-merged origin/main with no re-prompting. Stops the whole run only when a unit's plan or merge proof exhausts its review passes; stops only a gated unit's own spine — every other independent unit or spine still ships in the same run — when the issue explicitly gates further phases on a new decision. Invoke as `/ship ISSUE [--planner chatgpt|fable]`, `/ship ISSUE.PHASE`, or `/ship ISSUE1,ISSUE2`.
44
---
55

66
# /ship — deliver altinity-sql-browser issues autonomously
@@ -36,7 +36,8 @@ There are exactly three stop reasons:
3636

3737
1. a unit's plan is not approved after **5** review passes (step 2.2);
3838
2. a unit's merge proof condition fails at its own gate — including no certified head
39-
after **3** code review passes (step 2.7);
39+
after **3** code review passes AND the mandatory post-cap architecture consultation
40+
itself returns `VERDICT: REVISE` rather than `SHIP` (step 2.6/2.7);
4041
3. an explicit phase/issue **gate** is reached before starting the next unit on a spine
4142
(gate detection: step 1, re-checked at step 2.8 for every subsequent unit).
4243

@@ -140,7 +141,13 @@ this default beyond which Workflow script gets invoked — both are described th
140141
- Beyond the two formal loops, the coordinator may consult ChatGPT ad hoc for a
141142
genuinely hard judgment call — never pass-counted (it isn't a `chatgpt-review`
142143
invocation, so it doesn't conflict with the single-permitted-invocation rule above),
143-
never a substitute for internal review; see `references/review-loops.md`.
144+
never a substitute for internal review; see `references/review-loops.md`. One specific
145+
case of this is mandatory, not optional: whenever a code-review session's final pass
146+
under its 3-pass cap ends without certifying, the coordinator automatically runs the
147+
post-cap architecture consultation (`references/review-loops.md`) before reaching
148+
step 2.7 — unlike the general ad hoc case, this one carries a real, schema-free but
149+
mechanically fail-closed `VERDICT: SHIP`/`VERDICT: REVISE` line that can itself
150+
certify the head (step 2.6/2.7).
144151

145152
### Output capture
146153

@@ -522,27 +529,38 @@ loops the full local gate to green, and commits **locally only**. Act on the ret
522529
per the table in `references/review-loops.md`:
523530

524531
- `fixed-await-push` → diff the commits yourself, push, wait for green CI keyed on the
525-
head SHA, re-invoke with `pass+1` and the returned `session` handle so ChatGPT
526-
reassesses every earlier finding in the same conversation. Each fix pass gets its own
527-
pushed commit and separately labelled public review comment.
528-
- `no-accepted-findings` → append the rebuttals to the question file and re-invoke
529-
(spends a pass).
530-
- `session-cap-exhausted` → do NOT re-invoke this workflow with this session; switch
531-
immediately to the manual continuation in `references/review-loops.md` (driving the
532-
existing tab directly) — this is expected tooling behavior, not a failed proof
533-
condition.
534-
- `needs_human` → first rule out the two recoverable causes in
535-
`references/review-loops.md`'s "Recovering a stalled or hung generation" (a stuck
536-
live generation; a complete response the runner failed to recognize) — only then
537-
treat it as a failed proof condition at the gate (2.7).
532+
head SHA. If `pass < 3`, re-invoke with `pass+1` and the returned `session` handle so
533+
ChatGPT reassesses every earlier finding in the same conversation — each fix pass
534+
gets its own pushed commit and separately labelled public review comment. **If this
535+
was pass 3** (the cap, no certification reached), do not re-invoke — run the mandatory
536+
post-cap architecture consultation in `references/review-loops.md` instead, before
537+
proceeding per its outcome (below).
538+
- `no-accepted-findings` → append the rebuttals to the question file; if `pass < 3`,
539+
re-invoke (spends a pass). **If this was pass 3**, run the post-cap architecture
540+
consultation instead of re-invoking.
541+
- `session-cap-exhausted` → do NOT re-invoke this workflow with this session; run the
542+
post-cap architecture consultation in `references/review-loops.md` instead — this is
543+
expected tooling behavior, not itself a failed proof condition.
544+
- `needs_human` → this loop's own runner already exhausted its automatic retry attempts
545+
(see `references/review-loops.md`'s "Recovering a stalled or hung generation") before
546+
returning this — treat it as a failed proof condition at the gate (2.7) directly, no
547+
further recovery step to try.
538548
- `fix-failed`, `error` → treat as a failed proof condition at the gate (2.7).
539549

540-
A **certified head** is a `certified-pending-proofs` return (completed pass, verdict
541-
`SHIP`, no accepted findings) whose reviewed SHA equals this unit's current PR head.
542-
543-
- First clean pass at the current head → certified; stop reviewing. Never re-review an
544-
already-certified head — three is a failure ceiling, not a ritual (and the
545-
`chatgpt-review` script enforces the cap for `pr` mode).
550+
A **certified head** is either:
551+
- a `certified-pending-proofs` return (completed pass, verdict `SHIP`, no accepted
552+
findings) whose reviewed SHA equals this unit's current PR head; or
553+
- a `VERDICT: SHIP` from the post-cap architecture consultation (triggered when pass 3
554+
ends without certifying — `references/review-loops.md`), whose independently-confirmed
555+
reviewed SHA equals this unit's current PR head. This path skips the human gate
556+
entirely: proceed straight through 2.7's remaining checks (CI green, branch
557+
protection) and merge automatically. A `VERDICT: REVISE` (or unparseable) from that
558+
same consultation is NOT a certified head — proceed to 2.7's FULL STOP instead.
559+
560+
- First clean pass (or consultation `SHIP`) at the current head → certified; stop
561+
reviewing. Never re-review an already-certified head — three formal passes is a
562+
failure ceiling, not a ritual (and the `chatgpt-review` script enforces the cap for
563+
`pr` mode) — the consultation exists precisely for what happens after that ceiling.
546564
- **After certification, push nothing.** Any push voids the certification and burns
547565
another pass — which is why all reconcile commits landed in 2.5. Ship-log comment
548566
edits are fine; comments are not commits.
@@ -574,16 +592,24 @@ mutate main directly" remote rule above — the remote is untouched either way).
574592
after that, verify the merge landed on `origin/main` and flip this unit's own ship-log
575593
row to `shipped`.
576594

577-
**Any condition fails** — no certified head after 3 passes, ChatGPT unreachable or a
578-
pass incomplete, SHA drift, CI red or pending, branch protection refusal — → **FULL
595+
**Any condition fails** — no certified head after 3 passes AND the post-cap
596+
architecture consultation returned `VERDICT: REVISE`/unparseable, ChatGPT unreachable or
597+
a pass incomplete, SHA drift, CI red or pending, branch protection refusal — → **FULL
579598
STOP, right now, for the whole run.** Do not merge, and do not attempt any further unit
580-
or spine. Summarize the PR URL, head SHA, CI state, certification state, and every
581-
accepted, rejected, and **unresolved** finding with its comment URL, then ask the human
582-
to rule: merge anyway, leave the PR open, or direct further work. Their decision
583-
governs. **Even after the human rules and a real fix lands, do not open a fresh
584-
ChatGPT session to re-certify it** — continue the SAME session this unit has used since
585-
its plan was authored (see `references/review-loops.md`'s "one unit, one ChatGPT
586-
session" rule); a fresh session throws away everything already reviewed.
599+
or spine. Summarize the PR URL, head SHA, CI state, certification state, every
600+
accepted, rejected, and **unresolved** finding with its comment URL, and the post-cap
601+
architecture consultation's full answer if one was triggered (a `SHIP` verdict there
602+
short-circuits to the certified-head merge above and never reaches this paragraph — only
603+
a `REVISE`/unparseable one does), then ask the human to rule: merge anyway, leave the PR
604+
open, or direct further work. Their decision governs. **Even after the human rules and a
605+
real fix lands, do not open a fresh ChatGPT session to re-certify it** — continue the
606+
SAME session this unit has used since its plan was authored (see
607+
`references/review-loops.md`'s "one unit, one ChatGPT session" rule); a fresh session
608+
throws away everything already reviewed. If the human directs further formal review on
609+
the same conversation, that means a brand-new `pr`-mode session (`seedFromSession`
610+
naming the exhausted one) for a fresh 3-pass budget, per
611+
`references/review-loops.md`'s pass-cap continuation guidance — never a route-around of
612+
the exhausted session's own cap.
587613

588614
### 2.8 Before the next unit: re-check the gate, then auto-chain or stop
589615

@@ -610,7 +636,9 @@ Report per unit — a run can now produce several PRs and several merges:
610636
- **Shipped units**: PR URL, merge URL, merged head SHA, CI state, plan-loop pass count
611637
+ conversation URL, code-review pass count + every ChatGPT conversation/comment link,
612638
findings accepted/rejected/unresolved, and confirmation the ship-log row now reads
613-
`shipped`.
639+
`shipped`. If certification came from the post-cap architecture consultation's
640+
`VERDICT: SHIP` rather than a formal `pr`-mode pass, say so explicitly and cite that
641+
conversation URL in place of a code-review pass count.
614642
- **Gated units**: the exact trigger text (blockquote or matched prose, quoted
615643
verbatim) and its source, which unit(s) it covers, and — when it follows a unit that
616644
just landed — that unit's own recorded outcome as context. State plainly this is a

0 commit comments

Comments
 (0)