--- name: ship-check description: The definition of done. Run before calling any change done, fixed, verified, ready or shippable, for features and bug fixes alike. Checks the pre-mortem was answered, proves the tests fail on the old code, gets a fresh breaker review, runs CI's own checks in a clean checkout, checks the user-facing words, and writes the evidence report. Also use when asked "is it done", "is it ready", "did you verify it" or "can we merge". --- # ship-check Walk every step. A step you cannot do goes in the report under "Not verified" with the reason; it is never skipped silently. The repo's commands, test limits and heavy-run rules are in the `first-pass:project` block of its instruction file (AGENTS.md or CLAUDE.md); if there is none, read them from the CI config and say so in the report. Its test limits bind every step below, and so do the machine block's limits (how this machine bounds a heavy run, and the browsers and devices it can look at a UI with). Run everything inside the repo that changed (`cd `, `git -C `), not from a main folder above it. A change that spans repos walks the steps once per repo. A prompt with several items walks steps 1 and 2 per item, while each is built, running only the tests that item touches; one clean checkout of the base serves every item's fail-first run. Steps 3 and 4 run once for all of them, after the last item is built: one review per item (small items that touch the same code can share one), started together only where the repo's test limits say side-by-side runs are safe (at most three at once), otherwise one after another; and, while they run, CI's full checks in one clean checkout holding every item. A later edit reruns only the checks it can affect, and the full checks run once more on the final change (step 3). The report answers each item, and every item's list of smaller findings comes in it, once. Nothing is pushed, merged, deployed, migrated or published until steps 3 and 4 are finished for a clean checkout holding exactly what it ships (failures the base has too are named, and findings left open are answered by the user first), unless the user says to ship it as it is. ## 0. Size A change with no logic in it (a comment, a doc, a spelling fix that changes no behaviour) runs only the repo's format, lint and build checks, plus step 6 when a person reads the text, and the report says this exception was used. Anything else, however small (a constant, a condition, a default, a price, a label whose meaning changes), walks every step. When unsure, it is not a typo. ## 1. Pre-mortem Find the pre-mortem in the plan. If there is none, write it now from the diff with the `premortem` skill, and say in the report that it was written after the code. Search again for neighbors of every field, status, option, queue and endpoint in the diff; add any the plan missed. ## 2. Tests that fail on the old code For each behaviour the change adds or fixes, and each pre-mortem answer of the "test" kind: 1. **Right layer.** The lowest layer that reproduces it end to end. If the bug could live in a query, a transaction, a queue or a browser, the test runs against the real thing (an integration test on a real database, an end-to-end test in a browser). A unit test with mocks is enough only for pure logic. 2. **Fails first.** In a clean checkout of the code before the change. That is the base: HEAD when the change is still uncommitted, otherwise the commit the branch started from (`git merge-base HEAD origin/
`). Never a checkout that already contains the change, or good tests pass on the "old" code and look worthless. ``` git -C worktree add --detach "/-shipcheck--