--- name: re0-release description: "Walk a pending change in the repository it runs in through that repository's release procedure end to end, then tag and publish once confirmed. User-invoked: run it when you've decided to ship." disable-model-invocation: true --- Ship a release of the repository this runs in, from gathering what it carries to the published tag. ## Goal A release lands complete and trustworthy: its procedure met, every manifest bumped by kind, house-style notes as the signed tag's message, and an artifact its workflow publishes. `re0-release` calls `sip` when installed, writes messages to the standard step 5 states, and never calls another user-invoked skill. Each step that commits or writes in public waits for its own approval (Rules). It is **user-invoked**: shipping is a deliberate human action, so only the human runs it. ## Workflow 1. **Gather the release.** - Read the owner, repository and default branch with `gh repo view --json nameWithOwner,defaultBranchRef`, else the default branch with `git symbolic-ref --short refs/remotes/origin/HEAD` (its `origin/` dropped), else ask; then that branch's rulesets (`gh api repos///rules/branches/`) and classic protection (`gh api repos///branches//protection`, a 404 meaning none). A rule read there that requires a pull request or reviews sets the pull-request path. Rules that cannot be read (a 403, an origin that is not GitHub or is a `file://` path, no `gh`) set the direct path. - The release branch carries the unreleased changes, and is checked out. On the pull-request path it is the head of the current branch's open pull request (`gh pr view --json number,headRefName,baseRefName`), else of the one open pull request against the default branch (`gh pr list --base --state open --json number,headRefName,title`), which step 8 names; with several, ask which carries the release before drafting anything. With none, or on the direct path, it is the default branch, up to date with its remote. - The release is every change on the release branch since the last release tag (`git describe --tags --abbrev=0 --match 'v*'`, then `git log ..HEAD` and `git diff `), from the first commit where there is no tag, plus the pending diff. The bump, the notes, the credits and the release commit's message are drafted from that range. - The procedure is the repository's own: the Shipping and Releasing sections of its root `AGENTS.md`, else its `CONTRIBUTING.md`, else none, said and passed. Check each requirement it states on the release's state (a roster, a manifest, a translation); an unmet one is a gap, reported and repaired only once the human authorizes the repair, never set aside. An action it describes is done by the step below that does it, in the repository's wording where the two differ, and step 8 shows the difference. A file named below that the repository lacks is skipped. - A file in the pending diff that belongs to another change or author is excluded once its recorded owner (its commits, a TODO entry, a coordination note) has been read; step 8 shows the exclusion. 2. **Classify the bump** once every open question bearing on what ships is answered (a contract question, a behavior obligation the release would lose); until then, report it and name no version. A lost obligation blocks the release until it is restored or the human rules on it. Classify by kind, never size: a fix of wrong behavior, or a docs-only change, is patch; a new capability a user reaches for, a correct but narrower behavior widened included, is minor; a removal with no replacement is major. State the case; only a minor or major release carries `### New`. 3. **Taste-test.** Call the Skill tool with "sip", or, on a host with no Skill tool, read `sip`'s `SKILL.md` and follow it; when `sip` is not installed, say so. Its findings join step 8 unapplied, each with the output that shows it; never claim a review it did not visibly run. 4. **Plan the bump and checks.** List every manifest that carries the version: `package.json` with its lockfile, set through the package manager (`npm version X.Y.Z --no-git-tag-version`), and plugin manifests such as `.claude-plugin/plugin.json`, where present. Name the checks: the commands the repository's CI runs, else its documented ones (in paperthin, `npm test` and `npm run check`); with neither, step 8 says so. Both run after step 8's approval. 5. **Draft the messages** to the commit-message standard: the local log's shape, or, absent one, a subject plus one `-` bullet per durable change on a single unwrapped line; supporting edits folded in; nothing the diff or version already proves; no co-author tag except a closing `Co-authored-by` trailer crediting a human contributor on a squashed or carried contribution. A pending change and its bump go in one release commit, never split; only when every change in the range is already committed does it carry the bump alone. On the pull-request path every commit in the range lands as it is, so each one meets the standard, and one that does not goes to step 8 for `/re0-git`; the release commit is the head that lands the pull request, so its subject names the release (in paperthin, `chore(release): ship paperthin X.Y.Z with `), the pull request's title is that subject, and where the repository's commit form names the pull request (in paperthin, ` (#)`), the subject ends with it once the pull request has a number, its digits counted within the repository's limit (72 characters in paperthin). Cleanup of an existing commit goes to the human as `/re0-git`, never called here. 6. **Write the release notes** to `.re0/release/RELEASE_NOTES.local.md`, scratch that becomes the signed tag's message, never committed. Where `git check-ignore -q` finds that path not ignored, add `.re0/` to the file `git rev-parse --git-path info/exclude` names. The house style; `scripts/notes.mjs` decides each *(checked)* rule, and you each *(judgment)* one: - one `##` heading with no version number (`X.Y.Z`) in it *(checked)*, naming the release's durable idea *(judgment)*; - one paragraph on one line after it *(checked)*, short and present-tense, saying what is true now *(judgment)*; - sections in this order, each at most once: `### New` (or `### New: