Blob: .opencode/commands/changelog.md
description: Summarize current branch changes for a PR description or release note subtask: true
Generate a changelog for the current branch. $ARGUMENTS
Steps:
Determine the branch and base. Run:
git log --oneline origin/main..HEADIf there are no commits, try
main..HEAD. If the user specified a different base in the arguments, use that.Read the full diff to understand the actual changes:
git diff origin/main...HEAD --statRead commit messages for context:
git log origin/main..HEAD --format='%h %s%n%n%b'Categorize changes. You MUST load the
commit-categoriesskill before categorizing. Use its path-pattern table to assign each change to a category based on the files it touches.Draft the summary. For each category with changes:
- One bullet per logical change (not per commit — squash related commits into one bullet)
- Start each bullet with a verb: Add, Fix, Update, Remove, Refactor
- Include the most important file references
- Note any breaking changes, new compat flags, or new autogates prominently
Output format:
## Summary <1-2 sentence overview of the branch's purpose> ## Changes ### <Category> - <change description> ## Breaking Changes <if any, otherwise omit section> ## Testing <brief note on what tests were added or modified>If the user's arguments request a specific format (e.g., "for release notes", "for PR"), adjust the tone accordingly. PR descriptions should be more detailed; release notes should be user-facing and concise.
IMPORTANT: The output is meant to be copied into a PR or release notes. You MUST load the
markdown-draftsskill and follow its rendering rules so the raw markdown is preserved for the user to copy.