Skip to content

Versioning, changelog, and release policy

This policy is binding for every package under packages/* and every plugin under plugins/*. CI enforces the rules marked enforced.

1. Versions

  • All versioned units use SemVer 2.0.0.
  • Before 1.0.0, a minor bump may contain breaking changes. Each one must be listed under ### Changed with the prefix BREAKING: in its changeset.
  • From 1.0.0 on, a breaking change requires a major bump. No exceptions.
  • A removed or renamed public export is breaking. Deprecate it in one minor release first, then remove it in a later one.
  • A version is never reused. A bad release is fixed by a new patch version, not by republishing.

2. Who changes versions

  • Only changeset version changes a version number. Do not edit a version field by hand.
  • pnpm version-packages runs changeset version, then scripts/plugin-manifests.mjs --write, which copies the plugin version into .claude-plugin/plugin.json and the marketplace entry.

3. Changesets are required

  • Enforced: every pull request that changes a versioned package or plugin must include a changeset. CI runs changeset status --since=origin/<base> and fails otherwise.
  • Describe user-visible changes only. Internal refactors that change no behavior may use pnpm changeset add --empty, which still satisfies the check.
  • Skipping the check with --no-verify or by editing CI is not allowed.

4. Changelog

  • Each package’s CHANGELOG.md is generated only by changeset version. Never hand-edit it.
  • The root CHANGELOG.md is the project changelog. Authors write its [Unreleased] entries by hand, under the contract in changelog.md, and pnpm check:changelog validates it. changeset version does not write it, because the root package is not a workspace package.
  • Each changeset summary is one line, starting with a category: Added, Changed, Deprecated, Removed, Fixed, or Security. These follow Keep a Changelog.
  • A security fix names its advisory ID, for example GHSA-xxxx-xxxx-xxxx.

5. Plugin versions

  • The plugin version lives in plugins/<name>/package.json, which Changesets bumps.
  • Enforced: pnpm check:plugins fails if plugin.json or the marketplace entry disagrees with that version, or if the marketplace points at a missing plugin.

6. Releases

  • Releases are cut from the release commit on main. A maintainer publishes from a local machine with node scripts/publish-local.mjs --package <dir> --confirm. This is the only release path. npm trusted publishing (OIDC) is not required. Do not run pnpm release (changeset publish): it uses npm’s own credentials, runs no gate, and publishes every public package whose version is not on npm.
  • Each version needs the maintainer’s approval before --confirm is run. The maintainer records the approval in docs/project/handoff.md, in the release state for that version. The script does not check it.
  • A local publish takes the npm token only from the NPM_SWARQ_TOKEN environment variable, and passes it only to npm commands. The token is never written to a file, committed, printed or pasted into chat. The script refuses a private package, a missing token, a dirty working tree, a failing check, or a version that already exists on npm.
  • Before a local publish, run pnpm gate on the release commit (section 8). The script runs build, typecheck, test, check:publishable and check:plugins, but it does not run the Docker gate or check the branch. If the published commit differs from the commit that passed pnpm gate, the handoff must say why.
  • Each release gets a git tag. scripts/publish-local.mjs creates the annotated tag <name>@<version> on the published commit after a successful publish. Add --push-tag to push it to origin; without it, the script prints the command to push by hand. A tag that already points elsewhere is refused, and tags are never moved or deleted once pushed.
  • Stub packages (the 0.0.0 scaffolds) must not be published before their epic’s first release. Mark them "private": true until then.

7. Release schedule

Each epic publishes a release schedule with target dates. The schedule lives in the epic body and in docs/project/handoff.md, and it is the reference for planning.

  • A code freeze falls five business days before each target date. After the freeze, only fixes and release-note work land.
  • A target date can slip. A slip is recorded in the epic and the handoff board, with the reason.
  • Patch releases are cut as needed for security or correctness fixes, outside the schedule.

8. Hard stops

  • No release without a passing pnpm build, pnpm typecheck, pnpm test, pnpm check:publishable, and pnpm check:plugins on the release commit.
  • No release without a passing docker build of the root Dockerfile and a clean docker run of the resulting image. pnpm gate runs both on a Docker host and is the gate until CI can run. The CI docker job runs the same checks once Actions is available.
  • No release that ships a license other than the one in LICENSE.