@massu/core 1.8.0 → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -0
- package/commands/massu-release.md +23 -1
- package/dist/cli.js +514 -268
- package/package.json +1 -1
- package/src/changelog-generator.ts +178 -0
- package/src/cli.ts +7 -0
- package/src/commands/changelog.ts +165 -0
- package/src/security/registry-pubkey.generated.ts +1 -1
package/README.md
CHANGED
|
@@ -103,6 +103,23 @@ npx massu permissions check-drift
|
|
|
103
103
|
# Exit 4 + stderr "drift[strips-global-defaultmode]: ..." if the trap is present
|
|
104
104
|
```
|
|
105
105
|
|
|
106
|
+
### Changelog Generation
|
|
107
|
+
|
|
108
|
+
Release-boundary CHANGELOG entries are auto-drafted by `npx massu changelog generate` (shipped 1.9.0+). The generator reads commit subjects since the last git tag, groups them by `(plan-<token>)` paren-notation (the same convention enforced by CR-40), and pulls each plan file's `## Changelog Summary` section verbatim into a Keep-a-Changelog 1.1.0-compliant entry. Goal: "fewer changelog entries, more meaningful" — one entry per release, structured by plan-token, instead of per-commit noise.
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
# Auto-draft entry for commits since the last tag
|
|
112
|
+
npx massu changelog generate > /tmp/draft-entry.md
|
|
113
|
+
|
|
114
|
+
# Read-only verify that the latest CHANGELOG entry references every plan-token
|
|
115
|
+
# in the commit range since the last tag
|
|
116
|
+
npx massu changelog verify
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
**Plan-file `## Changelog Summary` contract**: any plan whose Status is in the shipped subset (SHIPPED, IMPLEMENTED, COMPLETE, SUPERSEDED, APPROVED) MUST contain a `## Changelog Summary` section. The plan-status validator (`scripts/massu-plan-status-validator.sh`) enforces this — plans missing the section fail validation. The release generator reads this section to produce the CHANGELOG entry body, so plan authors describe shipped behavior once (in the plan file) and the generator propagates it.
|
|
120
|
+
|
|
121
|
+
**Pre-tag gate**: `scripts/pre-push-light.sh` step `[11/11] Plan-Token Changelog Currency` fires when `packages/core/package.json#version` drifts from the latest git tag (i.e., a release is in progress). The gate BLOCKS the push if CHANGELOG.md doesn't have a `## [X.Y.Z]` heading matching the new version AND doesn't reference every plan-token in the commit range since the last tag. The CI workflow at `.github/workflows/ci.yml` mirrors this check (3-layer enforcement: pre-push + CI + drift-guard vitest).
|
|
122
|
+
|
|
106
123
|
## Documentation
|
|
107
124
|
|
|
108
125
|
Full documentation at [massu.ai](https://massu.ai).
|
|
@@ -179,7 +179,29 @@ fi
|
|
|
179
179
|
|
|
180
180
|
## STEP 3: CHANGELOG GENERATION
|
|
181
181
|
|
|
182
|
-
### 3.
|
|
182
|
+
### 3.0 Auto-Generate Draft Entry (PREFERRED, plan-1.9.0+)
|
|
183
|
+
|
|
184
|
+
The `npx massu changelog generate` subcommand auto-drafts an entry by reading
|
|
185
|
+
commit subjects since the last tag, grouping by `(plan-<token>)` paren-notation,
|
|
186
|
+
and pulling the prose from each plan file's `## Changelog Summary` section. This
|
|
187
|
+
makes "fewer changelog entries, more meaningful" the default workflow.
|
|
188
|
+
|
|
189
|
+
```bash
|
|
190
|
+
# Generate draft into a tmp file for operator review
|
|
191
|
+
npx massu changelog generate > /tmp/draft-changelog-entry.md
|
|
192
|
+
cat /tmp/draft-changelog-entry.md
|
|
193
|
+
|
|
194
|
+
# Operator reviews; edit inline if needed; then prepend to CHANGELOG.md.
|
|
195
|
+
# Stage D pre-tag gate (scripts/pre-push-light.sh step 11) BLOCKS the push
|
|
196
|
+
# if package.json#version drifts from the last tag but CHANGELOG.md does
|
|
197
|
+
# not have a matching `## [X.Y.Z]` heading AND references every plan-token
|
|
198
|
+
# in the commit range since the last tag.
|
|
199
|
+
|
|
200
|
+
# Sanity-check completeness post-edit
|
|
201
|
+
npx massu changelog verify # exit 0 = all plan-tokens referenced
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
### 3.1 Parse Conventional Commits (legacy / fallback when no plan-token paren-notation)
|
|
183
205
|
|
|
184
206
|
```bash
|
|
185
207
|
LAST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "")
|