Skip to content

Gather release notes from change files, and rewrite the changelog by kind - #46

Merged
ariloudev merged 7 commits into
developfrom
chore/changelog-fragments
Dec 3, 2026
Merged

ariloudev merged 7 commits into
developfrom
chore/changelog-fragments

Conversation

@ariloudev

Copy link
Copy Markdown
Contributor

Summary

CHANGELOG.md was the file every branch edited, which caused conflicts, and a hard-to-read wall of text. This PR replaces the hand-edited ## Unreleased sections with change files, and rewrites the changelog by kind.

  • Change files. Each branch adds changes/<branch>.md with a kind (breaking, security, added, changed, fixed), a lead of one sentence and at most a short paragraph. A breaking change ends with a Migration: note. Branches never edit CHANGELOG.md. The format is in changes/README.md.
  • scripts/changelog.sh X.Y.Z [date]. At release step 1 it gathers the files into the dated entry, with one heading per kind and each bullet opening with its lead in bold, then deletes them. It refuses an empty changes/, an unknown kind, or a version already in the changelog.
  • Release check. release-check.sh refuses a release (not a prerelease) whose commit still holds change files.
  • Guard. tests/guards/change_files.rs holds each file to the rules. The American-English guard now reads change files and skips CHANGELOG.md, whose entries are all released.
  • Rewrite. The 3.0.0 entries become 19 categorized change files. The full list of library moves lives in docs/migrating-to-3.0.md. Every released entry from 2.0.0 to 2.4.4 is rewritten under Breaking, Security, Added, Changed and Fixed. The file shrinks from 1,532 to 796 lines.
  • Docs. AGENTS.md describes the new workflow and release steps. The minor line no longer needs its own ## Unreleased in X.Y.0 section.

The contract change comes first, in spec:: a new Feature, Release notes, and a refusal added to the release requirement.

The GitHub release notes are extracted the same way as before (the workflow's awk stops at ## , not ### ). Release notes already published on GitHub keep their old text.

Test plan

  • cargo fmt --check, cargo clippy --workspace --all-targets -D warnings
  • cargo nextest run --workspace. The one failure, a test that started date, is fixed in the script commit.
  • loft fmt --check, loft check --fail-on warning, loft reconcile --fail-on warning
  • Negative checks: a broken change file fails the guard, reversed file order fails the order test, and disabling the release check fails its test.

🤖 Generated with Claude Code

ariloudev and others added 7 commits December 3, 2026 01:08
A new Feature, Release notes: each branch writes a change file with a
kind, a lead and at most a short paragraph; scripts/changelog.sh
assembles them into the version's entry; the gate holds each file to
its rules; a release is refused while changes/ holds one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A change file names a known kind, opens with a one-sentence lead of at
most 160 characters, holds at most one paragraph of at most 80 words,
and a breaking change ends with a migration note. CHANGELOG.md, now
released history alone, is no longer read by the spelling guard;
changes/README.md describes the format.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
scripts/changelog.sh X.Y.Z [YYYY-MM-DD] writes the dated entry above
every entry of CHANGELOG.md, one heading per kind, each change file a
bullet that opens with its lead in bold, and removes the files. It
refuses an empty changes/, a file of no known kind and a version the
changelog already holds, changing nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A release tag on a commit that still holds change files is refused,
naming them and the script that gathers them; a prerelease leaves them
for the release that follows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each branch writes a change file under changes/; release step 1 runs
scripts/changelog.sh, the release check refuses a commit that still
holds one, prereleases write a short entry by hand, and a minor line
needs no section of its own.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each entry becomes a categorized change file under changes/, shortened
to a lead and a paragraph; the library moves of the breaking change
are listed in full in docs/migrating-to-3.0.md. CHANGELOG.md holds
released entries alone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each release from 2.0.0 to 2.4.4 lists its changes under Breaking,
Security, Added, Changed and Fixed, each a bold one-sentence lead and
at most a short paragraph; breaking changes carry a migration note and
prerelease entries are cut to what they let people try. 1,532 lines
become 796.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ariloudev
ariloudev merged commit af5028e into develop Dec 3, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant