Skip to content
Back to skills

Prepare Release

ASecurity

Use when cutting, tagging, or publishing a new Reactive Agents version, or when a release/publish run fails and needs resuming. Covers the tag-driven lockstep flow (scripts/release.ts + .github/workflows/publish.yml).

  • 33 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added October 11, 2026
ai-agentsbashreactnodegitapidocumentation

Works with

  • api

Security analysis

A92/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro shows the line behind each finding and how to fix it

Scanned December 5, 2026

npx -y skills add tylerjrbuell/reactive-agents-ts --skill prepare-release --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Prepare Release?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Prepare Release
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tylerjrbuell-prepare-release/badge)](https://www.skillsdirectory.com/skills/tylerjrbuell-prepare-release)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: prepare-release
description: Use when cutting, tagging, or publishing a new Reactive Agents version, or when a release/publish run fails and needs resuming. Covers the tag-driven lockstep flow (scripts/release.ts + .github/workflows/publish.yml).
argument-hint: [vX.Y.Z]
---

# Prepare Release: $ARGUMENTS

## Mental model — read this first

Release is **tag-driven lockstep**. One version number stamps **all** public
packages. The release mechanism is `scripts/release.ts`, run by
`.github/workflows/publish.yml` when you push a `vX.Y.Z` tag.

- **Changesets are notes, not the driver.** `bun run changeset` only writes
  `.changeset/*.md` prose. `release.ts` aggregates those into root
  `CHANGELOG.md` under `## [<version>] — <date>` and deletes them at release
  time.
- **Do NOT hand-edit `CHANGELOG.md`.** It is generated. Curate the wording in
  the changeset `.md` body instead.
- **No release-notes files.** The GitHub Release
  (auto-created from the CHANGELOG section) is the announcement.
- **`publish.yml` is the sole GitHub Release author.** release-drafter was
  removed — there is no parallel PR-label draft. The published release body =
  a short header plus the `## [<version>] — <date>` CHANGELOG section, cut at
  a line under GitHub's 125000-char limit (`scripts/release-notes.ts`).
- **No changesets/action, no "Version Packages" PR.** That flow was removed.
  Pushing the tag is the entire trigger.
- **Drift is impossible by construction** — there is nothing to reconcile and
  no `check:versions` / `check-npm-versions` step anymore. Don't look for them.

## Step 0: Gather release context (wiki orient)

```
claude-obsidian:wiki-query "completed plans since <last-release-date>"
claude-obsidian:wiki-query "debriefs <package-or-feature-area>"
```
High-volume cycle (>20 plans/debriefs): `claude-obsidian:wiki-fold wiki/Research/Debriefs` first, then draft from the fold.

Sources: `wiki/Planning/Planning-Index.md`, `wiki/Research/Debriefs/`, `wiki/Decisions/Decision Index.md`, `wiki/Failure-Modes/`, `wiki/Issues/Running Issues Log.md`.

## Step 1: Pre-flight gate — all must pass

```bash
bun run build              # all packages, 0 errors
bun run test               # 0 failures (turbo; never pipe it)
bun run typecheck          # 0 errors; then: bun run repo check --all (docs drift, skills, placement)
```
**Hard stop on any failure.** Fix before continuing.

## Step 2: Identify changes since last release

```bash
git describe --tags --abbrev=0                                   # last tag
git log $(git describe --tags --abbrev=0)..HEAD --oneline        # commits
git diff $(git describe --tags --abbrev=0)..HEAD --name-only    # feed to: bun run repo scope <files> (owners + docs touched)
```

## Step 3: Audit documentation

Run the `update-docs` skill against changes since last release. Verify AGENTS.md / README.md test-count and package-count claims still match reality. Verify changed public APIs (`git diff <lasttag>..HEAD -- packages/*/src/index.ts | grep '^+export'`) are documented. Fix stale docs before proceeding.

## Step 4: Author the change notes (changeset)

```bash
bun run changeset
```
Choose the bump for the **note's** semver intent:

| Change type | Bump |
|---|---|
| Bug fix, internal refactor, perf | `patch` |
| New feature / package / builder method | `minor` |
| Breaking API change, removed export | `major` |

The changeset `.md` **body becomes the public changelog text verbatim** (its
frontmatter is stripped). Write it as the user-facing note: what changed, which
package, migration if breaking. This is the only place you curate prose.

> Lockstep note: every public package ships at the same tag version regardless
> of per-changeset bump. The bump type informs the note; it does not produce
> independent package versions.

## Step 5: Decide the version number

You choose the explicit version — it is the git tag, the single source of
truth. There is no tool that computes it for you (by design).

## Step 6: Dry-run gate (no mutation, no npm)

```bash
bun run release:dry <version>          # e.g. bun run release:dry 0.11.0
```
Confirms package discovery (expect ~35 public), topological publish order,
already-published classification, and changeset note count. Mutates nothing.

Optional full local confirm (stamps + builds, stops before npm):

```bash
bun scripts/release.ts <version> --no-publish
git restore .            # revert stamped versions + CHANGELOG + consumed changesets
```

### Step 6b: First publish of a new package name

`release.ts` publishes with `npm publish --access public` and stops at the first failure, so a refused
**new** name leaves earlier packages already at the new version. Before tagging, list public packages
that do not exist on npm yet:

```bash
for d in packages/*/; do n=$(node -p "require('./$d/package.json').private ? '' : require('./$d/package.json').name"); \
  [ -n "$n" ] && ! npm view "$n" name >/dev/null 2>&1 && echo "NEW: $n"; done
```

For each `NEW:` name, the **owner** decides how it gets created (agents never `npm publish`). The
precedent is `@reactive-agents/judgment`: a `0.0.0-stage` placeholder published by the owner before
the v0.17.0 tag, then the CI token published 0.17.0 over it. Packages first published in May
(`compose`, `observe`, `replay`, `diagnose`) were created by CI directly, so whether the current
`NPM_TOKEN` can create names depends on how the token was issued (a granular token limited to selected
packages cannot). Letting CI try is safe: publish order is topological, so a refused new name stops the
run before its dependents (`runtime`, `reactive-agents`), `npm i reactive-agents` keeps resolving the
previous release, and re-running `bun scripts/release.ts <version>` resumes after the fix. Record the
decision in the release audit and watch the publish run.

## Step 7: Push `main`, then tag and push — this triggers the release

**Push `main` first, always — even if this repo's convention is normally
"push at release/tag time."** `publish.yml`'s post-publish sync step resets to
`origin/main` and reapplies only VERSION/CHANGELOG/package.json on top of it
(`git checkout -f -B main origin/main`, not the tag's own ancestry). If
`origin/main` is behind the tagged commit when the tag is pushed, that reset
discards every local commit made since the last push, and the sync commit
lands on stale history — a divergent-history mess to reconcile by hand
(2026-09-05 incident, v0.16.0). Confirm before tagging:

```bash
git push origin main
git merge-base --is-ancestor origin/main HEAD && echo "OK: origin/main is caught up"
```

```bash
git tag v<version>
git push origin v<version>          # e.g. git push origin v0.11.0
```
`publish.yml` then: the shared `./.github/actions/release-preflight` action
(install → build → typecheck → test → clean-install smoke → `release:dry`
gate) → `release.ts <version>` (aggregate CHANGELOG, consume changesets,
stamp all packages + root, build, publish in dependency order, fail-fast) →
sync VERSION/CHANGELOG to main → GitHub Release from the
`## [<version>] — <date>` CHANGELOG section (`scripts/release-notes.ts` cuts
it under GitHub's 125000-char limit) → `gh workflow run docs.yml --ref main
-f version=<version>` (docs deploy from main only; the github-pages
environment rejects tags).

**Before tagging, the release path has already run on `dev`.**
`release-rehearsal.yml` runs the same preflight action, then
`release.ts <next patch> --no-publish`, the release notes with the size check
and the docs build at that version: nightly, on dev pushes touching the
release path, or by hand. Check the latest run is green:

```bash
gh run list --workflow release-rehearsal.yml --branch dev -L 1
```

**A new or changed workflow trigger or deploy path is exercised with
`workflow_dispatch` on a branch before anything relies on it** (e.g.
`gh workflow run docs.yml --ref <branch>` builds the docs without deploying).
v0.19.1: a docs `tags:` trigger added the day before first ran at the tag,
was rejected by the github-pages environment and cancelled the main deploy.
`bun run repo check --all` lints workflows (`check-actionlint`) and pins
deploy invariants (`workflow-invariants`), but GitHub-side rules (environment
branch policies, token permissions) only show in a real run.

Manual fallback / resume: GitHub → Actions → "Publish to npm" →
`workflow_dispatch`, enter the version. Re-running is safe — already-published
packages are skipped (idempotent), so a partial failure resumes cleanly after
you fix the cause.

If npm published but the GitHub Release is missing (GH-release step flaked
after publish): GitHub → Actions → "Backfill GitHub Releases" →
`workflow_dispatch`. It recreates releases for every tag from its CHANGELOG
section. Idempotent (skips/updates existing).

## Step 8: Post-release — update memory

```markdown
## Current Status (<Month> <Day>, <Year>)
- **v<version> released** — <one-line summary>
```
Update `.agents/MEMORY.md` AND Claude project memory under
`~/.claude/projects/*/memory/` (keep both in sync — other agents read
`.agents/MEMORY.md`).

## Final checklist

- [ ] Build / test / typecheck green (Step 1)
- [ ] Docs audited, AGENTS.md & README counts current (Step 3)
- [ ] Changeset authored with user-facing prose (Step 4)
- [ ] `release:dry <version>` clean (Step 6)
- [ ] Latest "Release Rehearsal" run on `dev` green; any changed workflow trigger exercised by `workflow_dispatch` on a branch (Step 7)
- [ ] `main` pushed and `origin/main` confirmed caught up (Step 7, before tagging)
- [ ] Tag pushed; "Publish to npm" workflow green (Step 7)
- [ ] GitHub Release present with notes
- [ ] `.agents/MEMORY.md` + Claude memory updated (Step 8)

## Common mistakes

| Mistake | Reality |
|---|---|
| Hand-editing `CHANGELOG.md` | `release.ts` generates it; manual edits collide. Edit the changeset `.md` instead. |
| Writing a release-notes file | None is used; the GitHub Release is the announcement. |
| Tagging before pushing `main` | The post-publish sync resets to `origin/main`, discarding any local commits main doesn't have yet. Push `main` first — see Step 7. |
| Waiting for a "Version Packages" PR | changesets/action was removed. Pushing the tag is the whole trigger. |
| Looking for a release-drafter draft | release-drafter was removed. `publish.yml` is the sole GitHub Release author. |
| `git tag` without `git push origin <tag>` | The tag push is what fires CI. A local tag releases nothing. |
| Looking for `check:versions` / drift scripts | Deleted — drift is structurally impossible in lockstep. |
| Running `release.ts` with no version arg | It requires an explicit semver and exits otherwise. |
| Adding a tag trigger to a deploy workflow | The github-pages environment admits branch `main` only; the tag run is rejected (v0.19.1). `publish.yml` redeploys the docs from main. `workflow-invariants` fails on it. |
| Editing a preflight step in `publish.yml` | The steps live in `.github/actions/release-preflight/action.yml`, shared with `release-rehearsal.yml`; `tools/repo/tests/release-rehearsal.test.ts` fails on a copy. |

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.