Skip to content
Back to skills

Rota Ship

ASecurity

Use on "ship it", "open the PR", "finish this branch", or when work is done and ready to integrate. Use --undo on "roll back the last cycle", "revert that merge".

  • 4 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added October 6, 2026
developmentgobashgitapibackend

Works with

  • terminal
  • cli
  • api

Security analysis

A100/100

Pro scans all 8 files and shows the line behind each finding

Scanned November 21, 2026

npx -y skills add l4ci/rota --skill rota-ship --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Rota Ship?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Rota Ship
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/l4ci-rota-ship/badge)](https://www.skillsdirectory.com/skills/l4ci-rota-ship)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: rota-ship
description: Use on "ship it", "open the PR", "finish this branch", or when work is done and ready to integrate. Use --undo on "roll back the last cycle", "revert that merge".
---

# rota-ship — Finish a Feature Branch

Copy this checklist and track your progress:

```
- [ ] Step 0 — Mode Dispatch
- [ ] Step 1 — Branch Check
- [ ] Step 2 — Scope the Work
- [ ] Step 3 — Review (opt-in)
- [ ] Step 3.5 — Second-Opinion Gate (opt-in)
- [ ] Step 3.75 — QA Gate (opt-in)
- [ ] Step 3.8 — UAT Gate (opt-in)
- [ ] Step 4 — Build the PR Body
- [ ] Step 5 — Pick Strategy
- [ ] Step 6a — Open a PR
- [ ] Step 6b — Direct Merge
- [ ] Step 6c — Close Upstream Issues (direct-merge path only)
- [ ] Step 7 — Finish
- [ ] Step 8 — Unproven Items
- [ ] Step 8.5 — Learn (Nudge or Auto-Invoke)
- [ ] Step 8.6 — Docs After-Work (inline)
- [ ] Step 9 — Report to User
- [ ] Step 9.5 — Release Nudge
- [ ] Step 9.7 — After the Ship
```

## Step 0 — Mode Dispatch

Read `$ARGUMENTS`. No flag: Normal Ship Mode (Steps 1–10), continue below.

When `--undo` is present, read [`undo-mode.md`](undo-mode.md) and follow it; terminal. When `--docs` (or `--docs restructure`) is present, print *"`/rota-ship --docs` is deprecated and goes away next release: use `/rota-docs`."* then read [`../rota-docs/SKILL.md`](../rota-docs/SKILL.md) and follow it with the same arguments; nothing else in this file applies.

## Configuration

Read `.rota/config.json` (`rota config show`):

- `work.mergeStrategy`: `"pr"` or `"direct"`; unset means ask (Step 5)
- `ship.review`: review depth, `full` (default), `light` or `none`, or a policy object that picks one by diff size, label and path, and lifts it to `full` on a `Door: one-way` PR or a diff outside the issue's declared files; `true` and `false` still mean `full` and `none`. A plain string fixes the depth for every branch: labels and diff size are ignored, and only the policy object lifts a `risk:high` branch
- `autonomy.level`: `"off"` (default), `"roundtrip"`, `"auto"` ([`references/autonomy.md`](references/autonomy.md)): whether Step 8.5 nudges or invokes directly, and whether Step 9.7 stops or runs the next item

`ship.secondOpinion`, `ship.qa` and `ship.uat` are read by [`opt-in-gates.md`](opt-in-gates.md); `docs.path`, `docs.afterWork` and `docs.autoCreate` by [`/rota-docs`](../rota-docs/SKILL.md).

## When to Use

- Feature branch has 1+ commits and the work is done (including after `/rota-work` with `mergeStrategy: "pr"`).
- Not mid-work (finish via `/rota-work`), not with nothing committed, not to resume a paused branch (`/rota-work` with no argument).

## Step 1 — Branch Check

```bash
rota git guard feature-branch
```

Exit 1 (`data.reason` `base` or `detached`): pass the message through and stop.

## Step 2 — Scope the Work

```bash
rota status show --json <branch>        # data.repo is $REPO, null in single-repo projects
rota review scope --json [--repo "$REPO"] <branch>
```

Keep the scope JSON (commits, `touchedFiles`, `referencedIds`, `intents`) for later steps. Exit 1: no commits beyond the base; tell the user and stop.

## Step 3 — Review (opt-in)

Run `rota review depth <branch> --json` (it reads the labels of a round branch's issue itself; add `--labels` only for labels it cannot see, such as a PR's) and print its `REVIEW-DEPTH` line (`data.depth`, `data.why`) so the user sees which depth applies and why. `none` skips this step, `light` has `/rota-review` dispatch the Spec reviewer only (the Standards reviewer when the branch references no issue), `full` is the whole review; a label such as `risk:high`, a `Door: one-way` PR, a diff outside the issue's files or a risky path can force `full` over a small diff, and `data.signal` names which one decided (`label`, `door`, `scope-drift`, `path`, `size` or `default`); before the PR exists there is no Door line, and the reason says so. Skipped when the depth is `none` and for a round worker's PR (branch `<agent>/<issue>-<slug>`, or the brief says it is a round slot); when either applies, read [`review-gate.md`](review-gate.md) and [`round-worker-and-issue-mode.md`](round-worker-and-issue-mode.md). Otherwise invoke `rota-review` by reading and following its instructions, then route on the recorded verdict (umbrella: add `--repo "$REPO"`):

```bash
rota verdict route <branch> --for ship-review --json
```

Exit 3: no verdict recorded; stop and rerun `/rota-review`, never read the report instead. `data.next` `continue` (PASS): go on silently. When it is `ask`, `surface` or `stop`, read `review-gate.md` (the table also serves Steps 3.5 and 3.75).

## Step 3.5 — Second-Opinion Gate (opt-in)

When `ship.secondOpinion` is `true`, read [`opt-in-gates.md`](opt-in-gates.md) (Step 3.5: skip conditions and procedure). Otherwise skip.

## Step 3.75 — QA Gate (opt-in)

When `ship.qa` is `true`, read `opt-in-gates.md` (Step 3.75: skip conditions and procedure). Otherwise skip.

## Step 3.8 — UAT Gate (opt-in)

When `ship.uat` is `true`, read `opt-in-gates.md` (Step 3.8: skip conditions and procedure). Otherwise skip.

## Step 4 — Build the PR Body

For issue-backed items, check acceptance before shipping: follow [`references/acceptance-marks.md`](references/acceptance-marks.md). Round workers also follow the outcome reporting in [`round-worker-and-issue-mode.md`](round-worker-and-issue-mode.md) before `worker done`.

```bash
rota ship body <branch>
```

Capture the output (`## Summary`, `## Items resolved`, `## Evidence` when items carry proof rows) and append `## Test plan`: 2-5 checkboxes, one per meaningful area (not per file), from the touched files, each naming the most visible behavior change. No generic checks. For a structural PR (files moved, split or renamed, or a call path rewired), add a fenced `diff` block under Summary showing the file tree or call tree before and after (idea from Dex Horthy).

End the body with one line written from the diff: `Door: one-way|two-way. Blast radius: <surfaces a mistake reaches>.` One-way: a mistake outlives a revert (migration, published format, released API, deleted data); two-way: reverting the PR undoes it. Name surfaces (CLI verbs, skills, docs, file formats), not files. Run the self-audit in `references/humanizing-prose.md` silently and show the post-audit draft.

## Step 5 — Pick Strategy

Run `rota ship strategy [--repo <name>]`; its `strategy` answers how the branch lands:

- `pr` when issues live on a tracker (`issues.source` is github or gitlab): read [`round-worker-and-issue-mode.md`](round-worker-and-issue-mode.md); no question, go to Step 6a.
- `direct` with a local forge (`forge` is `local`: no origin remote, or `forge.provider: local`): no question, go to Step 6b. There is no PR to open, so `work.mergeStrategy` is ignored. Say so in one line.
- Otherwise it echoes `work.mergeStrategy`. If it is `"direct"` or `"pr"` and the user has not said otherwise this session, use it silently. If `unset` or the user hinted otherwise, ask (single-select, header `"Strategy"`, *"How should I integrate `<branch>`?"*):

- `"Direct merge"` — *"Merge into the base with `--no-ff` and delete the branch."*
- `"PR"` — *"Push and open a PR with the body."*

Mark the configured strategy `(Recommended)`; unset defaults to Direct merge.

## Step 6a — Open a PR

> **Manual gate — filing a public artifact (`pr-open`).** Opening a PR creates externally visible state. This step is **always manual** — never auto-invoked, regardless of `autonomy.level`. Skill-enforced only (the verb does not refuse), so never skip the Step 5 question or the user's go-ahead. See `references/manual-gates.md`.

```bash
printf '%s' "$BODY" | rota ship pr <branch> --title "<short title>" --body-file - [--repo <name>]
```

Title: strongest commit subject, 70 characters max, no `[ID]` tags. Share the PR URL. Exit 4 with `data.blockedBy: "verdict"` is a recorded FAIL: surface it and stop.

When the backlog backend is issues, read `round-worker-and-issue-mode.md` (`--items`, `needs-review`, skips 6b, 6c and 8).

## Step 6b — Direct Merge

When Step 5 picked "Direct merge", read [`direct-merge.md`](direct-merge.md) (`rota ship merge`, its exit-4 cases). Skip on the PR path.

## Step 6c — Close Upstream Issues (direct-merge path only)

When Step 6b ran, read `direct-merge.md` (the `issue-close` manual gate and the close flow). Skip on the PR path and the issue backend.

## Step 7 — Finish

Round workers and umbrella projects skip the verb: read [`round-worker-and-issue-mode.md`](round-worker-and-issue-mode.md), which keeps their Steps 7 to 9.5. Otherwise:

```bash
rota ship finish --json <branch> [--commit <data.sha from Step 6b>]
```

One call removes the status entry, completes the still-open referenced items on the file backend (issue backend: `items.skipped`, the PR merge closes them) and decides the nudges. It dispatches nothing; Steps 8 to 9.7 act on its JSON. Exit 4 `blockedBy: "round worker"` or `"umbrella"`: take the reference path above.

## Step 8 — Unproven Items

Exit 4 `blockedBy: "proof missing"`: everything else ran, and `data.items.unproven` stay open. Read [`proof-missing.md`](proof-missing.md). Name `data.items.unknown` in the report.

## Step 8.5 — Learn (Nudge or Auto-Invoke)

Round workers run the post-to-issue learning pass at Step 4 instead (`round-worker-and-issue-mode.md`). Otherwise act on `data.learn` only when `action` is `fire`, and downgrade it to skip when the whole diff is a bulk rename, dependency bump, formatting sweep or generated-file refresh (never the reverse). By `autonomy.level` (`data.autonomy`):

- **`"off"`:** append `data.learn.nudge` to the Step 9 report.
- **`"roundtrip"` or `"auto"`:** dispatch `rota-learn` by reading and following its instructions immediately: no prompt, no confirmation, no "want me to" question. Brief: `data.items.referenced` and the touched files from Step 2.

## Step 8.6 — Docs After-Work (inline)

Round workers run it too, by hand (`round-worker-and-issue-mode.md`). When `data.docs.action` is `fire` (same downgrade as Step 8.5), read [`../rota-docs/SKILL.md`](../rota-docs/SKILL.md) and run its after-work flow (Steps D-A1 to D-A6) in this session, with the resolved IDs and touched files as context. No `autonomy.level` branch: Step D-A5's approval is the checkpoint. `docs.afterWork` is off by default; `rota config set docs.afterWork true` or one `/rota-docs` run turns it on.

## Step 9 — Report to User

One compact block:

```
PR opened: https://github.com/.../pull/42
Title: fix: timer badge and quick-switch overlay
Resolved: #12 #15   (file backend: [B01] [F03])
```

or `Merged `rota/demo` into main — commit a1b2c3d` plus the `Resolved:` line. When a review exception or a proof exception applies, `review-gate.md` and `proof-missing.md` say what to append.

## Step 9.5 — Release Nudge

When `data.release.action` is `fire`, append `data.release.message` as one line after `Resolved:`. `skip` (including no tag yet: the first release is the user's call): say nothing.

## Step 9.7 — After the Ship

Round workers skip this step. Read `autonomy.level` ([`references/autonomy.md`](references/autonomy.md)). `"off"`: stop after the report. `"roundtrip"`: stop; add one line naming the next ready item as a suggestion (`/rota-work` with no argument shows it). `"auto"`: run `/rota-work` with no argument for the next ready item, by reading and following its instructions immediately: no prompt, no confirmation, no "want me to" question. Stop and name why when no ready item is left or a stop in the reference is reached. The manual gates above (`pr-open`, `issue-close`) still ask at every level; a gate the user declined means nothing shipped, so stop there.

## Undo Mode (--undo)

When `--undo` is present, read `undo-mode.md` (Steps U1 to U3: preview, confirm, apply). Terminal.

## Docs (--docs, deprecated)

When `--docs` is present, print the deprecation line from Step 0, then run `/rota-docs` (Steps D1–D6 first-run scaffold, D-A1–D-A6 after-work). Only `--docs` and Step 8.6 load it. Remove this alias next release.

## Gates: Thought → Reality

| Thought | Reality |
|---|---|
| "The review report reads fine, skip the verdict." | `rota verdict route` exit 3 means none was recorded: rerun `/rota-review`. Never read the report instead. |
| "CONCERNS are minor, ship anyway." | CONCERNS routes to `ask`: surface each one, then the user picks. `FAIL` is `stop`, and `rota ship pr` and `rota ship merge` refuse it (exit 4, `blockedBy: "verdict"`). |
| "I'm a round worker, run `/rota-review` once to be safe." | Review is the orchestrator's seat. Skip Step 3 on a `<agent>/<issue>-<slug>` branch. |
| "Autonomy is on, so open the PR." | `pr-open` and `issue-close` are always manual, whatever `autonomy.level` says. Ask first. |
| "The merge touched few files, `--confirm` it." | `blockedBy: "manual gate"` is `merge-approval`: ask, then rerun with `--confirm --confirm-note "<their answer>"`. |
| "`--undo` only rewinds one cycle, no need to ask." | It runs `git reset --hard`, unrecoverable past the reflog. The confirmation is the only guard. |

## Key Principles

- **Read-only until Step 6.** Review, scoping and body generation mutate nothing.
- **One integration pass.** If review passes, ship.
- **Titles stay clean.** The body carries the linkage.

## References

- [`undo-mode.md`](undo-mode.md) — `--undo` rollback (Steps U1 to U3).
- [`../rota-docs/SKILL.md`](../rota-docs/SKILL.md) — docs scaffold and after-work flow, docs config (the `--docs` alias runs it).
- [`opt-in-gates.md`](opt-in-gates.md) — second-opinion and QA gates, their config and skip rules.
- [`review-gate.md`](review-gate.md) — verdict routing table, `REVIEW_CHOICE`, review-skipped case.
- [`round-worker-and-issue-mode.md`](round-worker-and-issue-mode.md) — round worker skips, issue backend and umbrella branches.
- [`direct-merge.md`](direct-merge.md) — Steps 6b and 6c.
- [`proof-missing.md`](proof-missing.md) — Step 8 proof-missing handling.
- [`references/autonomy.md`](references/autonomy.md) — what each `autonomy.level` chains and where a run stops.
- [`references/authoring-conventions.md`](references/authoring-conventions.md) — skill authoring rules.
- [`references/docs-conventions.md`](references/docs-conventions.md) — docs page layout and naming.
- [`references/humanizing-prose.md`](references/humanizing-prose.md) — self-audit for the PR body.
- [`references/issue-mode.md`](references/issue-mode.md) — issue backend: claim, proof note, PR path.
- [`references/manual-gates.md`](references/manual-gates.md) — always-manual gates (`pr-open`, `issue-close`).
- [`references/post-cycle-trigger-gate.md`](references/post-cycle-trigger-gate.md) — the condition `rota ship finish` evaluates for Steps 8.5 and 8.6.
- [`references/review-verdict-routing.md`](references/review-verdict-routing.md) — CONCERNS options and carrier labels.
- [`references/silent-failure-hunter.md`](references/silent-failure-hunter.md) — rubric carried by the review brief.
- [`references/three-mode-skill-shape.md`](references/three-mode-skill-shape.md) — normal, undo and docs mode layout.
- [`references/worker-contract.md`](references/worker-contract.md) — round-worker rules.

Files in this skill

  • SKILL.md11.7 KB
  • direct-merge.md1.9 KB
  • docs-mode.md6.3 KB
  • opt-in-gates.md1.9 KB
  • proof-missing.md969 B
  • review-gate.md1.6 KB
  • round-worker-and-issue-mode.md2 KB
  • undo-mode.md1.8 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.