changelog
Keep CHANGELOG.md honest and human-readable, in Keep a Changelog format with SemVer versioning.
When to invoke
- User says "update the changelog", "add to CHANGELOG", "generate release notes"
- User is preparing a release (tagging, version bump)
- After merging a feature/fix, if the project keeps CHANGELOG in lockstep with merges (check the recent commit pattern to confirm)
What to do
- Read existing
CHANGELOG.mdto learn the project's category vocabulary, ordering, and link style. Match it. - Determine scope of update:
- "Add to unreleased": the user just merged something; append to the
[Unreleased]section. - "Cut a release": user is bumping version; rename
[Unreleased]to[X.Y.Z] - YYYY-MM-DD, add a fresh empty[Unreleased], update version-comparison links at the bottom.
- "Add to unreleased": the user just merged something; append to the
- Categorize entries under the standard headings (skip empty ones):
- Added — new features
- Changed — non-breaking changes to existing behavior
- Deprecated — soon-to-be-removed features
- Removed — features removed in this release
- Fixed — bug fixes
- Security — vulnerability fixes
- Source the entries from
git log <last-tag>..HEAD --oneline(Conventional Commits map cleanly:feat:→ Added,fix:→ Fixed,refactor:/perf:→ Changed, etc.). Skip noise (chore:,ci:,docs:unless user-facing). - Phrase entries from the user's perspective, not the developer's. "Added retry on flaky upstream calls" — not "Implemented exponential backoff in HTTPClient.do_request".
- One bullet per change, reference PR/issue if available:
- Added retry on 5xx upstream errors. (#123).
Output format
Print the diff to apply (or the new section, if appending). Don't reformat unrelated parts of the file.
If you're cutting a release, include the version-link footer update:
[Unreleased]: https://github.com/owner/repo/compare/v1.2.0...HEAD
[1.2.0]: https://github.com/owner/repo/compare/v1.1.0...v1.2.0
If the user has git-cliff configured, mention that running git-cliff may be the better path and just generate the section it would produce as a preview.