| 1 | --- |
| 2 | id: aitoearn-commit-convention |
| 3 | trigger: "when writing a commit message" |
| 4 | confidence: 0.86 |
| 5 | domain: git |
| 6 | source: local-repo-analysis |
| 7 | --- |
| 8 | |
| 9 | # Use Conventional Commits |
| 10 | |
| 11 | ## Action |
| 12 | Prefix commits with: `feat:`, `fix:`, `chore:`, `docs:`, `test:`, `refactor:` |
| 13 | |
| 14 | Use scope in parentheses for module-specific changes: `feat(content):`, `fix(tiktok):` |
| 15 | |
| 16 | ## Format |
| 17 | ``` |
| 18 | <type>(<scope>): <description> |
| 19 | |
| 20 | [optional body] |
| 21 | ``` |
| 22 | |
| 23 | ## Examples |
| 24 | - `feat(login): 更新登录控制器中的注释和文档为中文` |
| 25 | - `refactor(mongodb): 移除materialGroup.repository中多余的type参数` |
| 26 | - `fix: 草稿箱创建缺失平台字段` |
| 27 | - `chore: add vitest setup and MCP unit tests` |
| 28 | |
| 29 | ## Evidence |
| 30 | - Analyzed 200 commits |
| 31 | - 86% follow conventional commit format |
| 32 | - Common scopes: content, mongodb, tiktok, douyin, channel-db, publish |
| 33 |