Skip to content

Commit 9aa5105

Browse files
nanotaboadaclaude
andcommitted
chore(commands): add /prerelease, update /precommit CHANGELOG step
- Add .claude/commands/prerelease.md with full pre-release checklist - Remove "I must do this manually" from precommit CHANGELOG step — the agent handles it Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent c517668 commit 9aa5105

File tree

2 files changed

+43
-2
lines changed

2 files changed

+43
-2
lines changed

.claude/commands/precommit.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
Run the pre-commit checklist for this project:
22

3-
1. Remind me to update `CHANGELOG.md` `[Unreleased]` section (Added / Changed / Fixed / Removed) — I must do this manually.
3+
1. Update `CHANGELOG.md` `[Unreleased]` section — add an entry under the
4+
appropriate subsection (Added / Changed / Fixed / Removed) describing the
5+
changes made, referencing the issue number.
46
2. Run `uv run flake8 .` — must pass.
57
3. Run `uv run black --check .` — must pass (run `uv run black .` to auto-fix).
68
4. Run `uv run pytest --cov=./ --cov-report=term` — all tests must pass, coverage must be ≥80%.
79

8-
Run steps 2–4, report the results clearly, then propose a branch name and commit message for my approval using the format `type(scope): description (#issue)` (max 80 chars; types: `feat` `fix` `chore` `docs` `test` `refactor` `ci` `perf`). Do not create the branch or commit until I explicitly confirm.
10+
Run steps 1–4, report the results clearly, then propose a branch name and commit message for my approval using the format `type(scope): description (#issue)` (max 80 chars; types: `feat` `fix` `chore` `docs` `test` `refactor` `ci` `perf`). Do not create the branch or commit until I explicitly confirm.

.claude/commands/prerelease.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
Run the pre-release checklist for this project:
2+
3+
1. **Detect current release and propose next**: Read `CHANGELOG.md` for the
4+
coach naming convention (A–Z table) and the most recent release heading.
5+
Run `git tag --sort=-v:refname` to confirm the latest tag. Determine the
6+
next codename (next letter in the A–Z sequence after the current one) and
7+
infer the version bump from the `[Unreleased]` section: any entry marked
8+
BREAKING → MAJOR; entries under Added → MINOR; only Changed/Fixed/Removed
9+
→ PATCH. Present the proposed `vX.Y.Z-{codename}` and ask me to confirm
10+
or override before proceeding. Do not continue until I confirm.
11+
12+
2. **Verify working tree**: Confirm we are on `master` with a clean working
13+
tree. Pull latest if behind remote.
14+
15+
3. **Create release branch**: `release/vX.Y.Z-{codename}`.
16+
17+
4. **Update CHANGELOG.md**: Move all content under `[Unreleased]` to a new
18+
release heading `[X.Y.Z - Codename] - {today's date}`. Leave a fresh
19+
`[Unreleased]` with all four empty subsections:
20+
Added / Changed / Fixed / Removed.
21+
22+
5. **Propose commit and ask for confirmation**:
23+
`docs(changelog): release vX.Y.Z Codename`
24+
Do not commit until I confirm.
25+
26+
6. **After confirmation**: commit, push the branch, open a PR into `master`.
27+
28+
7. **Stop and wait for my explicit confirmation** that:
29+
- All CI checks have passed
30+
- CodeRabbit review comments have been addressed
31+
- The PR has been merged into `master`
32+
Do not create or push the tag until I give this confirmation.
33+
34+
8. **After I confirm**: pull `master`, then propose the annotated tag
35+
`vX.Y.Z-{codename}` with message `Release X.Y.Z - Codename` and ask for
36+
approval. Do not tag until I confirm.
37+
38+
9. **After confirmation**: create and push the tag. The CD pipeline triggers
39+
automatically.

0 commit comments

Comments
 (0)