/ship:build [feature-name]from ship
Executes verified feature plans with atomic commits. Invoked when a feature plan is ready for implementation, handles phase detection, context loading, and task 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.
Build the active feature by executing its plan phase by phase.
Feature state is injected by hooks at session start and after compaction — check conversation context for "SHIP ACTIVE FEATURES" or "SHIP FEATURE STATE" blocks first.
$ARGUMENTS is provided, use it as the feature nameplan-verified or building (resuming).planning/features/*/CONTEXT.mdBefore starting, verify:
.planning/features/{name}/PLAN.md exists with pending tasksIf prerequisites fail, stop and tell the user what's missing.
The Explore digest is conditional — an optimization for large or unfamiliar phases, not a required step.
Read .planning/features/{name}/PLAN.md in full.
Extract all <files> elements across all pending tasks. Deduplicate the paths.
Filter to files that already exist (skip files the plan creates from scratch — use Glob to check existence; also skip binary, lock, and generated files).
Decide whether a digest is worth it: skip the digest and use an empty Key File Context block when the phase is small (roughly ≤5 unique existing files across its tasks) or the area is already well understood from this conversation. Delegate to an Explore digest subagent only when the phase touches many or unfamiliar files.
Do NOT Read the candidate file bodies into this conversation.
When the digest runs, delegate the read to the built-in Explore agent via the Agent tool — this keeps raw file bodies out of the orchestrator window. Use "medium" search breadth and send it this prompt:
Read these files and return ONLY a `## Key File Context` block: {deduped existing file list}.
For each file: one sentence on its structure and the patterns/conventions a builder should preserve.
Do not return file bodies — only the summary block.
Consume ONLY the returned ## Key File Context summary from the Explore agent. Do not re-read or expand the files.
If the Explore agent errors or returns no usable ## Key File Context, proceed with an empty Key File Context block and record a "Key File Context unavailable — digest subagent failed" concern; never stop the build. The digest is an optimization, never a gate.
This context block is embedded into each builder agent invocation below.
Read PLAN.md and check if it contains <phase> elements:
status != done.If all phases/tasks are already done, skip to Completion.
For each pending phase (or once for flat plans):
If phased, mark the current phase status="building" in PLAN.md.
Update CONTEXT.md frontmatter to status: building (if not already set).
Use the Agent tool to invoke the ship-builder agent with this prompt:
Build feature: {name}
Phase: {phase-id} — {phase-name}
## Key File Context (from Explore digest)
{paste the Key File Context block from Pre-Build Context Loading here}
Execute all pending tasks in this phase. Read:
- .planning/features/{name}/PLAN.md
- .planning/features/{name}/CONTEXT.md
Follow your instructions for the execution loop, deviation rules, and commit conventions.
For flat plans, omit the Phase line.
After the Agent tool returns, extract the build_result JSON block from the builder's output. Look for a fenced code block tagged build_result and parse the JSON inside it.
A builder running out of turns mid-phase is expected on large tasks, not a failure: its finished tasks are committed and marked status="done" in PLAN.md, so a continuation picks up exactly where it stopped. Two shapes signal it — a build_result with status PARTIAL, or no parseable build_result at all (the agent died mid-turn). Both continue.
Continuation round (run for either shape, up to 4 rounds per phase):
Read PLAN.md and count tasks in this phase marked status="done" — this is the ground truth for progress, not the builder's self-report.
If no pending tasks remain, the phase is done: treat it as COMPLETE_WITH_CONCERNS with the concern "builder exhausted its turn budget without reporting; completion confirmed from PLAN.md", and go to the Review Gate (3.1) using the commit hashes recorded on the phase's done tasks.
If the done-count did not increase since the previous round, the phase is genuinely stuck — go to BUILDER EXHAUSTED below.
Otherwise continue: SendMessage to the builder agent (or invoke a fresh ship-builder if the agent is gone) with:
You were building feature "{name}", phase {phase-id}, and stopped before finishing.
Read PLAN.md: skip every task marked status="done" and resume from the first pending task
in this phase. If the working tree has uncommitted changes from an interrupted task,
finish that task, run its <verify> command, and commit it before moving on.
When all tasks in this phase are done, emit your build_result JSON block.
Re-parse the result and route it back through this section (a COMPLETE/COMPLETE_WITH_CONCERNS result ends the loop and goes to ### 3; another PARTIAL/no-result starts the next round).
When the phase completes across several rounds, the commits list for the Review Gate is the union of every round's commits — the diff range must cover the whole phase, so take the oldest.
BUILDER EXHAUSTED — after 4 continuation rounds, or when a round lands no new done tasks:
## BUILDER EXHAUSTED
Feature: {name}
Phase: {phase-id} — {phase-name}
Builder rounds: {N}
Tasks completed: [count from PLAN.md]
Tasks remaining: [count from PLAN.md]
Completed tasks are committed — the phase is partially built.
The remaining tasks are likely too large for one builder's turn budget.
Run /ship:build to continue, or /ship:plan {name} to split them into smaller tasks.
buildingIf a valid build_result JSON with a terminal status is found (from the original Agent call or any continuation round): proceed to the status handling below (### 3).
Parse the builder agent's build_result JSON block. Extract the status field. (PARTIAL never reaches here — section 2.5 continues the phase until a terminal status.)
If status is "COMPLETE": Proceed directly to the Review Gate (3.1), then mark the phase done. The orchestrator does not re-run verify commands itself — the ship-reviewer's Step 1 re-runs every phase verify command and treats a failure as a critical finding, which triggers the fix round below.
If status is "COMPLETE_WITH_CONCERNS": Proceed directly to the Review Gate (3.1), then mark the phase done.
result.commits and run git rev-parse {first-commit}~1 to get the base. The range is {base}..HEAD. If result.commits is empty or git rev-parse fails, skip the review with a "review skipped: no diff range" concern and proceed to mark the phase done.ship-reviewer agent via the Agent tool:Review feature: {name}
Phase: {phase-id} — {phase-name}
Diff range: {base}..HEAD
Review the phase diff per your instructions. Read:
- .planning/features/{name}/PLAN.md
- .planning/features/{name}/CONTEXT.md
Emit your review_result JSON block when done.
review_result JSON block from the reviewer's output. If the Agent call errors, or no valid review_result block is found, salvage before giving up — the reviewer writes its findings to a scratch record as it goes, so a lost result is a transport failure, not proof the review never happened:
a. Run git rev-parse HEAD and Read .planning/features/{name}/.review-scratch/phase-{id}.json (all.json on a flat plan). If it parses, its scope is this phase, its head equals that SHA, and its stage is complete, adopt its status, findings, verify_runs, and files_reviewed as the review result and continue at the evidence check below. No agent runs.
b. If the record is instead at stage: "verify-only", or missing, invoke the ship-reviewer agent once more with the same prompt plus: "A previous reviewer's result was lost. Read .review-scratch/phase-{id}.json first per your Step 0: a matching verify-only record lets you skip Step 1 and carry its verify_runs forward; a non-matching one means a full review." Parse its review_result.
c. If that also yields nothing, append to REVIEW.md (format below) a "Review skipped — reviewer failed or returned no parseable result" line for this phase, add "review skipped for phase {id}" to the phase's concerns, and proceed to mark the phase done. A broken reviewer must never block a working build.
Before branching, check the review's own evidence. The block carries verify_runs (one entry per re-run verify command, each pass / fail / not_runnable) and files_reviewed. Both go into REVIEW.md, and both are read literally:not_runnable, add "phase {id}: {N} of {M} verify command(s) not re-runnable in this environment" to the phase's concerns.Branch on the findings, not on status. Collect the review's blocking set: every critical or high finding, plus every medium marked "reproduced": true (the reviewer demonstrated it with a command), plus every finding of any severity marked "fix_class": true (in a fix-{n} phase, another occurrence of the defect class one of its fix tasks repairs). An APPROVED that still lists a blocking finding is contradictory, and the finding wins — the go workflow treats it the same way, and the two paths must not diverge on what gates a phase.
recorded. Proceed to mark the phase done.status said): append all findings to REVIEW.md, then run exactly one fix round:
a. SendMessage to the builder agent (the same agent from step 2 of the phase loop):The phase reviewer found issues that must be fixed before this phase can complete.
Fix ONLY these findings — do not refactor beyond them:
{numbered list of the blocking findings: severity (+ "reproduced"), file, description, pattern, sites, recommendation}
Fix the defect class, not the instance: search this feature's changed files for every
other occurrence of each finding's pattern, fix every occurrence, and cover each with a
test. Name every site you fixed in the commit body. An occurrence outside the changed
files is pre-existing — leave it and record it in your concerns.
For each fix: implement it, re-run the affected task's <verify> command, and commit
with "fix({feature-name}): {short description}". Then emit an updated build_result JSON block.
b. Check the fix round produced commits before re-reviewing. If the builder's build_result lists no commits (or no parseable result came back), nothing verifiable was fixed: skip the re-review, mark every round-1 blocking finding unresolved in REVIEW.md, add "phase {id} fix builder landed no commits — {N} finding(s) unresolved, no re-review ran" to the phase's concerns, and go to step 6. Sending a reviewer at an empty diff is worse than sending none — it finds a clean tree and approves, which would record those findings as fixed.
c. With fix commits in hand, SendMessage to the reviewer agent: "The builder applied fixes for your blocking findings. Fix commits: {hashes}. New diff range: {base}..HEAD. Two jobs: (1) confirm from the code whether each blocking finding from your previous review is actually resolved at every site — search the phase's changed files for its pattern (for a fix_class finding, the feature's changed files since the merge-base with main, per your Fix Phases section), since an occurrence the fix missed means it is not resolved — re-running the verify commands it touched; (2) review the fix commits as a diff in their own right and report any NEW critical/high problem they introduced, marked "new_issue": true. Do not re-review the rest of the phase. Report verify_runs and files_reviewed for this re-review as you would for a review. Emit an updated review_result JSON block." If this SendMessage fails or returns no parseable review_result, treat all findings from round 1 as unresolved concerns (do not loop).
d. Check the re-review's evidence the same way as the review's. If its verify_runs and files_reviewed are both empty, it re-ran nothing and read nothing, so it confirmed nothing: treat it exactly as a re-review that returned no result — every blocking finding stays unresolved, and add "phase {id} re-review reported no verify runs and no files reviewed — fixes unconfirmed" to the phase's concerns. An APPROVED re-review over an unexamined tree is the one rubber stamp that turns every critical into "fixed".
e. One round only. If the re-review still reports blocking findings, record them in REVIEW.md as unresolved (or new (round 2) where new_issue is true), add each to the phase's concerns list, and proceed to mark the phase done. Surface unresolved findings in the PHASE COMPLETE output under "Concerns".
6. Update REVIEW.md outcome markers in the round-1 block: findings fixed in step 5a and confirmed by a substantiated re-review get fixed in {commit-hash}; other medium/low get recorded; leftover blocking findings get unresolved. Then, whenever a re-review ran, append a round-2 block for the phase (format below) carrying the re-review's own Status, Verify, and Reviewed lines and one line per re-review finding: unresolved for a surviving blocking finding, new (round 2) where new_issue is true, recorded for other medium/low. Round 2 gets the same evidence lines as round 1 so that "fixed" is auditable too.
7. Delete .planning/features/{name}/.review-scratch/ if the reviewer created one. It is a crash-recovery cache for a single review; once REVIEW.md carries the findings, a leftover file would let a later run's salvage retry report findings from the wrong build.
REVIEW.md format (orchestrator-owned; create .planning/features/{name}/REVIEW.md on first append):
# Review Log — {feature-name}
## Phase {id} — {phase-name} (round {1|2})
Status: {APPROVED | NEEDS_FIXES | SKIPPED}
Verify: {N} re-run — {P} pass, {F} fail, {X} not runnable
Reviewed: {M} file(s)
- [{severity}] {file}: {description} — {fixed in {hash} | unresolved | new (round 2) | recorded}
The Verify and Reviewed lines come straight from the review's verify_runs and files_reviewed. They are what makes a verdict auditable after the fact: Verify: 0 re-run under an APPROVED heading records that the phase was approved without a single command being executed. The unresolved markers are read later — ship-verifier treats each one as a mandatory verification target, and every recorded finding as a located target it must attempt to reproduce — so the markers are a live handoff, not an archive note.
After the Review Gate completes:
status="done" in PLAN.md## PHASE COMPLETE
Feature: {result.feature}
Phase: [M] / [total] — [phase name]
Tasks completed: {result.tasks_completed} / {result.tasks_total} in this phase
Overall progress: [done_across_all_phases] / [total_across_all_phases] tasks
Commits: {result.commits joined with ", "}
Review: {APPROVED | {N} findings ({M} fixed, {K} unresolved) | skipped}
Review evidence: {P} verify command(s) re-run ({F} failed, {X} not runnable), {M} file(s) reviewed
concerns array plus any review concerns:## PHASE COMPLETE (with concerns)
Feature: {result.feature}
Phase: [M] / [total] — [phase name]
Tasks completed: {result.tasks_completed} / {result.tasks_total} in this phase
Commits: {result.commits joined with ", "}
Review: {APPROVED | {N} findings ({M} fixed, {K} unresolved) | skipped}
Review evidence: {P} verify command(s) re-run ({F} failed, {X} not runnable), {M} file(s) reviewed
Concerns flagged by builder:
- {each item from result.concerns}
Continuing to next phase. Review concerns after build completes.
If status is "NEEDS_CONTEXT":
a. Use AskUserQuestion with one question built from result.missing: question text "The builder needs missing context to continue: {result.missing} — how should it proceed?", header "Context". Offer 2-4 plausible answer options when result.missing implies a choice (e.g. naming, approach, config value); when it is open-ended (e.g. an API key or URL), offer your best-guess options anyway — the user can always select "Other" and type a free-form answer.
b. SendMessage to the builder agent:
The user provided the missing context you asked for:
Question: {result.missing}
Answer: {user's answer}
Continue with the remaining tasks in this phase and emit an updated build_result JSON block when done.
c. Parse the new build_result from the SendMessage response and route it back through section 3's status handling (COMPLETE → Review Gate 3.1; another NEEDS_CONTEXT → repeat this flow).
d. Cap: 2 NEEDS_CONTEXT rounds per phase. On a third NEEDS_CONTEXT in the same phase, stop the loop, leave CONTEXT.md status as building, and output:
## CONTEXT NEEDED
Feature: {result.feature}
Tasks completed: {result.tasks_completed} / {result.tasks_total}
Missing: {result.missing}
Provide the missing information, then run /ship:build to continue.
Also append: "The builder asked for context 3 times in this phase — the plan likely has a gap. Consider /ship:plan {name} to replan."
If status is "CHECKPOINT":
buildingstopped_at, reason, and recommendation fields:## CHECKPOINT REACHED
Feature: {result.feature}
Tasks completed: {result.tasks_completed} / {result.tasks_total}
Stopped at: {result.stopped_at}
Reason: {result.reason}
Recommendation: {result.recommendation}
When all tasks are done (flat plan) or all phases are done (phased plan):
status: built## BUILD COMPLETE
Feature: {name}
Tasks completed: [N] / [N]
Commits: [list short hashes]
Next: /ship:verify
$ARGUMENTS
What SKILL.md sets; muted values are Claude Code's defaults
mediumThree short reads, in order
npx claudepluginhub dilhanz/ship --plugin ship16 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/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 failures/finishUse when a feature has been verified and needs to be completed — creates PR, merges locally, or keeps branchOther plugins' skills for the same job