feat: close MCP AC gap + sync SKILL.md version on release (SMI-4324, SMI-4325)#20
Merged
wrsmith108 merged 2 commits intoApr 19, 2026
Conversation
…(SMI-4324) Closes the MCP save_issue gap left by v3.0.0 — the Linear MCP server is hosted, so we can't server-side-gate it. Adds a pre-flight CLI validator for Claude to run before save_issue, plus a retroactive audit script. Changes: - validate-description subcommand (scripts/linear-ops.ts): pure-logic wrapper around validateIssueDescription. Supports positional body, --file <path>, --stdin. Exit 0 = valid, 5 = invalid + strict, 2 = bad args. Runs without LINEAR_API_KEY. - lint-issues script (scripts/lint-issues.ts): audits issues matching --since <duration> and/or --project <name>. Mutates nothing, emits a table or --json. Exits 5 if any scanned issue fails AC validation. - SKILL.md: tiered enforcement model — CLI/SDK hard-gated, MCP is instruction + retroactive audit. Rejected a PreToolUse hook (only fires in Claude Code runtime; harness-version-dependent payloads). - Two new end-to-end test files with env-scrubbing (LINEAR_API_KEY: '') following the smoke.test.ts pattern. 18 new tests; 47/47 pass. Co-Authored-By: claude-flow <ruv@ruv.net> Co-Authored-By: Claude <noreply@anthropic.com>
…MI-4325) After the v3.0.0 release, SKILL.md frontmatter still said version: 2.6.1 until commit d5487f1 fixed it by hand. Skillsmith's trust-tier validator reads the version: field from SKILL.md, not package.json — so drift here demotes the trust tier, not just cosmetics. Changes: - scripts/sync-skill-version.mjs: plain-ESM helper that rewrites only the version: line inside SKILL.md's YAML frontmatter block. Scoped by the first --- fences so prose/code-example mentions of version: below are never touched. Fails loud with a clear error + recovery hint if the frontmatter or version: line is missing. - release.config.js: @semantic-release/exec runs the helper as prepareCmd between @semantic-release/npm and @semantic-release/git. Added SKILL.md to the git assets so the synced frontmatter lands in the release commit alongside CHANGELOG.md, package.json, and package-lock.json. - package.json: @semantic-release/exec ^6.0.3 devDep. Verified: - Helper updates version: in frontmatter only (isolated run) - Missing version arg → exit 1 with usage - Missing SKILL.md → exit 1 with ENOENT - release.config.js parses with 7 plugins in correct order - npm test: 47/47 pass Co-Authored-By: claude-flow <ruv@ruv.net> Co-Authored-By: Claude <noreply@anthropic.com>
github-actions Bot
pushed a commit
that referenced
this pull request
Apr 19, 2026
# [3.1.0](v3.0.0...v3.1.0) (2026-04-19) ### Features * close MCP AC gap + sync SKILL.md version on release (SMI-4324, SMI-4325) ([#20](#20)) ([2c2350c](2c2350c))
|
🎉 This PR is included in version 3.1.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
Summary
Follow-up to the v3.0.0 AC enforcement release. Two independent fixes shipped together as they share the same Linear project (Issue Description Validation).
save_issuegap in AC enforcement. The Linear MCP server is hosted, so we can't server-side-gate it. Adds a pre-flight CLI validator (validate-description) for Claude to run beforesave_issue, plus a retroactivelint-issuesaudit script.semantic-releaseto syncSKILL.mdfrontmatterversion:to matchpackage.json. Drift recurred after v3.0.0 (commitd5487f1fixed it by hand). Skillsmith's trust-tier validator readsSKILL.mdversion — drift here demotes trust tier, not just cosmetics.Enforcement model (SMI-4324)
Honest framing: CLI + SDK paths are hard-gated; the MCP path is instruction + retroactive audit, not a mechanical block.
validate-description --stdinbeforesave_issue.npm run lint-issues -- --since 24hsurfaces any instruction-layer drift.Changes
SMI-4324:
scripts/linear-ops.ts— newvalidate-descriptionsubcommand (positional body /--file/--stdin,--strict=falsesupported, exit 0/5/2, noLINEAR_API_KEYrequired)scripts/lint-issues.ts— new audit script (--since,--project,--limit,--json), mutates nothingSKILL.md— rewrote the MCP callout (lines 180, 207) with a--stdinexample and the tiered-enforcement notescripts/__tests__/validate-description.test.ts+lint-issues.test.ts— 18 new end-to-end tests, allenv: { ...process.env, LINEAR_API_KEY: '' }so they don't inherit a real keypackage.json—lint-issuesnpm scriptSMI-4325:
scripts/sync-skill-version.mjs— plain-ESM helper that rewrites only theversion:line inside SKILL.md's frontmatter block (scoped by first---fences, fails loud on missing frontmatter/version line)release.config.js—@semantic-release/execruns the helper asprepareCmdbetween@semantic-release/npmand@semantic-release/git; addedSKILL.mdto git assetspackage.json—@semantic-release/exec^6.0.3 devDepVerification
npm run build— typecheck + esbuild cleannpm test— 47/47 pass (18 new tests across two new files)--stdin→ 0,lint-issuesno-flags → 2,lint-issuesno-API-key → 1sync-skill-version.mjsisolated run rewrites frontmatter only; missing-version → 1; missing-file → 1release.config.jsparses with 7 plugins in correct orderTest plan
npm ci && npm run build && npm test— expect 47/47 greenecho "" | node dist/linear-ops.js validate-description --stdin— expect exit 5printf '## Context\nBody text long enough to satisfy the minimum body length threshold used by the validator.\n\n## Acceptance Criteria\n- [ ] one\n- [ ] two\n' | node dist/linear-ops.js validate-description --stdin— expect exit 0CHANGELOG.md,package.json,package-lock.json, andSKILL.mdwith matching versionsReview-deferred follow-ups
Captured in
~/.claude/plans/jiggly-inventing-coral.md:SKILL.mdfrontmatter version equalspackage.jsonversion (5 lines insmoke.test.ts)create-issuestrict-failure exit1→EXIT_CODES.VALIDATION_ERROR(5)lint-issues --since 24hnightly (out of scope here)🤖 Generated with Ruflo