/ship
Finish and deliver completed work
> /plugin marketplace add lgbarn/shipyard> /plugin install shipyard@shipyard
Command definition
ship.mddescription: "Finish and deliver completed work"
disable-model-invocation: true
argument-hint: "[--phase | --milestone | --branch]"
/shipyard:ship - Delivery & Completion
You are executing the Shipyard shipping workflow. Follow these steps precisely.
<prerequisites>
Step 1: Parse Arguments & Load Context
Determine the shipping scope:
- `--phase` -- Ship only the current phase (partial delivery)
- `--milestone` -- Ship the entire milestone (default if all phases complete)
- `--branch` -- Ship whatever is on the current branch
- No argument -- auto-detect the appropriate scope
Follow **Worktree Protocol** (detect if running in a git worktree; if so, use worktree root for paths and record the branch name; see `docs/PROTOCOLS.md`) -- detect worktree, record working directory and branch. Follow **Model Routing Protocol** (select the correct model for each agent role using `model_routing` from config; see `docs/PROTOCOLS.md`) -- read `model_routing` from config for agent model selection.
Step 1a: Team or Agent Dispatch
**Detection:** Check the `SHIPYARD_TEAMS_ENABLED` environment variable (exported by `scripts/team-detect.sh`). This variable is set to `true` when `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1`.
**Prompt (conditional):** If `SHIPYARD_TEAMS_ENABLED=true`, use `AskUserQuestion` with exactly two options:
- "Team mode (parallel teammates)" — uses TeamCreate/TaskCreate/SendMessage/TeamDelete lifecycle
- "Agent mode (subagents)" — uses standard Task dispatch (current behavior)
Question text: "Teams available. Use team mode (parallel teammates) or agent mode (subagents)?"
**Silent fallback:** If `SHIPYARD_TEAMS_ENABLED` is `false` or unset, silently set `dispatch_mode` to `agent` with no prompt (zero overhead).
**Variable storage:** Store the result as `dispatch_mode` (value: `team` or `agent`). This variable is referenced by all subsequent dispatch steps.
**Recommendation:** For the ship command, agent mode is preferred. The sequential workflow (verify → audit → document → deliver) has no parallelism benefit from team mode. All dispatch steps below use Task dispatch regardless of `dispatch_mode`. The dispatch section is included for consistency with other Shipyard commands.
Step 2: Pre-Ship Verification
Invoke the `shipyard:shipyard-verification` skill to run a comprehensive check.
Verify:
- All acceptance criteria from plans are met
- No critical review findings are unresolved
- Code compiles/builds without errors
- Linting passes (if configured)
Step 3: Run Test Suite
Detect and run the project's test suite:
- Look for test commands in package.json, Makefile, Cargo.toml, etc.
- Execute the test command
- **If tests fail:**
Display the failures and stop: > "Tests are failing. Fix the issues before shipping. Failures:\n{test output summary}\n\nRun `/shipyard:build` to address these issues." Do not proceed.
- **If no test suite exists:** Note this and continue with a warning.
</prerequisites>
<execution>
Step 4: Pre-Ship Security Audit
**Note:** This audit runs regardless of `config.json` settings or `--light` usage during build. Shipping is the final gate — security is always checked here. If a passing `AUDIT-{N}.md` already exists from the build phase and no changes were made since, skip re-auditing and verify the existing report has no unresolved critical findings.
**Dispatch:** Always uses Task dispatch (single-agent step — team overhead not justified). This applies regardless of `dispatch_mode`.
Dispatch an **auditor agent** (subagent_type: "shipyard:auditor") with context per **Agent Context Protocol** (pass PROJECT.md, config.json, working directory, branch, and worktree status to all agents; see `docs/PROTOCOLS.md`):
- Git diff of ALL changes in the shipping scope (phase, milestone, or branch)
- Codebase docs per **Codebase Docs Protocol** (resolve configured codebase docs path and load CONVENTIONS.md, STACK.md, ARCHITECTURE.md, etc.; see `docs/PROTOCOLS.md`)
- All dependency files (package.json, requirements.txt, Cargo.toml, go.mod, etc.)
This is a comprehensive audit covering:
- Code security (OWASP Top 10) across all changes
- Secrets scanning in all modified files
- Dependency vulnerability check
- IaC security review (Terraform, Ansible, Docker)
- Cross-component security coherence
Produce audit report.
**If CRITICAL security findings exist:** 1. Display: "Security audit found critical issues that must be resolved before shipping:" 2. List each critical finding with location and remediation 3. > "Fix these issues and run `/shipyard:ship` again." 4. **Do not proceed.** Critical security findings are a hard gate.
**If no critical findings:** Continue. Display advisory/important findings as informational.
**If a phase-level audit was already run during `/shipyard:build` (AUDIT-{N}.md exists):**
- Only re-audit if new changes were made after the build audit
- Otherwise, verify the existing audit report shows no unresolved critical findings
Step 5: Comprehensive Documentation Generation
**Note:** This step runs regardless of `config.json` settings or `--light` usage during build. Shipping should produce comprehensive documentation.
**Dispatch:** Always uses Task dispatch (single-agent step — team overhead not justified). This applies regardless of `dispatch_mode`.
If phase-level `DOCUMENTATION-{N}.md` files exist from the build phase and are up-to-date (no changes since last documentation run), verify completeness and skip to documentation assembly. Otherwise, dispatch a **documenter agent** (subagent_type: "shipyard:documenter") with:
- Git diff of ALL changes in the shipping scope (phase, milestone, or branch)
- `.shipyard/PROJECT.md` for context
- All SUMMARY.md files from all completed phases
- Existing documentation in `docs/` directory (if exists)
This is comprehensive documentation generation covering:
- Complete API reference documentation in `docs/api/`
- Architecture documentation in `docs/architecture/`
-
Read more
description: "Finish and deliver completed work" disable-model-invocation: true argument-hint: "[--phase | --milestone | --branch]"
/shipyard:ship - Delivery & Completion
You are executing the Shipyard shipping workflow. Follow these steps precisely.
<prerequisites>
Step 1: Parse Arguments & Load Context
Determine the shipping scope:
- `--phase` -- Ship only the current phase (partial delivery)
- `--milestone` -- Ship the entire milestone (default if all phases complete)
- `--branch` -- Ship whatever is on the current branch
- No argument -- auto-detect the appropriate scope
Follow **Worktree Protocol** (detect if running in a git worktree; if so, use worktree root for paths and record the branch name; see `docs/PROTOCOLS.md`) -- detect worktree, record working directory and branch. Follow **Model Routing Protocol** (select the correct model for each agent role using `model_routing` from config; see `docs/PROTOCOLS.md`) -- read `model_routing` from config for agent model selection.
Step 1a: Team or Agent Dispatch
**Detection:** Check the `SHIPYARD_TEAMS_ENABLED` environment variable (exported by `scripts/team-detect.sh`). This variable is set to `true` when `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1`.
**Prompt (conditional):** If `SHIPYARD_TEAMS_ENABLED=true`, use `AskUserQuestion` with exactly two options:
- "Team mode (parallel teammates)" — uses TeamCreate/TaskCreate/SendMessage/TeamDelete lifecycle
- "Agent mode (subagents)" — uses standard Task dispatch (current behavior)
Question text: "Teams available. Use team mode (parallel teammates) or agent mode (subagents)?"
**Silent fallback:** If `SHIPYARD_TEAMS_ENABLED` is `false` or unset, silently set `dispatch_mode` to `agent` with no prompt (zero overhead).
**Variable storage:** Store the result as `dispatch_mode` (value: `team` or `agent`). This variable is referenced by all subsequent dispatch steps.
**Recommendation:** For the ship command, agent mode is preferred. The sequential workflow (verify → audit → document → deliver) has no parallelism benefit from team mode. All dispatch steps below use Task dispatch regardless of `dispatch_mode`. The dispatch section is included for consistency with other Shipyard commands.
Step 2: Pre-Ship Verification
Invoke the `shipyard:shipyard-verification` skill to run a comprehensive check.
Verify:
- All acceptance criteria from plans are met
- No critical review findings are unresolved
- Code compiles/builds without errors
- Linting passes (if configured)
Step 3: Run Test Suite
Detect and run the project's test suite:
- Look for test commands in package.json, Makefile, Cargo.toml, etc.
- Execute the test command
- **If tests fail:**
Display the failures and stop: > "Tests are failing. Fix the issues before shipping. Failures:\n{test output summary}\n\nRun `/shipyard:build` to address these issues." Do not proceed.
- **If no test suite exists:** Note this and continue with a warning.
</prerequisites>
<execution>
Step 4: Pre-Ship Security Audit
**Note:** This audit runs regardless of `config.json` settings or `--light` usage during build. Shipping is the final gate — security is always checked here. If a passing `AUDIT-{N}.md` already exists from the build phase and no changes were made since, skip re-auditing and verify the existing report has no unresolved critical findings.
**Dispatch:** Always uses Task dispatch (single-agent step — team overhead not justified). This applies regardless of `dispatch_mode`.
Dispatch an **auditor agent** (subagent_type: "shipyard:auditor") with context per **Agent Context Protocol** (pass PROJECT.md, config.json, working directory, branch, and worktree status to all agents; see `docs/PROTOCOLS.md`):
- Git diff of ALL changes in the shipping scope (phase, milestone, or branch)
- Codebase docs per **Codebase Docs Protocol** (resolve configured codebase docs path and load CONVENTIONS.md, STACK.md, ARCHITECTURE.md, etc.; see `docs/PROTOCOLS.md`)
- All dependency files (package.json, requirements.txt, Cargo.toml, go.mod, etc.)
This is a comprehensive audit covering:
- Code security (OWASP Top 10) across all changes
- Secrets scanning in all modified files
- Dependency vulnerability check
- IaC security review (Terraform, Ansible, Docker)
- Cross-component security coherence
Produce audit report.
**If CRITICAL security findings exist:** 1. Display: "Security audit found critical issues that must be resolved before shipping:" 2. List each critical finding with location and remediation 3. > "Fix these issues and run `/shipyard:ship` again." 4. **Do not proceed.** Critical security findings are a hard gate.
**If no critical findings:** Continue. Display advisory/important findings as informational.
**If a phase-level audit was already run during `/shipyard:build` (AUDIT-{N}.md exists):**
- Only re-audit if new changes were made after the build audit
- Otherwise, verify the existing audit report shows no unresolved critical findings
Step 5: Comprehensive Documentation Generation
**Note:** This step runs regardless of `config.json` settings or `--light` usage during build. Shipping should produce comprehensive documentation.
**Dispatch:** Always uses Task dispatch (single-agent step — team overhead not justified). This applies regardless of `dispatch_mode`.
If phase-level `DOCUMENTATION-{N}.md` files exist from the build phase and are up-to-date (no changes since last documentation run), verify completeness and skip to documentation assembly. Otherwise, dispatch a **documenter agent** (subagent_type: "shipyard:documenter") with:
- Git diff of ALL changes in the shipping scope (phase, milestone, or branch)
- `.shipyard/PROJECT.md` for context
- All SUMMARY.md files from all completed phases
- Existing documentation in `docs/` directory (if exists)
This is comprehensive documentation generation covering:
- Complete API reference documentation in `docs/api/`
- Architecture documentation in `docs/architecture/`
-
A Claude Code plugin for structured project execution. Plan work in phases, build with parallel agents and TDD, review with security audits and quality gates, and ship with confidence.
Other commands on shipyard.
More commands from other plugins.
build
CommandImplement tasks incrementally — build, test, verify, commit. Add "auto" to run the whole plan in one approved pass.

