Skip to content

Commit 58ead98

Browse files
committed
docs: add ifix type and improve distinction guide in commit message generator
- Add ifix type for internal/infrastructure bug fixes (CI, build, deploy) - Expand fix vs chore section to fix vs ifix vs chore with decision flowchart - Unify SemVer impact values for consistency (PATCH) - Enhance practical examples (Docker build, E2E tests, Vite build, etc.)
1 parent 3309314 commit 58ead98

File tree

1 file changed

+37
-20
lines changed

1 file changed

+37
-20
lines changed

.claude/commands/commit.md

Lines changed: 37 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,15 @@ Analyze staged changes and suggest the most appropriate type:
4141
| Type | When to Use | SemVer Impact |
4242
| ------------ | ----------------------------------------------------- | ------------- |
4343
| **feat** | New feature or capability added | MINOR (0.x.0) |
44-
| **fix** | Bug fix or problem resolution | PATCH (0.0.x) |
45-
| **docs** | Documentation only changes (README, comments, etc.) | None |
46-
| **style** | Code formatting, missing semicolons (no logic change) | None |
47-
| **refactor** | Code restructuring without changing behavior | None |
44+
| **fix** | User-facing bug fix | PATCH (0.0.x) |
45+
| **ifix** | Internal/infrastructure bug fix (CI, build, deploy) | PATCH (0.0.x) |
4846
| **perf** | Performance improvements | PATCH |
49-
| **test** | Adding or fixing tests | None |
50-
| **chore** | Build config, dependencies, tooling updates | None |
51-
| **ci** | CI/CD configuration changes | None |
47+
| **docs** | Documentation only changes (README, comments, etc.) | PATCH |
48+
| **style** | Code formatting, missing semicolons (no logic change) | PATCH |
49+
| **refactor** | Code restructuring without changing behavior | PATCH |
50+
| **test** | Adding or fixing tests | PATCH |
51+
| **chore** | Build config, dependencies, tooling updates | PATCH |
52+
| **ci** | CI/CD configuration changes | PATCH |
5253

5354
**BREAKING CHANGE**: MUST use both type! format (exclamation mark after type) AND BREAKING CHANGE: footer with migration guide for major version bump.
5455

@@ -82,23 +83,39 @@ package.json, pnpm-lock.yaml, .github/** → chore
8283

8384
If multiple types apply, prioritize: `feat` > `fix` > other types.
8485

85-
### Confusing Cases: fix vs chore
86+
### Confusing Cases: fix vs ifix vs chore
8687

87-
**Key distinction**: Does it affect **users** or only **developers**?
88+
**Key distinction**: Does it affect **users** or only **developers/infrastructure**?
8889

89-
| Scenario | Type | Reason |
90-
| ----------------------------------------------------- | ---------- | ----------------------------------------------- |
91-
| Backend GitHub Actions test workflow not running | `chore` | Only affects CI/CD, users don't experience this |
92-
| API returns 500 error for valid requests | `fix` | Users experience error responses |
93-
| Page loading speed improved from 3s to 0.8s | `perf` | Users directly feel the improvement |
94-
| Internal database query optimization (no user impact) | `refactor` | Code improvement, no measurable user benefit |
95-
| Dependency security patch (CVE fix) | `chore` | Build/tooling update |
96-
| App crashes when accessing profile page | `fix` | Users experience crash |
90+
| Scenario | Type | Reason |
91+
| ----------------------------------------------------- | ---------- | -------------------------------------------- |
92+
| Backend GitHub Actions test workflow not running | `ifix` | Bug in CI/CD that blocks development |
93+
| OOM error causing deployment failure | `ifix` | Infrastructure bug blocking release |
94+
| E2E test flakiness causing false negatives | `ifix` | Testing infrastructure bug |
95+
| Vite build timeout in production build | `ifix` | Build system bug |
96+
| API returns 500 error for valid requests | `fix` | Users experience error responses |
97+
| Page loading speed improved from 3s to 0.8s | `perf` | Users directly feel the improvement |
98+
| App crashes when accessing profile page | `fix` | Users experience crash |
99+
| Internal database query optimization (no user impact) | `refactor` | Code improvement, no measurable user benefit |
100+
| Dependency security patch (CVE fix) | `chore` | Build/tooling update (not a bug fix) |
101+
| Upgrading React version for new features | `chore` | Dependency update (not a bug fix) |
97102

98-
**User perspective priority:**
103+
**Decision flowchart:**
99104

100-
- ✅ "fix: app crashes when deleting items" (user problem)
101-
- ❌ "fix: null pointer exception in ItemService" (code problem)
105+
```
106+
Is it a bug (something broken)?
107+
├─ NO → Use chore/refactor/docs/etc
108+
└─ YES → Does it affect end users?
109+
├─ YES → fix (user-facing bug)
110+
└─ NO → ifix (infrastructure/developer bug)
111+
```
112+
113+
**Examples:**
114+
115+
-`fix: login button not responding` (user problem)
116+
-`ifix: Docker build failing due to missing environment variable` (infra bug)
117+
-`ifix: Prisma migration script syntax error` (developer tooling bug)
118+
-~~`fix: null pointer exception in ItemService`~~ → Use `fix: app crashes when viewing items` (user perspective)
102119

103120
## Commit Message Format Guidelines
104121

0 commit comments

Comments
 (0)