Generate Changelog
Follow this workflow in order. Do not skip step 1.
1. Generate Source Data First
Always run the gen-changelog.sh script, UNLESS the user provides the script output directly in their request.
bash scripts/gen-changelog.sh
The JSON result will be generated when you run the gen-changelog.sh script. Treat this command output (or the provided output) as the single source of truth for:
last_tagnext_versiondate- categorized commit list
If the output is No changes since last release. (or no commits are found), there is no need to create or update the changelog. Report that no changelog update is needed and stop immediately without modifying any files.
2. Use the Changelog Template
Use CHANGELOG.md as the rendering template for the new release block.
Map data from JSON output:
{{version}}->next_versionwithout leadingv{{date}}->date{{#added}}-> commits withcategory == "added"{{#breaking}}-> commits withcategory == "breaking"orbreaking == true{{#changed}}-> commits withcategory == "changed"{{#fixed}}-> commits withcategory == "fixed"{{#reverted}}-> commits withcategory == "reverted"
For each commit line:
- Use
- {{message}} (#{{pr}})only whenpris not empty. - Use
- {{message}}whenpris empty.
Remove empty sections so the output does not include blank category headings, and ensure each changelog entry starts with a capital letter.
3. Update CHANGELOG.md
If CHANGELOG.md does not exist, create it from the rendered template content.
If CHANGELOG.md already exists:
- Keep the existing title and intro paragraph.
- Insert the new release section directly below the intro, before older releases.
- Preserve older release entries below the new one.
4. Verify Final Result
Before finishing, review the generated changelog to ensure the following:
- The version number and release date exactly match the values returned by the script output.
- Section headings appear in the correct order: Added, Breaking Changes, Changed, Fixed, Reverted.
- Empty sections are completely removed so no unused category headings remain.
- Each changelog entry starts with a capital letter.
- Each entry is slightly improved from the original commit message to be clearer and more informative for end users.
- Avoid raw or technical commit-style messages; rewrite them into short, user-friendly descriptions when necessary.
- The Markdown structure is valid, clean, and easy to read.
- All content is written in English.
Additional Guidelines
- When release notes are requested (for example for App Store, Play Store, or announcements), generate them based on the latest version in
CHANGELOG.md. - Read and follow all guidelines defined in
references/release_notes.md. - Only include the most important user-facing improvements from that release.
- Ensure the final release notes follow the structure, tone, and language limits specified in the reference file.