Skip to content

chore: Block manual CHANGELOG.md edits#3810

Merged
buenaflor merged 1 commit into
mainfrom
buenaflor/chore/block-changelog-edits
Jun 30, 2026
Merged

chore: Block manual CHANGELOG.md edits#3810
buenaflor merged 1 commit into
mainfrom
buenaflor/chore/block-changelog-edits

Conversation

@buenaflor

Copy link
Copy Markdown
Contributor

Agents repeatedly add manual entries to CHANGELOG.md even though craft generates the changelog from PR titles at release time. This adds enforcement plus clearer guidance so it stops happening.

  • PreToolUse deny-hook in .claude/settings.json: blocks Edit/Write/MultiEdit on any CHANGELOG.md (the root file and the per-package symlinks) and returns the reason. Enforced by the harness, so it does not depend on an agent reading docs. craft's release-time writes are unaffected — it does not edit through Claude Code.
  • AGENTS.md: the changelog line previously read "see CONTRIBUTING.md for policy and custom entries", which invited editing the file. Replaced with an explicit "never edit CHANGELOG.md" rule in the early Conventions section, and rewrote the Pull Requests line. Custom entries belong in the PR description's ## Changelog Entry section, not the file.

The hook takes effect once these settings are loaded (next session start or /hooks reload).

Changelogs are auto-generated by craft from PR titles, but agents
repeatedly add manual CHANGELOG.md entries. The AGENTS.md guidance
was a soft pointer and its "custom entries" wording invited editing
the file.

Add a PreToolUse deny-hook that blocks Edit/Write/MultiEdit on any
CHANGELOG.md, and rewrite the AGENTS.md changelog rule as an explicit
prohibition (custom entries go in the PR description, not the file).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor

Semver Impact of This PR

None (no version bump detected)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


Features

Dart

  • Add array attributes to telemetry by buenaflor in #3778
  • Mark span streaming API as non-experimental by buenaflor in #3756

Enhancements

  • (flutter) Support int64 values from sentry-native by buenaflor in #3760

Dependencies

Deps

  • chore(deps): update Native SDK to v0.15.2 by github-actions in #3785
  • chore(deps): update Android SDK to v8.45.0 by github-actions in #3790
  • chore(deps): update Native SDK to v0.15.1 by github-actions in #3757

Internal Changes

  • (flutter) Remove flaky frames measurement tests by buenaflor in #3783
  • Block manual CHANGELOG.md edits by buenaflor in #3810
  • Add AI Use section to CONTRIBUTING.md by christophaigner in #3803

🤖 This preview updates automatically when you update the PR.

@buenaflor
buenaflor marked this pull request as ready for review June 30, 2026 12:00
@buenaflor
buenaflor requested a review from denrase as a code owner June 30, 2026 12:00
Copilot AI review requested due to automatic review settings June 30, 2026 12:00
Comment thread .claude/settings.json

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds guardrails to prevent manual CHANGELOG.md edits by agents, aligning workflow with craft’s release-time changelog generation from PR titles.

Changes:

  • Documents a strict “never edit CHANGELOG.md” rule in AGENTS.md, including where to place custom changelog entries (PR description) and how to exclude entries (skip-changelog).
  • Adds a .claude/settings.json PreToolUse deny hook intended to block Edit/Write/MultiEdit operations targeting any CHANGELOG.md.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
AGENTS.md Clarifies policy and directs custom changelog entries to PR description instead of editing files.
.claude/settings.json Adds a PreToolUse hook to deny tool-based edits to CHANGELOG.md.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .claude/settings.json
@buenaflor
buenaflor merged commit 2f4a993 into main Jun 30, 2026
20 checks passed
@buenaflor
buenaflor deleted the buenaflor/chore/block-changelog-edits branch June 30, 2026 13:48
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.

3 participants