diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 178b7ee..22e496d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -35,8 +35,8 @@ merge the contribution. ## Versioning This plugin follows [semantic versioning] (`MAJOR.MINOR.PATCH`) in -`.claude-plugin/plugin.json`. Claude Code uses this version to determine -whether to update a cached plugin, so you must bump it when publishing changes. +`.claude-plugin/plugin.json`. Claude Code uses this version to decide whether +to update a cached plugin. [semantic versioning]: https://semver.org @@ -49,15 +49,37 @@ and a rewording can meaningfully change behavior. Here's how we apply semver: - **MINOR** — add a new skill or meaningfully update an existing one. - **PATCH** — fix typos, update descriptions, or make trivial adjustments. -Bump the version in `.claude-plugin/plugin.json` as part of your pull request, -and keep `.claude-plugin/marketplace.json` in sync — it carries the same version -in both its `metadata.version` and its `plugins[].version` fields. Once the PR is -merged, cut a release with the included binstub: +Merging to `main` doesn't ship anything. Each marketplace that lists this +plugin, like [thoughtbot/skills], pins it to a release tag, so users get a new +version only when we move that pin: - bin/release +```json +"source": { + "source": "github", + "repo": "thoughtbot/rails-consultant", + "ref": "v2.1.0" +} +``` -This reads the version from `plugin.json`, creates an annotated git tag, and -pushes it. +Feature pull requests don't touch the version. Add a note under +`## [Unreleased]` in `NEWS.md` and leave it there. + +To release: + +1. Open a pull request that bumps `version` in `.claude-plugin/plugin.json` and + renames `## [Unreleased]` in `NEWS.md` to `## [x.y.z] - YYYY-MM-DD`, with a + new, empty `## [Unreleased]` above it. Merge it. +2. On the merged `main`, run: + + bin/release + + This reads the version from `plugin.json`, creates an annotated `vx.y.z` tag, + and pushes it. + +3. Open a pull request in each marketplace setting this plugin's `ref` to + `vx.y.z`. + +[thoughtbot/skills]: https://github.com/thoughtbot/skills See [obra/superpowers] for a reference example of how a mature Claude Code plugin handles versioning, release notes, and git tags. diff --git a/NEWS.md b/NEWS.md index 439afd6..163cc64 100644 --- a/NEWS.md +++ b/NEWS.md @@ -13,6 +13,9 @@ - 5 eval graders no longer fail runs that did the right thing, per [#76](https://github.com/thoughtbot/rails-consultant/pull/76). They covered `/implement-with-tdd`, `/pr`, `/eli5`, `/rubber-duck`, and `/risk-score`. +- Merging to `main` no longer ships a release. Marketplaces pin this plugin to + a tag, and feature pull requests stop bumping the version. + [CONTRIBUTING.md](CONTRIBUTING.md#versioning) has the new release steps. ## [2.1.0] - 2026-11-06