Repository navigation
feat(#1351): improve(release): changelog fragments instead of a shared [Unreleased] block — 121/192 main commits touch CHANGELOG.md - #1370
Draft
admarble wants to merge 5 commits into
Conversation
Entire-Checkpoint: 4eaec311f8e8
…he migrated fragments to the pre-switch bullets QA round 1: a bullet under [Unreleased] before any ### heading (or stray prose) was silently dropped and the CHANGELOG rewritten without it. Collate now throws before writing or deleting anything. New test: every pre-switch [Unreleased] bullet lives in a migrated fragment or in CHANGELOG.md, so deleting a fragment fails it, and it stays true after a release collates them. Entire-Checkpoint: 81acd4c65887
admarble
marked this pull request as draft
October 8, 2026 04:21
This was referenced Oct 10, 2026
This was referenced Oct 17, 2026
…out changelog.d/ The plugin and templates install these skills into user repos that have a CHANGELOG.md but no changelog.d/ and no changelog:collate script. /exec wrote orphan fragments there, and /release ran a script that does not exist and staged a missing path. Fragments and collate now apply only when changelog.d/ exists; otherwise the old [Unreleased] entry and stamp. /qa's missing-entry advice names both. Entire-Checkpoint: dbf48e1a97a4
admarble
marked this pull request as ready for review
October 19, 2026 15:15
admarble
marked this pull request as draft
October 19, 2026 15:16
Contributor
Author
|
Held until the plugin-directory review closes (owner decision, 2026-10-19). Prepped on 61552d2: main merged after v2.20.0, released fragments removed, [Unreleased] fallback added for repos without changelog.d/. CI test and canary green, portal Validate matches the baseline. Before merging later: merge main again, re-run CI and Validate. |
This was referenced Oct 19, 2026
…release-changelog-fragments-instead-of-a-s
This was referenced Nov 8, 2026
This was referenced Nov 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PRs now add a changelog fragment under
changelog.d/instead of editingCHANGELOG.md, and/releasecollates the fragments at release time. (Body rebuilt from exec's transcript; the 2.19.0 server left the placeholder, #1311.)What changed
scripts/changelog-collate.ts, run asnpm run changelog:collate -- <version> [--date D] [--check].changelog.d/<issue>-<slug>.md: akind: Added|Changed|Fixed|Removed|Securityline, then the entry text.[Unreleased], so PRs opened before this lands lose nothing..claude/skills, thensync:skillstotemplates/skillsandplugin/skills):/exec§3f now writes a fragment./releaseStep 3 runs the collate script, the feature-bullet step reads the new version's section, andgit addincludeschangelog.d./qa§10a accepts a fragment added by the branch as the changelog entry.scripts/release.shnow calls the collate script.[Unreleased]entries became 19 fragments, not the 4 the spec expected, because that block held 4 Added and 15 Fixed bullets. I also added this PR's own fragment,changelog.d/README.md, and ADR-0011 (with its README index row)..gitattributesno longer setsmerge=union.head -n -1in the feature-bullet extraction dropped the last bullet whenever Added was the final section, and BSDheaddoesn't support it. I replaced it.AC verification
scripts/changelog-skills.test.tschecks the §3f region in all three skill rootsscripts/changelog-collate.test.tscovers grouping, deletion, four malformed cases, and--check/releasereads collated outputscripts/changelog-skills.test.tsruns the documented extraction against a really collated filescripts/changelog-collate.test.ts, in agit inittemp reposcripts/changelog-collate.test.tscollates the pre-change[Unreleased]fixture and compares all bullets; I also checked the one-time migration produced 19 fragments from 19 bullets/qaaccepts a fragmentscripts/changelog-skills.test.tsruns the real detection line in a temp git repoChecks
npm run buildandnpm run lintpass, as dolint:skill-callsandlint:skill-argument-substitution.--changedselected all 379 files (thepackage.jsonchange), so I ran a targeted set instead: 52 files, 841 tests, all pass. The set is every test that mentionsSKILL_ROOTS,CHANGELOG,release/SKILLorrelease.sh, plus the tautology-detector test, the new tests andscripts/exec-skill-marker.test.ts.npm test; CI does.Each mutation made exactly the named test fail, then I restored the file.
Pre-PR confidence check
--check, because I added no CI job. Spec Open Question 1 deferred that to improve(ci): merge queue on main instead of strict up-to-date — 37 merge-main commits in the last 40 PRs #1350'smerge_grouptrigger.scripts/release.shedit has only abash -nsyntax check, not a run..claude/skills/qa§10a's other mentions of the changelog entry were updated, but only the detection line has a runtime test.QA round 1 fixes (runner,
c08409fe)unreleasedBulletssilently dropped a bullet sitting under[Unreleased]before any### Kindheading (and any stray prose), then rewrote CHANGELOG.md without it. Collate now throws, naming the lines, before writing or deleting anything.[Unreleased]bullet (from__tests__/fixtures/changelog-unreleased-pre-1351.md) lives in a migrated fragment or in CHANGELOG.md. Deleting a fragment fails it, and it stays true after a release collates the fragments into a released section.changelog-collate.tsandrelease.shis posted on improve(release): changelog fragments instead of a shared [Unreleased] block — 121/192 main commits touch CHANGELOG.md #1351: real--checkand full-collate runs, plus the orphan refusal (exit 1, file byte-identical).Mutation-verified: AC-5 — removed
changelog.d/1276-qa-6i-counts-changed.md;scripts/changelog-collate.test.ts > changelog collate > every pre-switch [Unreleased] bullet lives in a migrated fragment or CHANGELOG.md (AC-5)failed; restored.Mutation-verified: AC-5 — disabled the stray-line throw in
unreleasedBullets;scripts/changelog-collate.test.ts > changelog collate > refuses an [Unreleased] bullet with no ### Kind heading, writing nothingfailed; restored.Before merging (after the review): merge
mainin, and turn any[Unreleased]bullets that landed meanwhile into fragments (or leave them under a### Kindheading, which collate carries over). A--checkCI job for malformed fragments is a follow-up.After v2.20.0 (
5a7e42890,61552d2d9)Merged
mainafter the 2.20.0 release. 2.20.0 shipped from[Unreleased]and already lists the 19 migrated fragments (#1245–#1352), so they are deleted; collating them would list them a second time under 2.21.0. Only the #1351 fragment remains.CHANGELOG.mdtakes main's version. The ADR index keeps 0011 and main's 0012–0017.Fixed: user repos have no
changelog.d/.plugin/skillsandtemplates/skillsship/execand/releaseto repos that have aCHANGELOG.mdbut nochangelog.d/and nochangelog:collatescript. As written,/execwrote fragments that nothing collates, and/releaseran a missing npm script andgit add-ed a missing path. Now:/exec§3f writes a fragment only whenchangelog.d/exists ([ -d changelog.d ]). Otherwise it adds the bullet under## [Unreleased]→### <Kind>, as before./releaseStep 3 collates only whenchangelog.d/exists. Otherwise it renames[Unreleased]to the new version heading and adds a new empty[Unreleased]. Step 6 stageschangelog.donly when git tracks it./qa§10a's missing-entry note and checklist name both forms.Mutation-verified: AC-1 — deleted the "If
changelog.d/does not exist" fallback paragraph from.claude/skills/exec/SKILL.md;scripts/changelog-skills.test.ts > changelog skills (#1351) > exec §3f in .claude/skills writes a fragment only when changelog.d/ existsfailed; restored.Mutation-verified: AC-3 — deleted the "Without
changelog.d/" paragraph from release Step 3;scripts/changelog-skills.test.ts > changelog skills (#1351) > release Step 3 in .claude/skills stamps [Unreleased] when changelog.d/ is absentfailed; restored.Mutation-verified: AC-3 — replaced the Step 6
git ls-files --error-unmatch changelog.dguard with a baregit add -A changelog.d;scripts/changelog-skills.test.ts > changelog skills (#1351) > release staging of changelog.d succeeds in a repo that never had itfailed; restored.Mutation-verified: AC-5 (re-run after 2.20.0) — deleted the #1276 bullet from the
## [2.20.0]section;scripts/changelog-collate.test.ts > changelog collate > every pre-switch [Unreleased] bullet lives in a migrated fragment or CHANGELOG.md (AC-5)failed; restored.Fixes #1351
🤖 Generated by
sequant run; runner fixes after QA