From f15a75eff8a61c8dd2a1b6561d9951e90a867934 Mon Sep 17 00:00:00 2001 From: Nano Taboada <87288+nanotaboada@users.noreply.github.com> Date: Sat, 4 Apr 2026 00:04:07 -0300 Subject: [PATCH 1/4] chore(claude): rename and extend slash commands (#440) Co-authored-by: Claude Sonnet 4.6 --- .claude/commands/pre-commit.md | 12 ++++ .claude/commands/pre-release.md | 101 ++++++++++++++++++++++++++++++++ .claude/commands/precommit.md | 8 --- CLAUDE.md | 2 +- 4 files changed, 114 insertions(+), 9 deletions(-) create mode 100644 .claude/commands/pre-commit.md create mode 100644 .claude/commands/pre-release.md delete mode 100644 .claude/commands/precommit.md diff --git a/.claude/commands/pre-commit.md b/.claude/commands/pre-commit.md new file mode 100644 index 0000000..12162e0 --- /dev/null +++ b/.claude/commands/pre-commit.md @@ -0,0 +1,12 @@ +Run the pre-commit checklist for this project: + +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. +2. Run `dotnet build --configuration Release` — must succeed. +3. Run `dotnet test --settings .runsettings` — all tests must pass. +4. Run `dotnet csharpier --check .` — must pass (run `dotnet csharpier .` to auto-fix). +5. If `coderabbit` CLI is installed, run `coderabbit review --type uncommitted --prompt-only`: + - If actionable/serious findings are reported, stop and address them before proposing the commit. + - If only nitpick-level findings, report them and continue to the commit proposal. + - If `coderabbit` is not installed, skip this step with a note. + +Run steps 1–4, report the results clearly, run step 5 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. diff --git a/.claude/commands/pre-release.md b/.claude/commands/pre-release.md new file mode 100644 index 0000000..576da11 --- /dev/null +++ b/.claude/commands/pre-release.md @@ -0,0 +1,101 @@ +Run the pre-release checklist for this project. Work through all three phases +in order, pausing for explicit confirmation at each decision point before +proceeding. Never create a branch, commit, tag, or push without approval. + +--- + +## Phase 1 — Determine next release + +1. Run `git status` and confirm the working tree is clean and on `master`. + If not, stop and report the problem. + +2. Run `git tag --sort=-v:refname` to list existing tags. Identify the most + recent tag matching `v*.*.*-*` and extract its stadium codename. + +3. Read the A–Z stadium table from `CHANGELOG.md` to find the stadium that + follows the last used codename alphabetically. That is the next stadium. + +4. Read the `[Unreleased]` section of `CHANGELOG.md` and infer the version + bump using these rules (applied in order — first match wins): + - Any entry contains the word **BREAKING** → **major** bump + - Any `### Added` subsection has entries → **minor** bump + - Otherwise (only `### Changed`, `### Fixed`, `### Removed`) → **patch** bump + +5. Compute the next version by applying the bump to the current latest tag's + semver (e.g. `v2.1.0-dusseldorf` + minor → `2.2.0`). + +6. Present a summary for confirmation before continuing: + - Last tag and stadium + - Next version and stadium codename + - Bump type and the reasoning (what triggered it) + - Proposed tag: `vX.Y.Z-{stadium}` + - Proposed branch: `release/vX.Y.Z-{stadium}` + + **Wait for explicit approval before proceeding to Phase 2.** + +--- + +## Phase 2 — Prepare release branch + +1. Create branch `release/vX.Y.Z-{stadium}` from `master`. + +2. Edit `CHANGELOG.md`: + - Replace `## [Unreleased]` with `## [X.Y.Z - StadiumName] - YYYY-MM-DD` + (use today's date; use the stadium's display name from the table, e.g. + "Bernabeu", "Centenario"). + - Consolidate duplicate subsection headings (e.g. two `### Added` blocks + should be merged into one). + - Add a new empty `## [Unreleased]` section at the top (above the new + versioned heading) with the standard subsections. + - Update the compare links at the bottom of the file: + - `[unreleased]` → `.../compare/vX.Y.Z-{stadium}...HEAD` + - Add `[X.Y.Z - StadiumName]` → `.../compare/v{prev-tag}...vX.Y.Z-{stadium}` + +3. Show the full diff of `CHANGELOG.md` and propose this commit message: + + ``` + docs(changelog): prepare release notes for vX.Y.Z-{stadium} (#issue) + ``` + + **Wait for explicit approval before committing.** + +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." + +5. Propose opening a PR from `release/vX.Y.Z-{stadium}` into `master`. + **Wait for explicit approval before opening.** + +6. Open the PR with: + - Title: `docs(changelog): prepare release notes for vX.Y.Z-{stadium}` + - Body summarising what is included in this release. + +--- + +## Phase 3 — Tag and release + +1. Wait — do not proceed until the user confirms: + - CI is green + - The PR has been merged into `master` + +2. Once confirmed, run: + ```bash + git checkout master && git pull origin master + ``` + and show the resulting `git log --oneline -3`. + +3. Propose the annotated tag: + ```bash + git tag -a vX.Y.Z-{stadium} -m "Release vX.Y.Z - StadiumName" + ``` + + **Wait for explicit approval before creating the tag.** + +4. Create the tag, then propose: + ```bash + git push origin vX.Y.Z-{stadium} + ``` + + **Wait for explicit approval before pushing.** Remind the user that pushing + the tag triggers the CD workflow which will build, publish the Docker image, + and create the GitHub Release. diff --git a/.claude/commands/precommit.md b/.claude/commands/precommit.md deleted file mode 100644 index 37d6693..0000000 --- a/.claude/commands/precommit.md +++ /dev/null @@ -1,8 +0,0 @@ -Run the pre-commit checklist for this project: - -1. Remind me to update `CHANGELOG.md` `[Unreleased]` section (Added / Changed / Fixed / Removed) — I must do this manually. -2. Run `dotnet build --configuration Release` — must succeed. -3. Run `dotnet test --settings .runsettings` — all tests must pass. -4. Run `dotnet csharpier --check .` — must pass (run `dotnet csharpier .` to auto-fix). - -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. diff --git a/CLAUDE.md b/CLAUDE.md index 7d3153d..8ef5c13 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -4,4 +4,4 @@ ## Claude Code -- Run `/precommit` to execute the full pre-commit checklist for this project. +- Run `/pre-commit` to execute the full pre-commit checklist for this project. From 24996e74d6f4d1b4a7f71cffdbfc7deb6207c823 Mon Sep 17 00:00:00 2001 From: Nano Taboada <87288+nanotaboada@users.noreply.github.com> Date: Sat, 4 Apr 2026 00:49:52 -0300 Subject: [PATCH 2/4] chore(claude): address pre-commit and pre-release review feedback (#440) Co-authored-by: Claude Sonnet 4.6 --- .claude/commands/pre-commit.md | 2 +- .claude/commands/pre-release.md | 24 ++++++++++++++++-------- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/.claude/commands/pre-commit.md b/.claude/commands/pre-commit.md index 12162e0..d6c1444 100644 --- a/.claude/commands/pre-commit.md +++ b/.claude/commands/pre-commit.md @@ -9,4 +9,4 @@ Run the pre-commit checklist for this project: - If only nitpick-level findings, report them and continue to the commit proposal. - If `coderabbit` is not installed, skip this step with a note. -Run steps 1–4, report the results clearly, run step 5 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. +Run steps 1–4, report the results clearly, then run step 5 (CodeRabbit review) 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. diff --git a/.claude/commands/pre-release.md b/.claude/commands/pre-release.md index 576da11..3e89565 100644 --- a/.claude/commands/pre-release.md +++ b/.claude/commands/pre-release.md @@ -12,12 +12,19 @@ proceeding. Never create a branch, commit, tag, or push without approval. 2. Run `git tag --sort=-v:refname` to list existing tags. Identify the most recent tag matching `v*.*.*-*` and extract its stadium codename. -3. Read the A–Z stadium table from `CHANGELOG.md` to find the stadium that - follows the last used codename alphabetically. That is the next stadium. +3. Read the A–Z stadium table from `CHANGELOG.md` to find the next stadium: + - **No tags yet**: start at `A` (first stadium in the table). + - **Normal case**: use the stadium that follows the last used codename + alphabetically. If letters were skipped, pick the next after the + highest existing codename — do not backfill gaps. + - **Last codename is `Z`** (Zentralstadion): the list is finite. Stop and + refer to ADR 0012 for guidance on extending or revisiting the convention. 4. Read the `[Unreleased]` section of `CHANGELOG.md` and infer the version bump using these rules (applied in order — first match wins): - - Any entry contains the word **BREAKING** → **major** bump + - Any entry contains the word **BREAKING** (case-insensitive), a + `BREAKING CHANGE:` token in a commit footer, or a `!` suffix after + the commit type/scope (e.g. `feat!:` or `feat(scope)!:`) → **major** bump - Any `### Added` subsection has entries → **minor** bump - Otherwise (only `### Changed`, `### Fixed`, `### Removed`) → **patch** bump @@ -53,15 +60,16 @@ proceeding. Never create a branch, commit, tag, or push without approval. 3. Show the full diff of `CHANGELOG.md` and propose this commit message: - ``` + ```text docs(changelog): prepare release notes for vX.Y.Z-{stadium} (#issue) ``` **Wait for explicit approval before committing.** -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`, manually skipping step 1 — do not re-run or re-attempt + the CHANGELOG update; it was already completed above. Open with: "Skip + step 1 — CHANGELOG was already updated as part of this release branch." + Proceed directly with steps 2–5. 5. Propose opening a PR from `release/vX.Y.Z-{stadium}` into `master`. **Wait for explicit approval before opening.** @@ -86,7 +94,7 @@ proceeding. Never create a branch, commit, tag, or push without approval. 3. Propose the annotated tag: ```bash - git tag -a vX.Y.Z-{stadium} -m "Release vX.Y.Z - StadiumName" + git tag -a vX.Y.Z-{stadium} -m "Release X.Y.Z - StadiumName" ``` **Wait for explicit approval before creating the tag.** From d8ae17c716e8ddca076e18e265dbd7fc00fd0bdb Mon Sep 17 00:00:00 2001 From: Nano Taboada <87288+nanotaboada@users.noreply.github.com> Date: Sat, 4 Apr 2026 00:56:12 -0300 Subject: [PATCH 3/4] chore(claude): apply pre-commit improvements (#440) Co-authored-by: Claude Sonnet 4.6 --- .claude/commands/pre-commit.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.claude/commands/pre-commit.md b/.claude/commands/pre-commit.md index d6c1444..9a9f686 100644 --- a/.claude/commands/pre-commit.md +++ b/.claude/commands/pre-commit.md @@ -1,3 +1,5 @@ +Before running the checklist, run `git fetch origin`. If the current branch is behind `origin/master`, stop and rebase before proceeding. + Run the pre-commit checklist for this project: 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. From f591cfda280143ebce01f0aeb547fa70a838861e Mon Sep 17 00:00:00 2001 From: Nano Taboada <87288+nanotaboada@users.noreply.github.com> Date: Sat, 4 Apr 2026 01:38:10 -0300 Subject: [PATCH 4/4] docs(readme): rearrange badges Co-authored-by: Claude Sonnet 4.6 --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 99079ea..c7fe010 100644 --- a/README.md +++ b/README.md @@ -8,9 +8,9 @@ [![CodeFactor](https://www.codefactor.io/repository/github/nanotaboada/Dotnet.Samples.AspNetCore.WebApi/badge)](https://www.codefactor.io/repository/github/nanotaboada/Dotnet.Samples.AspNetCore.WebApi) [![License: MIT](https://img.shields.io/badge/License-MIT-3DA639.svg)](https://opensource.org/licenses/MIT) ![Dependabot](https://img.shields.io/badge/Dependabot-contributing-025E8C?logo=dependabot&logoColor=white&labelColor=181818) -![GitHub Copilot](https://img.shields.io/badge/GitHub_Copilot-contributing-8662C5?logo=githubcopilot&logoColor=white&labelColor=181818) -![Claude](https://img.shields.io/badge/Claude-Sonnet_4.6-D97757?logo=claude&logoColor=white&labelColor=181818) -![CodeRabbit Pull Request Reviews](https://img.shields.io/coderabbit/prs/github/nanotaboada/Dotnet.Samples.AspNetCore.WebApi?utm_source=oss&utm_medium=github&utm_campaign=nanotaboada%2FDotnet.Samples.AspNetCore.WebApi&link=https%3A%2F%2Fcoderabbit.ai&label=CodeRabbit+Reviews&labelColor=181818) +![Copilot](https://img.shields.io/badge/Copilot-contributing-8662C5?logo=githubcopilot&logoColor=white&labelColor=181818) +![Claude](https://img.shields.io/badge/Claude-contributing-D97757?logo=claude&logoColor=white&labelColor=181818) +![CodeRabbit](https://img.shields.io/badge/CodeRabbit-reviewing-FF570A?logo=coderabbit&logoColor=white&labelColor=181818) Proof of Concept for a RESTful API built with .NET 10 (LTS) and ASP.NET Core. Manage football player data with SQLite, Entity Framework Core, Swagger documentation, and in-memory caching.