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### Changedwith the prefixBREAKING:in its changeset. - From
1.0.0on, 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 versionchanges a version number. Do not edit aversionfield by hand. pnpm version-packagesrunschangeset version, thenscripts/plugin-manifests.mjs --write, which copies the plugin version into.claude-plugin/plugin.jsonand 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-verifyor by editing CI is not allowed.
4. Changelog
- Each package’s
CHANGELOG.mdis generated only bychangeset version. Never hand-edit it. - The root
CHANGELOG.mdis the project changelog. Authors write its[Unreleased]entries by hand, under the contract inchangelog.md, andpnpm check:changelogvalidates it.changeset versiondoes 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, orSecurity. 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:pluginsfails ifplugin.jsonor 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 withnode scripts/publish-local.mjs --package <dir> --confirm. This is the only release path. npm trusted publishing (OIDC) is not required. Do not runpnpm 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
--confirmis run. The maintainer records the approval indocs/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_TOKENenvironment 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 gateon the release commit (section 8). The script runs build, typecheck, test,check:publishableandcheck:plugins, but it does not run the Docker gate or check the branch. If the published commit differs from the commit that passedpnpm gate, the handoff must say why. - Each release gets a git tag.
scripts/publish-local.mjscreates the annotated tag<name>@<version>on the published commit after a successful publish. Add--push-tagto push it toorigin; 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.0scaffolds) must not be published before their epic’s first release. Mark them"private": trueuntil 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, andpnpm check:pluginson the release commit. - No release without a passing
docker buildof the rootDockerfileand a cleandocker runof the resulting image.pnpm gateruns both on a Docker host and is the gate until CI can run. The CIdockerjob runs the same checks once Actions is available. - No release that ships a license other than the one in
LICENSE.