aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/.github/instructions/commit.instructions.md
blob: cc29e9c98f829849d0fd21901fe6773dab239bf3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
---
applyTo: "**"
---

# Commit Helper Instructions

When user requests commit help → Follow <a>.github/agents/commit.agent.md</a>

## Critical Rules

1. **Language**: Commit message ALWAYS in **English** (unless user specifies otherwise)
2. **Explanation**: Use **user's request language** ONLY when commit language differs
   - Chinese user + English commit → Explain in Chinese
   - English user + Chinese commit → Explain in English
   - Same language → No extra explanation needed
3. **Confirmation**: ALWAYS ask before committing (unless "commit directly" requested)

## Quick Reference

**Format**: `<type>[scope]: <description>`

**Common types**: `feat` `fix` `docs` `refactor` `perf` `test` `chore`

**AI commits MUST include**: `Reviewed-by: [MODEL_NAME]`

**Spec**: <a>.github/references/git/conventional-commit.md</a>

## Common Mistakes

| Wrong | Right |
|-------|-------|
| `feat: Added feature` | `feat: add feature` (imperative) |
| `Fix bug.` | `fix: resolve auth issue` (lowercase, no period) |
| `feat: add A, refactor B, update C` | Split into 3 commits |

## User Triggers

"create commit", "commit message", "conventional commit"