Use when creating git commits. Defines conventional commit format and message structure guidelines.
Guidelines for writing clear, consistent git commit messages.
Use the conventional commits style:
<type>[optional scope]: <description>
CRITICAL: Single-line only. Never add a body or footer. The code and spec speak for themselves.
Pick the type from what kind of file changed, not from the intent behind the change. Use feat/fix only for changes to code.
Add scope in parentheses to provide additional context. Use the narrowest name that identifies what changed. Prefer the specific file, module, or component over a parent folder that holds many of them.
Indicate breaking changes with ! after type/scope:
Never add a commit body or footer. Every commit must be a single line only.
Do NOT include AI attribution, co-authored-by lines, or any other footers.
CRITICAL ā all of the following MUST be true before committing:
prek run --all-files and fix every issuegit fetchgit status and git diffgit add <files>ā NEVER commit with failing tests ā NEVER commit without running pre-commit hooks ā NEVER commit half-finished work
Commit once per completed requirement in the STDD cycle:
spec written ā tests RED ā tests GREEN ā hooks pass ā COMMIT
When following the spec-test-driven development workflow:
prek run --all-files ā all hooks pass