Skip to content

Commit 57617c2

Browse files
nanotaboadaclaude
andcommitted
chore(claude): rename and extend slash commands (#293)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent d1247d4 commit 57617c2

File tree

4 files changed

+113
-8
lines changed

4 files changed

+113
-8
lines changed

.claude/commands/pre-commit.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Run the pre-commit checklist for this project:
2+
3+
1. Update `CHANGELOG.md` `[Unreleased]` section — add an entry under the appropriate subsection (Added / Changed / Fixed / Removed) describing the changes made, referencing the issue number.
4+
2. Run `./mvnw clean install` — must succeed with no compilation warnings and all tests passing.
5+
3. Remind me to open `target/site/jacoco/index.html` to verify coverage after the build completes.
6+
4. If `coderabbit` CLI is installed, run `coderabbit review --type uncommitted --prompt-only`:
7+
- If actionable/serious findings are reported, stop and address them before proposing the commit.
8+
- If only nitpick-level findings, report them and continue to the commit proposal.
9+
- If `coderabbit` is not installed, skip this step with a note.
10+
11+
Run steps 1–3, report the results clearly, run step 4 if available, 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/pre-release.md

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
Run the pre-release checklist for this project. Work through all three phases
2+
in order, pausing for explicit confirmation at each decision point before
3+
proceeding. Never create a branch, commit, tag, or push without approval.
4+
5+
---
6+
7+
## Phase 1 — Determine next release
8+
9+
1. Run `git status` and confirm the working tree is clean and on `master`.
10+
If not, stop and report the problem.
11+
12+
2. Run `git tag --sort=-v:refname` to list existing tags. Identify the most
13+
recent tag matching `v*.*.*-*` and extract its club codename.
14+
15+
3. Read the A–Z club table from `CHANGELOG.md` to find the club that follows
16+
the last used codename alphabetically. That is the next club.
17+
18+
4. Read the `[Unreleased]` section of `CHANGELOG.md` and infer the version
19+
bump using these rules (applied in order — first match wins):
20+
- Any entry contains the word **BREAKING****major** bump
21+
- Any `### Added` subsection has entries → **minor** bump
22+
- Otherwise (only `### Changed`, `### Fixed`, `### Removed`) → **patch** bump
23+
24+
5. Compute the next version by applying the bump to the current latest tag's
25+
semver (e.g. `v1.0.0-arsenal` + minor → `1.1.0`).
26+
27+
6. Present a summary for confirmation before continuing:
28+
- Last tag and club
29+
- Next version and club codename
30+
- Bump type and the reasoning (what triggered it)
31+
- Proposed tag: `vX.Y.Z-{club}`
32+
- Proposed branch: `release/vX.Y.Z-{club}`
33+
34+
**Wait for explicit approval before proceeding to Phase 2.**
35+
36+
---
37+
38+
## Phase 2 — Prepare release branch
39+
40+
1. Create branch `release/vX.Y.Z-{club}` from `master`.
41+
42+
2. Edit `CHANGELOG.md`:
43+
- Replace `## [Unreleased]` with `## [X.Y.Z - ClubName] - YYYY-MM-DD`
44+
(use today's date; use the club's display name from the table, e.g.
45+
"Barcelona", "Chelsea").
46+
- Consolidate duplicate subsection headings (e.g. two `### Added` blocks
47+
should be merged into one).
48+
- Add a new empty `## [Unreleased]` section at the top (above the new
49+
versioned heading) with the standard subsections.
50+
- Update the compare links at the bottom of the file:
51+
- `[unreleased]``.../compare/vX.Y.Z-{club}...HEAD`
52+
- Add `[X.Y.Z - ClubName]``.../compare/v{prev-tag}...vX.Y.Z-{club}`
53+
54+
3. Show the full diff of `CHANGELOG.md` and propose this commit message:
55+
56+
```
57+
docs(changelog): prepare release notes for vX.Y.Z-{club} (#issue)
58+
```
59+
60+
**Wait for explicit approval before committing.**
61+
62+
4. Run `/pre-commit`, skipping step 1 — CHANGELOG was already updated above.
63+
Open with: "Skip step 1 — CHANGELOG was already updated as part of this
64+
release branch."
65+
66+
5. Propose opening a PR from `release/vX.Y.Z-{club}` into `master`.
67+
**Wait for explicit approval before opening.**
68+
69+
6. Open the PR with:
70+
- Title: `docs(changelog): prepare release notes for vX.Y.Z-{club}`
71+
- Body summarising what is included in this release.
72+
73+
---
74+
75+
## Phase 3 — Tag and release
76+
77+
1. Wait — do not proceed until the user confirms:
78+
- CI is green
79+
- The PR has been merged into `master`
80+
81+
2. Once confirmed, run:
82+
```bash
83+
git checkout master && git pull origin master
84+
```
85+
and show the resulting `git log --oneline -3`.
86+
87+
3. Propose the annotated tag:
88+
```bash
89+
git tag -a vX.Y.Z-{club} -m "Release vX.Y.Z - ClubName"
90+
```
91+
92+
**Wait for explicit approval before creating the tag.**
93+
94+
4. Create the tag, then propose:
95+
```bash
96+
git push origin vX.Y.Z-{club}
97+
```
98+
99+
**Wait for explicit approval before pushing.** Remind the user that pushing
100+
the tag triggers the CD workflow which will build, publish the Docker image,
101+
and create the GitHub Release.

.claude/commands/precommit.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44

55
## Claude Code
66

7-
- Run `/precommit` to execute the full pre-commit checklist for this project.
7+
- Run `/pre-commit` to execute the full pre-commit checklist for this project.

0 commit comments

Comments
 (0)