Release
Manage semantic versioning and Keep a Changelog formatted release notes.
Commands
/release bump <level> — Bump the version (major, minor, patch)
/release changelog — Generate or update CHANGELOG.md
/release tag — Create a git tag for the current version
/release (no subcommand) — Show current version and unreleased changes
/release bump
Bump the project version following semver.
Input: /release bump <major|minor|patch> or just /release bump to be asked.
Steps:
Detect project type and locate the version source:
mix.exs → look for version: "x.y.z" in project/0
package.json → look for "version": "x.y.z"
VERSION file → plain x.y.z string
- If multiple exist, prefer
mix.exs > package.json > VERSION
If no level argument provided, ask using AskUserQuestion:
- Show current version
- Offer major/minor/patch with descriptions of what each means
Calculate the new version per semver:
- major: increment major, reset minor and patch to 0
- minor: increment minor, reset patch to 0
- patch: increment patch
Update the version in the source file using Edit tool
Report: Version bumped: x.y.z → x.y.z
Do NOT commit, tag, or modify CHANGELOG.md — those are separate commands.
/release changelog
Generate or update CHANGELOG.md using Keep a Changelog format.
See references/keepachangelog.md for format details.
Input: /release changelog or /release changelog "manual description of changes"
Steps:
Read the current version from the version source (same detection as bump)
Read existing CHANGELOG.md if present. If not, create one with the header:
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
Gather changes — use BOTH sources, merging results:
a. Git commits: Find the last version tag (vX.Y.Z or X.Y.Z format):
git tag --sort=-v:refname | head -20
Then get commits since that tag:
git log <last-tag>..HEAD --pretty=format:"%s" --no-merges
If no tags exist, use all commits.
b. Manual input: If the user provided a description argument, incorporate it.
If git history is empty or unclear, ask the user to describe changes.
Categorize entries using conventional commit prefixes (see reference file for mapping).
For non-conventional commits, use best judgment to categorize, or ask the user.
Write the changelog entry:
- If an
[Unreleased] section exists with content, move its entries into the new version section
- Insert the new
## [x.y.z] - YYYY-MM-DD section after [Unreleased]
- Add/update comparison links at the bottom of the file
- Omit empty sections (don't add
### Removed if nothing was removed)
Detect the git remote to format comparison links:
git remote get-url origin
Generate GitHub/GitLab style links. If no remote, omit links.
Show the user the generated entry for review before writing.
/release tag
Create an annotated git tag for the current version.
Steps:
Read the current version from the version source
Check that the working tree is clean:
git status --porcelain
If dirty, warn the user and ask whether to proceed
Check that the tag doesn't already exist:
git tag -l "vX.Y.Z"
If it exists, inform the user and stop
Extract the current version's changelog entry from CHANGELOG.md for the tag message.
If no changelog entry exists, use a simple message.
Create the annotated tag:
git tag -a "vX.Y.Z" -m "<changelog entry or version string>"
Report the created tag. Ask before pushing:
git push origin "vX.Y.Z"
Do NOT push without explicit user confirmation.
/release (no subcommand)
Show release status: current version, last tag, and unreleased changes.
Steps:
- Read current version from version source
- Find the latest git tag:
git tag --sort=-v:refname | head -1
- Count commits since last tag:
git rev-list <tag>..HEAD --count
- Show a brief summary of unreleased commits grouped by type
- If
[Unreleased] section exists in CHANGELOG.md, show its contents
Guardrails
- Never modify version files without the user invoking
/release bump
- Never push tags without explicit user confirmation
- Never delete or overwrite existing changelog entries — only add new ones
- Preserve all existing content and formatting in CHANGELOG.md
- Use
v prefix for git tags (e.g., v1.2.3) — this is the most common convention
- Dates in changelog always use ISO 8601 (YYYY-MM-DD)
1---2name: release3description: Manage semantic versioning, changelogs, and git tags for releases. Supports Elixir/Mix (mix.exs), Node (package.json), and generic (VERSION file) projects. Use when the user says '/release bump', '/release changelog', '/release tag', '/release', 'bump version', 'create release', 'update changelog', 'tag release', 'prepare release', 'what version', or needs help with semantic versioning and release management.4---56# Release78Manage semantic versioning and Keep a Changelog formatted release notes.910## Commands1112- **`/release bump <level>`** — Bump the version (major, minor, patch)13- **`/release changelog`** — Generate or update CHANGELOG.md14- **`/release tag`** — Create a git tag for the current version15- **`/release`** (no subcommand) — Show current version and unreleased changes1617## `/release bump`1819Bump the project version following semver.2021**Input**: `/release bump <major|minor|patch>` or just `/release bump` to be asked.2223**Steps**:24251. Detect project type and locate the version source:26 - `mix.exs` → look for `version: "x.y.z"` in `project/0`27 - `package.json` → look for `"version": "x.y.z"`28 - `VERSION` file → plain `x.y.z` string29 - If multiple exist, prefer `mix.exs` > `package.json` > `VERSION`30312. If no level argument provided, ask using AskUserQuestion:32 - Show current version33 - Offer major/minor/patch with descriptions of what each means34353. Calculate the new version per semver:36 - **major**: increment major, reset minor and patch to 037 - **minor**: increment minor, reset patch to 038 - **patch**: increment patch39404. Update the version in the source file using Edit tool41425. Report: `Version bumped: x.y.z → x.y.z`4344**Do NOT** commit, tag, or modify CHANGELOG.md — those are separate commands.4546## `/release changelog`4748Generate or update CHANGELOG.md using Keep a Changelog format.49See [references/keepachangelog.md](references/keepachangelog.md) for format details.5051**Input**: `/release changelog` or `/release changelog "manual description of changes"`5253**Steps**:54551. Read the current version from the version source (same detection as bump)56572. Read existing `CHANGELOG.md` if present. If not, create one with the header:58 ```markdown59 # Changelog6061 All notable changes to this project will be documented in this file.6263 The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),64 and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).65 ```66673. Gather changes — use BOTH sources, merging results:6869 a. **Git commits**: Find the last version tag (`vX.Y.Z` or `X.Y.Z` format):70 ```bash71 git tag --sort=-v:refname | head -2072 ```73 Then get commits since that tag:74 ```bash75 git log <last-tag>..HEAD --pretty=format:"%s" --no-merges76 ```77 If no tags exist, use all commits.7879 b. **Manual input**: If the user provided a description argument, incorporate it.80 If git history is empty or unclear, ask the user to describe changes.81824. Categorize entries using conventional commit prefixes (see reference file for mapping).83 For non-conventional commits, use best judgment to categorize, or ask the user.84855. Write the changelog entry:86 - If an `[Unreleased]` section exists with content, move its entries into the new version section87 - Insert the new `## [x.y.z] - YYYY-MM-DD` section after `[Unreleased]`88 - Add/update comparison links at the bottom of the file89 - Omit empty sections (don't add `### Removed` if nothing was removed)90916. Detect the git remote to format comparison links:92 ```bash93 git remote get-url origin94 ```95 Generate GitHub/GitLab style links. If no remote, omit links.96977. Show the user the generated entry for review before writing.9899## `/release tag`100101Create an annotated git tag for the current version.102103**Steps**:1041051. Read the current version from the version source1061072. Check that the working tree is clean:108 ```bash109 git status --porcelain110 ```111 If dirty, warn the user and ask whether to proceed1121133. Check that the tag doesn't already exist:114 ```bash115 git tag -l "vX.Y.Z"116 ```117 If it exists, inform the user and stop1181194. Extract the current version's changelog entry from CHANGELOG.md for the tag message.120 If no changelog entry exists, use a simple message.1211225. Create the annotated tag:123 ```bash124 git tag -a "vX.Y.Z" -m "<changelog entry or version string>"125 ```1261276. Report the created tag. Ask before pushing:128 ```bash129 git push origin "vX.Y.Z"130 ```131132**Do NOT** push without explicit user confirmation.133134## `/release` (no subcommand)135136Show release status: current version, last tag, and unreleased changes.137138**Steps**:1391401. Read current version from version source1412. Find the latest git tag: `git tag --sort=-v:refname | head -1`1423. Count commits since last tag: `git rev-list <tag>..HEAD --count`1434. Show a brief summary of unreleased commits grouped by type1445. If `[Unreleased]` section exists in CHANGELOG.md, show its contents145146## Guardrails147148- Never modify version files without the user invoking `/release bump`149- Never push tags without explicit user confirmation150- Never delete or overwrite existing changelog entries — only add new ones151- Preserve all existing content and formatting in CHANGELOG.md152- Use `v` prefix for git tags (e.g., `v1.2.3`) — this is the most common convention153- Dates in changelog always use ISO 8601 (YYYY-MM-DD)