Skip to content

add update-changelog Makefile target#271

Open
joamatab wants to merge 2 commits into
mainfrom
add-update-changelog
Open

add update-changelog Makefile target#271
joamatab wants to merge 2 commits into
mainfrom
add-update-changelog

Conversation

@joamatab
Copy link
Copy Markdown
Contributor

@joamatab joamatab commented May 28, 2026

Summary

  • Add update-changelog Makefile target that uses Claude to generate a user-friendly changelog from CHANGELOG.md to docs/changelog.md

Test plan

  • Run make update-changelog to verify it works

Summary by Sourcery

Add a Makefile target to generate a user-friendly docs changelog using Claude and document agent configuration for Claude.

New Features:

  • Introduce an update-changelog Makefile target that regenerates docs/changelog.md from CHANGELOG.md via Claude.

Documentation:

  • Add CLAUDE.md to reference the agents configuration file used by Claude.

@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented May 28, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Adds a Makefile target to auto-generate a user-friendly docs changelog using Claude, and introduces a CLAUDE.md configuration file referencing AGENTS.md.

Flow diagram for the new update-changelog Makefile target

flowchart TD
    A[Developer runs make update-changelog] --> B[Makefile target update-changelog]
    B --> C[claude CLI
-p remove links and make a user friendly changelog
from @CHANGELOG.md to @docs/changelog.md]
    C --> D[Read CHANGELOG.md]
    C --> E[Apply CLAUDE.md config -> AGENTS.md]
    C --> F[Write docs/changelog.md]
Loading

File-Level Changes

Change Details Files
Introduce an update-changelog Makefile target that uses Claude to transform the main changelog into a docs-friendly version.
  • Add update-changelog target that runs a Claude command to rewrite CHANGELOG.md content into docs/changelog.md without links
  • Extend the list of PHONY targets to include update-changelog
Makefile
Add a Claude configuration/entrypoint file for tooling integration.
  • Create CLAUDE.md that references AGENTS.md to define Claude agent configuration or prompt routing
CLAUDE.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • The new CLAUDE.md file isn’t referenced anywhere in the Makefile or the claude command, so it currently has no effect; either wire it into the update-changelog prompt or remove it.
  • The update-changelog target assumes claude is installed and available on PATH; consider adding a simple check or a clear error message in the target to fail fast when the CLI is missing.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The new `CLAUDE.md` file isn’t referenced anywhere in the Makefile or the `claude` command, so it currently has no effect; either wire it into the `update-changelog` prompt or remove it.
- The `update-changelog` target assumes `claude` is installed and available on PATH; consider adding a simple check or a clear error message in the target to fail fast when the CLI is missing.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request adds an update-changelog target to the Makefile to generate a user-friendly changelog and references @AGENTS.md in CLAUDE.md. Feedback suggests that the @AGENTS.md reference in CLAUDE.md is not a supported directive and should be replaced with explicit build, test, and lint commands. Additionally, the new update-changelog target's output will be overwritten by other documentation targets (like docs-serve) that unconditionally copy the raw CHANGELOG.md file, so those targets should be updated to depend on the changelog file properly.

Comment thread Makefile

.PHONY: drc drc-sample doc docs docs-pdf build
update-changelog:
claude -p "remove links and make a user friendly changelog from @CHANGELOG.md to @docs/changelog.md"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

The update-changelog target generates a user-friendly changelog at docs/changelog.md. However, the existing docs, docs-serve, and docs-pdf targets all contain an unconditional cp CHANGELOG.md docs/changelog.md command.

This means that whenever someone runs make docs or make docs-serve, the Claude-generated docs/changelog.md will be immediately overwritten by the raw CHANGELOG.md.

To fix this, you should update those targets to only copy CHANGELOG.md if docs/changelog.md does not exist, or define docs/changelog.md as a proper Makefile target. For example:

docs/changelog.md:
	cp CHANGELOG.md docs/changelog.md

And then remove the explicit cp CHANGELOG.md docs/changelog.md from the docs, docs-serve, and docs-pdf recipes, making them depend on docs/changelog.md instead.

Comment thread CLAUDE.md
@@ -0,0 +1 @@
@AGENTS.md
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The CLAUDE.md file is used by Claude Code to understand build, test, and lint commands. Simply adding @AGENTS.md is not a supported directive or import syntax in CLAUDE.md, so Claude Code will not automatically load or follow those instructions.

It is highly recommended to provide explicit build, test, and lint commands so the agent can run them successfully, and link to AGENTS.md for additional context.

Suggested change
@AGENTS.md
# Build, Test, and Lint
- Install: make install
- Test: make test
- Lint/Format: pre-commit run --all-files
Refer to AGENTS.md for code standards and pre-commit requirements.

Copy link
Copy Markdown
Member

@nikosavola nikosavola left a comment

Choose a reason for hiding this comment

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

A ✴️🤖-only approach doesn't seem very robust, especially with such a brief prompt. I would prefer something more robust without agents.

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.

2 participants