Massu 1.9.0: Plan-token-aware CHANGELOG batcher
Replaces per-commit changelog noise with "fewer entries, more meaningful" — one structured entry per release, grouped by plan-token.
Why this exists
Hand-written CHANGELOG entries drift. Two failure modes were observable:
- Per-commit enforcement is too noisy. Industry-standard approaches like Conventional Commits + release-please fire on every commit; the operator explicitly rejected this.
- Version-bump-without-CHANGELOG-entry was only caught at pre-push test gate — too late if CI auto-publish is ever wired.
The natural batching unit is the (plan-<token>) commit subject convention already enforced by CR-40. Every commit since the last tag is grouped by plan-token; each plan-token becomes one section in the changelog entry.
New CLI cluster: massu changelog <sub>
# Auto-draft entry for commits since the last tag
npx massu changelog generate > /tmp/draft-entry.md
# Read-only verify the latest CHANGELOG entry references every plan-token
# in commits since the last tag
npx massu changelog verifyThe generator reads commit subjects since git describe --tags --abbrev=0, groups by (plan-<token>) paren-notation, looks up each plan file's ## Changelog Summary section, and emits a Keep-a-Changelog 1.1.0-compliant entry. Operator pipes/copies into CHANGELOG.md (no forced overwrite).
Plan-file ## Changelog Summary contract
Every plan with Status in the shipped subset (SHIPPED, IMPLEMENTED, COMPLETE, SUPERSEDED, APPROVED) MUST contain a ## Changelog Summary heading. The plan-status validator enforces this; 19 existing shipped plans were backfilled automatically. Plan authors describe shipped behavior once (in the plan file) and the generator propagates it.
Pre-tag gate (3-layer enforcement)
- Pre-push:
scripts/pre-push-light.shstep[11/11] Plan-Token Changelog Currencyfires whenpackages/core/package.json#versiondrifts from the latest git tag. BLOCKS the push if CHANGELOG.md lacks the matching[X.Y.Z]heading or doesn't reference every plan-token in the commit range. - CI mirror:
.github/workflows/ci.ymltype-check job runs the same script. - Vitest drift-guard:
website/src/tests/plan-token-changelog-coverage.test.ts(PTCC-01..04) asserts coverage at vitest run time.
Mirrors the CR-49 leak-guard 3-layer pattern precedent.
Shared regex SoT
scripts/lib/plan-token-regex.sh is the single source of truth for the (feat|fix|chore|docs)(plan-<token>) regex. Consumed by massu-plan-commit-drift.sh (refactored to source from lib), massu-changelog-coverage.sh (new pre-tag gate), and changelog-generator.ts (via TS literal). Eliminates N+1 parser drift per CR-46.
/massu-release skill integration
Step 3.0 added BEFORE the legacy conventional-commits parse: /massu-release now invokes npx massu changelog generate automatically as part of Stage D.
Self-application proof
The v1.9.0 release's own CHANGELOG entry was GENERATED by the new tool. npx @massu/core@1.9.0 changelog generate (against the real repo's v1.8.0..HEAD range) emits byte-equivalent content to what shipped in CHANGELOG.md.
Ship state
Production deploy at https://massu.ai/changelog HTTP 200 with [1.9.0] entry live. 25 new tests pass (15 CHG-GEN + 6 CHG-CLI + 4 PTCC). Pattern scanner 16/16 PASS; pre-push-light 11/11 PASS. Plan converged 7→2→0 across 3 audit iterations.
See plan-1.9.0-plan-token-aware-changelog-batcher and [1.9.0] in CHANGELOG.md.