| name | commit-rules |
|---|---|
| description | Commit message rules (Conventional Commits, English, short list-style body). Use when creating a git commit, or writing or editing a commit message or PR description. |
Commit messages follow Conventional Commits 1.0.0. Messages and PR descriptions are written in English.
Do not ask for a description of the changes. Build the message from the repository state.
- Inspect the changes (read-only):
git branch --show-currentgit status --shortgit diff HEAD --statto gauge the size; for large diffs read only the key filesgit diff HEADgit log -5 --oneline
- If there are staged changes, use only them; otherwise use all changes to tracked files. Ignore untracked service files unless they are the point of the change.
- The branch name (
<type>/<task-id>-<description>) is only a hint fortypeandscope. If it contradicts the diff, trust the diff. Do not put the branch name or task number into the message. - Take
scopefrom the affected module or component, using project terminology and the style of recent commits. Do not use file names. If the changes span several independent components, omit the scope. - Group changes by meaning, not by file.
- Show the message in a
textblock and stop.
<type>(<scope>)[!]: <short description>
- <action> <change> (<reason>)
- <action> <change> (<reason>)
Note: <required action>
- Header: imperative mood, short, describes the result rather than the process.
- Add a body only when the header is not enough. Separate it with a blank line.
- One body line per logical change. Do not list files, repeat the header or write long paragraphs.
- Actions:
add,fix,update,remove,refactor,improve,optimize. - Give a reason in parentheses only when it helps to understand the change.
- Include only what is confirmed by the actual changes.
| Type | Purpose |
|---|---|
feat |
new functionality |
fix |
bug fix |
docs |
documentation |
refactor |
refactoring without behavior change |
perf |
performance |
test |
tests |
build |
build and dependencies |
ci |
CI/CD |
chore |
technical and housekeeping changes |
style |
formatting without logic change |
Choose the type by the content of the changes. Other types are fine if the project uses them.
If actions are needed after deployment, add a final line Note: <what to do and what happens if skipped>. Otherwise omit Note:.
For changes that break backward compatibility, use ! before the colon and/or a BREAKING CHANGE: <description> footer (allowed with any type). Do not use ! for ordinary changes.
- Creating commits or staging files without an explicit user request.
- Adding
Co-Authored-Byor any other mention of AI involvement in commits and PR descriptions. - Uninformative messages, excessive detail, duplicating the header in the body.
fix(module): correct invalid behavior
chore: update project configuration
feat(module): extend existing functionality
- add new behavior (support additional scenarios)
- update validation (handle invalid input)
- fix condition handling (wrong result for empty value)
Note: update the configuration after deployment, or the new behavior will stay unavailable.
feat(module)!: change public interface
BREAKING CHANGE: the previous interface is no longer supported.
- Analyze the changes relative to the target branch.
- State the main goal briefly and group changes by meaning.
- Mark breaking changes and required manual steps.
- Add nothing unconfirmed; do not claim tests were run if they were not.
- Do not mention AI involvement.
## Summary
- add new functionality
- update existing behavior
## Testing
- verify expected behavior
## Notes
- required manual actions, if any
Add sections only when there is something to put in them.