From cefc7f3e72ed77382e3b831b0ea8a6546c17b4fa Mon Sep 17 00:00:00 2001 From: Mikola Lysenko Date: Mon, 5 Oct 2026 07:27:20 -0400 Subject: [PATCH] Write CHANGELOG only when cutting a release Agents were adding long per-PR changelog entries. Release notes are now written once, at cut time, by the release agent from the merged PR log and the code. AGENTS.md (imported by CLAUDE.md) tells every agent to leave CHANGELOG.md alone, and the release runbook says where the notes come from. Co-Authored-By: Claude Opus 5.5 (1M context) --- AGENTS.md | 12 ++++++++++++ CLAUDE.md | 1 + docs/releasing.md | 11 ++++++++--- 3 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 AGENTS.md create mode 100644 CLAUDE.md diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 000000000..ef889d410 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,12 @@ +# Agent instructions + +## CHANGELOG.md is written only at release time + +Don't add, edit or delete entries in `CHANGELOG.md` in a feature, fix, +refactor, CI or docs PR, even if a doc, template or reviewer asks for one. +The `[Unreleased]` section is written when a release is cut, by the release +agent, from the PRs merged since the last tag and the code itself. Put the +details of a change in its commit messages and PR description instead. + +If a PR you work on already changes `CHANGELOG.md`, restore that file to its +merge-base version. The only exception is a release PR (branch `release/v*`). diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 000000000..43c994c2d --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1 @@ +@AGENTS.md diff --git a/docs/releasing.md b/docs/releasing.md index 64463d92c..7b457dd57 100644 --- a/docs/releasing.md +++ b/docs/releasing.md @@ -15,9 +15,14 @@ See the [migration instructions](migrating-to-v5.md#installation-channels). ## 1. Write the release notes -Make sure `CHANGELOG.md`'s `[Unreleased]` section describes this release — -`bump-version.sh` refuses to run if it is empty, and `release-lint.sh` blocks -a release whose CHANGELOG section is missing or empty. +Release notes are written now, at cut time, and only here: PRs never touch +`CHANGELOG.md`. The release agent (or whoever cuts the release) writes the +`[Unreleased]` section from the PRs merged since the last tag +(`git log --first-parent ..origin/main`) and from reading the code +those PRs changed. Describe user-visible behavior, not implementation +details. `bump-version.sh` refuses to run if the section is empty, and +`release-lint.sh` blocks a release whose CHANGELOG section is missing or +empty. ## 2. Open the version-bump PR