> Adapted from [commit-messages-guide](https://github.com/RomuloOliveira/commit-messages-guide) by Romulo Oliveira, licensed under [CC-BY-4.0](https://creativecommons.org/licenses/by/4.0/).
- **type** (required): the category of change, from the [Types](#types) table below.
- **scope** (optional): the area of the codebase affected, in parentheses and lowercase (`auth`, `api`, `parser`, `deps`). Omit it when the change is broad or no single scope fits.
- **description** (required): a short summary in imperative mood, lowercase, with no trailing period.
Examples:
```
feat(parser): add retry logic for transient upstream failures
Keep the whole header (type, scope, and description) under 72 characters, and aim to keep the description itself around 50. The header is for scanning; details go in the body.
| `fix: correct race condition in queue processor` | `fix: this commit fixes a race condition` |
| `feat: add input validation for email field` | `feat: this PR adds validation` |
| `refactor: simplify auth middleware for clarity` | `refactor: I refactored the auth middleware` |
## Breaking changes
Mark a breaking change with a `!` before the colon, and add a `BREAKING CHANGE:` footer describing the migration. Breaking changes drive a SemVer MAJOR bump (see [Versioning](git-workflow.md#versioning)).
```
feat(api)!: remove the deprecated /v1/receipts endpoint
BREAKING CHANGE: clients must migrate to /v2/receipts. The v1
Use the `Refs:` trailer to point at the work this commit relates to:
- **Jira key** (`PROJ-123`) when the work tracks a Jira issue. The GitHub for Jira app reads the key and threads the commit into the issue's development panel. See [git-workflow.md](git-workflow.md#linking-to-jira).
- **GitHub issue** (`#123`) when the work tracks a GitHub issue in the same repo.
List both when both apply: `Refs: PROJ-123, #123`. The key only needs to appear once in the branch, PR title, or any commit for the link to form, but including it in the trailer keeps the reference attached to the individual change.