/ship:go [feature-name] [--auto] [--headless] [--profile <quick|standard|thorough>] [--fix-rounds <n>] [--build-mode <per-task|per-phase>]from ship
Auto-runs remaining Ship steps for a feature, with options for approval gates and headless execution.
Ships in ship. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Auto-run all remaining steps for the active feature. Round-1 planning and the finish step run inline here; the plan revision loop and the build→verify spine each run in a Workflow, so per-agent output never enters this conversation.
Pass --auto to skip the "Ready to build?" approval gate. It is not a fully hands-off run. A verify FAIL still stops the run and hands you the fix phase it wrote, because section 6b's automatic fix rounds run only under --headless, and a person reads the fix tasks before anything builds them. Everything else is unchanged — --auto never suppresses a NEEDS_INPUT question, which is the one interruption the plan loop can raise.
Pass --headless for unattended runs (e.g. a spawned claude -p) where no interactive prompt can fire. --headless implies --auto, and additionally degrades every interactive point deterministically per the contract in ${CLAUDE_PLUGIN_ROOT}/ship/docs/headless.md — read that file when the flag is present; it is the contract of record for QUESTIONS.md, OUTCOME.json, the outcome vocabulary, and the workflow wait rule below.
Auto run (/ship:auto only). Applies only when the /ship:auto skill invoked this skill in this session and .planning/features/{name}/AUTO.json exists. No flag selects it, and a direct /ship:go never enters it. It is an interactive --auto run (the workflow wait stays interactive: end the turn, continue on the notification; no OUTCOME.json, no QUESTIONS.md; NEEDS_INPUT is still asked) with these differences only: (1) right after every Workflow invocation run node "${CLAUDE_PLUGIN_ROOT}/ship/auto-run.cjs" workflow {name} {plan|build} {task-id}, and once that workflow's result is reconciled run node "${CLAUDE_PLUGIN_ROOT}/ship/auto-run.cjs" workflow {name} clear; (2) section 7 makes no offer and /ship:finish is not invoked from here, section 2's done row included; (3) when this skill's run ends (a report, a stop, any plan-loop terminal) do not end on a recommendation: continue at the auto skill's ## Route section; (4) the auto skill's No-prompt rule applies to every skill this one invokes, and in manual mode a builder NEEDS_CONTEXT is not asked: it is a stop, as under --headless. Section 6b stays headless-only; the auto skill runs its own fix rounds.
Shell commands. Edit PLAN.md, CONTEXT.md and REVIEW.md with Edit or Write, never cat >> or a heredoc, and keep every other Bash call one plain command — no shell functions, for loops or cd … && chains. A worktree-isolated session refuses any command it cannot verify stays inside the worktree, and each refusal costs a turn. Stage files by explicit path (git add -- {paths}); the safety gate blocks the -A form even when paths follow it. Never stage AUTO.json.
The Workflow tool does not return the workflow's result. It launches the workflow in the background and returns a Task ID immediately; the result arrives later as a completion notification.
Interactively that is fine and must not change: report that the workflow is running and end the turn — the session outlives it, /workflows shows progress, and the notification lands back here. Blocking an interactive run for the length of a build would be a worse bug than the one this rule fixes.
Under --headless it is fatal. claude -p exits when the turn ends, so a turn that ends mid-workflow kills or orphans it: the run exits cleanly having produced no outcome, leaves CONTEXT.md mid-flight, and can leave agent processes still writing to the worktree after the caller believes it finished.
So under --headless, after EVERY Workflow invocation in this skill — section 2a's plan loop and section 5's build→verify spine alike — do not end the turn until that workflow is terminal:
Take the Task ID from the Workflow tool result (it reports Task ID: {id}).
If the completion notification already arrived while you were still in the launching turn — short workflows do finish that fast — the result is in hand. Skip to reconciling it.
Otherwise block in a foreground Bash call on the workflow's output file. The harness keeps {task_id}.output in the session's tasks/ directory: it is empty while the workflow runs and holds the workflow's result JSON once it ends. Run this with the Bash timeout set to 600000 (600000 ms is the Bash tool's maximum, not a tuning choice), substituting the Task ID:
id={task_id}; n=0
until f=$(find /private/tmp /tmp "${TMPDIR:-/tmp}" -path "*/tasks/$id.output" 2>/dev/null | head -1); [ -s "$f" ] || [ $n -ge 114 ]; do sleep 5; n=$((n+1)); done
[ -s "$f" ] && echo "DONE $f" || echo RUNNING
Do not wait any other way. There is no TaskOutput tool in current Claude Code builds, so a rule that needs one leaves nothing to block on. run_in_background Bash and Monitor return at once, so the turn ends and claude -p exits anyway. And the "type":"result" lines in the workflow's journal.jsonl mark individual agents finishing, not the workflow, so watching them ends the wait early. TaskStop may be a deferred tool. Load it with ToolSearch using select:TaskStop before step 5 needs it.
Read the line the call prints. A build spine routinely outlasts ten minutes, so one call is not enough: while the status is still running, repeat step 3 (the call printed RUNNING) — up to 12 calls (a 2-hour ceiling). On DONE, read the file it names. Its result field is the workflow's own return value: the same { feature, stoppedAt, completed, verdict, salvageEvents } (or plan-loop) object a notification would carry. Reconcile from that; do not wait for a separate notification on top of it. If a completion notification lands between calls, reconcile from its <result>, or from its <output-file> when that result is cut short. The payload is a compact summary, not an agent transcript, so reading it costs nothing.
If the ceiling is reached with the task still running, call TaskStop on the Task ID before terminating, then terminate as error per section 6 with detail workflow exceeded the 2-hour headless wait cap. Stopping first is what holds the guarantee that nothing is still writing to the worktree once the run returns.
The structured result you then reconcile is unchanged — only when you receive it changes.
First parse flags out of $ARGUMENTS: strip --auto and --headless (recording whether each was present, in any argument order) before resolving the feature name, so /ship:go my-feature --auto, /ship:go --auto my-feature, /ship:go --headless my-feature, and /ship:go --auto all work. --headless sets --auto.
Also strip --profile {value} in the same pass — both the --profile quick and --profile=quick forms, in any argument order — recording the value for section 1b. Strip --fix-rounds {n} the same way (both forms), recording n for section 6b; it must be a whole number 0–3, and any other value is treated as absent. Strip --build-mode {value} the same way (both the --build-mode per-phase and --build-mode=per-phase forms), recording the value for section 1b. Whatever remains after all flags are stripped is the feature name.
Feature state is injected at session start ("SHIP ACTIVE FEATURES"). If the remaining $ARGUMENTS names a feature, use it. Otherwise pick the one feature whose CONTEXT.md status is not done. If several are unfinished, ask which. If none exist, tell the user to run /ship:start. Under --headless, resolution must never ask: if several features are unfinished and none was named, or none exist, terminate with outcome error and a detail line naming the problem (per the headless termination rule in section 6).
Headless preamble: when --headless is present, immediately after resolving the feature delete .planning/features/{name}/OUTCOME.json if it exists — the run's first act. A fresh one is written as the run's last act, so a missing file after the process exits signals a mid-flight death. From here on, every terminal path in this skill must end via the headless termination rule defined in section 6.
Once the feature name is resolved, resolve the workflow profile for this run:
node "${CLAUDE_PLUGIN_ROOT}/ship/resolve-profile.cjs" {name}
# with the flag present, append it:
node "${CLAUDE_PLUGIN_ROOT}/ship/resolve-profile.cjs" {name} --profile {value}
# with --build-mode present, append it too:
node "${CLAUDE_PLUGIN_ROOT}/ship/resolve-profile.cjs" {name} --build-mode {value}
It prints a single line of JSON: { profile, source, warning, knobs: { reviewGate, verifyDepth, maxBuildRounds, maxPlanRounds }, buildMode, buildModeSource }. Parse it.
Build mode is the top-level buildMode field (per-task or per-phase), not a profile knob. Precedence: --build-mode flag > SHIP_BUILD_MODE env > per-task. per-phase is the rollback to the pre-diet path (one builder per phase reading PLAN.md); setting SHIP_BUILD_MODE=per-phase in the environment the runs inherit rolls back every run without a version pin. An unrecognized value resolves to per-task and its warning is merged into warning.
Precedence: flag > CONTEXT.md profile: frontmatter > standard. An absent field resolves to standard, which is exactly today's behavior; an unrecognized value resolves to standard with a warning. The helper always exits 0 with valid JSON — resolution never asks a question and never stops the run.
If warning is non-null, surface it: interactively, say it before continuing; under --headless, include it in the final report and detail.
The resolved knobs feed the workflow args in sections 2a and 5. On standard every knob equals today's constant, so a standard run is byte-identical to a run from before profiles existed.
Sections 2a and 5 need the Workflow tool, and a session does not always have it: since Claude Code 2.1.312 some sessions (worktree sessions most often) start without it, so Workflow is neither in the tool list nor returned by ToolSearch. Check once, before routing: if Workflow is not in your tool list, run ToolSearch with select:Workflow. If it is still not available, this run is in manual mode:
--headless, put the same line in the final report and detail./ship:plan-verify {name} via the Skill tool. APPROVED → continue to section 3. NEEDS-REVISION → stop: interactively, report the CRITICALs and recommend /ship:plan {name} (its replan mode) and then /ship:go {name}; under --headless, terminate as unresolved./ship:build {name}, then /ship:verify {name} once CONTEXT.md reads status: built. Section 6's reconcile does not apply: there is no workflow result, and the two skills write REVIEW.md, VERIFY.md and CONTEXT.md themselves. Route on CONTEXT.md status afterwards: done → GO COMPLETE, then section 7; plan-verified (verify FAIL, fix tasks appended) → interactively report and recommend /ship:go {name} to run the fix round, under --headless terminate as verify-fail; still building → report the build skill's stop, and under --headless terminate as needs-context, checkpoint, or exhausted to match it. Under --headless a builder NEEDS_CONTEXT is never asked via AskUserQuestion — it terminates as needs-context.### Outcome block, REVIEW.md entries, or a verdict yourself. The workflow scripts' guards (convergence, blocking findings, verdict downgrade, salvage) exist only inside them; the manual skills are the supported path without them.Route on the feature's status and run these inline, in order, until the feature reaches plan-verified:
| Status | Action |
|---|---|
brainstormed | Invoke the /ship:plan skill. On success the status becomes planned. |
planned | Run the plan loop (section 2a). |
done | Invoke /ship:finish and stop. Under --headless, do NOT invoke /ship:finish — terminate with outcome done and detail "feature already done; finish is never attempted headlessly". |
(brainstormed requires that /ship:start already ran — go does not brainstorm; an interview can't run unattended.)
Headless pre-check: under --headless, before invoking the workflow, check for .planning/features/{name}/QUESTIONS.md and run the answer round-trip in ship/docs/headless.md §7, which is the contract for all three cases: answered → feed answers + roundOffset (plus maxPlanRounds: {knobs.maxPlanRounds}, exactly as on the initial invocation; findings are optional on resume — the workflow reads the open findings from PLAN.md when none are passed) into the workflow and archive the file; unanswered → terminate as needs-input (detail: "QUESTIONS.md awaiting answers", questions_file set) without re-running the loop; absent → invoke normally.
Invoke the Workflow tool:
Workflow({
scriptPath: "${CLAUDE_PLUGIN_ROOT}/ship/workflows/plan.workflow.js",
args: { feature: "{name}", maxPlanRounds: {knobs.maxPlanRounds} }
})
maxPlanRounds is the resolved knob from section 1b, passed as a real JSON number (not a string). It must appear on every plan.workflow invocation — the initial one here, the interactive NEEDS_INPUT re-invocation below, and the headless answered-file resume — or a quick-profile loop resumes at the default cap of 5 instead of 2. Omitting it entirely yields today's 5.
Under --headless, block on the returned Task ID before reading the result — see Headless workflow wait above. Interactively, behave as before.
The workflow loops review → replan → re-review for up to 5 rounds (the cap check fires before the replan, so at most 4 replans) and stops early when a round's CRITICAL set repeats. When args.answers is present it first runs an optional apply-answers step (replan:answers, a replanner that lands the user's answers in PLAN.md before any review can approve; it consumes a ### Round n label but not a review round). It returns { feature, status, rounds, findings, questions?, examined?, history, nextRoundOffset, blockedBy? } — nextRoundOffset is the total number of ### Round n labels consumed across all invocations so far (the answers step included), and blockedBy (reviewer | replanner | answers) names which agent went missing on BLOCKED. Agent output stays inside the workflow — you receive only this structured result.
Before branching, record the outcome in .planning/features/{name}/PLAN.md: ensure a ## Plan Review section exists — create it if absent, since on a clean round 1 no replanner ran and the section does not exist yet — then append it with the Edit tool:
### Outcome — {status}
**Rounds:** {rounds}
[If `reason` is present:] **Reason:** {reason}
[If `history` is non-empty, one line per entry:]
- Round {n}: {reviewStatus}, {criticals} critical
[An entry with `step: 'answers'` renders instead as:]
- Answers applied: {changes.length} change(s)
rounds and reason always render: a round-1 BLOCKED returns history: [], so they are what make that case legible. The per-round lines carry the multi-round cases where no replanner subsection was written.
statusAPPROVED — set CONTEXT.md status: plan-verified. The outcome block additionally lists the examined files and any WARNING/SUGGESTION findings, each WARNING followed by its disposition from Apply the warnings below. Continue to the approval gate (section 3).NEEDS_INPUT — split on --headless:
--headless) — ask each entry in questions via AskUserQuestion (one question per entry, using its options; the automatic Other option covers anything else). Then RE-INVOKE the same workflow with args: { feature: "{name}", answers: "<Q/A transcript>", roundOffset: <the result's nextRoundOffset>, findings: <the result's findings>, maxPlanRounds: {knobs.maxPlanRounds} } and re-branch on the new status. nextRoundOffset is the total number of ### Round n labels consumed so far across all invocations — it counts an apply-answers step, which summing rounds would miss; when the field is absent (an older workflow), fall back to the summed rounds. It is what keeps the replanner's ### Round {n} headings unique across re-invocations — without it a second run restarts at ### Round 1 and collides with the first run's subsection, which the replanner is forbidden to rewrite. findings are the escalated CRITICALs the re-invoked workflow applies the answers against: it runs them through a replan:answers step before its first review, so an answer can no longer be dropped by an approving review. Do not use resumeFromRunId. Cap this at 2 re-invocations; if a third NEEDS_INPUT arrives, report it and stop..planning/features/{name}/QUESTIONS.md in the format specified in ship/docs/headless.md §6, recording roundOffset as the result's nextRoundOffset (the total ### Round n labels consumed so far across all invocations; fall back to the summed rounds when the field is absent). Leave CONTEXT.md at planned and terminate as needs-input with questions_file set.NEEDS_INPUT under --headless terminates as needs-input with detail "re-invocation cap reached — escalate to a human" — and still writes the new QUESTIONS.md so the questions are not lost.STUCK — leave CONTEXT.md status: planned. Report the surviving CRITICAL findings and the round count, tell the user to run /ship:plan {name}, and stop.UNRESOLVED — same as STUCK, additionally reporting that all 5 rounds were spent. Stop.BLOCKED — leave CONTEXT.md status: planned. Split on blockedBy (when the field is absent, read reason to tell which agent went missing):
reviewer — before reporting, run the scratch fallback. The reviewer writes its record incrementally, so a run that died after finishing its review still left that review on disk. Run git hash-object .planning/features/{name}/PLAN.md, then Read .planning/features/{name}/.review-scratch/plan-round-{rounds}.json (rounds from the result — the reviewer names its record by bare loop round). If the file exists, parses as JSON, its plan_hash equals that hash, and complete is true, adopt its findings as this round's review:
APPROVED branch exactly as if the workflow had returned it: outcome block heading ### Outcome — APPROVED (adopted from scratch record), CONTEXT.md status: plan-verified, continue to section 3..planning/features/{name}/.review-scratch/plan-round-1.json (the fresh run's round-1 reviewer adopts it through its own salvage check, which runs before any exploration; plan_hash keeps the copy safe), then re-invoke the workflow once — plan.workflow.js with args: { feature: "{name}", roundOffset: <the result's nextRoundOffset>, maxPlanRounds: {knobs.maxPlanRounds} } (plus answers and findings if this invocation had them) and re-branch on the new status. A second BLOCKED reports as below with no further re-invocation./ship:plan-verify {name} to review once manually. Stop.replanner / answers — the report must say PLAN.md may already be partly or fully revised: the replanner edits before it writes its subsection, so a lost result is not proof the plan is untouched. Point at .planning/features/{name}/.review-scratch/replan-round-{n}.json (the workflow's reason names it) for what landed, and recommend re-running /ship:go {name} — the retry salvages the record and resumes from the first pending finding. Do not send the user to a manual review: reviewing a half-revised plan is the wrong remedy. Stop.Invariant: only APPROVED advances the status machine. STUCK, UNRESOLVED, and BLOCKED all leave CONTEXT.md at planned and never proceed to build.
Scratch cleanup — after the branch, never before it. The reviewer scratch fallback above reads plan-round-{rounds}.json, so this step runs only once the BLOCKED branch has finished (adopted, re-invoked, or reported) — deleting first would destroy the record the fallback exists to read. On every terminal outcome except NEEDS_INPUT (whose re-invocation still needs them — including a headless park, which is terminal for this process but leaves the loop live, so the files are kept exactly as on interactive NEEDS_INPUT) and except a BLOCKED whose blockedBy is replanner or answers (the report just pointed the user at replan-round-{n}.json, and the recommended /ship:go re-run salvages it), delete .planning/features/{name}/.review-scratch/plan-round-*.json and .planning/features/{name}/.review-scratch/replan-round-*.json — the plan reviewers' and replanner's crash-recovery cache for the loop that just ended. Leaving them is not dangerous (each is fingerprinted with the PLAN.md hash it was written against, so a salvage rejects one from a different plan) but they serve no further purpose. On APPROVED, section 6 clears the whole directory anyway.
APPROVED only)A WARNING does not block approval, but a per-task builder reads its brief, not ## Plan Review, so a warning left in the outcome block reaches nobody. Before the approval gate, give every WARNING in the approved result exactly one disposition, written after it in the outcome block:
*Applied:* {what changed} — the warning names a task (task_id is set) and its evidence holds when you check it with one Read or Grep (a reviewer can be wrong). Edit only that task's <files>, <reference>, <action> or <verify> in PLAN.md. Never renumber a task id, never add or remove a task, and never touch a task the warning does not name.*Not applied:* {evidence} — the check disproved the warning.*Needs the user:* {what must be decided} — the warning names no task, or acting on it would add or remove a task or change CONTEXT.md (an acceptance criterion, a decision, the scope). Never edit CONTEXT.md here: every requirement in it is one the user confirmed, and a criterion rewritten on a reviewer's say-so is no longer theirs.SUGGESTION findings are listed and not applied. The dispositions are written the same way under --auto and --headless; a Needs the user warning does not stop the run, because a WARNING never blocks — it is shown in the section 3 summary, which prints even when the gate is skipped.
Fires when status is plan-verified (whether the plan loop just approved it or the feature was already there). Skip it when resuming from building, and skip it when --auto was passed — without the flag the gate always fires. (--headless implies --auto, so the gate is always skipped headlessly.)
.planning/features/{name}/PLAN.md; count tasks and phases.Needs the user in full.--auto: show the summary, note that the gate was skipped, and continue.)/ship:plan {name} then /ship:go.Build the ordered list of pending phases with the task lister:
node "${CLAUDE_PLUGIN_ROOT}/ship/plan-tasks.cjs" {name}
It prints one JSON line, { feature, phases: [{ id, name, tasks: [{ id, name, docsOnly }] }], warning }, and always exits 0. Pass its phases (each with tasks) to section 5 as-is. Its documented behavior matches the old manual rules: each <phase> whose status != done is listed with its pending tasks; a flat plan (no <phase> elements) is a single pseudo-phase {id: "all", name: "all"}; and when no pending phases remain but pending <task>s exist outside any phase (fix tasks appended by an older verifier), they also form the {id: "all", name: "all"} pseudo-phase — its builder prompt says to execute all pending tasks in the plan, which sweeps them up.
Fallback: if it prints a non-null warning, or an empty phases while PLAN.md has pending tasks, fall back to building the list by hand from PLAN.md by the rules above, as {id, name} phases without tasks — a phase with no task list builds per-phase, so a misparse degrades to the old path rather than skipping work. A malformed layout is one such warning: a <task> or <phase> still open at end of file, or a closing </task> that is not alone on its line (which would swallow the next task), comes back as warning: "malformed PLAN.md: …" naming the lines. Say that you fell back, and why.
Not a fallback case: a warning that begins unsafe id in PLAN.md (or contains it) means a pending phase or task id is not a plain token — letters, digits, dot, underscore or dash, starting with a letter or digit. Ids are written into shell commands in the builders' prompts, so the workflow refuses such an id as well and a hand-built list would only fail there. Do not build the list by hand and do not pass the id on: stop, report the ids the warning names, and tell the user to correct them in PLAN.md (under --headless, terminate as error with the warning as detail).
If status is built (build already complete, verify only), use an empty phase list — the workflow will skip straight to verify.
Set CONTEXT.md frontmatter status: building (unless already built).
Invoke the Workflow tool:
Workflow({
scriptPath: "${CLAUDE_PLUGIN_ROOT}/ship/workflows/go.workflow.js",
args: {
feature: "{name}",
phases: [ {id, name, tasks}, ... ],
profile: "{profile}",
reviewGate: {knobs.reviewGate},
verifyDepth: "{knobs.verifyDepth}",
maxBuildRounds: {knobs.maxBuildRounds},
syncMain: true,
buildMode: "{buildMode}",
shipRoot: "${CLAUDE_PLUGIN_ROOT}"
}
})
syncMain: true is always passed: before the verifier runs, a builder merges main into the feature branch (sync:main), resolving only mechanical conflicts — rows both sides appended to the same shared file — and aborting the merge on anything that needs a judgement. The verifier's trial merge then checks a branch that already contains main, instead of failing it on a conflict that a fix round and a full re-verification would otherwise have to clear. It never rebases, pushes, or runs on the default branch, and it stands down while a verification's scratch record exists so a salvage can still resume. The workflow treats an absent syncMain as off, so older callers keep the old behavior.
buildMode comes from section 1b. per-task (the default) dispatches one fresh, brief-fed builder per pending task and needs phases[].tasks from section 4 — a phase without a task list builds per-phase regardless; per-phase ignores every task list and runs the pre-diet path. shipRoot is the absolute plugin root: it is how the workflow's agents find the brief, tick and review-package scripts (ship/task-brief.cjs, ship/tick.cjs, ship/review-package.cjs).
The four policy fields come from section 1b. Pass them as real JSON values — reviewGate a boolean, maxBuildRounds a number, profile/verifyDepth strings. profile is display-only (it labels records); the other three drive behavior, and each defaults inside the workflow to today's value when absent.
Under --headless, block on the returned Task ID before reading the result — see Headless workflow wait above. This is the invocation the wait rule exists for: the build→verify spine is the long one, and a headless turn that ends here strands it. Interactively, behave as before — report that it is running and end the turn.
The workflow builds each phase (one brief-fed builder per task in per-task mode, or one builder for the whole phase in per-phase mode → reviewer re-verify+review → one fix round for blocking findings — critical/high, a medium the reviewer reproduced, or, in a fix-{n} phase, any finding marked fix_class (another occurrence of the defect class a fix task repairs) — → re-review), then runs the merged verifier (acceptance criteria + adversarial bug hunt → VERIFY.md). It returns { feature, stoppedAt, completed, verdict, salvageEvents, sync }. sync is the sync:main result — outcome (up-to-date, merged, conflict-aborted, not-runnable), target, commit, conflicted_files, notes — or null when the step did not run or returned nothing. Agent output stays inside the workflow — you receive only this structured result.
salvageEvents is one entry per salvage retry — { agent, record, outcome }, where outcome is adopted, rejected, unknown, or no-result. It is empty on a run where nothing was lost in transit, which is the common case.
Each phase in completed carries the review's own evidence — verifyRuns and filesReviewed — alongside its findings, plus builderEvidence: the per-task verify_evidence the builders recorded (empty in per-phase mode). In per-task mode the reviewer reads one review-package file and does not re-run the verify commands builders recorded with exit 0, so verifyRuns holds only the reviewer's own runs. A fix round that lands no commits gets no re-review (there would be no diff to read, and an approving re-review over an empty tree would read as "fixed"); its findings come back unresolved with a concern instead.
A builder that runs out of turn budget mid-phase does not stop the run: the workflow continues the phase with fresh builders (up to 5 rounds) as long as tasks keep landing, and reports the round count per phase as builderRounds (in per-task mode the round cap applies per task, and builderRounds is the maximum any single task needed). It only stops when a whole round lands nothing new.
From the returned result:
For each phase in completed, mark its <phase> status="done" in PLAN.md (skip the all pseudo-phase).
Persist review findings to .planning/features/{name}/REVIEW.md (create on first append), same format as the manual build skill: a ## Phase {id} — {phase-name} (round 1) heading with Status: {reviewStatus}, then the two evidence lines from verifyRuns and filesReviewed — Verify: {N} re-run — {P} pass, {F} fail, {X} not runnable (counting only the reviewer's own runs, never the builders') and Reviewed: {M} file(s) — then, when the phase's builderEvidence is non-empty, a third line after Reviewed:, Builder evidence: {K} task(s) — {P} exit 0, {F} non-zero — then one line per finding: - [{severity}] {file}: {description} — {marker}. Marker: new (round 2) if the finding appears in that phase's introducedByFix list; unresolved if it appears in unresolved; fixed in fix round for other blocking findings (critical/high, a medium with reproduced: true, or any finding with fix_class: true) when fixApplied is true; recorded otherwise. Keep the [{severity}] tag exactly as is (audits parse it); a finding with reproduced: true appends (reproduced) to its description, and one with sites appends — sites: {sites joined by ", "}, both before the marker. Write the heading and evidence lines for every phase, including ones with an empty findings array — a phase approved with Verify: 0 re-run and Reviewed: 0 file(s) is exactly the record worth keeping, and reviewStatus: SKIPPED must appear as Status: SKIPPED so REVIEW.md durably records that the diff went unreviewed.
Skipped by profile: when a phase's reviewStatus is SKIPPED_BY_PROFILE, write Status: SKIPPED (profile: {profile}) and, in place of the two evidence lines, the single line Review skipped by profile — no reviewer ran by design. This is deliberately distinct from a bare Status: SKIPPED, which continues to mean the review was supposed to run and failed. An audit must be able to tell a traded-away review from a broken one.
Round 2: when a phase's rereviewStatus is non-null, a re-review ran — append a second block for the phase, ## Phase {id} — {phase-name} (round 2), with Status: {rereviewStatus} and the same two evidence lines built from rereviewVerifyRuns and rereviewFilesReviewed, then one line per entry in rereviewFindings: new (round 2) if it appears in introducedByFix (checked first — it is a subset of unresolved, so the other order would never label anything new), unresolved if it appears in unresolved, recorded otherwise. A re-review whose two evidence lines both read zero is the record of a rubber stamp — the workflow has already kept that phase's findings unresolved and raised a concern, and the block is what lets a reader see why.
Delete .planning/features/{name}/.review-scratch/ if it exists. It is the reviewers' crash-recovery cache for the run that just finished — once REVIEW.md carries the findings, a stale scratch file would let a future run's salvage retry report findings from the wrong build.
Collect any per-phase unresolved review findings (blocking findings that survived the fix round) and builder concerns across completed. These must be surfaced in the report below — a phase is marked done even when it carries unresolved findings (one fix round only, the verifier is the backstop), so the user needs to see them.
The workflow already handed those findings to the verifier in its prompt, as mandatory Stage 2b targets, and every phase's recorded findings (medium/low, from the review and the re-review) as located targets — REVIEW.md is written here, after the workflow returns, so on this path the verifier could not have read any of them off disk. That ordering is why the handoff lives in the prompt. When a verdict is present, cross-check it: an unresolved critical/high finding should appear in VERIFY.md's Carried Review Findings table as reproduced, not reproduced, or not testable, and so should each recorded finding. If the table is missing or does not account for one, say so in the report — the backstop did not close.
If stoppedAt is set (a build phase returned CHECKPOINT, NEEDS_CONTEXT, EXHAUSTED, or INFRASTRUCTURE): leave CONTEXT.md status: building and report the blocker, including stoppedAt.build.commits — a stopped phase is usually partially built, and those commits are real. For NEEDS_CONTEXT, tell the user to run /ship:build {name} — the manual build handles interactive context collection (the unattended workflow cannot prompt mid-run). For EXHAUSTED, the phase outlived several builders without finishing: report tasks_completed / tasks_total, and suggest /ship:build {name} to continue or /ship:plan {name} to split the remaining tasks into smaller ones.
INFRASTRUCTURE — the run lost its connection to the API, or its usage window ran out: several consecutive agents died on a transport error (ENOTFOUND, ECONNRESET, a 5xx, an overload, a session limit) having done no work. The workflow recognises this two ways — by the thrown message when the harness passes the cause through, and, because it usually does not, by the outage's shape: a builder and its read-only progress probe dying together in two consecutive rounds, or a verifier, its salvage retry, and a one-call canary:verify connection check all dying in a row. Either way the reason says which. Nothing about the plan is wrong and every committed task is preserved. Leave CONTEXT.md status: building, report stoppedAt.build.reason (it names the actual transport error) and the commits that landed, and recommend re-running /ship:go {name}. Do NOT suggest splitting tasks into smaller ones or running /ship:plan {name} — that is EXHAUSTED's advice, and giving it here is the exact confusion this status exists to end: an outage was previously reported as a spent turn budget, and operators went off resizing tasks that were fine. stoppedAt.phase.id may be verify, meaning the outage took the verifier rather than a build phase; the recommendation is the same.
If a verdict is present:
verdict.downgraded_from is set, the workflow overrode the verifier's PASS/INCONCLUSIVE because the result still carried Open bugs, a failed checklist item, or a failed trial merge (verdict.downgrade_reason names the counts). The verifier has already written status: done and no fix tasks, so reconcile here:
status: plan-verified.**Overall Status:** line with **Overall Status:** FAIL (downgraded by go workflow from {downgraded_from}: {downgrade_reason}).<phase id="fix-{n}" name="Verify fix round {n}" status="pending"> with the next unused n (for a flat plan with no <phase> elements, append bare tasks instead). Add one task per verdict.bugs entry whose severity is not low (a low is Left open — recorded, never a fix task), plus one per failed verdict.checklist row or failed verdict.trial_merge only when no verdict.bugs entry already covers it (the verifier records every FAIL row and failed trial merge as a bug too, so most are already covered — never write two tasks for one defect). Each task: <name>Fix: {description}</name>, <files> from the bug's file plus the file of every entry in its sites, <action> from its description plus evidence, naming every sites entry and the pattern (fix every occurrence of it in the feature's changed files, each with a test), and a <verify> that runs a command reproducing the evidence (the project test command when none is given). Task ids continue from the highest existing id, each with status="pending".
Then report it as a FAIL.done on PASS/INCONCLUSIVE, plan-verified + fix tasks on FAIL). Report it.If verdict is null and nothing stopped: all phases built but the verifier produced no result (it crashed or was skipped — the workflow retries once, then degrades to null). Set CONTEXT.md status: built, check git log to confirm the build commits landed, and tell the user to run /ship:verify {name} manually.
Applies only under --headless, and only when the reconciled verdict is a FAIL (including a downgrade). Interactive runs skip this section: there a person reads the fix tasks before anything builds them.
A headless FAIL used to end the run at once, leaving the fix phase it had just written for the caller to start in a new run. Nearly every unattended feature needed at least one such round, and each one cost the caller a full poll interval of idle time before the fix phase was even picked up. So a headless run builds its own fix phase and verifies again, a bounded number of times, before it reports verify-fail.
Budget. --fix-rounds {n} when given (0 turns this off and restores the old single-verify behavior), otherwise 2. A fix round is one more pass through sections 4–6 against the pending fix phase that section 6 (or the verifier) just appended.
The failing set of a verdict is its count of: FAIL acceptance criteria, verdict.bugs entries whose severity is not low, FAIL verdict.checklist rows, and a FAIL verdict.trial_merge. Record it after every verify, starting with the first.
Before each fix round, all of these must hold — otherwise go terminates as verify-fail exactly as before:
stoppedAt is not set and the verdict is not null.Then go back to section 4: rebuild the pending phase list (it is now the fix phase), set status: building, run section 5's workflow with the same args (and the same headless wait), and reconcile with section 6. Each workflow invocation has its own 2-hour wait ceiling.
Reporting. Write the GO COMPLETE report once, after the last round, and in it add Fix rounds: {used} of {budget} — failing set {first}→…→{last} with the reason the loop stopped (passed, budget spent, not shrinking, no fix task, or stopped). The OUTCOME.json detail carries the same fix rounds {used}/{budget}, failing set {trend} clause, so a caller can count the rounds already spent without reading VERIFY.md. A run that passes on a fix round terminates as done as normal.
## GO COMPLETE
Feature: {name}
Final status: {status}
[If the resolved profile is not `standard`:] Profile: {profile} (review gate: {on|off}, verify depth: {verifyDepth}, build rounds: {maxBuildRounds})
Phases built: {N} / {total} Review fixes applied: {count}
Verify: {PASS | FAIL | INCONCLUSIVE | FAIL (downgraded from {downgraded_from}) — criteria_passed/criteria_total, bugs by severity}
[If any unresolved review findings:] Unresolved review findings (marked done anyway, one fix round only — handed to the verifier as mandatory targets):
- {phase id}: [{severity}] {file} — {description} → {verifier outcome from VERIFY.md, or "not accounted for in VERIFY.md"}
[If any builder concerns:] Build concerns:
- {phase id}: {concern}
[If sync is non-null:] Sync with main: {sync.outcome}{ — sync.commit}{ — conflicts left for the verifier: sync.conflicted_files when outcome is conflict-aborted}{ — sync.notes}
[If salvageEvents is non-empty:] Salvage events:
- {agent}: {record} → {adopted | rejected | unknown | no result}
[If any phase whose reviewStatus is NOT `SKIPPED_BY_PROFILE` has an empty verifyRuns, empty filesReviewed and empty builderEvidence:] Unsubstantiated review verdicts: phase {id} approved with no verify re-runs, no builder evidence and no files reviewed. (A per-task phase that reviewed no files surfaces through its concern line.)
[If buildMode is per-phase:] Build mode: per-phase (rollback path)
[If any phase's reviewStatus is `SKIPPED_BY_PROFILE`:] Review gate off by profile ({profile}): no reviewer ran for phase(s) {ids} — the verifier was the only gate.
[If verdict PASS/INCONCLUSIVE:] Ready to finish — run /ship:finish (or I can run it now).
[If FAIL, including a downgraded verdict:] Fix tasks were appended to PLAN.md as a pending fix phase. Review them, then /ship:go to continue (or /ship:build for manual control).
[If stoppedAt:] Stopped at phase {id}. Reason: {status}{, tasks_completed/tasks_total if EXHAUSTED}. Commits landed: {stoppedAt.build.commits}. Next: {suggested action}.
An `INFRASTRUCTURE` stop reports the transport cause from `stoppedAt.build.reason` and the `/ship:go {name}` re-run recommendation instead of task counts — the counts are not what stopped it.
[If any phase has builderRounds > 1:] Note: phase {id} needed {builderRounds} builder rounds (tasks are large enough to outlive one turn budget; in per-task mode this is the most rounds any single task needed — a task outlived one builder's turn budget).
An adopted salvage event is the machinery working — a lost result recovered for a few thousand tokens instead of a ~90k-token re-run; a rejected one means the record did not match this build and the work was redone from scratch. Surfacing both is what makes the next field audit a read of this report rather than a reconstruction from session transcripts.
Under --headless, the fenced ship_outcome block (headless termination rule below) follows the GO COMPLETE report and is the final message's last content.
Under --headless, EVERY terminal path in this skill — the resolution/done routing in sections 1–2, the plan-loop terminals in 2a, build stops, verify verdicts, and errors — ends the same way. As the run's LAST act, write .planning/features/{name}/OUTCOME.json per the schema in ship/docs/headless.md §4, taking outcome from the table below and status from the settled CONTEXT.md. Then end the final message with a fenced block tagged ship_outcome containing the exact same JSON. Interactive runs never write this file.
| Terminal | Outcome |
|---|---|
Plan loop APPROVED | not terminal — continue to build |
Plan loop NEEDS_INPUT | needs-input |
Plan loop STUCK | stuck |
Plan loop UNRESOLVED | unresolved |
Plan loop BLOCKED | blocked |
Build stoppedAt NEEDS_CONTEXT | needs-context |
Build stoppedAt EXHAUSTED | exhausted |
Build stoppedAt CHECKPOINT | checkpoint |
Build stoppedAt INFRASTRUCTURE | infrastructure — CONTEXT.md stays building; the detail names the transport cause from stoppedAt.build.reason and the /ship:go {name} re-run. Never exhausted: nothing needs resizing |
| Verdict PASS / INCONCLUSIVE | done |
Verdict FAIL, or a PASS/INCONCLUSIVE downgraded by the workflow (downgraded_from set) | verify-fail — fix tasks are already in PLAN.md (for a downgrade, the reconcile in section 6 wrote them). Terminal only once section 6b's fix rounds are spent or refused; the detail carries the rounds used and the failing-set trend |
| Null verdict, nothing stopped | error — detail names the manual /ship:verify {name} follow-up |
| Unrecoverable skill-level failure (workflow crash, unresolvable feature) | error |
| Workflow still running at the 2-hour wait ceiling | error — call TaskStop on the Task ID first, then terminate |
If the verdict is PASS or INCONCLUSIVE, offer to run /ship:finish (PR/merge/keep is outward-facing — confirm before acting). Do not finish automatically without the user's go-ahead.
Under --headless, skip this section entirely: PASS/INCONCLUSIVE terminates as done, with the finish offer suppressed — PR/merge stays human-gated, and the detail notes /ship:finish is the manual next step.
In an auto run (the intro's Auto run paragraph), make no offer: return to the auto skill's ## Route.
$ARGUMENTS
What SKILL.md sets; muted values are Claude Code's defaults
mediumThree short reads, in order
16 skills in this plugin
/autoUse when you want to take an idea, a ledger row or an in-flight feature all the way to a pull request with no prompts after the brainstorm/buildUse when a feature plan has been verified and is ready for implementation — executes tasks with atomic commits/designUse when a brainstormed feature needs architectural decisions — presents 2-3 approaches for user to choose before planning/deviation-rulesUse when plan diverges from reality during build execution — provides 3 escalation levels for handling failuresnpx claudepluginhub dilhanz/ship --plugin shipOther plugins' skills for the same job