add update-changelog Makefile target#271
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdds 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 targetflowchart 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]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The new
CLAUDE.mdfile isn’t referenced anywhere in the Makefile or theclaudecommand, so it currently has no effect; either wire it into theupdate-changelogprompt or remove it. - The
update-changelogtarget assumesclaudeis 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.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
There was a problem hiding this comment.
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.
|
|
||
| .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" |
There was a problem hiding this comment.
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.mdAnd 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.
| @@ -0,0 +1 @@ | |||
| @AGENTS.md | |||
There was a problem hiding this comment.
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.
| @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. |
nikosavola
left a comment
There was a problem hiding this comment.
A ✴️🤖-only approach doesn't seem very robust, especially with such a brief prompt. I would prefer something more robust without agents.
Summary
update-changelogMakefile target that uses Claude to generate a user-friendly changelog from CHANGELOG.md to docs/changelog.mdTest plan
make update-changelogto verify it worksSummary by Sourcery
Add a Makefile target to generate a user-friendly docs changelog using Claude and document agent configuration for Claude.
New Features:
Documentation: