Changelog Generator
Generate a structured CHANGELOG.md from git commits between two tags or refs.
Workflow
- Determine the range:
- If user specifies two refs, use them:
git log ref1..ref2 - If user specifies one ref, use
ref..HEAD - If no ref, use last tag to HEAD:
git describe --tags --abbrev=0..HEAD
- If user specifies two refs, use them:
- Run
scripts/parse-commits.tsto parse git log into structured data - Classify each commit using
rules/conventional-commits.md - Group by category and sort by importance
- Generate CHANGELOG.md in the format below
Output Format
# Changelog
## [version] - YYYY-MM-DD
### Breaking Changes
- **module**: description (#PR)
### Features
- **module**: description (#PR)
### Bug Fixes
- **module**: description (#PR)
### Performance
- **module**: description (#PR)
### Other
- **module**: description (#PR)
Rules
- Follow classification in
rules/conventional-commits.md - Include PR/issue number if present in commit message
- Extract scope (module name) from conventional commit prefix:
feat(auth): ...→ scope isauth - Skip merge commits and CI-only commits
- If a commit has
BREAKING CHANGE:in body, always list under Breaking Changes
Constraints
- Do not modify any source files — only generate/update CHANGELOG.md
- Preserve existing CHANGELOG.md content below the new section
- If no meaningful commits found, report "No changes to document"