audit
On-demand security audit — OWASP, secrets, dependencies, IaC security
Finish and deliver completed work
> /plugin marketplace add lgbarn/shipyard > /plugin install shipyard@shipyard
How it fires
How this command gets triggered: by you, by Claude, or both.
/shipContext preview
What this command does when you run it.
Finish and deliver completed work
description: "Finish and deliver completed work" disable-model-invocation: true argument-hint: "[--phase | --milestone | --branch]"
You are executing the Shipyard shipping workflow. Follow these steps precisely.
<prerequisites>
Determine the shipping 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.
**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:
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.
Invoke the `shipyard:shipyard-verification` skill to run a comprehensive check.
Verify:
Detect and run the project's test suite:
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.
</prerequisites>
<execution>
**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`):
This is a comprehensive audit covering:
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):**
**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:
This is comprehensive documentation generation covering:
-
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.
Repo: lgbarn/shipyard
On-demand security audit — OWASP, secrets, dependencies, IaC security
Explore requirements through Socratic dialogue and capture project definition
Execute plans using fresh subagents with review gates
Investigate bugs and failures with systematic root-cause analysis