Refresh Changelog Entries
Bring the changelog entries this branch introduced back in sync
with what the branch currently does. With --commit, the correction
lands as a new commit stacked on top; otherwise the edit is left
uncommitted for the user to commit, like /changelog. History is
never rewritten — for that, use the changelog-rewrite-aggressively skill.
Hard scope rule: this command only ever edits changelog content the
branch itself added. Entries that came from the base branch — earlier
releases, or unreleased entries from other work — are read-only. If a
correction would require touching a line the branch didn't add, stop
and ask.
Additional context from user: $ARGUMENTS
Phase 1: Establish scope
Detect the base. If the branch has a PR
(gh pr view --json baseRefName), the base is its baseRefName —
stack-aware. Otherwise detect trunk via
git symbolic-ref refs/remotes/origin/HEAD (fall back to master).
If currently on the base/trunk itself, report and stop.
Find the changelog file the same way /changelog does (scan for
CHANGES, CHANGES.md, CHANGELOG.md, HISTORY.md, NEWS.md,
…). No changelog changes on this branch and no changelog file →
suggest /changelog instead and stop.
Extract the branch's changelog footprint:
git diff origin/<base>...HEAD -- <changelog-file>
The added lines are the branch-owned entries — the only region this
command may edit. Also list the branch commits touching the file:
git log origin/<base>..HEAD --oneline -- <changelog-file>
If the branch has no changelog commits yet, say so and offer to
generate entries via the /changelog procedure instead.
Phase 2: Recompute what the entries should say
Read the sibling command file
the changelog skill and apply its rules
verbatim — the Core Constraint (a branch is not a release), Phase 1
convention detection, Phase 2 commit categorization, and Phase 3 entry
generation and voice. Generate, from the branch's current net
change (git log / git diff against origin/<base>), the entries
the branch should have.
Phase 3: Diff documented vs. actual
Compare the branch-owned entries (Phase 1) against the recomputed
entries (Phase 2):
- Accurate — leave byte-for-byte untouched, including phrasing
you'd have written differently. Refresh fixes drift, not style.
- Stale — the entry describes something the branch no longer does,
or misstates scope. Rewrite it in place, matching the file's style.
- Missing — a user-visible change with no entry. Insert it in the
correct section of the unreleased block, following the sibling
command's section-order and homogeneity rules.
- Orphaned — an entry whose change was removed from the branch
entirely. Remove the entry.
- Out of reach — the fix would touch content the branch didn't add
(e.g., the branch's entry was merged into a pre-existing bullet, or
a section heading shared with base-branch entries must change). Ask
via
ask-user-choice before touching anything outside the branch's
footprint; if declined, leave it and note the limitation.
Phase 4: Present, edit, commit
Mandatory gate — never edit or commit without explicit approval.
- Present a summary line
(
Branch: <name> | Base: <base> | Changelog commits: <shas>),
then the proposed edit as old → new markdown for each touched
entry, and the statement that everything else in the file is
untouched. Include the Target: unreleased section line from the
sibling command's Phase 4 — refresh never touches version headings
or version files.
- On approval, apply with the Edit tool, confined to the branch's
footprint plus approved insertions in the unreleased block.
- Show the modified region for verification, then verify the scope
guard mechanically:
git diff -- <changelog-file> combined with the
branch footprint must show no modifications to base-branch lines.
- Commit only with
--commit. When $ARGUMENTS contains
--commit, commit the edit as a new commit on top of the branch,
following the commit message rules in the sibling command's Commit
message conventions for CHANGES edits — project convention first,
fallback docs(CHANGES) <what the update covers>, never a version,
never a #N in the message. Stage the changelog file explicitly by
path — never git add -A. Without --commit (the default), leave
the edit uncommitted and show a ready-to-use commit message built
from the same rules — committing is the user's decision, as with
/changelog.
Rules
- Branch-scoped, always: never modify changelog content the branch
didn't introduce; when a fix requires it, ask first.
- Never rewrites: no rebase, no amend, no force-push. With
--commit it stacks a single new commit; otherwise it commits
nothing. Rewriting the branch's changelog history is
the changelog-rewrite-aggressively skill.
- A branch is not a release: all Core Constraint rules from
/changelog apply — no version headings, no version predictions, no
version-file edits.
- Whole-branch perspective: entries document the net result
against the base, not the branch's internal history.
- Ask on ambiguity; the cost of a question is smaller than a
changelog that lies.
Portability notes
ask-user-choice — present the listed options and wait for the user to pick one. Hosts with a structured multiple-choice tool (Claude Code's AskUserQuestion) should use it; otherwise print a numbered list and wait for a numbered reply. Never proceed on an assumed answer.
$ARGUMENTS — the text the user passed when invoking this skill. If your host does not substitute it, read it as the user's request in the current turn, and ask when there is none.
1---2name: changelog-refresh3description: Update the branch's own changelog entries to match its current net change; commits only with --commit4---56# Refresh Changelog Entries78Bring the changelog entries **this branch introduced** back in sync9with what the branch currently does. With `--commit`, the correction10lands as a **new commit stacked on top**; otherwise the edit is left11uncommitted for the user to commit, like `/changelog`. History is12never rewritten — for that, use the `changelog-rewrite-aggressively` skill.1314Hard scope rule: this command only ever edits changelog content the15branch itself added. Entries that came from the base branch — earlier16releases, or unreleased entries from other work — are read-only. If a17correction would require touching a line the branch didn't add, stop18and ask.1920Additional context from user: $ARGUMENTS2122---2324## Phase 1: Establish scope25261. **Detect the base.** If the branch has a PR27 (`gh pr view --json baseRefName`), the base is its `baseRefName` —28 stack-aware. Otherwise detect trunk via29 `git symbolic-ref refs/remotes/origin/HEAD` (fall back to `master`).30 If currently on the base/trunk itself, report and stop.31322. **Find the changelog file** the same way `/changelog` does (scan for33 `CHANGES`, `CHANGES.md`, `CHANGELOG.md`, `HISTORY.md`, `NEWS.md`,34 …). No changelog changes on this branch and no changelog file →35 suggest `/changelog` instead and stop.36373. **Extract the branch's changelog footprint**:38 ```39 git diff origin/<base>...HEAD -- <changelog-file>40 ```41 The added lines are the branch-owned entries — the only region this42 command may edit. Also list the branch commits touching the file:43 ```44 git log origin/<base>..HEAD --oneline -- <changelog-file>45 ```46 If the branch has no changelog commits yet, say so and offer to47 generate entries via the `/changelog` procedure instead.4849## Phase 2: Recompute what the entries should say5051Read the sibling command file52the `changelog` skill and apply its rules53verbatim — the *Core Constraint* (a branch is not a release), Phase 154convention detection, Phase 2 commit categorization, and Phase 3 entry55generation and voice. Generate, from the branch's **current net56change** (`git log` / `git diff` against `origin/<base>`), the entries57the branch *should* have.5859## Phase 3: Diff documented vs. actual6061Compare the branch-owned entries (Phase 1) against the recomputed62entries (Phase 2):6364- **Accurate** — leave byte-for-byte untouched, including phrasing65 you'd have written differently. Refresh fixes drift, not style.66- **Stale** — the entry describes something the branch no longer does,67 or misstates scope. Rewrite it in place, matching the file's style.68- **Missing** — a user-visible change with no entry. Insert it in the69 correct section of the unreleased block, following the sibling70 command's section-order and homogeneity rules.71- **Orphaned** — an entry whose change was removed from the branch72 entirely. Remove the entry.73- **Out of reach** — the fix would touch content the branch didn't add74 (e.g., the branch's entry was merged into a pre-existing bullet, or75 a section heading shared with base-branch entries must change). Ask76 via `ask-user-choice` before touching anything outside the branch's77 footprint; if declined, leave it and note the limitation.7879## Phase 4: Present, edit, commit8081**Mandatory gate — never edit or commit without explicit approval.**82831. Present a summary line84 (`Branch: <name> | Base: <base> | Changelog commits: <shas>`),85 then the proposed edit as old → new markdown for each touched86 entry, and the statement that everything else in the file is87 untouched. Include the `Target: unreleased section` line from the88 sibling command's Phase 4 — refresh never touches version headings89 or version files.902. On approval, apply with the Edit tool, confined to the branch's91 footprint plus approved insertions in the unreleased block.923. Show the modified region for verification, then verify the scope93 guard mechanically: `git diff -- <changelog-file>` combined with the94 branch footprint must show no modifications to base-branch lines.954. **Commit only with `--commit`.** When `$ARGUMENTS` contains96 `--commit`, commit the edit as a new commit on top of the branch,97 following the commit message rules in the sibling command's *Commit98 message conventions for CHANGES edits* — project convention first,99 fallback `docs(CHANGES) <what the update covers>`, never a version,100 never a `#N` in the message. Stage the changelog file explicitly by101 path — never `git add -A`. Without `--commit` (the default), leave102 the edit uncommitted and show a ready-to-use commit message built103 from the same rules — committing is the user's decision, as with104 `/changelog`.105106---107108## Rules109110- **Branch-scoped, always**: never modify changelog content the branch111 didn't introduce; when a fix requires it, ask first.112- **Never rewrites**: no rebase, no amend, no force-push. With113 `--commit` it stacks a single new commit; otherwise it commits114 nothing. Rewriting the branch's changelog history is115 the `changelog-rewrite-aggressively` skill.116- **A branch is not a release**: all Core Constraint rules from117 `/changelog` apply — no version headings, no version predictions, no118 version-file edits.119- **Whole-branch perspective**: entries document the net result120 against the base, not the branch's internal history.121- **Ask on ambiguity**; the cost of a question is smaller than a122 changelog that lies.123124125## Portability notes126127- `ask-user-choice` — present the listed options and wait for the user to pick one. Hosts with a structured multiple-choice tool (Claude Code's `AskUserQuestion`) should use it; otherwise print a numbered list and wait for a numbered reply. Never proceed on an assumed answer.128- `$ARGUMENTS` — the text the user passed when invoking this skill. If your host does not substitute it, read it as the user's request in the current turn, and ask when there is none.