-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathcommit-message.ai.yaml
More file actions
117 lines (108 loc) · 3.55 KB
/
commit-message.ai.yaml
File metadata and controls
117 lines (108 loc) · 3.55 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
# Commit Message Guide - AI Optimized (v2 Dual-Layer)
# Source: core/commit-message-guide.md
standard:
id: commit-message
name: Commit Message Standards
description: Conventional Commits format for standardized git commit messages
guidelines:
- "Use Conventional Commits format: <type>(<scope>): <subject>"
- "Use imperative mood in subject (add, fix, not added, fixed)"
- "Keep subject line under 72 characters"
- "Use lowercase for scope"
- "Reference issue numbers in footer"
meta:
version: "2.0.0"
updated: "2026-02-04"
source: core/commit-message-guide.md
description: Conventional Commits format for standardized git commit messages
format:
template: |
<type>(<scope>): <subject>
<body>
<footer>
components:
- name: type
required: true
description: Type of change
- name: scope
required: false
description: Module/component affected
- name: subject
required: true
description: Brief description (max 72 chars)
- name: body
required: false
description: Detailed explanation
- name: footer
required: false
description: Issue references, breaking changes
decision:
question: "What is your team composition?"
matrix:
- answer: "International or mixed team"
select: english
- answer: "Local team (Taiwan)"
select: traditional-chinese
- answer: "Mixed with local focus"
select: bilingual
options:
commit_language:
default: english
choices:
- id: english
file: options/commit-message/english.ai.yaml
- id: traditional-chinese
file: options/commit-message/traditional-chinese.ai.yaml
- id: bilingual
file: options/commit-message/bilingual.ai.yaml
rules:
- id: choose-language
trigger: starting a project
instruction: Choose ONE commit message language and document in CONTRIBUTING.md
priority: required
- id: consistent-language
trigger: writing commit message
instruction: Use the same language consistently across all commits
priority: required
- id: subject-max-length
trigger: writing commit subject
instruction: Keep subject line under 72 characters
validator: "^.{1,72}$"
priority: required
- id: scope-lowercase
trigger: specifying scope
instruction: Use lowercase for scope (auth, not Auth)
validator: "^[a-z][a-z0-9-]*$"
priority: required
- id: imperative-mood
trigger: writing commit subject
instruction: Use imperative mood (add, fix, not added, fixed)
priority: required
examples:
good:
- "feat(auth): add OAuth2 login"
- "fix(api): handle null response"
bad:
- "feat(auth): added OAuth2 login"
- "fix(api): handles null response"
- id: no-mixed-changes
trigger: committing code
instruction: One commit per logical change; avoid mixing unrelated changes
priority: required
- id: reference-issues
trigger: fixing bugs or implementing features
instruction: Reference issue numbers in footer
priority: recommended
examples:
good:
- "Closes #123"
- "Fixes #456"
- "Refs #789"
physical_spec:
type: custom_script
validator:
command: "test -f commitlint.config.js || test -f .commitlintrc.js || test -f .commitlintrc.json"
rule: "commitlint_config_exists"
simulator:
type: command
command: 'echo "{input}" | npx commitlint'