Skip to content

chore(claude): rename and extend slash commands#446

Merged
nanotaboada merged 4 commits intomasterfrom
chore/rename-and-extend-slash-commands
Apr 4, 2026
Merged

chore(claude): rename and extend slash commands#446
nanotaboada merged 4 commits intomasterfrom
chore/rename-and-extend-slash-commands

Conversation

@nanotaboada
Copy link
Copy Markdown
Owner

@nanotaboada nanotaboada commented Apr 4, 2026

Summary

  • Renames .claude/commands/precommit.mdpre-commit.md to align with hyphenated slash command convention
  • Extends /pre-commit with automated CHANGELOG update (step 1) and an optional CodeRabbit review step (coderabbit review --type uncommitted --prompt-only) after all checks pass — blocks on serious findings, continues on nitpicks, skips gracefully if CLI not installed
  • Adds /pre-release implementing the three-phase release checklist (determine next stadium codename + version bump, prepare release branch, tag and push)
  • Updates CLAUDE.md reference from /precommit to /pre-commit

Closes #440

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation

    • Added comprehensive pre-commit checklist guide covering build verification with Release configuration, test execution, code review validation, and standardized commit message formatting.
    • Added comprehensive pre-release checklist guide covering version derivation, changelog consolidation, release branch workflow, and release tag creation.
  • Chores

    • Renamed command references from /precommit to /pre-commit.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 4, 2026

Warning

Rate limit exceeded

@nanotaboada has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 23 minutes and 51 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 23 minutes and 51 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: b7d08766-fcb4-4727-bf6b-e6495072534f

📥 Commits

Reviewing files that changed from the base of the PR and between 044e5ee and f591cfd.

📒 Files selected for processing (5)
  • .claude/commands/pre-commit.md
  • .claude/commands/pre-release.md
  • .claude/commands/precommit.md
  • CLAUDE.md
  • README.md

Walkthrough

This PR renames the /precommit command file to /pre-commit and replaces it with an enhanced pre-commit checklist that automates CHANGELOG updates and adds CodeRabbit code review integration. It introduces a new /pre-release command implementing a three-phase release workflow with version detection and changelog management.

Changes

Cohort / File(s) Summary
Pre-commit command
CLAUDE.md, .claude/commands/pre-commit.md, .claude/commands/precommit.md
Replaced the manual /precommit command with a hyphenated /pre-commit command. New pre-commit checklist automates CHANGELOG.md updates under [Unreleased] section, runs build/test/formatter checks, conditionally executes CodeRabbit review (blocking on serious findings, continuing on nitpicks), and proposes commit message format.
Pre-release command
.claude/commands/pre-release.md
Introduced new three-phase pre-release checklist: Phase 1 determines next version/codename by inspecting git tags and [Unreleased] CHANGELOG content; Phase 2 creates release branch, updates CHANGELOG with versioned heading, and runs /pre-commit; Phase 3 waits for CI/merge, then tags and pushes with explicit confirmation gates throughout.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Assessment against linked issues

Objective Addressed Explanation
Rename precommit.md to pre-commit.md and update CHANGELOG.md step to automate updates [#440]
Add CodeRabbit review step with conditional handling for actionable vs. nitpick findings [#440]
Implement /pre-release with three-phase workflow including version inference and changelog management [#440]

Possibly related PRs

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The pull request title follows Conventional Commits format (chore:), is descriptive and specific about renaming and extending slash commands, and is well under the 80-character limit at 47 characters.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/rename-and-extend-slash-commands
  • 🛠️ sync documentation: Commit on current branch
  • 🛠️ sync documentation: Create PR
  • 🛠️ enforce http error handling: Commit on current branch
  • 🛠️ enforce http error handling: Create PR
  • 🛠️ idiomatic review: Commit on current branch
  • 🛠️ idiomatic review: Create PR
  • 🛠️ verify api contract: Commit on current branch
  • 🛠️ verify api contract: Create PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

🧹 Nitpick comments (2)
.claude/commands/pre-release.md (2)

20-20: Specify case sensitivity for BREAKING keyword detection.

The rule states "Any entry contains the word BREAKING" but doesn't specify case sensitivity. Conventional Commits typically use "BREAKING CHANGE:" (all uppercase) in commit body/footer, or a "!" suffix after type/scope.

✨ Suggested clarification
-   - Any entry contains the word **BREAKING** → **major** bump
+   - Any entry contains the word **BREAKING** (case-insensitive) → **major** bump
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.claude/commands/pre-release.md at line 20, Clarify the BREAKING detection
rule by specifying it's case-insensitive and by expanding detection to common
Conventional Commits forms: match "BREAKING" in any case (e.g., breaking,
Breaking), recognize the explicit "BREAKING CHANGE:" token in commit
body/footer, and also detect the "!" breaking-change suffix after type/scope
(e.g., feat!: ... or feat(scope)!: ...); update the single-line rule text that
currently reads "Any entry contains the word **BREAKING**" to mention these
three checks so the pre-release logic is unambiguous.

62-64: Clarify the mechanism for skipping step 1 of /pre-commit.

The instruction says "Run /pre-commit, skipping step 1" but doesn't explain how to skip it. Looking at .claude/commands/pre-commit.md, there's no apparent parameter or flag support. The follow-up instruction (lines 63-64) provides context to explain WHY step 1 should be skipped, but the mechanism remains unclear.

💡 Suggested clarification
-4. Run `/pre-commit`, skipping step 1 — CHANGELOG was already updated above.
-   Open with: "Skip step 1 — CHANGELOG was already updated as part of this
-   release branch."
+4. Run `/pre-commit` but manually skip step 1 (CHANGELOG update).
+   Open with: "Skipping step 1 — CHANGELOG was already updated as part of this
+   release branch. Proceeding with steps 2–5."

This makes it explicit that the skip is manual (Claude should skip it when executing the checklist) rather than via a command parameter.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.claude/commands/pre-release.md around lines 62 - 64, Update the instruction
for "/pre-commit" to explicitly state that skipping step 1 is manual rather than
a command flag: change the line to something like "Run `/pre-commit`, skipping
step 1 (manually omit the CHANGELOG update) — Claude should not attempt to run
or re-run step 1; just proceed with the remaining steps." Reference the
"/pre-commit" invocation and the phrase "Skip step 1 — CHANGELOG was already
updated..." so the intent is clear that the checklist runner must skip step 1
manually when executing the checklist.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.claude/commands/pre-commit.md:
- Line 12: The instruction line "Run steps 1–4, report the results clearly, run
step 5 if available..." is inconsistent with the checklist that defines five
steps; update the sentence to remove ambiguity by either changing the range to
"Run steps 1–5" or explicitly saying "Run steps 1–4, report the results clearly,
then run step 5 (CodeRabbit review) if it is available" so it matches the
checklist and clarifies when the CodeRabbit review should be executed; edit the
exact phrase "Run steps 1–4" in .claude/commands/pre-commit.md to the chosen
wording and ensure "CodeRabbit review" is mentioned if step 5 is conditional.
- Line 12: The docs list 8 allowed commit types but commitlint currently imports
`@commitlint/config-conventional` without restricting types, so either update the
documentation to list all types accepted by that preset or modify
commitlint.config.mjs to enforce the 8 documented types; to fix prefer modifying
commitlint.config.mjs by adding a rule for "type-enum" (or equivalent rule key)
that restricts types to the documented set (feat, fix, chore, docs, test,
refactor, ci, perf) so the linter matches pre-commit.md, and ensure
pre-commit.md wording and examples reflect the exact allowed set and format used
by commitlint.

In @.claude/commands/pre-release.md:
- Around line 43-45: The changelog heading pattern "## [X.Y.Z - StadiumName] -
YYYY-MM-DD" and the tag message "Release vX.Y.Z - StadiumName" are inconsistent;
update the tag generation to remove the leading "v" so the tag message reads
"Release X.Y.Z - StadiumName" to match the changelog heading format (find the
code that constructs the tag message "Release vX.Y.Z - StadiumName" and remove
the "v" prefix there); ensure any tests or prompt templates that build the tag
string are updated accordingly so both places use the same version format.
- Around line 56-58: Update the fenced code block in
.claude/commands/pre-release.md that currently shows the commit example (the
triple-backtick block containing "docs(changelog): prepare release notes for
vX.Y.Z-{stadium} (`#issue`)") to include a language specifier such as "text" or
"bash" (e.g., change ``` to ```text) so the block is explicitly labeled for
markdownlint-cli2 and other static analysis tools.
- Around line 15-16: Clarify the stadium-selection step in the pre-release
instructions: update the line about reading the "A–Z stadium table" from
CHANGELOG.md and "find the stadium that follows the last used codename
alphabetically" to explicitly handle three edge cases—(1) if the last used
codename is 'Z' (Zentralstadion) state that the list is finite and refer to ADR
0012 for the requirement to extend or revisit the convention; (2) if there are
gaps in tags (e.g., last tag is 'C' but 'B' was skipped) instruct to choose the
next available alphabetic stadium after the highest existing codename rather
than trying to backfill skipped letters; and (3) if no tags exist yet instruct
to start at 'A' (first stadium). Include references to "A–Z stadium table",
"CHANGELOG.md", "last used codename", and "ADR 0012" so reviewers can locate and
verify the changes.

---

Nitpick comments:
In @.claude/commands/pre-release.md:
- Line 20: Clarify the BREAKING detection rule by specifying it's
case-insensitive and by expanding detection to common Conventional Commits
forms: match "BREAKING" in any case (e.g., breaking, Breaking), recognize the
explicit "BREAKING CHANGE:" token in commit body/footer, and also detect the "!"
breaking-change suffix after type/scope (e.g., feat!: ... or feat(scope)!: ...);
update the single-line rule text that currently reads "Any entry contains the
word **BREAKING**" to mention these three checks so the pre-release logic is
unambiguous.
- Around line 62-64: Update the instruction for "/pre-commit" to explicitly
state that skipping step 1 is manual rather than a command flag: change the line
to something like "Run `/pre-commit`, skipping step 1 (manually omit the
CHANGELOG update) — Claude should not attempt to run or re-run step 1; just
proceed with the remaining steps." Reference the "/pre-commit" invocation and
the phrase "Skip step 1 — CHANGELOG was already updated..." so the intent is
clear that the checklist runner must skip step 1 manually when executing the
checklist.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 4f927f3c-b818-4bde-9967-5fdd4a3874b5

📥 Commits

Reviewing files that changed from the base of the PR and between 3bcedda and 044e5ee.

📒 Files selected for processing (4)
  • .claude/commands/pre-commit.md
  • .claude/commands/pre-release.md
  • .claude/commands/precommit.md
  • CLAUDE.md
💤 Files with no reviewable changes (1)
  • .claude/commands/precommit.md

Comment thread .claude/commands/pre-commit.md Outdated
Comment thread .claude/commands/pre-release.md Outdated
Comment thread .claude/commands/pre-release.md
Comment thread .claude/commands/pre-release.md Outdated
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
@nanotaboada nanotaboada force-pushed the chore/rename-and-extend-slash-commands branch from 044e5ee to f15a75e Compare April 4, 2026 03:40
nanotaboada and others added 3 commits April 4, 2026 00:49
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Apr 4, 2026

@nanotaboada nanotaboada merged commit 8b4def5 into master Apr 4, 2026
9 checks passed
@nanotaboada nanotaboada deleted the chore/rename-and-extend-slash-commands branch April 4, 2026 06:03
@coderabbitai coderabbitai Bot mentioned this pull request Apr 12, 2026
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add /pre-release slash command and extend /pre-commit

1 participant