From 3159a653b4764200943daf7ee9f78687caa7b43f Mon Sep 17 00:00:00 2001 From: Hector Ventura Date: Sun, 13 Sep 2026 19:54:49 -0500 Subject: [PATCH] docs: stop telling contributors to hand-edit CHANGELOG.md (#24) * docs: stop telling contributors to hand-edit CHANGELOG.md AGENTS.md and the PR template both asked for an entry under [Unreleased], which changelog-guard.yml hard-fails and CONTRIBUTING.md forbids. Both lines predate the semantic-release cutover in #20. AGENTS.md now states the generated-file rule and points at the changelog-edit escape hatch; the template drops the checkbox and says on the Conventional Commits line why no hand edit is needed. * docs: say which commit types actually produce a changelog entry The previous wording claimed every Conventional Commit message is the changelog entry. The commit gate accepts eleven types, but .releaserc.json runs commit-analyzer with no releaseRules and no preset, so only feat, fix, perf and breaking changes release. Two commits landed between 0.2.1 and 0.2.2, a fix and a docs, and only the fix appears in the 0.2.2 section. Corrected in all four places the claim lived: AGENTS.md, the PR template, CONTRIBUTING.md, and the changelogTitle in .releaserc.json. CHANGELOG.md changes with .releaserc.json on purpose and must stay byte identical to it. @semantic-release/changelog strips the configured title from the existing file only when the file starts with it, so changing one without the other would leave the old header in the body and prepend the new one, shipping a duplicated header on the next release. That is what the changelog-edit label exists for. Reported by Greptile on #24 and verified before acting. * docs(ci): correct the same changelog claim in the guard's own error message My first pass grepped only *.md and *.json, so it missed the two copies inside changelog-guard.yml: the header comment and the ::error:: text a contributor actually sees when the guard fires. A repo-wide grep now returns nothing. --- .github/pull_request_template.md | 3 +-- .github/workflows/changelog-guard.yml | 4 ++-- .releaserc.json | 2 +- AGENTS.md | 2 +- CHANGELOG.md | 2 +- CONTRIBUTING.md | 2 +- 6 files changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index bc157f5..2575495 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -22,7 +22,6 @@ - [ ] `mvn test` passes locally - [ ] New or updated tests added (or explained below why not needed) -- [ ] `CHANGELOG.md` entry added under `[Unreleased]` (user-visible changes) - [ ] `README.md` updated (if a command or flag changed) - [ ] Native binary verified (`mvn package -Pnative`) — required if Jackson serialization or dependencies changed -- [ ] Commit messages / PR title follow [Conventional Commits](https://www.conventionalcommits.org/) +- [ ] Commit messages / PR title follow [Conventional Commits](https://www.conventionalcommits.org/) — a `feat`/`fix`/`perf` subject becomes the release note, so `CHANGELOG.md` needs no hand edit diff --git a/.github/workflows/changelog-guard.yml b/.github/workflows/changelog-guard.yml index 0c683d9..8eb1530 100644 --- a/.github/workflows/changelog-guard.yml +++ b/.github/workflows/changelog-guard.yml @@ -1,7 +1,7 @@ name: Changelog Guard # CHANGELOG.md is generated by semantic-release (the Release Cut workflow) — -# a contributor's Conventional Commit message IS the changelog entry, so PRs +# a feat, fix or perf subject becomes the release note verbatim, so PRs # must not edit the file by hand. Genuine corrections (typos in history, # security notes) are allowed by adding the `changelog-edit` label to the PR. @@ -21,5 +21,5 @@ jobs: steps: - name: Reject hand edits run: | - echo "::error::CHANGELOG.md is generated by semantic-release — your Conventional Commit message is the changelog entry. Remove the CHANGELOG.md changes from this PR, or ask a maintainer for the 'changelog-edit' label if this is a genuine correction." + echo "::error::CHANGELOG.md is generated by semantic-release — a feat, fix or perf subject becomes the release note, so hand edits conflict with the release commit. Remove the CHANGELOG.md changes from this PR, or ask a maintainer for the 'changelog-edit' label if this is a genuine correction." exit 1 diff --git a/.releaserc.json b/.releaserc.json index 1dc43a0..b579667 100644 --- a/.releaserc.json +++ b/.releaserc.json @@ -10,7 +10,7 @@ "@semantic-release/changelog", { "changelogFile": "CHANGELOG.md", - "changelogTitle": "# Changelog\n\nEntries in this file are generated by [semantic-release](https://github.com/semantic-release/semantic-release) from Conventional Commit messages — do not edit it by hand; your commit message is the changelog entry. Historic sections at the bottom were maintained by hand in the Keep a Changelog format." + "changelogTitle": "# Changelog\n\nEntries in this file are generated by [semantic-release](https://github.com/semantic-release/semantic-release) from Conventional Commit messages — do not edit it by hand. A `feat`, `fix` or `perf` subject becomes a release note verbatim; the other accepted types produce no entry. Historic sections at the bottom were maintained by hand in the Keep a Changelog format." } ], [ diff --git a/AGENTS.md b/AGENTS.md index e1de8df..913c965 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -162,5 +162,5 @@ printer.error("Container 'floci' not found.\nRun 'floci start' to launch one."); ## Documentation Rules - `README.md` documents all four product trees (AWS, GCP, Azure, OCI). If you add/change a command or flag, update the README in the same change. -- `CHANGELOG.md` follows Keep a Changelog. Every user-visible change gets an entry under `[Unreleased]` in the same PR. +- `CHANGELOG.md` is generated by semantic-release from Conventional Commit messages — **never edit it by hand**. A `feat`, `fix` or `perf` subject (or a breaking change) becomes a release note verbatim, so write those from the user's point of view: what was broken or what is new, not how it was implemented. The other accepted types (`docs`, `chore`, `refactor`, `test`, `build`, `ci`) pass CI but produce no release and no entry. `changelog-guard.yml` fails any PR that touches the file; genuine corrections to history need the `changelog-edit` label. - `CLAUDE.md` is gitignored (maintainer-local); this file (`AGENTS.md`) is the tracked source of truth for agent guidance. Update it here. diff --git a/CHANGELOG.md b/CHANGELOG.md index fad4b61..7551f44 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -Entries in this file are generated by [semantic-release](https://github.com/semantic-release/semantic-release) from Conventional Commit messages — do not edit it by hand; your commit message is the changelog entry. Historic sections at the bottom were maintained by hand in the Keep a Changelog format. +Entries in this file are generated by [semantic-release](https://github.com/semantic-release/semantic-release) from Conventional Commit messages — do not edit it by hand. A `feat`, `fix` or `perf` subject becomes a release note verbatim; the other accepted types produce no entry. Historic sections at the bottom were maintained by hand in the Keep a Changelog format. ## [0.2.2](https://github.com/floci-io/floci-cli/compare/0.2.1...0.2.2) (2026-09-13) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 459796b..cbef40f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -115,7 +115,7 @@ Do not include `Co-Authored-By` trailers for AI tools in commit messages. Attrib ## Changelog -`CHANGELOG.md` is generated by [semantic-release](https://github.com/semantic-release/semantic-release) from Conventional Commit messages. **Do not edit it by hand**. Your commit message *is* the changelog entry, so write it from the user's point of view (what was broken / what's new, not how it was implemented). Genuine corrections to the file (typos in history, security notes) require the `changelog-edit` label on the PR. +`CHANGELOG.md` is generated by [semantic-release](https://github.com/semantic-release/semantic-release) from Conventional Commit messages. **Do not edit it by hand**. A `feat`, `fix` or `perf` subject (or a breaking change) becomes a release note verbatim, so write those from the user's point of view: what was broken or what's new, not how it was implemented. The other accepted types (`docs`, `chore`, `refactor`, `test`, `build`, `ci`) pass CI but produce no release and no entry, which is normal and needs no action. Genuine corrections to the file (typos in history, security notes) require the `changelog-edit` label on the PR. ## Pull Request Guidelines