dart-changelog
Use this skill in Codex to run the DART dart-changelog workflow. The editable
workflow source lives in .claude/commands/; this file is its generated adapter
in the shared .agents/skills/ catalog.
Invocation
- Claude Code:
/dart-changelog <arguments>
- Codex:
$dart-changelog <arguments>
Treat the text after the skill name as $ARGUMENTS. When the workflow
references $1, $2, etc., map those to the positional values supplied by the
user.
Command Body
Maintain DART changelog entries: $ARGUMENTS
Purpose
dart-changelog is the reusable changelog decision and writing routine. It is
usually invoked by other DART workflows when they reach a changelog decision,
not directly by users.
Use it to decide whether CHANGELOG.md needs an entry, draft an entry at the
right level of detail, add a PR link after publication, or audit a release
section for missing or over-detailed entries. Keep style, placement, evidence,
and release-note density aligned with docs/onboarding/changelog.md.
Required Reading
@AGENTS.md
@docs/onboarding/changelog.md
@docs/onboarding/release-roadmap.md
@docs/onboarding/release-management.md
Modes
Interpret $ARGUMENTS as one of these modes when present:
decide: determine whether the current change needs a changelog entry and
record the reason for the PR checklist/body when no entry is needed.
draft: write or revise the entry before a PR number exists.
finalize: add the PR link or adjust the entry after a PR exists, keeping the
follow-up local until explicit maintainer/user approval permits a push.
audit: scan a release section or PR set for missing, duplicate,
over-detailed, misplaced, or stale entries.
release-audit: alias for audit when the caller is finalizing a release
section through dart-release-packaging.
If no mode is given, infer the smallest mode that satisfies the caller's need.
Output Contract
Every run must leave the caller with a concise, pasteable decision note. Use
this shape in the response or handoff text. The PR body/checklist needs only the
relevant decision, no-entry reason, or unresolved follow-up, not this full note:
Changelog decision:
- Mode: decide | draft | finalize | audit | release-audit
- Base evidence: <base ref or PR/release inspected>
- Scope evidence: <diff, PR, issue, or release section inspected>
- Decision: entry required | no entry required | entry deferred | audit only
- Target section: <release/category, or N/A>
- Entry text: <final or draft bullet, or N/A>
- PR-body note: <exact no-entry reason or follow-up, or N/A>
- Follow-up: <PR link, maintainer approval, release audit, or none>
For no entry required, the PR-body note must name the evidence-backed reason
rather than just saying "not needed." For entry deferred, say exactly what is
missing, usually the PR number or release target. For finalize, confirm the
entry still matches nearby CHANGELOG.md style after adding the PR link.
Workflow
- Inspect the change and target:
git status --short --branch
git diff --stat
git diff --cached --stat
BASE_REF="$(gh pr view --json baseRefName --jq .baseRefName 2>/dev/null || true)"
# If the caller or arguments name a release branch before PR creation, set
# BASE_REF to that branch before falling back to automatic inference.
if [ -z "$BASE_REF" ]; then
CURRENT_BRANCH="$(git branch --show-current)"
UPSTREAM_REF="$(git rev-parse --abbrev-ref --symbolic-full-name @{upstream} 2>/dev/null || true)"
for REF in "$CURRENT_BRANCH" "${UPSTREAM_REF#origin/}"; do
case "$REF" in
main|release-*) BASE_REF="$REF"; break ;;
esac
done
fi
BASE_REF="${BASE_REF:-main}"
git fetch origin "$BASE_REF"
git diff --stat "origin/$BASE_REF...HEAD"
gh pr diff --name-only 2>/dev/null || true
gh pr list --head "$(git branch --show-current)"
Use the base comparison or PR diff even when the worktree is clean. If a PR,
issue, release, or target branch is named, inspect that live object before
writing and prefer its base over the main fallback.
- Read
docs/onboarding/changelog.md and the relevant CHANGELOG.md release
section. Compare nearby bullets before drafting so wording, section choice,
and level of detail match the current file.
- Decide whether an entry is required using the guide:
- user-visible API, behavior, packaging, CI, docs workflow, AI-infra,
simulation correctness, release, or migration impact usually needs an
entry;
- typo-only, formatting-only, generated-only, and tiny internal refactors
usually do not.
- Record the decision with the Output Contract before modifying
CHANGELOG.md or telling a caller to skip it. The decision must cite the
diff, PR, issue, release section, or target branch that was inspected.
- When writing, start with the reader-visible outcome, not the implementation
chore. Use one concise bullet, combine closely related changes, avoid author
credits, and avoid one-bullet-per-PR diary style.
- Place the entry under the target branch's release section and nearest
existing category. Do not create a new category for one PR unless the release
shape genuinely needs it.
- Add the best evidence link:
- if a PR number exists, use
([#1234](https://github.com/dartsim/dart/pull/1234));
- if no PR number exists yet, draft without the link and leave the follow-up
local until explicit approval permits another push or PR update.
- For release audits, consolidate noisy implementation ledgers, confirm
breaking/removal/deprecation bullets name a migration or support lane, and
preserve human-readable release notes over exhaustive history.
- Validate with the gate appropriate to the caller. For changelog-only edits,
run the docs-only checks from
docs/ai/verification.md; before any commit,
run pixi run lint.
Caller Contract
Other workflows should call this routine whenever they touch behavior or docs
that may need release notes. The caller keeps ownership of the overall task,
validation, PR body, and approval boundary; dart-changelog owns the changelog
decision, wording, placement, evidence-link hygiene, and the pasteable decision
note that lets Claude, Codex, and manual contributors record the same outcome.
Output
Report:
- the changelog decision note in the Output Contract shape above;
- the drafted or finalized entry text and its
CHANGELOG.md placement;
- gates run (
pixi run lint, docs-only checks) and their results;
- any follow-up left local pending explicit maintainer/user approval.
1---2name: dart-changelog3description: DART Changelog: decide, draft, finalize, or audit DART changelog entries4---56<!-- AUTO-GENERATED FILE - DO NOT EDIT MANUALLY -->7<!-- Source: .claude/commands/dart-changelog.md -->8<!-- Sync script: scripts/sync_ai_commands.py -->9<!-- Run `pixi run sync-ai-commands` to update -->1011# dart-changelog1213Use this skill in Codex to run the DART `dart-changelog` workflow. The editable14workflow source lives in `.claude/commands/`; this file is its generated adapter15in the shared `.agents/skills/` catalog.1617## Invocation1819- Claude Code: `/dart-changelog <arguments>`20- Codex: `$dart-changelog <arguments>`2122Treat the text after the skill name as `$ARGUMENTS`. When the workflow23references `$1`, `$2`, etc., map those to the positional values supplied by the24user.2526## Command Body2728Maintain DART changelog entries: $ARGUMENTS2930## Purpose3132`dart-changelog` is the reusable changelog decision and writing routine. It is33usually invoked by other DART workflows when they reach a changelog decision,34not directly by users.3536Use it to decide whether `CHANGELOG.md` needs an entry, draft an entry at the37right level of detail, add a PR link after publication, or audit a release38section for missing or over-detailed entries. Keep style, placement, evidence,39and release-note density aligned with `docs/onboarding/changelog.md`.4041## Required Reading4243@AGENTS.md44@docs/onboarding/changelog.md45@docs/onboarding/release-roadmap.md46@docs/onboarding/release-management.md4748## Modes4950Interpret `$ARGUMENTS` as one of these modes when present:5152- `decide`: determine whether the current change needs a changelog entry and53 record the reason for the PR checklist/body when no entry is needed.54- `draft`: write or revise the entry before a PR number exists.55- `finalize`: add the PR link or adjust the entry after a PR exists, keeping the56 follow-up local until explicit maintainer/user approval permits a push.57- `audit`: scan a release section or PR set for missing, duplicate,58 over-detailed, misplaced, or stale entries.59- `release-audit`: alias for `audit` when the caller is finalizing a release60 section through `dart-release-packaging`.6162If no mode is given, infer the smallest mode that satisfies the caller's need.6364## Output Contract6566Every run must leave the caller with a concise, pasteable decision note. Use67this shape in the response or handoff text. The PR body/checklist needs only the68relevant decision, no-entry reason, or unresolved follow-up, not this full note:6970```markdown71Changelog decision:7273- Mode: decide | draft | finalize | audit | release-audit74- Base evidence: <base ref or PR/release inspected>75- Scope evidence: <diff, PR, issue, or release section inspected>76- Decision: entry required | no entry required | entry deferred | audit only77- Target section: <release/category, or N/A>78- Entry text: <final or draft bullet, or N/A>79- PR-body note: <exact no-entry reason or follow-up, or N/A>80- Follow-up: <PR link, maintainer approval, release audit, or none>81```8283For `no entry required`, the PR-body note must name the evidence-backed reason84rather than just saying "not needed." For `entry deferred`, say exactly what is85missing, usually the PR number or release target. For `finalize`, confirm the86entry still matches nearby `CHANGELOG.md` style after adding the PR link.8788## Workflow89901. Inspect the change and target:91 ```bash92 git status --short --branch93 git diff --stat94 git diff --cached --stat95 BASE_REF="$(gh pr view --json baseRefName --jq .baseRefName 2>/dev/null || true)"96 # If the caller or arguments name a release branch before PR creation, set97 # BASE_REF to that branch before falling back to automatic inference.98 if [ -z "$BASE_REF" ]; then99 CURRENT_BRANCH="$(git branch --show-current)"100 UPSTREAM_REF="$(git rev-parse --abbrev-ref --symbolic-full-name @{upstream} 2>/dev/null || true)"101 for REF in "$CURRENT_BRANCH" "${UPSTREAM_REF#origin/}"; do102 case "$REF" in103 main|release-*) BASE_REF="$REF"; break ;;104 esac105 done106 fi107 BASE_REF="${BASE_REF:-main}"108 git fetch origin "$BASE_REF"109 git diff --stat "origin/$BASE_REF...HEAD"110 gh pr diff --name-only 2>/dev/null || true111 gh pr list --head "$(git branch --show-current)"112 ```113 Use the base comparison or PR diff even when the worktree is clean. If a PR,114 issue, release, or target branch is named, inspect that live object before115 writing and prefer its base over the `main` fallback.1162. Read `docs/onboarding/changelog.md` and the relevant `CHANGELOG.md` release117 section. Compare nearby bullets before drafting so wording, section choice,118 and level of detail match the current file.1193. Decide whether an entry is required using the guide:120 - user-visible API, behavior, packaging, CI, docs workflow, AI-infra,121 simulation correctness, release, or migration impact usually needs an122 entry;123 - typo-only, formatting-only, generated-only, and tiny internal refactors124 usually do not.1254. Record the decision with the Output Contract before modifying126 `CHANGELOG.md` or telling a caller to skip it. The decision must cite the127 diff, PR, issue, release section, or target branch that was inspected.1285. When writing, start with the reader-visible outcome, not the implementation129 chore. Use one concise bullet, combine closely related changes, avoid author130 credits, and avoid one-bullet-per-PR diary style.1316. Place the entry under the target branch's release section and nearest132 existing category. Do not create a new category for one PR unless the release133 shape genuinely needs it.1347. Add the best evidence link:135 - if a PR number exists, use `([#1234](https://github.com/dartsim/dart/pull/1234))`;136 - if no PR number exists yet, draft without the link and leave the follow-up137 local until explicit approval permits another push or PR update.1388. For release audits, consolidate noisy implementation ledgers, confirm139 breaking/removal/deprecation bullets name a migration or support lane, and140 preserve human-readable release notes over exhaustive history.1419. Validate with the gate appropriate to the caller. For changelog-only edits,142 run the docs-only checks from `docs/ai/verification.md`; before any commit,143 run `pixi run lint`.144145## Caller Contract146147Other workflows should call this routine whenever they touch behavior or docs148that may need release notes. The caller keeps ownership of the overall task,149validation, PR body, and approval boundary; `dart-changelog` owns the changelog150decision, wording, placement, evidence-link hygiene, and the pasteable decision151note that lets Claude, Codex, and manual contributors record the same outcome.152153## Output154155Report:156157- the changelog decision note in the Output Contract shape above;158- the drafted or finalized entry text and its `CHANGELOG.md` placement;159- gates run (`pixi run lint`, docs-only checks) and their results;160- any follow-up left local pending explicit maintainer/user approval.