|
| 1 | +# Conventional Commit Standards |
| 2 | + |
| 3 | +## Structure |
| 4 | +``` |
| 5 | +<type>(<scope>): <concise subject> |
| 6 | +
|
| 7 | +<body explaining the "why" of the change> |
| 8 | +
|
| 9 | +<footer for BREAKING CHANGES or issue references> |
| 10 | +``` |
| 11 | + |
| 12 | +## Mandatory Types |
| 13 | +* **feat**: A new feature. |
| 14 | +* **fix**: A bug fix. |
| 15 | +* **docs**: Documentation only changes. |
| 16 | +* **style**: Changes that do not affect the meaning of the code (white-space, formatting, etc.). |
| 17 | +* **refactor**: A code change that neither fixes a bug nor adds a feature. |
| 18 | +* **perf**: A code change that improves performance. |
| 19 | +* **test**: Adding missing tests or correcting existing tests. |
| 20 | +* **build**: Changes that affect the build system or external dependencies (e.g., npm, make). |
| 21 | +* **ci**: Changes to our CI configuration files and scripts (e.g., GitHub Actions). |
| 22 | +* **chore**: Other changes that don't modify source or test files (e.g., updating `.gitignore`). |
| 23 | + |
| 24 | +## Scope Detection |
| 25 | +* **Infer Scope:** Look at file paths. |
| 26 | + * If changes are isolated (e.g., `src/auth/`, `lib/utils.ts`), use that as scope (e.g., `auth`, `utils`). |
| 27 | + * If changes are global or spread across many modules, omit the scope. |
| 28 | + |
| 29 | +## Subject Rules |
| 30 | +* Max 50 characters. |
| 31 | +* Use **imperative mood** (e.g., "add", "fix", "change"). |
| 32 | +* Lowercase start, no trailing period. |
| 33 | +* **NO BACKTICKS**: Never use backticks (`) in the subject. |
| 34 | + |
| 35 | +## Body Formatting |
| 36 | +* Blank line after subject. |
| 37 | +* Explain **intent** and **reasoning** ("why", not just "what"). |
| 38 | +* Use bulleted lists (`-`) for multiple distinct changes. |
| 39 | +* Wrap at 72 characters. |
| 40 | +* **NO BACKTICKS**: Never use backticks (`) in the body. Use single quotes (') instead if needed. |
| 41 | + |
| 42 | +## Breaking Changes |
| 43 | +* **Detection:** Look for removal of public API, signature changes, or incompatible config changes. |
| 44 | +* **Format:** Footer MUST start with `BREAKING CHANGE:` followed by description and migration instructions. |
| 45 | + |
| 46 | +## Footer |
| 47 | +* Reference issues using `Closes: #`. |
0 commit comments