# Commit Message Template ## Format ``` (): [optional body] [optional footer] Co-Authored-By: Claude Opus 4.5 ``` ## Types | Type | Description | Emoji | |------|-------------|-------| | `feat` | New feature | n/a | | `fix` | Bug fix | n/a | | `docs` | Documentation only | n/a | | `style` | Formatting, missing semicolons | n/a | | `refactor` | Code change that neither fixes a bug nor adds a feature | n/a | | `perf` | Performance improvement | n/a | | `test` | Adding missing tests | n/a | | `chore` | Maintenance tasks | n/a | | `ci` | CI configuration | n/a | | `build` | Build system or dependencies | n/a | | `revert` | Reverts a previous commit | n/a | ## Scope The scope is optional and should be the affected area: - `auth` - Authentication - `api` - API routes - `ui` - User interface - `db` - Database - `config` - Configuration - etc. ## Description Rules 1. Use imperative mood: "add" not "added" or "adds" 2. Lowercase first letter 3. No period at the end 4. Max 50 characters ## Body Rules 1. Separated from subject by a blank line 2. Explain "why" not "what" 3. Wrap at 72 characters ## Footer Rules Used for: - `BREAKING CHANGE: description` - Breaking changes - `Closes #123` - Issue references - `Refs #456` - Related issues ## Examples ### Simple fix ``` fix(auth): resolve token refresh race condition Co-Authored-By: Claude Opus 4.5 ``` ### Feature with body ``` feat(api): add user preferences endpoint Allows users to save and retrieve their app preferences. Includes validation for preference keys and values. Closes #42 Co-Authored-By: Claude Opus 4.5 ``` ### Breaking change ``` refactor(api)!: change response format for /users endpoint BREAKING CHANGE: The /users endpoint now returns an object with a `data` array instead of a direct array. Before: [{ id: 1 }, { id: 2 }] After: { data: [{ id: 1 }, { id: 2 }], meta: { total: 2 } } Co-Authored-By: Claude Opus 4.5 ```