diff --git a/.claude/skills/prerelease-notes/SKILL.md b/.claude/skills/draft-release-notes/SKILL.md similarity index 58% rename from .claude/skills/prerelease-notes/SKILL.md rename to .claude/skills/draft-release-notes/SKILL.md index 4c210b5f3..c3b5be10a 100644 --- a/.claude/skills/prerelease-notes/SKILL.md +++ b/.claude/skills/draft-release-notes/SKILL.md @@ -1,34 +1,52 @@ --- -name: prerelease-notes -description: Draft the GitHub release notes for a RomM alpha.1 or beta.1 prerelease from the diff since the last stable tag, in the house format the published RomM releases use. Use when asked to "draft the 5.3.0-alpha.1 notes", "write the prerelease notes", "what goes in the beta notes", or to refresh a draft after more PRs land. Produces callouts, Highlights, Minor changes, Fixes, Other changes, API changes and New Contributors, and never publishes. -argument-hint: "[tag to draft, e.g. 5.3.0-alpha.1 | nothing to infer it]" +name: draft-release-notes +description: Draft the GitHub release notes for a RomM release, stable or alpha/beta prerelease, from the diff since the previous stable tag, in the house format the published RomM releases use. Use when asked to "draft the 5.3.0 notes", "write the release notes for the beta", "what goes in the 5.3.0-alpha.1 notes", or to refresh a draft after more PRs land. Produces callouts, Highlights, Minor changes, Fixes, Other changes, API changes and New Contributors, and never publishes. +argument-hint: "[tag to draft, e.g. 5.3.0 or 5.3.0-alpha.1 | nothing to infer it]" --- -# Drafting alpha/beta release notes +# Drafting release notes -Turn a tag range into the notes RomM actually publishes. The GitHub autogenerated -list is raw material, not the deliverable: the published notes reorganize it into -sections, lift the few changes that matter into prose Highlights, and add the -callouts an upgrader needs before they pull the image. +Turn a tag range into the notes RomM actually publishes, for a stable release or +for an alpha/beta prerelease. The GitHub autogenerated list is raw material, not +the deliverable: the published notes reorganize it into sections, lift the few +changes that matter into prose Highlights, and add the callouts an upgrader needs +before they pull the image. Output a markdown file and print it. **Never** run `gh release create` or `gh release edit`. Publishing is the maintainer's call. --- -## 1. Resolve the range +## 1. Pick the shape + +Two documents exist, and the tag decides which one you are writing. + +| Tag | Document | +| --------------------------------------------------- | ------------------------------------- | +| `X.Y.Z`, `X.Y.Z-alpha.1`, `X.Y.Z-beta.1` | the full treatment, sections 3 onward | +| `X.Y.Z-alpha.2` and later, `X.Y.Z-beta.2` and later | flat `## What's Changed` | +| a stable patch with no `feat:` work | flat `## What's Changed` | + +This is what the history does without exception: every `.1` prerelease and every +feature-carrying stable gets Highlights and partitioned bullets, while every +later prerelease in the same line is a plain list of what landed since. The flat +shape is just the autogenerated body with `## New Contributors` and the compare +link kept, so for those tags steps 4 through 6 do not apply. + +## 2. Resolve the range `$ARGUMENTS` is the tag being drafted. If it is empty, infer it: take the last stable tag, bump minor for a range containing `feat:` work or patch otherwise, and say which you picked so it can be corrected. -The base is always **the last stable tag**, never the preceding prerelease. A -`5.1.0-beta.1` is drafted against `5.0.0`, the same base its own alpha used, so -the beta is a superset of the alpha rather than a delta on top of it. +The base is **the stable tag below the release line**, for a stable release and a +prerelease alike, so a whole line accumulates against one base. `5.1.0-alpha.1`, +`5.1.0-beta.1` and `5.1.0` all compare against `5.0.0`, which makes each document +a superset of the one before it rather than a delta on top of it. ```bash -TAG=5.3.0-alpha.1 # what you are drafting -LINE=${TAG%%-*} # 5.3.0, the stable version this line becomes +TAG=5.3.0-alpha.1 # what you are drafting, stable or prerelease +LINE=${TAG%%-*} # 5.3.0, the stable version of this line git fetch origin master --tags # the stable tag immediately below $LINE. Numeric tags only, since the legacy @@ -46,10 +64,11 @@ git diff --stat $RANGE | tail -20 ``` Sanity-check the pair before going further. `$BASE` should equal the tag in the -previous release's compare link, and if `$LINE` is already tagged stable while -`$TAG` is not, then `$TAG` is wrong: stop and confirm the version. +previous release's compare link. If `$TAG` is a prerelease and `$LINE` is already +tagged stable, the line has shipped and `$TAG` is wrong: stop and confirm the +version. -## 2. Pull the raw material +## 3. Pull the raw material The autogenerated list is the spine. Its **order is merge order, keep it** when you partition lines into sections, and keep each line's `by @user in ` tail @@ -88,7 +107,7 @@ For each candidate Highlight, read the PR itself rather than paraphrasing its title: `gh pr view --json title,body,author`. The prose in the notes is usually a compression of the PR description. -## 3. Assemble the document +## 4. Assemble the document Follow `template.md` in this skill directory for the exact skeleton. Sections in this order, all optional except the last two: @@ -104,11 +123,15 @@ this order, all optional except the last two: | `## New Contributors` | verbatim from the autogenerated body | | `**Full Changelog**` | verbatim from the autogenerated body | -**Small patch prereleases skip all of it.** Under roughly eight PRs with no -`feat:`, publish a single flat `## What's Changed` list plus the changelog link, -the way `4.9.1-beta.1` did. Do not manufacture Highlights for a bugfix release. +Which of the two optional tables you carry depends on the line, not on whether +the tag is stable. See section 6. -## 4. Section rules +**A patch release skips all of it**, stable or prerelease. Under roughly eight +PRs with no `feat:`, publish a single flat `## What's Changed` list plus the +changelog link, the way `4.9.1-beta.1` and `4.9.1` both did. Do not manufacture +Highlights for a bugfix release. + +## 5. Section rules **Highlights.** Three to eight for a minor line, zero for a patch line. A change earns one only if it changes what a user can do or how they run RomM: a new @@ -150,26 +173,52 @@ Env vars go in a table with `variable | default | description`; API changes in a table with `Change | Description` for edits, and `Method | Path | Description` for a new endpoint group. Prefix a breaking entry with `⚠️`. -## 5. alpha.1 versus beta.1 +## 6. Prerelease versus stable + +The three documents on a line are the same document, regenerated over a range +that keeps growing against a fixed base. Each one starts as its predecessor, not +as a blank page, so open the previous one's body and edit that: + +```bash +# the release before $TAG on this line: its alpha.1, or its last full beta +gh release view 5.1.0-beta.1 --json body --jq .body +``` - **alpha.1** opens the line. Put the env var and API tables in one `> [!NOTE]` block at the top, where the third-party app developers reading the alpha will see them first. -- **beta.1** regenerates over the same base, so it is the alpha's notes plus - everything merged since. Carry the alpha's Highlights across verbatim unless - the feature changed, add the new ones, and fold in any warning that alpha - feedback produced. Once the API table runs past roughly fifteen rows, move it - to the bottom inside `

API changes

`, since - by the beta most readers are upgraders rather than integrators. +- **beta.1** is the alpha's notes plus everything merged since. Carry the alpha's + Highlights across verbatim unless the feature changed, add the new ones, and + fold in any warning that alpha feedback produced. Once the API table runs past + roughly fifteen rows, move it to the bottom inside + `

API changes

`, since by the beta most + readers are upgraders rather than integrators. +- **the stable release** is the last full-treatment prerelease's notes plus + everything merged during the beta. Two things change: -## 6. Before handing it over + **Re-curate the Highlights.** They are not carried over untouched. Going from + `5.0.0-beta.1` to `5.0.0`, four were added (CRT mode, server-side ROM patching, + the permission system, the music player), three were dropped, and three were + renamed, "A brand-new frontend" becoming "UI overhaul". Pick what the finished + release is about, not what the beta was about. + + **Drop the tables a prerelease already published.** The API table is for the + developers tracking the line, and they read it in the alpha. `5.1.0`, `5.0.0`, + `4.9.0` and `4.8.0` all dropped theirs; `5.2.0` kept one only because its line + shipped no prerelease that carried it. Keep the env var table when it grew + during the beta, as `5.1.0` did going from three variables to seven, since a + reader upgrading straight from the last stable has seen none of them. + +## 7. Before handing it over - Every PR in `/tmp/raw-notes.md` is accounted for exactly once, either as a Highlight or as a bullet, never both and never dropped. - Every `#NNNN` in the Highlights resolves to a PR in the range. -- Every new env var found in step 2 is documented, and every route change too. +- Every new env var found in step 3 is documented, and every route change too. - A migration in the range means you have checked whether it needs a warning. -- The `**Full Changelog**` compare link ends in the tag you are drafting. +- The `**Full Changelog**` compare link ends in the tag you are drafting. Editing + a prerelease's body into a stable one makes this easy to miss: `4.9.0` shipped + pointing at `4.8.1...4.9.0-beta.1`. - No em-dashes, no invented screenshot URLs, no marketing claims the diff does not support. diff --git a/.claude/skills/prerelease-notes/template.md b/.claude/skills/draft-release-notes/template.md similarity index 76% rename from .claude/skills/prerelease-notes/template.md rename to .claude/skills/draft-release-notes/template.md index 24426daee..bb898f518 100644 --- a/.claude/skills/prerelease-notes/template.md +++ b/.claude/skills/draft-release-notes/template.md @@ -4,14 +4,18 @@ > [!WARNING] diff --git a/CLAUDE.md b/CLAUDE.md index ceb345917..faceaf031 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -50,7 +50,7 @@ These live in `.claude/skills/` and carry the detailed rules. Invoke the one tha | `review-polish` | Before committing / opening a PR / declaring done - the self-review pass (comments, duplication, naming, test typing) plus the checks that keep CI green. | | `security-audit` | Vetting a diff (release tag range or PR) for anything malicious or a security regression - supply chain, egress, auth/injection, CI, provenance. | | `pr-ready` | Before opening a PR - the four passes in order: `security-audit`, `code-review xhigh --fix`, `simplify`, `review-polish`. Not auto-invoked. | -| `prerelease-notes` | Drafting the GitHub release notes for an alpha.1 / beta.1 prerelease from the diff since the last stable tag. | +| `draft-release-notes` | Drafting the GitHub release notes for a release, stable or alpha/beta, from the diff since the previous stable tag. | ---