--- 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 -` - `since ` (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: 1. **Target the main branch at origin.** Always show what's new on the remote `main` branch, regardless of which branch is currently checked out. First, fetch the latest: ``` git fetch origin main ``` Then use `origin/main` as the ref for all subsequent git commands (instead of `HEAD`). 2. **Fetch the commits.** Run `git log` with the parsed range against `origin/main`: ``` git log origin/main --format='%h|%aN|%as|%s' --no-merges ``` Also include merge commits separately if relevant: ``` git log origin/main --format='%h|%aN|%as|%s' --merges ``` 3. **Get the diff stats** for scope: ``` git diff --stat ^..origin/main ``` 4. **Categorize each commit.** You MUST load the `commit-categories` skill before categorizing. Use its path-pattern table to assign each commit to a category based on the files it touches. 5. **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) 6. **Output:** ``` ## What's New () ** commits** by authors | files changed, insertions, deletions ### Highlights - ### API - `` — ### Node.js compat - `` — ...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.