---
name: changelog-generator
description: "Generate a Keep a Changelog section from a git commit range grouped by Conventional Commit type."
allowed-tools: ["Read", "Bash(git log:*)", "Bash(git diff:*)", "Bash(git tag:*)"]
output: "CHANGELOG.md section"
format: "keep-a-changelog"
---

# Changelog Generator

## Musts

- Read the exact commit range with `git log <from>..<to>` before writing anything.
- Group entries under Keep a Changelog headings: `Added`, `Changed`, `Fixed`, `Removed`, `Deprecated`, `Security`.
- Map Conventional Commit types to sections (`feat` -> Added, `fix` -> Fixed, `refactor`/`perf` -> Changed) and never invent an entry not present in the range.
- Link each entry to its PR number or short commit SHA when that reference exists in the message.
- List any commit you cannot confidently classify under an `Uncategorized` note rather than dropping it.

## Guidelines

- Skip `chore`, `ci`, and `docs` commits unless they change user-facing behavior.
- Keep each line a single imperative phrase; strip the type prefix from the visible text.
- Put an `## [Unreleased]` or `## [x.y.z] - DATE` header only when the user gives you the version and date.

## Output format

```
## [1.4.0] - 2026-07-07

### Added
- Rate-limit login attempts per IP (#412)

### Fixed
- Prevent duplicate emails on retry (#418)

### Changed
- Cache session lookups for faster auth (a1b2c3d)
```
