Repository navigation
test: gate version anchors and CHANGELOG entries in npm test (#22) - #30
Merged
Merged
Conversation
4 tasks
Adds check-version-sync.sh (package.json, .claude-plugin/plugin.json, a CHANGELOG.md heading and any v* tag on HEAD agree), check-changelog-updated.sh (docs/, case-studies/, skills/ or examples/ changes need a CHANGELOG.md change against the PR base), bump-version.sh, a self-testing fixture test, CI with full history and tag runs, CHANGELOG.md seeded with 0.2.0, the bump rule and tag step in AGENTS.md, and README descriptions of pages 03 and 04 that match #12. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
lukemaj
force-pushed
the
docs/22-version-gate
branch
from
September 29, 2026 22:06
34b13f2 to
0bdb8ef
Compare
5 tasks
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.
What:
npm testnow fails whenpackage.json,.claude-plugin/plugin.json, theCHANGELOG.mdheading and av*tag on the commit disagree on the version, or whendocs/,case-studies/,skills/orexamples/change without aCHANGELOG.mdchange.CHANGELOG.mdstarts at 0.2.0 with tonight's cleanup.Why: The version lived in two files with no check that they matched or matched a tag, and nothing recorded what changed for readers.
So what: Luna max review of this head, then the user merges. Tagging
v0.2.0stays with the user (a tag is a release artifact).Closes #22
Refs #7
Changes
scripts/check-version-sync.sh:package.jsonand.claude-plugin/plugin.jsonmust match,CHANGELOG.mdmust have a## [X.Y.Z]heading for that version, and everyv*tag on HEAD must equalvX.Y.Z. Each failure prints aFix:line.scripts/check-changelog-updated.sh: diffs the working tree against the merge base withorigin/$GITHUB_BASE_REF(CI) ororigin/main; a reader-visible path withoutCHANGELOG.mdfails. A missing base fails with a fetch fix instead of passing.scripts/bump-version.sh X.Y.Z: setspackage.json,package-lock.json(vianpm version --no-git-tag-version) andplugin.json, then prints the tag command.tests/check-version-and-changelog.test.sh: runs both gates on the tree, then self-tests them on a fixture repo (10 cases: mismatch, missing changelog heading, matching and disagreeing tags, untracked, uncommitted and committed docs changes with and without a changelog change, non-reader change, missing base). Failure cases must print aFix:line..github/workflows/test.yml:fetch-depth: 0(full history and tags, so the merge base and tags exist in CI's checkout) and runs onv*tag pushes, where the tag check matters.AGENTS.md: bump rule (MAJOR / MINOR / PATCH from the drift draft's section 6) and tag step under "Versions and changelog"; Proof lists the new checks; Gate version anchors and CHANGELOG entries in npm test #22 removed from the planned-work list.README.md: Make the README, overview, AGENTS.md and loader Skill state the current scope and route by action #14's follow-up. After State the measured activation behavior in the quickstart, mental model, three questions and token economics #12 (merged in docs: activation and budget pages match measured behavior (#12) #28), page 03 names each host's description-listing limit and page 04 covers per-host listing limits and pointer-versus-full-body injection. The README's Question 3 said "the description listing budget" and page 04's blurb said "how SessionStart-hook injection cost compounds"; both now match. Pages 01 and 02 blurbs already matched. Contributing points atCHANGELOG.md.CHANGELOG.md: 0.2.0 covers Case study: the AgentsMD routing benchmarks (toolboxmd/agentsmd#164, #174, #182) #6, Correct triggers.md and add the trigger-benchmark method #5, Correct the harness facts for Claude Code, Codex, Grok Build, OpenCode and Gemini CLI #8, Fix wrong facts and undefined sources in the evolution, frontmatter, line-budget and iron-laws pages #9, Make the doc checks run: link check, llms.txt freshness and CI #10, Move TODO.md, the drift-prevention draft and the continuous-learning handoff into Issues #11, State the measured activation behavior in the quickstart, mental model, three questions and token economics #12, Add the routing and harness failure modes to the anti-pattern catalog and the mechanism page #13, Make the README, overview, AGENTS.md and loader Skill state the current scope and route by action #14 and Tool descriptions are activation contracts; deferred loading hides them #4 from their merged PRs (docs: case study of the AgentsMD routing benchmarks (#6) #24, docs: correct triggers.md and add the trigger-benchmark method (#5) #26, docs: correct harness facts for Claude Code, Codex, Grok Build, OpenCode and Gemini CLI (#8) #25, docs: fix wrong facts and undefined sources in four doctrine pages (#9) #16, test: doc link check, llms.txt freshness and CI (#10) #15, Mark the continuous-learning handoff superseded by #18 #23, docs: activation and budget pages match measured behavior (#12) #28, docs: routing and harness anti-patterns and reword-first evidence (#13) #27, docs: state current scope and route the loader Skill by action (#14) #29, docs: tool descriptions are activation contracts; deferred loading hides them (#4) #31). This PR's own changes sit under[Unreleased].versionctl versus a script
Chose three small scripts over AgentsMD
versionctl.versionctlneeds a rootVERSIONfile, Python 3.11 and its own code in this repo or fetched in CI (tools/versionctl/README.mdat toolboxmd/agentsmda14d823); it lives in another repository, so CI here would have to vendor or clone it. It does not check that a reader-visible change touchedCHANGELOG.md, the gate this Issue needs most. The scripts need only Node and Git, which CI already has. Recorded on #22.Proof
npm ci && npm testunder Node v22.23.1 at this head: exit 0;OK: build-llms,OK: check-docs-links,OK: check-llms-coverage,OK: check-version-and-changelog, all other scripts pass.Fix:; each pass case passes (output in the test).bash scripts/bump-version.sh 0.2.0on the tree leaves every file unchanged.Elon record
versionctladoption and aVERSIONfile; major/minor/patch arithmetic in the bump script (the author picks the level); the draft's rootCLAUDE.mdand Recent Changes cap; apackage-lock.jsoncheck (npm writes it withpackage.json); past-version tags.npm testand every fixture case; readversionctl's launcher, README and AgentsMD's.version-policy.json; confirmed both version files and the lockfile say 0.2.0 and the repo has nov*tag; read the merged PR bodies and file lists for the changelog entries; compared the README blurbs with pages 01 to 04 after docs: activation and budget pages match measured behavior (#12) #28.🤖 Generated with Claude Code