/smith-ship — ship the current change end-to-end
Drive the change in the current worktree from review to merged, following smith
conventions. Run phases in order; stop and surface only on the must-ask triggers
in @smith-gh-pr/SKILL.md (Review Convergence Protocol). Argument (if given) is
the intended PR scope/title.
Live state
- Status: !
git status -s - Branch: !
git branch --show-current - Open PR (if any): !
gh pr status 2>/dev/null | head -20
Procedure
Load and follow @smith-gh-pr/SKILL.md, @smith-git/SKILL.md,
@smith-style/SKILL.md, @smith-worktree/SKILL.md, and
@smith-subagents/SKILL.md.
- Preflight — run
/smith-preflightto see which invariants the change already violates. Exactly one result routes instead of blocking: abranch-first FAILcaused by the checkout sitting on a protected branch, and only when it is the ONLY failing check — paired with any otherFAILit stops here like the rest, or the companion failure rides along unaddressed. Abranch-first FAILfrom a detached HEAD is never that case. Every otherFAILstops here — a secret-scan failure in particular must not reach review or commit. The binding refusal on push stays at step 4. - Isolate — a
branch-first FAILfrom step 0 is not cleared by being clean: if the checkout sits on a protected branch with nothing modified, branch orEnterWorktreebefore any edit, then re-run the gate. Never take path (a) below while still on a protected branch — committing there is what@smith-guidanceHarmless forbids; branch first, then commit. Otherwise checkgit status --porcelain: if the checkout is dirty, STOP and pick ONE path: (a) commit or stash the changes, thenEnterWorktree; or (b) branch in place (git switch -c …) and continue in the current checkout — noEnterWorktreeat all (the tree is still dirty and theworktree-dirty-guardhook would block it; a new worktree starts clean, stranding uncommitted changes).worktree.baseRef: headonly preserves already-committed unpushed work, never uncommitted changes. Then, if on the EnterWorktree path in a background session, enter the worktree (see@smith-worktree) and rename the branch to the@smith-styleconvention before any push. - Review to convergence — run the
/smith-reviewloop; it owns the tool marshaling, per-round receipts, and convergence criteria. Do not ship until it reports converged. - Commit — logically and semantically atomic; conventional subject ≤72,
body ≤72/line,
Assisted-by:trailer (see@smith-style). One concern per commit. - Push & PR — re-run
/smith-preflighton the finished commit first and do NOT push on aNO-GO(step 0's verdict was taken before the branch and commit existed, so it does not carry). Then push the renamed branch;gh pr create --base <default> --assignee @mewith a What/Why/Testing body ending with theAssisted-by:line (@smith-style). Link issues only if real. The body and title are content: show them and create on an explicit yes (@smith-guidanceHarmless). - Address review — follow
@smith-gh-pr(Code Review Cycle, Posting Review Findings) for fetching, replying, attribution, suggestion blocks, and the content-vs-mechanics gate. Ship-specific: fix high-confidence findings with fix + amend (not new commits); re-run/smith-preflightbefore each of those pushes too — an amended commit is content step 4's verdict never saw, so a token introduced while fixing a review finding would otherwise reach the remote unscanned; after each push rerun the/smith-reviewloop to a fresh converged verdict (full receipt plus criteria — a mechanics-only recheck is not convergence); confirm CodeRabbit actually ran before trusting 0 (@smith-gh-pr"CodeRabbit fails OPEN"). - Merge — re-run
/smith-preflightonce more first: the PR title, body and every review reply are external writes authored AFTER step 4 gated, so this is the only point that measures them. Do NOT merge on aNO-GO: the refusal binds here exactly as it does at step 4, and a gate that runs without being able to stop the merge is decoration. Then, on both aGOand a converged verdict for the LATEST pushed commit (earlier convergence does not carry across new commits),gh pr merge --squash --delete-branch(targets the current branch's PR). If this branch has an open child PR stacked on it, OMIT--delete-branchand follow@smith-gh-pr"Stacked PRs" instead. - Sync & clean up —
ExitWorktree(remove), then ff-only pull the repo's DEFAULT branch in the primary checkout; clear any squash-merge orphan branch (@smith-worktreeSync-After-Squash-Merge).
Stacked mode — /smith-ship stack
For multi-part work that should ship as a dependent stack of PRs. Also load
@smith-gh-pr "Stacked PRs" (+ its references/STACKS.md when operating on
the stack) and @smith-worktree.
- Decompose first — split into logically AND semantically atomic units,
each one branch/PR. Present the numbered decomposition and get scope
approval BEFORE any branch exists (
@smith-guidanceOperating Discipline; this is a distinct, earlier gate than the existing-branch scope verification in@smith-gh-prStacked PRs). - Per unit, run phases 0-4 above in that unit's own worktree, with two
stack overrides: the PR base is the parent branch (not the default
branch), and the PR body carries
Depends on:/Blocks:. Branch names follow@smith-style. The stack's PR titles and bodies are shown together and opened on one explicit yes (batched consent). - Phases 5-7 are stack-wide, not per unit — address review across the
stack, then merge bottom-up with retarget-before-merge and manual parent
branch deletion per
@smith-gh-prStacked PRs (cli/cli#1168); cascade rebases; ff-only sync once per merge. - Report per branch — verify the stack scope (no omissions) and state status per branch in-band.
State results in your own message (in-band); end with a result: line.