|
| 1 | +--- |
| 2 | +description: Audit changelog and draft entries for upcoming release |
| 3 | +allowed-tools: Bash(git:*), Bash(jq:*), Bash(bd:*), Read, Edit, Grep, AskUserQuestion, Skill(beads) |
| 4 | +model: haiku |
| 5 | +--- |
| 6 | + |
| 7 | +Audit the changelog for missing entries since the last release and draft updates. |
| 8 | + |
| 9 | +## Instructions |
| 10 | + |
| 11 | +Follow these steps exactly in order. |
| 12 | + |
| 13 | +### Step 1: Get the last release tag |
| 14 | + |
| 15 | +```bash |
| 16 | +git describe --tags --abbrev=0 2>/dev/null || echo "no tags yet" |
| 17 | +``` |
| 18 | + |
| 19 | +### Step 2: Get commits and bead IDs since the tag |
| 20 | + |
| 21 | +Replace `<TAG>` with actual tag from Step 1: |
| 22 | + |
| 23 | +```bash |
| 24 | +git log <TAG>..HEAD --oneline --no-merges |
| 25 | +git log <TAG>..HEAD --format="%B" --no-merges | grep -oE "(commando|forge)-[a-z0-9]+" | sort -u |
| 26 | +``` |
| 27 | + |
| 28 | +Also read CHANGELOG.md `[Unreleased]` section. |
| 29 | + |
| 30 | +### Step 3: Categorize each commit |
| 31 | + |
| 32 | +**INCLUDE if:** |
| 33 | + |
| 34 | +- Commit type is `feat:` or `fix:` |
| 35 | +- Change affects CLI users (commands, output, behavior) |
| 36 | + |
| 37 | +**SKIP if:** |
| 38 | + |
| 39 | +- Type is: `docs:`, `ci:`, `test:`, `chore:`, `bd:`, `bd sync:`, `refactor:` |
| 40 | +- Change is in: `.claude/`, `.github/`, `scripts/`, `docs/`, `.beads/` |
| 41 | +- Bead ID already in CHANGELOG.md |
| 42 | + |
| 43 | +### Step 4: Get bead details |
| 44 | + |
| 45 | +```bash |
| 46 | +bd list --status=closed --limit=20 |
| 47 | +``` |
| 48 | + |
| 49 | +For each bead ID from commits: |
| 50 | + |
| 51 | +```bash |
| 52 | +bd show <bead-id> |
| 53 | +``` |
| 54 | + |
| 55 | +### Step 5: Check for gaps |
| 56 | + |
| 57 | +Compare closed beads vs beads in commits. Flag user-facing beads missing from commits. |
| 58 | + |
| 59 | +### Step 6: Draft changelog entries |
| 60 | + |
| 61 | +Format: |
| 62 | + |
| 63 | +- One line per entry, max 80 chars |
| 64 | +- Start with verb: "Add", "Fix", "Change", "Remove" |
| 65 | +- Include bead ID: `(\`commando-xxx\`)` |
| 66 | +- Group by: Added, Changed, Fixed, Removed |
| 67 | + |
| 68 | +### Step 7: Present report |
| 69 | + |
| 70 | +Show: |
| 71 | + |
| 72 | +1. **Commits analyzed** - hash, type, INCLUDE/SKIP, reason |
| 73 | +2. **Beads referenced** - ID, title, type |
| 74 | +3. **Gaps** - missing beads or "None" |
| 75 | +4. **Draft entries** - grouped by section |
| 76 | + |
| 77 | +### Step 8: Ask for confirmation |
| 78 | + |
| 79 | +Use `AskUserQuestion`: |
| 80 | + |
| 81 | +- Question: "Update CHANGELOG.md with these entries?" |
| 82 | +- Header: "Changelog" |
| 83 | +- Options: "Yes, update" / "No, skip" |
| 84 | + |
| 85 | +### Step 9: Update CHANGELOG.md (if yes) |
| 86 | + |
| 87 | +1. Find `## [Unreleased]` |
| 88 | +2. Insert entries after it, before next version section |
| 89 | +3. Merge with existing entries (no duplicates) |
| 90 | +4. Do NOT commit |
| 91 | +5. Tell user: "CHANGELOG.md updated. Review with `git diff CHANGELOG.md`" |
0 commit comments