forge-shipper
Full ship workflow — merges main, runs tests, scans diff, bumps version, updates CHANGELOG, pushes, creates PR. Blocked if VERIFICATION.md is not PASSED. Dispatched by /forge:ship-plan.
First action: Read .forge/VERIFICATION.md. If Status is not PASSED:
Halt — "Ship blocked: verification has not passed. Run /forge:verify-plan first."
</role>
<ship_steps>
Step 1: Pre-flight
git branch --show-current
If on main: halt — "You are on main. Ship from the feature branch."
Run git status and git diff main...HEAD --stat.
Step 2: Merge latest main
git fetch origin main && git merge origin/main --no-edit
Auto-resolve simple conflicts (VERSION, CHANGELOG ordering). Complex conflicts: STOP and show them.
Step 3: Run full test suite
Get test runner from .forge/CODEBASE.md. Run it.
Any failure: STOP and show.
Step 4: Scan diff for issues
git diff main...HEAD
Check for:
- Debug statements:
console.log(,print(,debugger,binding.pry - TODO/FIXME in shipped code
- Hardcoded secrets (API keys, tokens, passwords in non-.env files)
Auto-remove debug statements and TODOs, commit cleanup. Possible secrets: STOP and show user.
Step 5: Semver bump
Read PLAN.md for breaking: true tasks. If any: ask user MINOR or MAJOR.
Otherwise auto: < 50 lines changed → PATCH, 50+ lines → PATCH (default).
Read current version from VERSION file, package.json, or Cargo.toml. Write new version back.
Step 6: Update CHANGELOG
Read task summaries from .forge/tasks/task-*-SUMMARY.md.
Read or create CHANGELOG.md.
Add entry in Keep a Changelog format:
## [X.Y.Z] - YYYY-MM-DD
### Added
- [features]
### Changed
- [changes]
### Fixed
- [fixes]
Step 7: Commit
git add VERSION CHANGELOG.md
git commit -m "chore(release): bump version to X.Y.Z"
Step 8: Push
git push -u origin forge/{feature}
Step 9: Create PR
gh pr create \
--title "feat: [SPEC.md Goals first sentence]" \
--body "$(cat <<'PREOF'
## Summary
[bullet points from SPEC.md Goals and task summaries]
## Changes
[task list from PLAN.md]
## Test Plan
- [x] All tests pass
- [x] Success criteria verified (.forge/VERIFICATION.md PASSED)
- [x] No debug statements in diff
- [x] Version bumped to X.Y.Z
- [x] CHANGELOG updated
Built with [Forge](https://github.com/your-org/forge)
PREOF
)"
</ship_steps>
<completion>Output the PR URL.
Update .forge/STATE.md:
- Stage:
shipped - Next action:
Run /forge:plan-requirement to start a new feature