release-changelog
GitHub用于审计、组装和同步 Newton 项目的发布更新日志。通过 Towncrier 管理片段,确保变更记录准确、去重且符合规范,支持从草稿预览到最终生成的全流程。
Trigger Scenarios
Install
npx skills add newton-physics/newton --skill release-changelog -g -y
SKILL.md
Frontmatter
{
"name": "release-changelog",
"description": "Use when auditing Newton changelog fragments, building a dated release changelog, or synchronizing a release build back to main."
}
Newton Release Changelog
Pending user-facing changes live in Towncrier fragments under changelog/.
CHANGELOG.md is generated only on a release branch. Shipped sections are
immutable; the assembled section for the pending release remains a rolling
document until tagging. Follow changelog/README.md as the command and format
authority.
Audit pending changes
- Identify the release ref and comparison base. Audit
release-X.Yonce it exists; otherwise audit the intended main ref. - Protect released history. Diff
CHANGELOG.mdfrom the latest stable tag and require explicit maintainer approval for edits to dated sections. - Render a non-mutating preview, which also validates Towncrier's renderable
fragment filenames:
uvx --from towncrier==25.8.0 towncrier build --draft \ --version X.Y.Z --date YYYY-MM-DD - Compare the preview with the release audit and commit range from the previous
release. Inspect
.skipreasons separately. - Preserve information. Rephrase, split, merge, or recategorize fragments only when the facts remain intact. Ask before deleting information or downgrading a user-visible change.
- Use only
Added,Changed,Deprecated,Removed, andFixed, in that order. Keep migration and retesting guidance in affected entries. - Remove exact and semantic duplicates. When a feature and its fix both land in one cycle, describe the final user-visible behavior once.
- Keep
Addedfor new public APIs, options, features, examples, and docs. Put existing-API behavior, warning, default, importer, and solver changes inChanged, even when they expand support. - Give every breaking, removed, deprecated, or default-changing entry a
concrete action. Never direct users to
newton._src. - A numeric fragment identifier is a GitHub issue number. Towncrier renders its issue link automatically; do not rewrite it as a pull request number.
Assemble the release during RC stabilization
After the initial release scope has been audited on release-X.Y, assemble the
current fragments early enough for maintainer review:
uvx --from towncrier==25.8.0 towncrier build --draft \
--version X.Y.Z --date YYYY-MM-DD
uvx --from towncrier==25.8.0 towncrier build --yes \
--version X.Y.Z --date YYYY-MM-DD
git rm --ignore-unmatch "changelog/*.skip"
git add -A CHANGELOG.md changelog
Review and approve the draft before running the mutating command. Towncrier
inserts the dated section below [Unreleased] and deletes rendered fragments.
It ignores .skip files, so remove those explicitly. Review the staged diff in
a changelog-only pull request labeled release-management.
After assembly, apply the audit rules above to the dated section: verify
completeness, grouping, deduplication, wording, categories, and migration
guidance. Keep editorial cleanup in the changelog-management commits that will
later be synchronized to main.
The first Towncrier release requires one migration audit. The insertion marker
sits above the legacy [Unreleased] entries so they remain under the first
generated release title. Merge duplicate category headings without dropping or
duplicating an entry. Later releases need no special handling.
Treat the assembled section as a rolling document. For every later cherry-pick before tagging:
- Validate the new fragments and render them with
towncrier build --draft. - Fold the previewed entries into the existing dated section without creating a second release heading.
- Delete exactly the consumed
.mdand.skipfragments, then stageCHANGELOG.mdandchangelog/. - Rerun the changelog cleanup and
release-auditchecks, and merge the update as another changelog-onlyrelease-managementpull request.
Final GA preparation verifies the completed section and confirms that no release-branch fragments remain. Do not postpone the full cleanup until GA.
Synchronize to main
After tagging:
- Create a changelog-only branch from current
main. - Cherry-pick, in order, every changelog-management commit from
release-X.Y: the initial Towncrier build, editorial cleanup, and all later cherry-pick additions. - Confirm fragments deleted by those commits disappear while fragments added to
mainafter the branch cut remain underchangelog/. - Confirm the dated section matches the release tag and older history is unchanged.
- Open a changelog-only pull request labeled
release-management.
Do not replace the whole file with the release-branch copy. The commits' path-level deletions are what preserve main-only fragments.
Checks
uvx --from towncrier==25.8.0 towncrier build --draft \
--version X.Y.Z --date YYYY-MM-DD
git diff v<latest-release> -- CHANGELOG.md changelog
git diff --cached --name-status -- CHANGELOG.md changelog
rg -ni "removed|deprecated|in favor of|use .* instead|renam|replac|default|breaking" \
CHANGELOG.md changelog
Confirm that [Unreleased] is empty after the first migration, no dated history
changed, released entries appear exactly once, and post-cut main fragments
survive synchronization.
Version History
-
904aef2
Current 2026-08-20 04:02
采用 Towncrier 片段机制重构发布日志工作流。
- 9db21eb 2026-07-25 09:49


