Skip to content

Add a shared changelog protocol (roll-changelog + verify-changelog) #31

Description

@mabry1985

Summary

Add a fleet-shared changelog protocol to release-tools — a roll-changelog bin (promote [Unreleased] → a dated version section) plus a verify-changelog check (PR gate) — mirroring the existing init/verify-workspace-config and apply-branch-protection bins. Today each repo that wants a committed changelog has to carry its own script; this centralizes it like the rest of our release plumbing.

Motivation

We just prototyped this in protoAgent (manual-cadence releases + a committed CHANGELOG.md):

  • scripts/changelog.py roll <version> — moves everything under ## [Unreleased] into a dated ## [X.Y.Z] - YYYY-MM-DD section, leaving a fresh empty Unreleased block.
  • prepare-release.yml runs the roll and commits CHANGELOG.md inside the chore: release vX.Y.Z PR, so it passes through the branch ruleset (PR + required checks) like any change — release.yml never pushes to main directly.
  • Keep a Changelog format; contributors add entries under [Unreleased] in their feature PRs.

It works, but it's a per-repo Python script. Every repo on the standard will want the same thing, and rewrite-release-notes already owns the outbound notes (Discord embed from the commit range) — an in-repo changelog is the complementary half, and both belong in the shared toolkit.

Proposed surface

Mirror verify-workspace-config's zero-dependency, node-builtins-only style:

  • bin/roll-changelog.mjs --version X.Y.Z [--date YYYY-MM-DD] [--root .]
    Promote [Unreleased]## [X.Y.Z] - <date>; recreate an empty [Unreleased]; normalize blank lines. No-op-safe; non-zero + clear error if there's no [Unreleased] heading.
  • bin/verify-changelog.mjs --root . (the PR gate)
    Assert CHANGELOG.md exists, has an [Unreleased] heading, and (optionally, configurable) that the PR diff adds at least one entry under it. Plugs into checks.yml next to verify-workspace-config.
  • Optional: bin/init-changelog.mjs to seed the Keep a Changelog skeleton, paralleling init-workspace-config.

Integration shape

Notes / cross-refs

Happy to port the protoAgent prototype (scripts/changelog.py + the prepare-release roll step + the Keep a Changelog seed) as the starting implementation if useful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions