← All craftbooks

Ship

Ship and releaseevalv1.0.0released 2026-05-16workflow: release

End-to-end release procedure: run tests, run a review pass, commit/push, open the PR, wait for CI to come back green, hand off for merge. Requires a GitHub-connected project on a feature branch.

Steps

Entry step: preflight. Each step names the specialist role it wants; the full working prompt is expandable.

  1. Preflightdeveloperentry

    Confirm the working tree is in a shippable state: branch is right, no uncommitted weirdness, what is/isn't included.

    Show working prompt
    Before anything destructive, snapshot the state:
    
    1. Call `inspect_git_workdir` (or equivalent) for the current branch, dirty status, ahead/behind.
    2. Read the most recent commit messages on this branch to confirm scope.
    3. If the branch is `main` or the configured trunk, STOP and use `ask_user_question` — shipping straight to main needs explicit confirmation.
    4. If the working tree is dirty, ask whether to commit first or stash.
    
    Write the snapshot to task notes. Advance.
  2. Run testsdeveloper

    Run the project's test command. Branches on failure to a triage step; on success advances to the review pass.

    Show working prompt
    Run the `run-tests` script. It picks the project's primary test command (npm `test` script, `pnpm test`, etc.) and runs it. Output: `{ passed: boolean, summary: string }`.
    
    If passed: advance.
    If failed: write the failure summary to task notes and DO NOT proceed. Report DONE_WITH_CONCERNS with the failure summary — let the user fix and re-run.
  3. Self-review passreviewer

    Walk your own diff before opening the PR. Last chance to catch obvious mistakes.

    Show working prompt
    Read your own diff (`git diff @{u}...` or against the base branch). Look for:
    
    - Debug prints / console.log left in
    - Commented-out code
    - Filenames that don't match the rename you intended
    - Test files you forgot to commit
    - Migration files in the wrong direction
    
    If anything jumps out, fix it now via `writeFile` + commit. If clean, advance.
  4. Open PRdeveloper

    Push the branch + open the pull request.

    Show working prompt
    Run the `open-pr` script. It pushes the current branch (via `pushProjectGithub`-equivalent) and calls `github_pr_create` with a title derived from the most recent commit and a body that captures the scope.
    
    If the script returns an error (push rejected, branch already has an open PR, missing PAT), surface the message and stop here — don't try to guess past it.
  5. Wait for CIdeveloper

    Poll workflow runs / check status until the gate is green or fails.

    Show working prompt
    Run the `wait-checks` script with the branch name and a sensible timeout (default 10 minutes). It polls `github_workflow_runs` + `github_check_status` until the state settles to success / failure / timeout.
    
    While polling, do not chat — wait. When it returns:
    
    - `success`: advance to summary.
    - `failure`: write the failing checks to task notes; report DONE_WITH_CONCERNS.
    - `timeout`: report status, let the user decide whether to keep waiting.
  6. Summarydeveloper

    Stamp a final summary. PR opened, CI green, ready to merge.

    Show working prompt
    Write a one-paragraph DONE summary: PR number, URL, scope (one line), test result, CI verdict. Save to task notes. Report DONE.
  7. Halteddeveloper

    Something blocked the ship — tests, CI, or push. Report DONE_WITH_CONCERNS.

    Show working prompt
    Report DONE_WITH_CONCERNS with the specific failure surfaced upstream. Do not retry, do not push past — the user needs to see this and decide.

Triggers

Phrases that suggest this craftbook to a crew.

Source

View this craftbook on GitHub · MIT license