Repository navigation
Open
Labels
Description
Summary
Each PR edits the [Unreleased] block of CHANGELOG.md, so each squash-merge into main makes the next PR conflict. Move to one changelog fragment file per PR and build CHANGELOG.md from the fragments at release time.
Current State
- 121 of 192 first-parent commits on
mainsince 2026-09-01 touchCHANGELOG.md. .gitattributessetsCHANGELOG.md merge=union. Its own comment notes that GitHub still conflicts: the union driver only helps local merges.- Guard wave 1 (2026-09-20) needed a scratch
resolve-changelog.pyfor N serial conflict rounds. PR chore(guard): post-release action items from the 2026-09-20 run #1133 shipped the union workaround. /releasereads[Unreleased]directly: Step 3 (stamps the version heading) and the feature-bullet extraction at ~L330 (sed -n '/^## \[Unreleased\]/,/^## \[/p').- Merge queue (linked issue) won't fix this: a conflicting PR is removed from the queue.
Proposed Change
Each PR adds a file under changelog.d/ (or similar), named so two PRs never collide (e.g. <issue>-<slug>.md), holding a section key (Added/Fixed/Changed) and the entry text. /release gathers the fragments into a new version section, deletes them, and commits.
Tool options:
- changie: fragments only, does not own versioning. Standalone Go binary, so it adds a non-npm dependency to release.
- @changesets/cli: npm-native, but it also bumps versions and writes the changelog its own way, which clashes with
/release's own bump. - ~50-line script in
scripts/: no new dependency, fits the existingscripts/+ vitest pattern.
Recommendation: the in-repo script, unless the spec finds a reason to use changie.
Exec's "add an [Unreleased] entry" instruction has to switch to "add a fragment".
Acceptance Criteria
- AC-1: exec SKILL.md (and mirrors) instructs writing a changelog fragment, not editing
CHANGELOG.md— Evidence:grep -n "changelog.d" .claude/skills/exec/SKILL.md - AC-2: a collate script turns fragments into a version section grouped by kind, deletes the fragments, and fails non-zero on a malformed fragment — Evidence:
npx vitest run scripts/changelog-collate.test.ts - AC-3:
/releaseStep 3 and the feature-bullet step read the collated output, not[Unreleased]— Evidence:grep -nE "changelog.d|collate" .claude/skills/release/SKILL.md - AC-4: two branches that each add a fragment merge into
mainwithout conflict — Evidence: scripted two-branch merge in a test - AC-5: the existing
[Unreleased]entries are migrated or kept, and none are lost — Evidence: diff of the next release's section against the pre-change[Unreleased]
Context
- Location:
CHANGELOG.md,.gitattributes,.claude/skills/{exec,release}/SKILL.md,scripts/ - Type: Infrastructure
- Effort: Medium
- Identified by:
/improveanalysis (tooling research, 2026-10-07)
Related
- Merge queue issue (filed alongside), chore(guard): post-release action items from the 2026-09-20 run #1133
Activity
admarble commentedon Oct 7, 2026
Paired with #1350 (merge queue). Its
merge_grouptrigger should cover the fragment-collate check too, if that becomes a CI job.admarble commentedon Oct 8, 2026
Runner note (sequant run, 2026-10-08):
plugin/is frozen while the plugin-directory review is open. This issue's skill edits are its core, so do them as specified (sync the mirrors as usual); the runner will hold the PR unmerged until the review closes.npm test; CI runs it. Use the affected-tests rules in exec's skill (improve(skills): phases run affected tests (vitest --changed) instead of the full suite; CI keeps the full run #1349): the changed and AC-named tests, theSKILL_ROOTStests, foreground,timeout 590. Commit every ~10 minutes.SEQUANT_MUTATIONmarkers and the AC table in exec's final## Summary. The 2.19.0 server may drop it, and the runner will restore it from the transcript.admarble commentedon Oct 8, 2026
Complexity: Standard (5 ACs, 5 directories)
AC Quality Check
All five ACs are single-line with an
Evidence:clause. I ran the command-shaped ones onmain: AC-1 and AC-3grepforchangelog.d|collateand find 0 matches in the exec and release skills, andscripts/changelog-collate.test.tsdoes not exist, so none of them pass today.npx vitest run scripts/changelog-collate.test.ts(agit inittemp repo, two branches, each adds a fragment,git mergeexits 0).[Unreleased]bullets..claude/skills,templates/skills,plugin/skills(SKILL_ROOTS).Scope Assessment
Non-Goals:⚠️ not in the issue. Proposed: no changie/changesets, no CI job for collation (#1350 may add one), no rewrite of released sections in
CHANGELOG.md.scripts/,changelog.d/, 3 skill roots, root files)Verdict: ✅ SCOPE_OK
Acceptance Criteria
AC-1: exec instructs a fragment, not a CHANGELOG edit
Verification: Unit Test (gate test reading the §3f region of exec SKILL.md)
Scenario: Given exec §3f → When read → Then it names
changelog.d/and does not say to edit## [Unreleased].AC-2: collate script
Verification: Unit Test
Scenario: Given fragments with
Added/Fixed/Changedkeys → When collated for version X → Then a## [X] - datesection grouped by kind is inserted, fragments deleted; a malformed fragment (no key, unknown key, empty body, bad filename) exits non-zero and deletes nothing.AC-3: /release reads collated output
Verification: Unit Test (gate test on Step 3 and the feature-bullet region)
Scenario: Given release SKILL.md → Then Step 3 runs the collate script and the bullet extraction reads the new version section, not
[Unreleased].AC-4: no merge conflict
Verification: Integration Test
Scenario: Given two branches off one commit, each adding a different fragment → When merged → Then exit 0 and both files present.
AC-5: no entries lost
Verification: Unit Test + Manual
Scenario: Given the current
[Unreleased](4 bullets) → When migrated → Then each bullet is one fragment, and collating them reproduces the same bullets.Implementation Plan
Phase 1: Script (TDD)
scripts/changelog-collate.tsplusscripts/changelog-collate.test.ts. Fragment format:changelog.d/<issue>-<slug>.md, first linekind: Added|Fixed|Changed|Removed|Security, rest is the bullet. Collation is deterministic (sort by issue number).--checkvalidates without writing, for a possible CI job. Add annpm run changelog:collatescript.Phase 2: Skills (edit
.claude/skills, thennpm run sync:skills)git addlist at L537 to include deletedchangelog.d/*.[Unreleased]. The issue omits it. It must check for a fragment named for the issue, orchangelog_missingfires on every PR. Run thelint-skill-gatesandSKILL_ROOTStests.scripts/release.shL62-75 stamps[Unreleased]. Switch it to collate, or the two release paths diverge.Phase 3: Migrate
[Unreleased]bullets into fragments, keep an empty## [Unreleased]heading as the insertion anchor, update.gitattributes(drop the union driver and its comment once nothing edits CHANGELOG.md in PRs), addchangelog.d/README.md, add this PR's own fragment.Design Review
scripts/(existing script plus vitest pattern), called from/release./releasebump).merge=unionin chore(guard): post-release action items from the 2026-09-20 run #1133, and a scratchresolve-changelog.pyin the 2026-09-20 wave. Both are workarounds for one cause (a shared file). Fragments fix the class, so this is not a third patch.[Unreleased]: producers: exec §3f, hand edits. Consumers: release Step 3 and bullets,scripts/release.sh, qa §10a (8 sites), the three skill roots. All covered by the plan.docs/features/exec-qa-phase-guards.mdand theac-lintertest only mention the word, so no change.ADR: Q2 rejects changie and changesets, so the exec PR should include an ADR in
docs/adr/(next is 0011, per its README).Feature Quality Planning
plugin/is frozen per the runner note, so mirror edits are the issue's core. The PR is held unmerged.[Unreleased]. Keep the anchor and make collate append any remaining[Unreleased]bullets, so nothing is lost.Open Questions
collate --check? Recommendation: no, defer 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. Impact: a malformed fragment is found at release.Recommended Workflow
Phases: exec → qa
Quality Loop: disabled
Reasoning: the script's unit and integration ACs are covered by exec's tests.
testgenis optional, as the script's behaviour is spelled out above. No UI, no security surface.Label Review
Current: enhancement. Recommended: enhancement, planned. Quality loop stays off.
admarble commentedon Oct 8, 2026
QA Verdict: AC_MET_BUT_NOT_A_PLUS
AC coverage: 6/6 met
Gaps:
Suggestions:
-, which would render as- - ….--date. A bare--dateproduces- undefinedin the heading.admarble commentedon Oct 8, 2026
Execution Verification (runner, 2026-10-08, branch head
c08409fe)Commands run for real against the branch:
npx tsx scripts/changelog-collate.ts 2.20.0 --checkOK: 20 entries for 2.20.0, exit 0, worktree unchangednpx tsx scripts/changelog-collate.ts 2.20.0 --date 2026-10-08Collated: 20 entries for 2.20.0, exit 0.## [2.20.0] - 2026-10-08has### Added(4),### Changed(1, #1351),### Fixed(15).## [Unreleased]is left empty, andchangelog.d/holds onlyREADME.md- orphan (#9)inserted under## [Unreleased]before any headingCHANGELOG.md has lines collate cannot place … - orphan (#9).CHANGELOG.mdbyte-identical, all 20 fragments keptscripts/release.shnow callsnpm run changelog:collate -- "$VERSION" --date "$DATE"in place of thesedheading rename. It runs that same entry point underset -e(exit 1 stops the release). The release script itself wasn't run, since it publishes.fix(#1351): collate refuses [Unreleased] lines it cannot place; pin t…
chore(#1351): merge main after v2.20.0
fix(#1351): exec and release fall back to [Unreleased] in a repo with…