@@ -17,8 +17,9 @@ This is policy and doctrine, not automation.
1717## Rule Order (enforce in this order)
1818
19191 . Commit signing policy
20- 2 . Repo placement policy (Personal vs Organization)
21- 3 . Visibility policy (Public vs Private vs Internal)
20+ 2 . Commit message policy
21+ 3 . Repo placement policy (Personal vs Organization)
22+ 4 . Visibility policy (Public vs Private vs Internal)
2223
2324## Commit Signing Policy
2425
@@ -70,6 +71,61 @@ For important repositories (templates, core libs, product repos), enable:
7071
7172If using an organization, prefer organization rulesets over per-repo configuration.
7273
74+ ## Commit Message Policy
75+
76+ ### Required outcome
77+
78+ - Every non-merge commit message follows a structured format.
79+ - Commit subjects are short, specific, and searchable.
80+ - Breaking changes are explicit.
81+
82+ ### Required format
83+
84+ Use this subject format:
85+
86+ ``` text
87+ <type>(<scope>): <summary>
88+ ```
89+
90+ ` (<scope>) ` is optional. Use lowercase for ` type ` and ` scope ` .
91+
92+ Allowed ` type ` values:
93+
94+ - ` feat ` -> new behavior/capability
95+ - ` fix ` -> bug fix
96+ - ` docs ` -> documentation-only change
97+ - ` chore ` -> maintenance, tooling, housekeeping
98+ - ` refactor ` -> internal restructuring without behavior change
99+ - ` test ` -> tests added/updated
100+ - ` ci ` -> CI workflow/pipeline changes
101+ - ` build ` -> build/dependency/release tooling changes
102+ - ` perf ` -> performance-focused change
103+ - ` revert ` -> explicit revert commit
104+
105+ Subject line rules:
106+
107+ - Imperative mood (` add ` , ` fix ` , ` update ` , not ` added ` , ` fixes ` ).
108+ - Prefer <= 72 characters.
109+ - No trailing period.
110+ - Must describe what changed, not generic text (` update stuff ` , ` misc fixes ` ).
111+
112+ Breaking change rule:
113+
114+ - Use ` ! ` in subject when applicable: ` feat(api)!: remove v1 endpoints `
115+ - Include a ` BREAKING CHANGE: ` footer in the commit body explaining migration impact.
116+
117+ ### Exceptions
118+
119+ - Merge commits generated by GitHub/Git are allowed.
120+ - Release merge commits can keep release-oriented phrasing.
121+
122+ ### Enforcement baseline
123+
124+ For important repositories (templates, core libs, product repos), enforce both:
125+
126+ - Signed commits
127+ - CI or hook-based commit message linting against this policy
128+
73129## Repo Placement Policy (Personal vs Organization)
74130
75131### Keep in personal account when
0 commit comments