|
| 1 | +# Plan: `/ship` command — single-defect audit→fix→PR pipeline (PowerShell-safe) |
| 2 | + |
| 3 | +- Date: 2026-06-17 |
| 4 | +- Branch: `feat/ship-command` (off `origin/main` 136b7f1) |
| 5 | +- Closes: R6 from the 2026-06-17 report-coverage map (no unified `/ship` command exists) |
| 6 | + |
| 7 | +## Goal |
| 8 | + |
| 9 | +A single-concern slash command that walks ONE defect from audit to a review-ready PR, reusing existing skills, with Windows/PowerShell-safe commit guidance. Pure routing — no new orchestration logic, no new skill, no new code. |
| 10 | + |
| 11 | +## Why |
| 12 | + |
| 13 | +The coverage map confirmed the audit→TDD→test→commit→PR→merge→deploy pipeline is already composable from `release-train` + `proceed-with-the-recommendation` + the superpowers stages, but there is no single entry point for the common case: fix one defect, open one PR. `release-train` is multi-PR; `proceed-with-the-recommendation` walks an arbitrary recommendation list. `/ship` is the single-defect fast path. |
| 14 | + |
| 15 | +## Scope (one concern) |
| 16 | + |
| 17 | +In: |
| 18 | +- New `commands/ship.md` — a routing command (prose), command-only, sequencing existing skills for one defect on one branch. |
| 19 | +- Regenerate plugin manifests + `plugins/` mirror via `npm run build` (generated output, committed). |
| 20 | + |
| 21 | +Out (explicitly deferred, not dropped): |
| 22 | +- No multi-PR orchestration — that is `release-train`. |
| 23 | +- No new skill, no new hook, no `.mts` code — keeps skill-count / skill-tiers / skill-law-tag / tool-count invariants untouched. |
| 24 | +- No deploy automation, no auto-merge — `/ship` stops at "PR open, CI green, awaiting your merge". Deploy verification stays advisory via `deploy-receipt`. |
| 25 | +- PowerShell-native fallbacks for `deploy-receipt`'s Bash-only scripts (the other half of R6) → separate follow-up PR. |
| 26 | + |
| 27 | +## Design (routing only) |
| 28 | + |
| 29 | +`/ship <one-line defect description>` walks: |
| 30 | +1. `reconcile` — establish git ground truth; refuse if not on a clean feature branch off `origin/main`. |
| 31 | +2. `tdd-workflow` — RED failing test reproducing the defect → GREEN minimal fix (pre-test code deleted). |
| 32 | +3. `verification-loop` — run the project verify ladder; build/types/tests green before commit. |
| 33 | +4. One commit, one concern, PowerShell-safe message (single-line `-m`, or `-F <tempfile>`) per the global Windows Shell Discipline rule. |
| 34 | +5. `commit-commands:commit-push-pr` — push branch + open PR. STOP. Never auto-merge. |
| 35 | +6. `deploy-receipt` — after you merge, verify the deployed SHA (advisory). |
| 36 | + |
| 37 | +Hard stops (halt and ask): protected-branch push, ambiguous defect description, any verification failure. |
| 38 | + |
| 39 | +## Files |
| 40 | + |
| 41 | +- Source (hand-authored, committed): `commands/ship.md` (1 file). |
| 42 | +- Generated (committed via `npm run build`, never hand-edited): `plugins/continuous-improvement/commands/ship.md` mirror; `.claude-plugin/marketplace.json` + `plugins/continuous-improvement/.claude-plugin/plugin.json` if command lists are embedded; `llms.txt` / docs counts if a command total is cited. |
| 43 | + |
| 44 | +## TDD / verification |
| 45 | + |
| 46 | +1. Before writing the command: grep for any asserted command count (tests, `llms.txt`, README, `scripts/`); bump it if one exists (RED if a count test fails first). |
| 47 | +2. Write `commands/ship.md`. |
| 48 | +3. `npm run build` (regenerates mirror + manifests). |
| 49 | +4. `npm run verify:all` green — especially `everything-mirror`, `scripts-citation-drift`, `docs-substrings`, `routing-targets` (every skill `/ship` cites must exist), `doc-runtime-claims`. |
| 50 | +5. `git diff --exit-code -- bin lib test plugins` clean after build (build-pipeline invariant). |
| 51 | +6. Stage by explicit filename (no `git add -A`). One commit, cite this plan. Open PR; do not merge. |
| 52 | + |
| 53 | +## Risks |
| 54 | + |
| 55 | +- Count-drift invariants (`scripts-citation-drift` / `docs-substrings`) if a command total is cited anywhere — caught by `verify:all`. |
| 56 | +- `routing-targets`: every skill `/ship` references must resolve — caught by the invariant. |
| 57 | +- `.mts`/`.mjs` trap: none here (command-only), but rebuild-before-stage still applies to the generated mirror. |
| 58 | + |
| 59 | +## Done when |
| 60 | + |
| 61 | +`verify:all` green + PR open + this plan cited in the commit. Merge and any deploy remain the operator's call. |
0 commit comments