| name | conventional-commits |
| topic | Conventional Commits |
| description | Write Conventional Commits messages (v1.0.0) โ type(scope): subject format for changelogs and semver. Use when drafting commit messages, PR titles, or release notes. |
| token_cost | 150 |
| keywords | ["commit","message","conventional","changelog","version","release","git"] |
| related | ["jj-core","sem"] |
Conventional Commits (v1.0.0)
Produce consistent commit messages that parse into changelogs and drive semantic versioning.
Format
type(scope): description
[optional body]
[optional footers]
Rules: header on one line, scope is always included, separate sections with blank lines. Add ! before : for breaking changes (e.g., feat(api)!: remove v1).
Choosing the Type
User-facing changes:
feat: new user-visible behavior โ new CLI flags, UI components, API endpoints
fix: corrected behavior โ fixes crashes, handles edge cases, corrects output
Maintenance:
refactor: structure change without behavior change โ renaming, extracting utilities
perf: performance improvement โ faster algorithms, reduced allocations
chore: general maintenance โ dead code removal, tooling updates
style: formatting only โ whitespace, semicolons, no logic changes
test: test-only changes โ .test.ts, .spec.ts files
build: build system โ package.json, Cargo.toml, bundler config
ci: CI/CD pipelines โ GitHub Actions, deployment scripts
docs: documentation files only โ .md, .txt. Code comments use the type matching the actual code change.
Reverts:
revert: undo a previous commit โ revert: <original-message>
When unsure: new user behavior โ feat, corrected behavior โ fix, otherwise โ chore or a more specific maintenance type.
Writing the Description
Use imperative mood, be specific, avoid generic words like "stuff" or "changes".
โ
feat(auth): add passwordless login
โ
fix(api): handle empty pagination cursor
โ docs(agent): add behavioral guidelines and core principles (too vague)
โ
docs(agent): add rules for dead code removal, build verification, security (specific)
Breaking Changes
Mark in the header with !:
feat(api)!: remove deprecated v1 endpoints
Or add a BREAKING CHANGE: footer when you need an explanation:
feat(api): remove deprecated v1 endpoints
BREAKING CHANGE: /v1/* endpoints are removed; migrate to /v2/*.
Semantic Versioning Mapping
fix โ patch
feat โ minor
- Any breaking change (
! or BREAKING CHANGE:) โ major
Rules
- Subject line must be imperative mood ("add" not "added" or "adds")
- No period at end of subject line
- Keep subject under 72 characters
- Use
BREAKING CHANGE: footer for breaking changes
- Map types to semver: fixโpatch, featโminor, breakingโmajor
When Asked to Write a Commit Message
Collect what changed, the scope/module, whether it's user-facing, and any issue IDs. Then produce a conventional header with optional body and footers.