Skip to content

Commit ae47101

Browse files
committed
docs: add conventional commit guidelines after learning the hard way
Documented commit type reference and common mistakes to prevent future accidental releases from misusing fix: instead of test:/chore:.
1 parent 900e056 commit ae47101

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed

CLAUDE.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# cachekit-core
2+
3+
Standalone Rust crate for compression, checksums, and encryption.
4+
5+
**Status**: Published to crates.io (v0.1.0)
6+
7+
## Conventional Commits (IMPORTANT - READ THIS)
8+
9+
**THIS PROJECT USES RELEASE-PLEASE** - Commit types matter. Get them wrong, and you'll trigger accidental releases or hide important changes.
10+
11+
### Commit Type Reference
12+
13+
| Type | Triggers Release? | Use When | Examples |
14+
|------|------------------|----------|----------|
15+
| `feat:` | ✅ YES | New user-facing functionality | New API method, new feature flag |
16+
| `fix:` | ✅ YES | User-facing bug fixes | Crash fix, incorrect behavior fix |
17+
| `perf:` | ✅ YES | Performance improvements | Algorithm optimization, reduced allocations |
18+
| `security:` | ✅ YES | Security fixes | CVE patch, timing attack mitigation |
19+
| `revert:` | ✅ YES | Reverting previous changes | Revert previous commit |
20+
| `docs:` | ❌ NO | Documentation only | README updates, doc comments |
21+
| `test:` | ❌ NO | Test-only changes | New tests, test fixes, test refactoring |
22+
| `chore:` | ❌ NO | Build/CI/tooling changes | Workflow updates, dependency bumps |
23+
| `refactor:` | ❌ NO | Code refactoring (no behavior change) | Internal restructuring |
24+
| `ci:` | ❌ NO | CI/CD changes | GitHub Actions, workflow config |
25+
| `build:` | ❌ NO | Build system changes | Cargo.toml metadata, build scripts |
26+
27+
### Common Mistakes (LEARNED THE HARD WAY - 2025-12-09)
28+
29+
**WRONG**: `fix: use CodeQL autobuild to capture Rust-generated C FFI`
30+
- This is a CI workflow change, not a user-facing bug fix
31+
- Would trigger patch release for no reason
32+
33+
**CORRECT**: `chore: use CodeQL autobuild to capture Rust-generated C FFI`
34+
35+
**WRONG**: `fix: improve timing test robustness for CI environments`
36+
- Test-only change, no user impact
37+
- Would show up in release notes as a "bug fix"
38+
39+
**CORRECT**: `test: improve timing test robustness for CI environments`
40+
41+
### Decision Framework
42+
43+
Ask yourself:
44+
1. **Does this change user-facing behavior?**`feat:` or `fix:`
45+
2. **Is this a security issue?**`security:`
46+
3. **Does this only affect tests?**`test:`
47+
4. **Does this only affect CI/build/tooling?**`chore:` or `ci:`
48+
5. **Is this internal refactoring?**`refactor:`
49+
50+
**When in doubt**: Use a non-releasing type (`chore:`, `test:`, `ci:`). You can always re-release later if needed.
51+
52+
## Release Process
53+
54+
- Release-please runs on every push to `main`
55+
- Analyzes conventional commits since last release
56+
- Creates/updates release PR with auto-generated CHANGELOG
57+
- On PR merge, publishes to crates.io automatically
58+
59+
**Manifest sync**: `.release-please-manifest.json` is auto-updated by release-please. If it gets out of sync (manual publish), update it manually to match Cargo.toml version.

0 commit comments

Comments
 (0)