/ship closes completed code work through a pull request. Knowledge-note
lifecycle and external publication remain host concerns.
Git delivery
Test, commit, create PR. One command from "code done" to "PR open".
Step 0: Read Config
Read verbs config from CLAUDE.md or AGENTS.md (whichever the project uses) for: test command, tag format, release preference.
Step 1: Pre-flight
- Run
git pullto sync with remote (avoid conflicts from auto-backup). - Run the project's test/build command. If it fails, stop and report.
- Run
git diff --statto see uncommitted changes. - Run
git log origin/{main}..HEAD --onelinefor commit history. - Check current branch:
git branch --show-current.
Step 2: Load Learnings
Search {learnings_dir} for type: pitfall related to the changed files.
If any matched pitfall touches a changed file, list it and require ack before proceeding; else skip.
Step 3: Scope Check
If a brief exists for this branch (check docs/briefs/):
- Read the brief's Scope > In/Out sections.
- Get the current full diff:
git diff origin/{main} --stat. - Compare against the brief scope. Flag any files or features outside stated scope.
- Also compare against the diff at review time (if
/reviewwas run earlier). Check for post-review additions. - Output:
- "Scope: ON TRACK" if all changes match the brief and nothing was added post-review.
- "SCOPE DRIFT: [description]" for each out-of-scope change.
- "POST-REVIEW CHANGES: [files]" for any files modified after the last review. Ask user to confirm before proceeding if either is detected.
If no brief exists, still check for post-review additions:
- Run
git log --oneline --since="1 hour ago"to see recent commits. - If there are commits after the last
/reviewin this session, list them and warn.
If neither brief nor review history exists, skip silently.
Step 4: Review Gate
If /review has NOT been run on the current diff in this session:
- Warn: "Review not run. Run /review first?"
- If user says skip, proceed. Otherwise run review.
Step 5: Branch (mandatory, before commit)
Never push directly to main/master. Always ship via PR.
- If on main/master, create a feature branch:
fix/*for bug fixesfeat/*for featuresrefactor/*for refactoring
- If already on a feature branch, stay on it.
Do not stage or commit until this branch gate passes. Creating the branch after the commit would still advance the local default branch.
Step 6: Commit
If there are uncommitted changes:
- Analyze the diff
- Generate a conventional commit message (
type(scope): description) - Stage relevant files (never
git add -A) - Stop if
git diff --cachedis empty after staging (nothing to commit) — report and skip the commit. - Commit (don't amend, don't skip hooks)
Step 7: Tag (if configured)
If verbs config has tag: semver:
- Read current version from package.json, VERSION, or latest git tag
- Determine bump type from commits (feat = minor, fix = patch)
- Create tag:
git tag v{version}
If tag: none: skip.
Step 8: Push + PR
- Push the branch with
-u(and tags if created) - Create PR with
gh pr create:- Title: short, under 70 chars
- Body: what changed, why, how to test
- If the host/project persisted a learning from this session, mention it
- Return the PR URL.
- Closure evidence before claiming done: print the PR URL and pushed commit/branch. Ticket or project-state transitions belong to the host; if required delivery evidence is missing, name the gap and do not claim done.
Step 9: Release (if configured)
If verbs config has release: true:
- Create GitHub Release from the tag
- Auto-generate release notes from commits
If release: false: skip.
Step 10: Surface Learning Candidates (if applicable)
Emit a learning candidate ONLY if a concrete artifact surfaced during this ship:
a test that caught a subtle bug, a deploy pattern worth remembering, or a CI
gotcha. If none surfaced, skip. Use the lib/learning-format.md fields in the
response and apply the quote gate before quoting:
@skills/engineering/ship/lib/quote-gate.md. Do not persist the candidate;
storage belongs to the host/project.
For recurring or mechanically checkable bug classes, apply review Step 7's guard-escalation wording: propose the exact guard file only, never create it here.
Route the flaw back (propose-only). If a flaw surfaced during ship maps to an existing Verbs skill — matched against that skill's anti-pattern / checklist table, not just its trigger keywords — emit one skill-edit candidate: <skill> — <missing check> line into the session-end learning-candidate audit when the host provides one. See lib/trigger-first-skill-evolution.md. Propose-only: never edit the target skill here, and never during an autonomous build. This routes the catch back to strengthen the skill that let it through, instead of leaving only a passive pitfall.
Common Rationalizations
Anti-bypass table tying each ship shortcut to the failure it causes: @skills/engineering/ship/lib/rationalizations.md.