Skip to content

chore(release): /release pre-flight should regenerate marketplace README + check README 'What's new' freshness #684

Closed

Description

@admarble

Problem

During the v2.4.0 release, two doc surfaces shipped stale because the /release skill's pre-flight does not cover them:

  1. Marketplace README artifact (dist/marketplace/external_plugins/sequant/README.md) was generated from a stale run and still said "Node.js 20+" while its source (scripts/prepare-marketplace.ts) already said 22.12+. It got bundled into the published sequant-2.4.0.tgz. (Low user impact — gitignored, not the npm-displayed README — but it shipped.)
  2. Root README.md "What's new" section was never refreshed for 2.4.0. It listed only 2.3.0-era features, omitted both breaking changes (Node 22.12 floor chore: raise Node engine floor to >=22.12 (drop EOL Node 20), unblock commander 15 #677, -q/-Q flag rebind fix(cli): -q is short for --quality-loop, not --quiet — silently bypasses quiet-mode rendering #658), and still described the runner as a "two-zone TTY grid (append-only events log)" — wording superseded by the feat(cli): replace start/complete event journal with in-place phase-matrix #672 in-place phase matrix.

Both were caught and fixed post-release in follow-up commits (6e1805a, marketplace regen), but they should have been pre-flight gates.

Why it happened

.claude/skills/release/SKILL.md pre-flight checks docs/internal/what-weve-built.md version stamps but has no equivalent for:

  • regenerating the marketplace artifact before publish, and
  • verifying README.md "What's new" mentions the version being released.

Proposed fix

Add to the /release skill pre-flight / release steps:

  1. Regenerate marketplace artifact before publish — run npm run prepare:marketplace as a release step (before npm pack/npm publish) so the bundled artifact always matches current sources. Optionally diff the generated README's prerequisite/version lines against package.json engines.
  2. README "What's new" freshness check — warn (like the existing what-weve-built check) if README.md does not mention the new version in its "What's new" section, prompting the releaser to add a feature group.
  3. (Optional) Stale-version sweep — grep README.md + generated marketplace README for the previous version string and the prior Node floor; warn on any hit.

Acceptance criteria

  • /release pre-flight regenerates (or validates freshness of) the marketplace README artifact before publish.
  • /release warns when README.md "What's new" omits the version being released.
  • SKILL.md change mirrored to all skill copies if applicable (.claude/skills/, templates/skills/, skills/).

Context

Activity

  1. added
    documentation
    on May 31, 2026
  2. admarble commented on May 31, 2026

    @admarble
    ContributorAuthor

    Complexity: Standard (3 ACs, 1 directory)

    AC Quality Check

    Parser found 0 ID-tagged items (issue uses plain - [ ] checkboxes, no AC-N: prefixes) — IDs assigned inline below.

    • AC-1 — ✅ Measurable ("regenerates ... before publish"). One ambiguity: regenerate vs validate freshness — both offered. Recommend regenerate (deterministic; see Design Q2).
    • AC-2 — ✅ Clear, measurable (warn when version absent from "What's new").
    • AC-3 — ⚠️ Open-ended "if applicable". Investigation resolves it: the release skill exists only in .claude/skills/release/ — there is no templates/skills/release/ or skills/release/. So AC-3 is vacuously N/A for this change. (Confirmed via find . -name SKILL.md -path '*release*'.)

    Scope Assessment

    Non-Goals: ⚠️ No explicit Non-Goals section. Implied boundary: this only hardens /release pre-flight; it does not change prepare-marketplace.ts itself (its README_CONTENT template already emits Node.js 22.12+).

    Metric Value Status
    Feature count 1 (release pre-flight gates) ✅
    AC items 3 (1 N/A) ✅
    Directory spread 1 (.claude/skills/release/) ✅

    Verdict: ✅ SCOPE_OK


    Acceptance Criteria

    AC-1: /release regenerates (or validates freshness of) the marketplace README artifact before publish

    Verification: Integration Test (manual run) — execute npm run prepare:marketplace, then assert the generated dist/marketplace/external_plugins/sequant/README.md "Node.js" line matches package.json engines.node. Plus Manual: the regeneration step is present in SKILL.md before npm pack/npm publish.
    Scenario: Given a stale dist/marketplace/.../README.md → When the releaser runs /release → Then the artifact is regenerated from source before Step 5 (pack), so the published tgz bundles a fresh README.
    Why it matters: package.json files: ["dist", ...] ships all of dist/ (gitignored) into the tgz — the stale artifact shipped in sequant-2.4.0.tgz precisely because it was never regenerated before pack.

    AC-2: /release warns when README.md "What's new" omits the version being released

    Verification: Manual Test (run the snippet) — point the new pre-flight check at a README missing $current in its "What's new" region; confirm it warns. (Mirrors the existing what-weve-built.md version-stamp warning at SKILL.md:104.)
    Scenario: Given README.md "What's new in 2.x" lacks New in <version> → When pre-flight runs → Then a warning prints (non-blocking, like the existing doc check).
    Assumptions: "What's new" is a stable heading (### What's new in 2.x at README.md:12; entries formatted **New in X.Y.Z:**). Warning-only, not a hard stop — matches existing doc-check ergonomics.

    AC-3: SKILL.md change mirrored to all skill copies if applicable — N/A

    Verification: Manual Test — find . -name SKILL.md -path '*release*' returns only .claude/skills/release/SKILL.md. No mirror copies exist, so nothing to mirror. Document N/A in the PR.


    Implementation Plan

    Phase 1: Marketplace regeneration gate (AC-1)

    1. Add Step 4.7: Regenerate marketplace artifact after Step 4.6 (what-weve-built), before Step 5 (Verify Package Size / npm pack): run npm run prepare:marketplace.
    2. Add a freshness assertion (the issue's "optionally diff"): compare the generated README's Node.js X+ line against package.json engines.node and warn/fail on mismatch. npm run validate:marketplace (--validate-only) is available for a lighter check.
    3. Note in the step that dist/ (incl. dist/marketplace/) is shipped via files, so regeneration must precede pack/publish.

    Phase 2: README "What's new" freshness check (AC-2)

    1. Extend the Documentation Checks pre-flight block (after the what-weve-built.md block, SKILL.md:101-120) with a warn-only check: grep README.md for the $current version string within/after the "What's new" heading; warn if absent. Use || true on greps (0-match exit-code 1 guard).

    Phase 3: Mirroring (AC-3)

    1. Confirm single-copy; add a one-line PR note that no mirror sync is needed for release.

    Design Review

    1. Where does this logic belong? Both gates live in .claude/skills/release/SKILL.md — AC-2 in the existing Documentation Checks pre-flight block; AC-1 as a new release Step 4.7 (regeneration is an action, not a read-only pre-flight check, so it belongs in Release Steps before pack).
    2. Simplest correct approach? Regenerate unconditionally (npm run prepare:marketplace) rather than "validate freshness then maybe regenerate" — deterministic, idempotent, removes the staleness class entirely. The optional diff-vs-engines is a cheap belt-and-suspenders check, not the primary mechanism. Rejected: a freshness-only validator that warns but leaves the stale artifact in place — that re-introduces the exact 2.4.0 failure if the releaser ignores the warning.
    3. Existing pattern? AC-2 directly mirrors the what-weve-built.md version-stamp warning already at SKILL.md:104-119 (warn-only, grep -oE version extraction). AC-1 slots into the numbered Release Steps sequence.
    4. What would a senior reviewer challenge? "Why not just validate?" → because validation that ships the stale file anyway is what already failed; regenerate. "Is Step 4.7 before pack?" → yes, must precede Step 5/9. "Grep brittleness on README heading?" → anchored to the stable What's new heading + version regex, warn-only so a false negative is low-cost.

    Feature Quality Planning

    All standard checks pass. Notable items:

    • No code paths added (markdown + bash snippets in a skill) → no unit/integration test wiring; verification is run-the-snippet inspection.
    • Grep snippets must use || true to avoid exit-code-1 kills (per repo convention).

    Derived ACs

    None.


    Open Questions

    1. Regenerate vs validate-only for AC-1? — Recommendation: regenerate (npm run prepare:marketplace) + optional engines diff. Impact if validate-only: a warning the releaser can skip past, re-shipping a stale artifact (the original bug).
    2. Should the engines-mismatch diff hard-fail or warn? — Recommendation: warn (consistent with existing doc checks); regeneration already fixes the artifact, so the diff is a sanity signal, not a gate.

    Recommended Workflow

    Phases: exec → qa (optionally /verify to dry-run the new pre-flight snippets)
    Quality Loop: disabled (single-file skill change, SCOPE_OK)
    Reasoning: documentation label, no UI, no new code modules → skip test/testgen. The deliverable is bash/prose in one SKILL.md; /verify is the right tool to actually run the new regeneration step + grep checks for human review.


    Label Review

    Current: documentation
    Recommended: documentation (add planned via this phase)
    Reason: Accurate — change is confined to release-process tooling docs/snippets. No complex/refactor warranted.
    Quality Loop: Won't auto-enable (SCOPE_OK, no SCOPE_WARNING).


  3. added
    planned
    on May 31, 2026
  4. admarble commented on May 31, 2026

    @admarble
    ContributorAuthor

    --- DRAFT GITHUB ISSUE COMMENT (PROGRESS UPDATE) ---

    /exec complete — PR #685

    AC Coverage

    AC Description Status Evidence
    AC-1 Pre-flight regenerates marketplace README before publish ✅ Implemented New Step 4.7 (npm run prepare:marketplace) in SKILL.md, before Step 5 pack / Step 9 publish, + warn-only Node-floor-vs-engines diff
    AC-2 Warn when README.md "What's new" omits release version ✅ Implemented Check #12 added to Documentation Checks pre-flight block
    AC-3 Mirror change to other skill copies 🔄 N/A Single copy only (.claude/skills/release/); confirmed via find . -name SKILL.md -path '*release*'

    Files Changed

    • .claude/skills/release/SKILL.md (+33) — only tracked file; dist/marketplace/ regen output is gitignored

    Verification (run-the-snippet — no code paths added)

    • AC-2 pass: README has New in 2.4.0 → no warning ✅
    • AC-2 warn: simulated missing 9.9.9 → warning fires ✅
    • AC-1 regen: npm run prepare:marketplace succeeds; generated Node.js 22.12+ matches engines >=22.12.0 → no warning ✅
    • AC-1 warn: simulated stale Node.js 20.0 → warning fires ✅
    • npm run lint clean; npm run lint:skill-calls no violations

    Build/test skipped: markdown + bash snippets only, no TS/runtime code. Per spec, /verify is the suitable follow-up to dry-run the new pre-flight steps.

    Quality Plan Alignment

    N/A — spec's Feature Quality Planning noted no code paths added and no derived ACs.

    PR Status

    Created: #685

    Known Gaps

    None. AC-1/AC-2 implemented and live-verified; AC-3 vacuously N/A.

  5. admarble commented on May 31, 2026

    @admarble
    ContributorAuthor

    QA Review for Issue #684

    AC Coverage

    AC Source Description Status Notes
    AC-1 Original /release pre-flight regenerates (or validates freshness of) the marketplace README before publish MET New Step 4.7 runs npm run prepare:marketplace before Step 5 (pack) / Step 9 (publish). Regeneration is deterministic — verified live: produces Node.js 22.12+, matching engines.node >=22.12.0.
    AC-2 Original /release warns when README.md "What's new" omits the version being released MET Check #12 in Documentation Checks. Verified live: present 2.4.0 → no warning; simulated 2.4.0 absent → warning fires.
    AC-3 Original Mirror SKILL.md change to all skill copies if applicable N/A find . -name SKILL.md -path '*release*' → only .claude/skills/release/. No templates/skills/ or skills/ mirror exists. Vacuously satisfied.

    Coverage: 2/2 applicable AC items met (AC-3 N/A)


    Quality Metrics

    Metric Value Status
    Type issues (any) 0 OK
    Deleted tests 0 OK
    Files changed 1 OK
    Lines added +33 -
    Lines deleted -0 -
    Security patterns 0 OK

    Single-file markdown change (.claude/skills/release/SKILL.md). No TS/runtime code; build/test sub-agents not applicable.


    CI Status

    Check State Impact
    build (22.x) SUCCESS ✅ MET
    typecheck SUCCESS ✅ MET
    validate-plugin SUCCESS ✅ MET
    validate-skills SUCCESS ✅ MET

    CI Summary: 4 passed, 0 pending, 0 failed. (PR #685)


    Skill Command Verification

    Skill files changed: 1 (.claude/skills/release/SKILL.md)

    Command Status
    npm run prepare:marketplace ✅ Exists (scripts/prepare-marketplace.ts); executed successfully
    node -p "require('./package.json')..." ✅ Valid

    Verification Status: Passed


    Detection Pattern Verification

    New awk/grep patterns added to skill markdown — verified against the real repo corpus (local files, not GitHub comments):

    Pattern Corpus Samples Expected Actual Status
    awk "/^#+ What.?s new/{f=1} f" README.md heading at L12 match ### What's new in 2.x matched ✅ Passed
    grep -qF "New in ${current}" README.md What's-new region **New in 2.4.0:** match matched ✅ Passed
    grep -oE "Node\.js [0-9]+\.[0-9]+" generated marketplace README Node.js 22.12+ → 22.12 match engines 22.12 matched ✅ Passed

    Motivating-example fixtures from issue body (run against the new gates):

    • Fixture B — README "What's new" missing release version → warn fires ✅
    • Fixture A — stale Node.js 20+ marketplace README → the freshness regex (MAJOR.MINOR) extracts empty on major-only strings and skips the warn. This is correct by design: Step 4.7 regenerates the artifact first, overwriting 20+ with 22.12+, so the freshness check never sees the 20+ state. The freshness check's real job (template-vs-engines drift) was verified: engines bumped to 24.0.0 vs template 22.12 → warn fires ✅.

    Verification Status: Passed (against the actual post-regeneration corpus)


    Risk Assessment

    • Likely failure mode: None for the primary mechanism — regeneration is deterministic and idempotent; a stale artifact cannot survive Step 4.7. The freshness check is warn-only and secondary.
    • Not tested: No automated tests (correct — bash snippets in skill markdown have no importable surface). Coverage is live snippet execution (both pass and warn paths) + green CI.
    • Sibling sites considered: none — no cross-file siblings. AC-3 confirmed the release skill has a single copy; the two new gates sit alongside the pre-existing what-weve-built.md version-stamp check (same warn-only idiom).
    • Sibling-line audit: The release skill's other version surface (what-weve-built.md check) already existed and is unaffected; the two added gates cover the two surfaces that shipped stale in 2.4.0. No other un-gated doc surface in the file.

    Adversarial Re-Read

    Findings: Walked the diff adversarially: (1) ran both gates against the issue's verbatim motivating fixtures — README "What's new" omission warns correctly; the Node.js 20+ fixture is the pre-regeneration state eliminated by Step 4.7, and drift-detection on MAJOR.MINOR works. (2) exec's evidence is genuine post-fix validation, not a bug repro. (3) Process state clean — working tree clean (dist regen is gitignored), branch 0 behind origin/main, PR #685 open with green CI. (4) Sibling sites cited above. (5) Non-Goal honored — prepare-marketplace.ts source is untouched. One non-blocking robustness gap: the freshness regex assumes Node.js MAJOR.MINOR; a future template emitting major-only (Node.js 24+) would silently skip the sanity warn. Low impact (warn-only, secondary to regeneration; a naive broadening would introduce false positives since the comparison normalizes to MAJOR.MINOR on both sides) — note, not a blocker.

    Status: Gaps Found (non-blocking)


    CHANGELOG Verification

    Check Status
    CHANGELOG.md exists ✅ Found
    User-facing changes ✅ Yes (feat(release): commit)
    [Unreleased] entry ❌ Missing

    The [Unreleased] section is empty; no entry for this change. Per the §10a gate, user-facing changes (release-process behavior) need an [Unreleased] entry. This demotes the verdict from READY_FOR_MERGE.


    Verdict: AC_MET_BUT_NOT_A_PLUS

    Both acceptance criteria are genuinely MET (AC-3 N/A), verified live against the real corpus, with green CI. Two non-blocking items hold it back from A+:

    1. Missing CHANGELOG [Unreleased] entry (§10a gate) — required for this user-facing feat: change.
    2. Minor robustness note — freshness regex is MAJOR.MINOR-only; documented above as low-impact, optional.

    Mergeable after adding the CHANGELOG entry. No AC rework needed.

    Documentation

    • N/A — this change is release-process documentation/tooling; no separate README/docs update needed.
    • CHANGELOG [Unreleased] entry — add before merge (see below).

    Next Steps

    1. Add a CHANGELOG [Unreleased] entry, e.g. under ### Added:
      - /release pre-flight regenerates the marketplace artifact and checks README "What's new" freshness before publish (#684)
    2. (Optional, low-priority) If desired, future-proof the Step 4.7 freshness regex to normalize major-only Node strings on both sides of the comparison.
    3. Merge PR feat(#684): /release pre-flight regenerates marketplace README + checks README 'What's new' freshness #685.
  6. added
    needs-improvement
    on May 31, 2026
  7. added a commit that references this issue on May 31, 2026
  8. admarble commented on May 31, 2026

    @admarble
    ContributorAuthor

    /fullsolve Complete

    Issue: #684
    Status: READY_FOR_MERGE
    PR: #685

    AC Coverage

    AC Description Status
    AC-1 /release pre-flight regenerates marketplace README before publish ✅ MET (Step 4.7 npm run prepare:marketplace + warn-only Node-floor diff)
    AC-2 /release warns when README "What's new" omits release version ✅ MET (Check #12 in Documentation Checks)
    AC-3 Mirror SKILL.md change to all skill copies if applicable ✅ N/A (single copy — .claude/skills/release/ only)

    Coverage: 2/2 applicable AC met (AC-3 vacuously N/A)

    Resolution of QA Gate

    Prior QA verdict was AC_MET_BUT_NOT_A_PLUS, blocked only by a missing CHANGELOG [Unreleased] entry (§10a gate). Now added:

    • docs(#684) commit 6196fee — adds ### Added entry under [Unreleased] for the /release pre-flight doc-freshness gates.

    The optional robustness note (freshness regex is MAJOR.MINOR-only) remains as a low-impact, non-blocking follow-up — not worth broadening (would introduce false positives since both sides normalize to MAJOR.MINOR, and Step 4.7 regeneration is the primary mechanism).

    Quality Metrics

    Metric Value
    Files changed 2 (SKILL.md +33, CHANGELOG.md +4)
    Type issues (any) 0
    Deleted tests 0
    CI 4/4 green (build, typecheck, validate-plugin, validate-skills)

    Iterations

    • Test loop: skipped (markdown/bash skill change, no UI, no runtime code)
    • QA loop: 1 (CHANGELOG gate addressed)

    Final Verdict

    READY_FOR_MERGE — both ACs met & live-verified, CHANGELOG entry added, all CI green, branch mergeable. Ready for human review and merge.

  9. added a commit that references this issue on Jun 1, 2026
  10. admarble commented on Jun 1, 2026

    @admarble
    ContributorAuthor

    Gap fix — AC-2 check ordering

    Adversarial re-read surfaced a real gap in the AC-2 gate (verified by running it against the live repo):

    Problem: Check #12 lived in the pre-flight block and read package.json.version — but the version bump is Step 4, much later. So at pre-flight time it read the previous release (e.g. 2.4.0), which the README already lists, and never warned for the version actually being released (e.g. 2.5.0). The AC literally says "omits the version being released." It mirrored the existing Check #11 pattern, so not a regression — but the gate was effectively a no-op in the documented step order.

    Fix (commit f10cfa0): relocated the README "What's new" check to a new Step 4.65, immediately after the Step 4 version bump, so new_version is the freshly-bumped target. Left a pointer note where it used to live.

    Verified against live corpus:

    • Target 2.5.0 absent from README → warn fires ✓
    • Target 2.4.0 present → no warn ✓
    • npm run lint:skill-calls clean; CI 4/4 green.

    Untouched (out of scope): the existing Check #11 (what-weve-built) shares the same pre-flight ordering but is the approved prior pattern; not changed here.

    Updated verdict: READY_FOR_MERGE — both ACs now genuinely functional, not just present.

  11. added a commit that references this issue on Jun 1, 2026
  12. added a commit that references this issue on Jun 3, 2026
  13. added a commit that references this issue on Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationneeds-improvementplanned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions