Skip to content

Commit 883476a

Browse files
committed
docs: refine commit message guidelines
- Allow bullet points for distinct subsections or components - Focus on functional changes rather than business impact - Clarify when to use bullets vs single descriptions
1 parent 9beddbb commit 883476a

File tree

2 files changed

+51
-1
lines changed

2 files changed

+51
-1
lines changed

.claude/commands/commit.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@ Handle the complete commit workflow:
2121
- Use conventional commit format: `<type>: <description>`
2222
- Types: feat, fix, docs, style, refactor, test, chore
2323
- Keep description concise (under 50 chars), focus on purpose/benefit
24-
- Add body only if needed to explain WHY (1-2 sentences max)
24+
- Add body only if needed to explain WHY or list distinct subsections
25+
- Use bullet points for multiple logical components or subsections
2526
- NEVER mention specific files, methods, classes, or implementation details
27+
- Focus on user/business impact, not technical implementation
2628

2729
3. **Handle pre-commit hooks**:
2830
- Attempt commit to trigger lefthook checks

commit-examples.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Commit Message Examples
2+
3+
## Good Examples with Subsections
4+
5+
### Multiple Related Features
6+
7+
```
8+
feat: enhance eval testing capabilities
9+
10+
- Remove json-schema scorer (doesn't serve realistic use case)
11+
- Add auto-fixing pre-commit hooks
12+
- Improve commit message guidelines
13+
```
14+
15+
### Different Areas of Impact
16+
17+
```
18+
fix: resolve authentication and validation issues
19+
20+
- Fix token validation logic
21+
- Update error handling for expired sessions
22+
- Improve user feedback for auth failures
23+
```
24+
25+
### Single Focused Change
26+
27+
```
28+
feat: implement auto-fixing pre-commit hooks
29+
30+
Pre-commit hooks now automatically fix and re-stage formatting and linting issues.
31+
```
32+
33+
## Bad Examples (Too Technical)
34+
35+
```
36+
feat: implement auto-fixing pre-commit hooks
37+
38+
- Add stage_fixed: true to format and lint commands in lefthook.yml
39+
- Update runJsonSchemaScorer method in EvalTestRunner class
40+
- Modify test-config.json schema validation
41+
```
42+
43+
## Guidelines
44+
45+
- Use bullets when there are 2+ distinct logical subsections
46+
- Each bullet should describe a user-facing change or benefit
47+
- Avoid implementation details (file names, method names, etc.)
48+
- Focus on WHAT the user gets, not HOW it's implemented

0 commit comments

Comments
 (0)