| name | ship |
| description | Structured release pipeline with pre-flight checks, AI code review, version bump, changelog, PR creation, platform publish, and GitHub release. Triggers on "ship", "release", "publish". |
| allowed-tools | Read, Write, Bash, Glob, Grep |
Ship
Structured release pipeline that guides code from working branch to a published release through 7 gated phases: pre-flight checks, automated code review, version bump, changelog generation, PR creation, platform publish (npm/PyPI/etc.), and GitHub release.
Phases 5 (PR) and 6 (Publish) are conditionally skippable โ trunk-based workflows that commit directly to main skip Phase 5; private packages skip Phase 6. Phase 7 (GitHub release) is the terminal phase and always runs unless the publish step failed.
Key Design Principles
- Phase Gates: Each phase must pass before the next begins โ no shipping broken code
- Multi-Project Support: Detects npm (package.json), Python (pyproject.toml), and generic (VERSION) projects
- AI-Powered Review: Uses CCW CLI to run automated code review before release
- Audit Trail: Each phase produces structured output for traceability
- Safe Defaults: Warns on risky operations (direct push to main, major version bumps)
Architecture Overview
User: "ship" / "release" / "publish"
|
v
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Phase 1: Pre-Flight Checks โ
โ โ git clean? branch ok? tests pass? build ok? โ
โ โ Output: preflight-report.json โ
โ โ Gate: ALL checks must pass โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Phase 2: Code Review โ
โ โ detect merge base, diff against base โ
โ โ ccw cli --tool gemini --mode analysis โ
โ โ flag high-risk changes โ
โ โ Output: review-summary โ
โ โ Gate: No critical issues flagged โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Phase 3: Version Bump โ
โ โ detect version file (package.json/pyproject.toml/VERSION)
โ โ determine bump type from commits or user input โ
โ โ update version file โ
โ โ Output: version change record โ
โ โ Gate: Version updated successfully โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Phase 4: Changelog & Commit โ
โ โ generate changelog from git log since last tag โ
โ โ update CHANGELOG.md โ
โ โ create release commit, push to remote โ
โ โ Output: commit SHA โ
โ โ Gate: Push successful โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Phase 5: PR Creation (skippable for trunk-based) โ
โ โ gh pr create with structured body โ
โ โ auto-link issues from commits โ
โ โ Output: PR URL โ
โ โ Gate: PR created OR skipped (direct-to-main) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Phase 6: Platform Publish (skippable if private) โ
โ โ detect registry (npm / PyPI / crates.io) โ
โ โ npm publish / twine upload / cargo publish โ
โ โ verify new version is live on registry โ
โ โ Output: published artifact metadata โ
โ โ Gate: registry confirms version OR skipped (private) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Phase 7: GitHub Release โ
โ โ git tag -a vX.Y.Z + push tag โ
โ โ gh release create with structured notes โ
โ โ Output: release URL โ
โ โ Gate: release URL returned โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Execution Flow
Execute phases sequentially. Each phase has a gate condition โ if the gate fails, stop and report status.
- Phase 1: Pre-Flight Checks -- Validate git state, branch, tests, build
- Phase 2: Code Review -- AI-powered diff review with risk assessment
- Phase 3: Version Bump -- Detect and update version across project types
- Phase 4: Changelog & Commit -- Generate changelog, create release commit, push
- Phase 5: PR Creation -- Create PR with structured body and issue links (skip for trunk-based)
- Phase 6: Platform Publish -- Publish to npm / PyPI / crates.io (skip for private packages)
- Phase 7: GitHub Release -- Tag release commit and publish GitHub release notes
Pre-Flight Checklist (Quick Reference)
| Check | Command | Pass Condition |
|---|
| Git clean | git status --porcelain | Empty output |
| Branch | git branch --show-current | Not main/master |
| Tests | npm test / pytest | Exit code 0 |
| Build | npm run build / python -m build | Exit code 0 |
Completion Status Protocol
This skill follows the Completion Status Protocol defined in SKILL-DESIGN-SPEC.md sections 13-14.
Every execution terminates with one of:
| Status | When |
|---|
| DONE | All applicable phases completed, GitHub release published |
| DONE_WITH_CONCERNS | Release published but with review warnings, skipped publish (private pkg), or non-critical issues |
| BLOCKED | A gate failed (dirty git, tests fail, push rejected, publish failed, tag conflict) |
| NEEDS_CONTEXT | Cannot determine bump type, ambiguous branch target, unclear registry target |
Escalation
Follows the Three-Strike Rule (SKILL-DESIGN-SPEC section 14). On 3 consecutive failures at the same step, stop and output diagnostic dump.
Reference Documents