Description
What's the problem?
Our changelog and GitHub releases are mechanical. They're a list of conventional-commit subject lines with PR/commit links, e.g. v0.7.2:
### Bug Fixes
* **annotation:** confirm before discarding draft comments (#174) (becad44)
* **cli:** detect Homebrew cask installs on Intel macOS (#176) (1edd638)
That tells a reader what files moved, not what changed for them. The few releases that read well — v0.5.0, with the contextbridge open narrative — are ones where Ben hand-edited CHANGELOG.md after the fact. Hand-editing doesn't scale, and the hand-edits don't even reach the GitHub release body (see #111).
A related symptom: because the changelog is derived from commit prefixes, a stray feat: on something users will never see (e.g., a website-only copy change) becomes a "feature" in the release notes. That's happened to us recently.
Downstream, we want the same narrative content to show up in:
CHANGELOG.md- GitHub Releases (so the link from npm/install pages is worth clicking)
- A "What's new" section on the Astro website
- A post in the community Slack on each release
Today none of those exist as anything other than the mechanical list.
Proposed solution
Replace release-please with changesets. The defining feature is that PR authors write the release-note prose at PR time, in a small markdown file that ships with the PR. The release tool then assembles those snippets into the CHANGELOG, GitHub release, and version bump.
The author flow
-
Author makes a change in a branch.
-
Before opening the PR, they run
bun changeset(interactive CLI) or hand-create a file at.changeset/<random-name>.md:--- 'contextbridge': minor --- You can now annotate a file *and* a folder of files in the same session. PlanBridge will keep the unrelated annotations grouped by document so you can review them one by one.
-
The markdown body is the narrative — full sentences, written for users, no commit-message conventions.
-
The frontmatter declares the semver bump (
patch/minor/major). -
PR includes the
.changeset/*.mdfile. Thechangesets/actionGitHub Action comments on PRs that change source but don't include a changeset, nudging authors. (Configurable; we can exempt Dependabot, docs-only changes, etc.)
Changes that shouldn't appear in the changelog
Not every PR deserves a changelog entry — internal refactors, dev-tooling tweaks, CI fixes, website-only copy changes. Changesets supports this two ways:
bun changeset --emptycreates a.changeset/*.mdwith no semver bump and no body. The PR satisfies the bot ("there's a changeset"), but the next release doesn't get a CHANGELOG entry from it.- Ignore-list config (
ignorein.changeset/config.json, plus path-based exemptions in the bot). We can tell the changeset bot to never demand a changeset for PRs that only touchpackages/website,.github/, etc.
We'd document a short rule in the PR template: "if your change is user-visible, write a real changeset; if it isn't, an empty changeset is fine and explains why."
The release flow
The changesets/action is the equivalent of the release-please bot:
- On push to
main, the action looks for unreleased.changeset/*.mdfiles. - If any exist, it opens (or updates) a Version Packages PR that:
- Deletes the consumed
.changeset/*.mdfiles - Bumps
package.jsonversion - Prepends a new section to
CHANGELOG.mdbuilt from the changeset bodies
- Deletes the consumed
- When that PR is merged, the action tags + publishes the release (we wire it into our existing goreleaser job instead of npm publish).
- A separate workflow on
release: publishedfans the body out to:- The Astro website (commit a new
src/content/changelog/<version>.mdxvia PR) - The community Slack (incoming webhook)
- The Astro website (commit a new
Syncing the Claude plugin version
Today release-please's extra-files config keeps harnessIntegrations/claude/.claude-plugin/plugin.json in sync via $.version. Changesets does not have a first-class equivalent — see changesets#1166, open since 2023.
The supported pattern is to override the version input on changesets/action so it runs a wrapper instead of bare changeset version:
- uses: changesets/action@v1
with:
version: bun run version # wraps `changeset version` + sync step…where bun run version does changeset version && bun run sync-plugin-version, and sync-plugin-version is ~10 lines that reads the new package.json version and writes it into plugin.json. It's wiring we'd own, but it's mechanical and well-trodden — every JS project with multiple version files (docs sites with embedded version strings, generated version.ts files, etc.) does this same thing.
Pros
- Author writes the narrative once, at PR time, while the context is fresh — same time they'd write a PR description, so the marginal cost is low.
- CI enforces it: a PR without a changeset gets a bot comment. Chore/docs/Dependabot PRs can be exempted by config so we're not nagging on noise.
- Frontmatter-driven semver means the bump is explicit, not inferred from commit prefixes. A stray
feat:on a website-only change can't sneak into the release notes — there's no commit-prefix-to-changelog pipeline anymore. The author either writes a changeset (intentional) or doesn't (no entry). - The CHANGELOG entry is the GitHub release body — no divergence (closes docs: can release-please use the CHANGELOG.md content in the GitHub release? #111).
- Custom changelog formatter (
@changesets/changelog-githubor our owngetReleaseLine) gives us full control over the prose template and PR/contributor attribution. - Works fine for single-package repos despite changesets being monorepo-flavored — set a single entry in
packages.
Cons / tradeoffs
- Every meaningful PR needs an extra file. Friction for contributors and for our own Dependabot/CI-fix churn. Mitigation: bot-driven nag + ignore-list config; an empty changeset is one line.
- Conventional Commits stop driving the changelog. We can keep them as a commit-style convention, but the changelog no longer derives from them. Some contributors will write a great commit and forget the changeset; the nag bot is the safety net.
- Existing CHANGELOG.md history stays as-is. We don't rewrite the mechanical entries; we draw a line at the first changesets release and start fresh from there.
- Plugin-version sync is on us (see above). Not a blocker, but it's a piece of release plumbing we don't currently maintain.
Alternatives you considered
- Keep release-please, add a
.changes/<pr>.mdconvention. Smaller change: PR template gets a "Release notes" section, an action drops it into.changes/, a release-please hook prepends them above the auto-generated list. Downside: release-please's mechanical "Features / Bug Fixes" sections are still there underneath, so we're stacking narrative on top of noise rather than replacing it. - git-cliff with PR-body parsing. Most templating power, no author-side CLI — just a PR template convention. Downside: no built-in "release PR" flow like release-please / changesets have, so we'd either drive version bumps manually or pair it with another tool.
- Knope. Rust-based, has changeset-style files. Smaller JS ecosystem footprint and we'd be early adopters — probably not worth the risk over changesets.
- Do nothing structural; just hand-edit
CHANGELOG.mdmore aggressively post-release. This is the status quo. It produces good prose for big releases (v0.5.0) but rots immediately because the hand-edits never make it back to the GitHub release body (docs: can release-please use the CHANGELOG.md content in the GitHub release? #111).
Additional context
- Related: docs: can release-please use the CHANGELOG.md content in the GitHub release? #111 (asks the narrower question: "can the GitHub release use the hand-edited CHANGELOG?")
- Existing release config:
release-please-config.json,.github/workflows/release-please.yml - The website (
packages/website) is Astro + Starlight, so a "What's new" page is just an MDX collection — the release workflow would PR a new file into it.
Activity