Skip to content

Release: a skill that does the whole release, and a script that checks it went out - #129

Merged
dinooo13 merged 4 commits into
mainfrom
t3/126-release-skill
Nov 25, 2026
Merged

dinooo13 merged 4 commits into
mainfrom
t3/126-release-skill

Conversation

@dinooo13

Copy link
Copy Markdown
Owner

Closes #126

Why

The release pipeline exists (release.yml, release.sh, changelog.sh, appcast.sh, cask.sh), but nothing drove it end to end. Picking the version, previewing the notes, dispatching, following the run and checking what went out were all done by hand, and a failed cask bump even leaves the run green. Every release run was also titled just "Release", so the approval page did not say which version it would release.

Change

  • .claude/skills/release/SKILL.md: a project skill next to perf-report, for "release", "cut a release", "release 0.x.y" and "release as a draft". It runs these steps:

    1. The preflight.
    2. A version suggestion with its one-line reason and the changelog.sh notes. A minor when a subject adds something a user can newly do or set, a patch otherwise, never a major unless asked. It goes on without waiting, and a version named in the request wins.
    3. The dispatch, and finding the run.
    4. A wait until the run needs approval, and one line with the run's link.
    5. Following the run to the end.
    6. Reading a rejection, a refused check, a failed step or a cancel. On a rejection with another version named, it dispatches again with that version.
    7. check-release.sh.
    8. The Homebrew cask by hand, in two commands with the tap diff read between them, only when the bump failed.
    9. A report.

    Its rules say it never approves, rejects or bypasses a deployment by any route, never cancels or reruns a run, never deletes a release or tag, never reads the signing keys, and never launches, quits, updates or replaces a copy of Pladder.

  • scripts/check-release.sh <version>: read only. It prints one PASS/FAIL/SKIP line per named check, and the exit code is the contract (0 nothing failed, 1 a check failed, 2 usage or a missing tool). The checks:

    • release: the release v<version> exists, is titled "Pladder " and is not a pre-release.
    • latest: it is the latest release.
    • assets: Pladder.dmg, Pladder.dmg.sha256 and appcast.xml are attached and download.
    • sha256: the checksum file matches the downloaded DMG and GitHub's digest of it.
    • appcast: the feed names the version, the build (the commit count at the tag), this release's DMG URL and its length.
    • signature: the EdDSA signature verifies against SUPublicEDKey at the tag, with CryptoKit on macOS and OpenSSL 3 on Linux.
    • gatekeeper and staple: spctl accepts the DMG, and its notarisation ticket is stapled.
    • app: in the DMG, mounted read-only and hidden, the app has the version, the build and team V2KCT6R76J.
    • cask: the tap's cask names the version and the SHA-256.
    • latest-download: both releases/latest/download links resolve to this release.

    A draft skips latest, cask and latest-download, and Linux skips the three macOS checks; each skip is named.

  • scripts/release-preflight.sh [--force]: read only, apart from a fetch of main and the tags. It stops at the first STOP with exit 1:

    • not on the Mac, not on main, or not level with origin/main;
    • CI, Docs or Scripts not green on the head commit;
    • a Release run already open;
    • the last tag missing, only local, without a release, or an unpublished draft;
    • nothing the build reads changed since the last tag, unless --force.

    The source paths are read out of release.yml at HEAD, so the list is not copied a third time, and a reformatted workflow fails closed.

  • .github/workflows/release.yml: only run-name: Release ${{ inputs.version }}${{ inputs.draft && ' (draft)' || '' }}, so the approval page names the version.

  • CLAUDE.md, ## Ship only:

    • a Release bullet naming the skill, the approval as the maintainer's, and check-release.sh as the live check;
    • the After-merge sentence points to it;
    • the Verify bullet spells out the three doc checks, since a fourth check-*.sh now exists that CI does not run.
  • INSTALL.md, "Releasing": one paragraph on the skill and the two scripts.

  • .github/workflows/docs.yml: check-doc-commands.sh also reads .claude/skills/*/SKILL.md, so a script a skill names cannot disappear unnoticed.

The open questions from the plan, settled with its recommendation:

  • A draft exits 0, with its three skips and a summary that says "draft".
  • The Developer ID team is pinned as a constant.
  • A reviewer's rejection comment counts as the maintainer naming another version.
  • The preflight requires the Scripts workflow to be green as well as CI and Docs.
  • The Distribution row and the Commands block stay as they are.

Dropped: a shared path-list file read by ci.yml, release.yml and the preflight. It would change release.yml's check job, which cannot be exercised without a real run.

Verified

Nothing in this PR dispatched, approved, rejected or cancelled a run, or created, edited or deleted a release or tag, or pushed to the tap.

  • scripts/check-release.sh 0.2.1 on the Mac: 11 PASS, Pladder 0.2.1: 11 passed., exit 0. The signature check passed through CryptoKit, gatekeeper reported "Notarized Developer ID", and app read 0.2.1 (329) with team V2KCT6R76J.

  • The same on the code-box (Ubuntu): 8 PASS with the signature through OpenSSL 3.5.5, and 3 SKIP … needs macOS, exit 0.

  • scripts/check-release.sh 9.9.9: FAIL release no release v9.9.9 in dinooo13/pladder, exit 1.

  • scripts/check-release.sh 0.2.0: FAIL latest, cask and latest-download (all three point at 0.2.1), the other 8 PASS, exit 1.

  • A DMG with one byte flipped, through a scratch copy of the script: FAIL sha256 and signature on both systems. gatekeeper and app also failed on macOS, and nothing was left mounted.

  • scripts/release-preflight.sh in this worktree: STOP branch on t3/126-release-skill; a release starts from main, exit 1.

  • The preflight in a scratch --shared clone with a local bare origin:

    Head Result
    9e993e8, a commit whose Docs run failed STOP checks Docs ended failure on 9e993e8: …/runs/41363252951, exit 1
    the v0.2.1 commit STOP changes nothing the build reads changed since v0.2.1; --force releases anyway, exit 1
    the v0.2.1 commit, with --force Ready: 9692cfe, last tag v0.2.1., exit 0
    b5bce27 PASS changes 11 files the build reads changed since v0.2.1, Ready, exit 0
    one local commit ahead STOP up-to-date
    v0.2.1 tag deleted on the scratch origin STOP last-tag … a local tag origin does not have
    a tag v9.9.8 pushed to the scratch origin STOP last-tag v9.9.8 has no release …
  • actionlint .github/workflows/*.yml is clean, including the run-name line.

  • shellcheck scripts/*.sh is clean. Both new scripts answer --help, -h and x --help with their usage and exit 0, and scripts.yml's loop counts 14 scripts.

  • The doc checks pass: check-doc-pointers.sh (39 pointers), check-doc-commands.sh with the skills (68 script names, 18 commands), and check-site-numbers.sh.

  • No copy touched: pgrep -fl Pladder.app showed the same /Applications/Pladder.app PID before and after, and hdiutil info listed no Pladder image afterwards.

  • No Swift changed, so CI skips build-and-test.

Not checked, for a human (these need a real run)

  1. Title on the approval page. In a Claude Code session on the Mac, on main, ask to "release as a draft". The run waiting for release is titled "Release (draft)".
  2. Reject and ask for another version. Reject that run on the approval page and say "make it ". git ls-remote --tags origin shows no new tag, and a second run appears, titled with the other version.
  3. A checked draft. Approve the second run. The session ends with check-release.sh reporting a draft, with latest, cask and latest-download skipped, and the approval was the only human step. Then publish the draft, or delete it and its tag, by hand. After publishing, "check the release" should go through the cask-by-hand step.
  4. gh's behaviour that only a real run shows. That gh workflow run prints the run URL, that gh release view and gh release download serve a draft, and what a rejected run looks like through the approvals endpoint.
  5. From the issue. Check for Updates… and Install on an installed copy, and brew upgrade on a real Mac.

The maintainer's user settings already deny the REST and GraphQL routes to approving a deployment, as the issue asks. The GraphQL reject route is not in that list. The skill's rule covers it, but it could be added to permissions.deny as Bash(*rejectDeployments*).

Benchmark

No code on the release-to-paste path changed, so no benchmark.

Review loop

Reviewer Round 1 Round 2 Round 3
Claude Opus 5.5 (xhigh) CHANGES CHANGES APPROVE
Kimi K3.1 Pro (max) CHANGES APPROVE —

Fixed:

  • Round 1:
    • The fallback that finds the run missed a run its check had already ended.
    • An unsigned DMG or app aborted check-release.sh under pipefail instead of printing FAIL app.
    • The cask-by-hand step kept the tap path in a shell variable, which does not last from one command to the next. With an empty path, git -C "" would have committed in this checkout.
    • The preflight passed when there was no tag; it now stops then, and also on a tag without a release or an unpublished draft.
    • The tap diff may now also include what changed in scripts/pladder.rb.
    • A queued run's STOP line lost its URL, because an empty field between tabs was folded.
    • A failed run is now reported and stopped, not dispatched again on the skill's own, and a cancelled run is covered.
    • The wait for approval is one background command.
  • Round 2:
    • A run followed from the preflight may already be past its approval, so completed now goes to "when the run ends" instead of reading as a refused check.
    • The dispatch prints the time, so the run's createdAt can be checked against it.
    • The run lookup prints nothing when no run matches.
    • Only gh's "release not found" reads as "no release"; any other gh error is quoted as it is.
  • Round 3, a nit: the draft check passes only on a plain false. Anything else gh returns is a STOP.

🤖 Generated with Claude Code

dinooo13 and others added 4 commits November 25, 2026 21:46
Nothing checked a release once release.yml was green, and a failed cask
bump even leaves the run green. The script checks, one line each, the
release and its title, that it is the latest, its three files, the
SHA-256 three ways, the appcast's version, build, enclosure and length,
the EdDSA signature against SUPublicEDKey at the tag, Gatekeeper, the
staple, the app inside the read-only mounted DMG and its team, the tap's
cask, and the releases/latest/download links. A draft skips what only a
published release has; Linux skips what needs macOS and verifies the
signature with OpenSSL 3. The exit code is the contract.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A release should stop before anyone is asked to approve it: on another
branch, a checkout behind or ahead of origin/main, a head commit that is
not green in CI, Docs and Scripts, a Release run already open, a local
tag the remote no longer has, or nothing the build reads changed since
the last tag. The path list is read from release.yml at the head, so the
preflight and the workflow's own check cannot disagree.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The approval page showed only "Release", so the reviewer could not see
which version they were approving. Now it says "Release 0.3.0", with
"(draft)" for a draft: approving accepts that version, rejecting and
naming another changes it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The pipeline existed but nothing drove it end to end: the version, the
notes, the dispatch, following the run and checking what went out were
all by hand. The skill does them, and leaves the maintainer one step,
the approval of the release environment, which no agent takes by any
route. It touches no copy of Pladder on the Mac. Ship names the skill and
check-release.sh as the live check, INSTALL.md the two scripts, and
docs.yml now checks the scripts the skills name as it does CLAUDE.md's.

Closes #126.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dinooo13
dinooo13 merged commit a17126a into main Nov 25, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Release: a project skill that does the whole release, and a script that checks it went out

1 participant