DEV Community

Attila Albert
Attila Albert

Posted on

Let your AI coding assistant write the changelog, without dumping git log into it

By Elena Novak, NBT

Release day often goes like this: the code is ready, the tag is waiting, and someone has to write the changelog. It's tempting to paste git log into the file and call it done. That's also exactly what the people behind Keep a Changelog ask you not to do. The first line of their site reads: "Don't let your friends dump git logs into changelogs."

An AI coding assistant is very good at the work in between: reading forty commits and the diffs behind them, grouping them, and rewriting them in words a user understands. It just needs the right inputs and a clear format to fill. This guide sets that up so it's repeatable, and so you review a short draft instead of writing from nothing. If you're still choosing a tool, our comparison of AI coding assistant options: Claude Code, Codex and Copilot CLI covers the main terminal agents. Everything below works with any of them.

The format rules come from Keep a Changelog 1.1.0 and Conventional Commits 1.0.0, both fetched on 6 December 2026.

Why git log isn't a changelog

Keep a Changelog explains the difference well. A commit documents a step in how the code evolved. A changelog entry documents a noteworthy difference, often across several commits, for the people who use the software. Commit logs are full of noise: merge commits, commits with vague titles, documentation tweaks.

So the assistant's job isn't to summarise commits one by one. It's to work out what changed for a user, and leave the rest out.

Step 1: give the file a fixed shape

Start CHANGELOG.md with the structure the assistant will fill in. Keep a Changelog's version looks like this:

# Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

## [Unreleased]

## [1.4.0] - 2026-11-20
### Added
- Export to CSV from the reports page.
### Fixed
- Dates in the weekly email now use the reader's time zone.
Enter fullscreen mode Exit fullscreen mode

Under each version, entries go into six fixed groups: Added for new features, Changed for changes to existing behaviour, Deprecated for features that will be removed soon, Removed for features now gone, Fixed for bug fixes and Security for vulnerabilities. A fixed set of headings is exactly what an AI does well with, because sorting into known groups is far more reliable than inventing its own structure.

Keep an Unreleased section at the top. Keep a Changelog recommends it so people can see what's coming, and so that at release time you only need to rename it to the new version.

Step 2: make commits easier to sort (optional, but it helps)

If your team writes commits in the Conventional Commits format, the assistant has a strong head start. The format is <type>[optional scope]: <description>, and the spec ties the main types to version numbers:

  • fix: patches a bug, which matches a PATCH release in Semantic Versioning.
  • feat: adds a feature, which matches a MINOR release.
  • A BREAKING CHANGE: footer, or a ! after the type (feat!: or feat(api)!:), marks a breaking change, which matches a MAJOR release.

Other types such as docs:, refactor:, test: and ci: are allowed. The spec mentions them as conventions from commitlint's Angular-based config, and they have no effect on the version unless they include a breaking change. That makes them easy candidates to leave out of a user-facing changelog.

You don't need perfect commit discipline for this to work. A mix of good and lazy commit messages is fine, as long as the assistant reads the diffs as well as the messages.

Step 3: hand it the right range

Ask for the changes since the last tag, with enough detail to understand them:

LAST=$(git describe --tags --abbrev=0)
git log "$LAST"..HEAD --no-merges --pretty=format:'%h %s%n%b' > /tmp/commits.txt
git diff --stat "$LAST"..HEAD > /tmp/diffstat.txt
Enter fullscreen mode Exit fullscreen mode

--no-merges drops the merge commits Keep a Changelog calls noise. The diffstat shows the assistant where the real changes were, so a commit titled "misc fixes" that touched the billing module gets a proper look.

Step 4: the prompt

Here is a prompt to start from. Paste it into your assistant in the repository:

Update the [Unreleased] section of CHANGELOG.md for the changes since tag $LAST. Read /tmp/commits.txt and /tmp/diffstat.txt, and open the diff of any commit whose message doesn't make the user-facing effect clear. Rules: write for users of the product, not developers. One line per change, starting with what the user can now do or what was fixed. Group under Added, Changed, Deprecated, Removed, Fixed, Security, and leave out empty groups. Merge commits that make up one change into one line. Leave out refactors, tests, CI, dependency bumps and docs unless they change behaviour. List any breaking change first under Changed or Removed, starting with "BREAKING:". Don't invent anything you can't point to in a commit, and at the end of your reply list the commit hashes you left out.

The last sentence is what keeps the draft honest. Every line has to come from something real, and the list of left-out commits gives you a quick way to check nothing important was dropped.

Step 5: review it like code

Read the draft as a user would. Three checks catch most problems:

  1. Is anything inflated? "Improved performance" from a commit that changed one query is a claim you can't back up. Make it specific or remove it.
  2. Is a breaking change hidden? Compare any ! or BREAKING CHANGE commits with the draft.
  3. Did a security fix go into Fixed? It belongs under Security, where people looking for it will find it.

Then edit, commit the changelog together with the version bump, and tag.

Make it a habit, not a release-day chore

The cheapest version of this runs after every merged pull request: the assistant adds one or two lines to Unreleased while the change is still fresh. Release day then shrinks to renaming the section and adding the date. Keep a Changelog prefers dates written like 2017-07-17 (year, month, day, largest unit first), so no reader misreads the day.

The assistant does the reading and sorting. You check that what it wrote is true and worth telling users. Split that way, the changelog stops being the step everyone skips.

Top comments (0)