Blob: .opencode/commands/whats-new.md
description: Summarize recent commits — by count, date, or time range subtask: true
Show what's new: $ARGUMENTS
Parse the argument to determine the commit range:
- A number (e.g.,
10) → the N most recent commits:git log -<N> since <date>(e.g.,since 2026-02-01) → commits after that date:git log --since='2026-02-01'today→git log --since='midnight'this week→git log --since='1 week ago'this month→git log --since='1 month ago'yesterday→git log --since='2 days ago' --until='midnight'last week→git log --since='2 weeks ago' --until='1 week ago'- No argument → default to
10
Steps:
Target the main branch at origin. Always show what's new on the remote
mainbranch, regardless of which branch is currently checked out. First, fetch the latest:git fetch origin mainThen use
origin/mainas the ref for all subsequent git commands (instead ofHEAD).Fetch the commits. Run
git logwith the parsed range againstorigin/main:git log <range> origin/main --format='%h|%aN|%as|%s' --no-mergesAlso include merge commits separately if relevant:
git log <range> origin/main --format='%h|%aN|%as|%s' --mergesGet the diff stats for scope:
git diff --stat <oldest_commit>^..origin/mainCategorize each commit. You MUST load the
commit-categoriesskill before categorizing. Use its path-pattern table to assign each commit to a category based on the files it touches.Highlight notable changes. Scan commit messages and diffs for:
- New compatibility flags (additions to
compatibility-date.capnp) - New autogates (additions to
autogate.h) - Breaking changes or behavioral changes
- New APIs or features
- Security fixes
- Dependency updates
- If current branch is not
main:- Relevant changes to files touched by the current branch (if any)
- Conflicts with the current branch (if any)
- New compatibility flags (additions to
Output:
## What's New (<range description>) **<N> commits** by <M> authors | <files changed> files changed, <insertions> insertions, <deletions> deletions ### Highlights - <notable changes, if any> ### API - `<hash>` <summary> — <author> ### Node.js compat - `<hash>` <summary> — <author> ...additional categories as needed (omit empty categories)...Keep summaries to one line per commit. Group related commits (e.g., a feature + its fixup) into a single entry where obvious.