Skip to content

Commit 49dea22

Browse files
committed
docs: add commit message guidelines
1 parent e7c4e05 commit 49dea22

File tree

2 files changed

+61
-0
lines changed

2 files changed

+61
-0
lines changed

test-commit-msg.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Test Commit Message Generation
2+
3+
## Bad Examples (current):
4+
5+
```
6+
feat: implement auto-fixing pre-commit hooks
7+
8+
- Add stage_fixed: true to format and lint commands in lefthook.yml
9+
- Pre-commit hooks now automatically fix formatting and linting issues
10+
- Fixed files are automatically re-staged for commit
11+
- Eliminates the need for manual fix-restage-retry cycles
12+
- Typecheck and test remain as validation-only hooks
13+
```
14+
15+
## Good Examples:
16+
17+
```
18+
feat: implement auto-fixing pre-commit hooks
19+
20+
Pre-commit hooks now automatically fix and re-stage formatting and linting issues.
21+
```
22+
23+
```
24+
refactor: remove json-schema scorer from eval testing
25+
26+
JSON schema validation doesn't serve a realistic use case for LLM response evaluation.
27+
```
28+
29+
## Guidelines:
30+
31+
- Single line description preferred
32+
- If body needed, 1-2 sentences max
33+
- Focus on business value/reasoning, not implementation
34+
- Never list file names, method names, or technical details
35+
- Explain WHY, not WHAT

test-prompts.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Commit Message Prompt Testing
2+
3+
## Prompt V1 (Current - TOO VERBOSE):
4+
5+
"Generate commit message based on changes: Use conventional commit format with detailed bullet points"
6+
7+
## Prompt V2 (Concise):
8+
9+
"Generate a concise commit message. Format: `<type>: <description>`. Keep description under 50 chars. Add 1-2 sentence body only if needed to explain WHY, never WHAT."
10+
11+
## Prompt V3 (Business-focused):
12+
13+
"Write a commit message focusing on user/business impact, not implementation details. Format: `<type>: <description>`. Avoid mentioning files, methods, or technical specifics."
14+
15+
## Prompt V4 (Minimal):
16+
17+
"Generate commit message: `<type>: <description>`. Description should be concise and focus on the purpose/benefit, not implementation. Single line preferred."
18+
19+
## Test with recent changes:
20+
21+
**Changes:** Added `stage_fixed: true` to lefthook.yml format and lint commands
22+
23+
**V1 Result:** (too verbose - current behavior)
24+
**V2 Result:** `feat: auto-fix formatting and linting in pre-commit`
25+
**V3 Result:** `feat: implement auto-fixing pre-commit hooks`
26+
**V4 Result:** `feat: auto-fix pre-commit formatting and linting`

0 commit comments

Comments
 (0)