Repository navigation
feat(plugin): ship the devkit Claude Code plugin - #1751
Merged
Merged
Conversation
Failing first: asserts the plugin tree, the plugin.json <-> DEVKIT_VERSION lock, the marketplace entry, every skill's frontmatter and refusal coverage, and the drift gate proper -- every `just <recipe>` and `<name>.yml` token inside a SKILL.md code region must resolve against devkit's or the scaffold's justfiles/workflows. The extractors are unit-tested against constructed fixtures so a green suite still proves the rules can fail. Refs: #1744
Eleven state-lookup-first operator skills under plugins/devkit/, published through a marketplace in this repo (/plugin marketplace add vig-os/devkit, then /plugin install devkit@vigos-devkit) rather than vendored into the consumer scaffold. Every skill's step 1 is /devkit:status, re-read in the same run, and every mutating skill carries a refusal table naming the state, why it is a foot-gun and the verb that clears it. Skills wrap the canonical just recipes and workflow dispatches; none re-implements release logic. Read-only skills stay model-invocable; every mutating skill sets disable-model-invocation so an agent cannot infer its way into dispatching a release verb. plugin.json's version equals DEVKIT_VERSION and release.yml's finalize step now bumps both, so the skills and the workflows they drive can never drift across a release. Two deviations from the issue body, both required by the plugin format: .claude-plugin/ holds only plugin.json (skills/ live at the plugin root), and components are namespaced, so the commands are /devkit:status rather than /devkit-status. Refs: #1744
Ran /devkit:status's own queries against this repo, as #1744's acceptance criteria ask for. Two checks were wrong in the direction that blocks a release that would have worked: - The App credentials are ORGANIZATION secrets. `gh secret list` shows the repository scope only, so the skill reported all four as absent and would have refused every release verb. It now queries the organization-secrets endpoint as well, and reports `unknown` rather than `absent` when either query fails -- a secret you could not see is not a secret that is missing. - The #1642 preserved-hook check read the branch guard's `--branch` argument. Devkit's own config deliberately passes `--branch __none__` and does the whole job in `--pattern`, so the check produced a false finding on the very repo it is dogfooded against. It now compares the pattern's `(?!dev$)` clause and is scoped to a consumer repo. Also: an absent DEVKIT_WORKFLOW key means gitflow (it is written back only for trunk), which the section now states. Refs: #1744
The check read "is the release branch an ancestor of dev", which looks conclusive and is not: prepare-release.yml pushes the Unreleased reset to dev immediately after cutting the branch, so dev's tip stops being an ancestor of a branch that was cut from dev minutes earlier. Both lanes therefore answer the same way, and the skill would have reported a regular train as a hotfix -- the state that decides whether a new train may be cut at all (#1627) and whether promote order walks the floating tag backwards (#1626). Replaced with direct evidence in both places: which workflow created the branch, and whether the version is the next patch of main's latest tag, which is exactly what the hotfix lane enforces. release-hotfix verifies its own dispatch instead, and checks that the branch differs from main by the seed commit alone. Refs: #1744
install.sh's preview is by definition a preview of an upgrade and rides the force report path internally (assets/init-workspace.sh), so --force adds nothing. Pairing the two in an operator skill teaches the reader that a preview needs it -- i.e. that a preview might mutate something, which is the one thing it never does. Refs: #1744
Review of #1751 found three real defects. Tests first, all failing: - No skill may run a repo-local `./install.sh`. adopt and status run against arbitrary repositories and a consumer never ships devkit's installer, so `./install.sh` there is either a no-op or someone else's script -- arbitrary code execution from a model-invocable skill. A piped installer must also come from a tag, never from a moving branch. - No skill may hard-code `repos/vig-os/devkit/releases`. The floating-tag monotonicity check has to read the CURRENT repo's series, or it judges a consumer against devkit's. - The version lock is a property of a tag, not of an install: an unpinned marketplace tracks the default branch. status must compare the running plugin's own manifest against DEVKIT_VERSION, and the README must document the tag-pinned form instead of claiming drift is impossible. Plus: every skill taking an X.Y.Z argument must validate it before the recipes interpolate it into bash, and release.yml's bump must verify the sed matched rather than silently shipping a stale plugin.json. Also strengthens two existing gates: the state-lookup test now asserts section 1 *is* the lookup rather than comparing text offsets, and the drift extractors cover `.yaml` workflows and `just --flag recipe`. Refs: #1744
BLOCKER 1 -- the version-lock claim was false. A marketplace added
without a ref tracks the repository's default branch, so every consumer
got the newest release's skills whatever DEVKIT_VERSION they pinned. The
docs do support pinning (`marketplace add owner/repo@ref` builds a github
source with `ref`), so both halves are now in place: the README documents
the tag-pinned form as the way to install, and a new /devkit:status
section reads the running plugin's own manifest through
${CLAUDE_PLUGIN_ROOT} and reports a plugin version mismatch against the
pin. The claim itself is corrected in the README and the CHANGELOG: the
lock guarantees a release TAG carries matching skills, which is a
property of the tag, not of an unpinned install.
BLOCKER 2 -- arbitrary code execution. adopt and status ran
`./install.sh` in the repo under inspection. A consumer never ships
devkit's installer, so that path is either absent or somebody else's
script, and adopt is model-invocable. Both now fetch devkit's installer
at a pinned tag; upgrade does the same for its preview and its apply. A
test bans the repo-local form outright and rejects a fetch pinned to a
moving ref.
BLOCKER 3 -- status and release-promote hard-coded
`repos/vig-os/devkit/releases` for the floating-tag monotonicity check,
which judges a consumer against devkit's release series. Both now use
`repos/{owner}/{repo}` (verified: gh substitutes it from the checkout).
The cross-repo smoke gate keeps its fixed repository, which is correct --
the downstream validator is a named repo, not a property of the repo you
are in.
NITS
- release.yml verifies the bump with `jq -e` and fails the step; a sed
that matches nothing exits 0 and would ship a stale plugin.json.
- release-candidate gives both publish-candidate signatures, since the
consumer recipe takes create-release as a third positional.
- release-hotfix passed a run id to `gh run view --job`, which expects a
job id and returns nothing, so the evidence looked empty rather than
absent.
- status snippets are self-contained; shell state does not persist
between commands, so `$PINNED`/`$VERSION` expanded to empty.
- Every version-taking skill validates `^[0-9]+\.[0-9]+\.[0-9]+$` before
the recipes interpolate it into bash; release-candidate takes its
version from a branch name, so it validates what it parsed.
release-neutral quotes its dispatch args (an apostrophe in a title
broke the single-quoted form).
- Drift gate covers `.yaml` workflows and `just --flag recipe`, and the
state-lookup test now asserts section 1 IS the lookup rather than
comparing text offsets.
Refs: #1744
Re-review found the code-execution path reached through the variable: status and adopt read DEVKIT_VERSION out of the INSPECTED repo's .vig-os and interpolate it into a raw.githubusercontent.com path that is piped to bash. curl collapses `..` before sending, so a hostile manifest escapes the URL prefix entirely. Verified against the live host before writing these tests: DEVKIT_VERSION=../../octocat/Hello-World/refs/heads/master -> GET https://raw.githubusercontent.com/octocat/Hello-World/refs/heads/master/... -> HTTP 200 So it escapes to an arbitrary OWNER, not merely another ref of devkit, and `bash -s --` would have run whatever came back. The new gate is block-local and ordered: every fenced block that fetches install.sh must carry the ^[0-9]+\.[0-9]+\.[0-9]+$ guard *in that block*, before the fetch. A file-level check is not enough -- status already contains that regex for an unrelated release-series filter, so a file-level test passes while the fetch stays unguarded. The old main/dev/HEAD blacklist is replaced rather than extended: it could only ever enumerate refs, and the injection is not a ref. Also failing: installer fetches must use refs/tags/<version> so a branch of the same name cannot shadow the tag; README's --sparse must name its paths; and status/upgrade must tell the operator to remove a marketplace before re-adding it, since a repeat add is a no-op. Refs: #1744
DEVKIT_VERSION is read from the manifest of the repository being inspected and interpolated into a raw.githubusercontent.com path that is piped to bash. curl collapses `..` before it sends the request, so the value escapes the URL prefix. Verified live: a value of `../../octocat/Hello-World/refs/heads/master` resolves to that owner's repository and returns HTTP 200, so the pipeline would have executed an arbitrary third party's script -- a different OWNER, not merely another ref of devkit. Every installer fetch in status, adopt and upgrade now validates ^[0-9]+\.[0-9]+\.[0-9]+$ in the same snippet, immediately before the fetch, and resolves the ref as refs/tags/<version> so a branch of the same name cannot shadow the tag (confirmed: refs/heads/1.17.0 is 404, refs/tags/1.17.0 is 200). The gate is block-local and ordered rather than file-level, because status already carried that same regex for an unrelated release-series filter -- a file-level assertion passes while the fetch stays unguarded. The main/dev/HEAD blacklist is replaced, not extended: it could only enumerate refs, and the injection is not a ref. NITS - README's --sparse now names its paths (.claude-plugin plugins); the flag takes directories. - Re-adding a marketplace is a no-op (`already on disk`, exit 0) and `marketplace update` refreshes the ref it was added with rather than moving to a new one, so README, status and upgrade now document remove -> add@tag -> install, including that the re-install is required because removing a marketplace uninstalls its plugins. Refs: #1744
…ay literal Three checks from the security re-review. Two fail today: - A bash block that reads $VERSION without assigning it. status's cross-repo smoke-gate block does exactly that, contradicting the rule the same file states in section 2. - release-neutral assigns TITLE with double quotes, so issue-sourced text containing $(...) or backticks executes at assignment. Verified: TITLE="ci(guard): $(id -un)" substitutes; a quoted heredoc does not. The third passes on arrival, and that is the point of its companion: guard_aborts() checks that each semver guard's failure branch actually exits rather than merely matching the regex text, and the mutation test changes `exit 1` to `true` -- identical regex text -- and asserts the checker rejects it. Without that mutation the new assertion would be untested and could rot into a tautology. Refs: #1744
status's cross-repo smoke-gate snippet read "$VERSION" without assigning it, contradicting the rule the same file states in section 2. It now sets and validates the version like every other block. release-neutral assigned TITLE with double quotes, so a title copied from an issue would have its $(...) and backticks executed at assignment. It now uses a single-quoted heredoc, which keeps every character literal -- apostrophes included, which was the original reason that line was quoted at all. Verified: a title of `ci(guard): $(id -un) and `whoami`` survives verbatim. Both test rules are scoped to runnable bash blocks rather than to the whole file, so the prose can keep naming the unsafe form in order to explain why it is unsafe. What is asserted is what an operator copies. Refs: #1744
Resolves the CHANGELOG conflict by keeping both Unreleased entries: #1746's release-train seams and #1744's operator plugin. Devkit's own release.yml did not conflict -- #1750 changed the SCAFFOLD copy under assets/workspace/, so the plugin.json bump in the "Update root .vig-os" step carried over untouched. #1746's seams are merged now, so the plugin's claims about them were stale in the wrong direction. Corrected: - pack-rust's "what is still open" section becomes an audit of three shipped contracts: the pre-release format (precedence, the dotted- counter caveat because SemVer sorts rc10 below rc9, the sort-below refusal, and stray X.Y.Z-* tags now blocking candidates), the draft-first Release-owner contract with its pre-publish assets window, and the standalone publish seam on `release: published`. - The cargo-dist guidance is taken from the merged docs/DOWNSTREAM_RELEASE.md, NOT from #1746's issue body: the proposed `create-release = false` plus `github-release = "host"` recipe is documented there as wrong, because cargo-dist uploads into the draft and then publishes it itself, bypassing promote and firing no `release: published` event. The supported shape is cargo-dist as an asset builder with no `ci` key, plus a consumer-owned tag-push upload. - status no longer says DEVKIT_PRERELEASE_FORMAT is absent until #1746 lands, and no longer claims a candidate never creates a Release object (`create-release: true` makes a draft pre-release). - Only #1496's pack template layers remain open. The drift gate now resolves publish-release-extension.yml against the real scaffold file, so the seam is named rather than described in prose. Refs: #1744
This was referenced Sep 29, 2026
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.
Description
Ships a versioned
devkitClaude Code plugin: eleven state-lookup-first operator skills for adopting vigOS devkit, running its release train, and keeping a consumer in sync. The plugin lives in this repository, beside the workflows it drives, and its version is devkit's own — so the skills and the verbs they wrap are released together and cannot drift.The plugin is a thin operator surface, not a re-implementation. Every skill's step 1 is the read-only
/devkit:statuslookup, re-read in the same run; every mutating skill then carries a refusal table naming the state, why it is a foot-gun, and the verb that clears it; and the dispatch itself is always a canonicaljustrecipe or workflow dispatch.Two deviations from #1744's issue body, both required by the actual plugin format and explained in full on the issue:
.claude-plugin/holds onlyplugin.json. The manifest reference is explicit thatskills/,commands/andhooks/go at the plugin root, not inside.claude-plugin/. The issue's sketched.claude-plugin/skills/…layout would not load.plugin:component, so there is no bare/devkit-status. A skillstatusin plugindevkitis/devkit:status. Keeping thedevkit-directory prefix would have produced/devkit:devkit-status.Both manifests pass
claude plugin validate --strict.Type of Change
feat-- New featurefix-- Bug fixdocs-- Documentation onlychore-- Maintenance task (deps, config, etc.)refactor-- Code restructuring (no behavior change)test-- Adding or updating testsci-- CI/CD pipeline changesbuild-- Build system or dependency changesrevert-- Reverts a previous commitstyle-- Code style (formatting, whitespace)Modifiers
!) -- This change breaks backward compatibilityChanges Made
plugins/devkit/— the plugin (new).claude-plugin/plugin.json— iddevkit,version=1.17.0=DEVKIT_VERSION.README.md— the command table, the five principles, and a pointer todocs/RELEASE_CYCLE.mdas the source of truth ("when a skill and a doc disagree, the doc wins and the skill is a bug").skills/status/— the read-only report every other skill delegates to: scope (devkit vs consumer), the pin vs the latest release, scaffold drift, trains in flight, pre-release tags and whether a Release is attached, the promote gate gate-by-gate, the hotfix lane,DEVKIT_WORKFLOWvs the real topology (including the preserved-hook staleness of [BUG] Switching trunk -> gitflow leaves the dev-branch guard stripped from the preserved .pre-commit-config.yaml #1642), legacy-tag and tombstone hazards, and required App secrets. It matches a pre-release as<base>-<anything>and readsDEVKIT_PRERELEASE_FORMAT, so it stays correct once Release train: first-class Rust release extension (crates.io, cargo-dist binaries, wheels) via a general publish/Release-owner seam #1746 makes the format configurable.skills/adopt/— proposal only for a repo with no.vig-os: inspects languages, CI, existing release tooling, Nix and pre-commit; proposes--mode/--workflow/--versionwith reasons; renders the resulting manifest and the--previewdiff; and flags the collisions that are silent rather than loud (release-plz, cargo-dist, semantic-release/release-please/changesets, an existingflake.nix,.gitignore, CodeQL, a preserved.pre-commit-config.yaml, gitflow with nodev).skills/upgrade/—--previewdry run first, always; applies only on an explicit second-turn confirmation; refuses through a dirty tree, a protected branch or a train in flight; calls out the#1497case where a flake input named something other thanvigosis silently not bumped.skills/release-{prepare,candidate,finalize,promote,abandon,hotfix,neutral}/— one per pathway, each wrapping its canonical verb.skills/pack-rust/— read-only audit of what the Rust pack ships today (Rust pack: L1/L4/L7 never shipped — the pack cannot be adopted cold #1496) plus the silent-green trap; names Release train: first-class Rust release extension (crates.io, cargo-dist binaries, wheels) via a general publish/Release-owner seam #1746's three unmerged contracts as open work instead of describing them as available..claude-plugin/marketplace.json(new) — this repo is the marketplace (vigos-devkit), with a relative-path entry for./plugins/devkit. Installable on merge; when #927 lands,vig-os/org-configadds agit-subdirentry pointing here and nothing moves..github/workflows/release.yml— the finalize step that rewrites.vig-osnow bumpsplugins/devkit/.claude-plugin/plugin.jsonin the same place (nine added lines, self-contained).tests/test_devkit_plugin.py(new, 110 tests) — see Testing below.docs/RELEASE_CYCLE.md— a short "Operator plugin" subsection under Justfile Recipes.Changelog Entry
Testing
just test)tests/test_devkit_plugin.py— 110 tests, TDD (failing tests committed first in27a3fd4f, implementation inc614d86d). It enforces the two invariants that make drift impossible:plugin.json's version equalsDEVKIT_VERSION, and a shape test assertsrelease.yml's finalize step rewrites the plugin manifest in the same step that rewrites.vig-os. Without the second half the lock would hold only until the next release.just <recipe>and every<name>.ymltoken inside a code span or fenced block of anySKILL.md(and of the README) must resolve against devkit's justfiles/workflows or the consumer scaffold's, since the skills run in both. A renamed recipe breaks the suite before it breaks an operator mid-release.Extraction follows
test_scaffold_lint's doctrine — only code regions are scanned, so prose like "just merge the PR" is never read as a recipe namedmerge. The extractors are themselves unit-tested against constructed fixtures (test_just_extractor_flags_an_unknown_recipe,test_yml_extractor_flags_an_unknown_workflow), so a green suite still proves the rules can fail.Also asserted: manifest and marketplace schema shape, no unsupported top-level keys,
.claude-plugin/containing onlyplugin.json, the exact skill catalogue, frontmatter (name matches directory, description within the 1536-char limit),disable-model-invocationon every mutating skill and not onstatus, that every mutating skill's/devkit:statuslookup textually precedes its first dispatch, per-skill refusal coverage keyed on issue number, every axis/devkit:statusmust report, thatstatusdoes not hard-code-rc, and that the plugin is never added toscripts/manifest.tomlor vendored intoassets/workspace/.Manual Testing Details
claude plugin validate --strict ./plugins/devkit→ Validation passedclaude plugin validate .(marketplace) → Validation passeduv run pytest tests/ packages/vig-utils/tests→ 2028 passed, 10 skipped. The 17 errors intests/test_install_script.pyare environmental (Podman image ghcr.io/vig-os/devcontainer:dev not found) and reproduce ondevwithout a locally built image.uv run python scripts/sync_manifest.py sync assets/workspace/run so the.devcontainer/CHANGELOG.mdmirror matches the new entry.Checklist
docs/templates/, then runjust docs)CHANGELOG.mdin the[Unreleased]section (and pasted the entry above)Additional Notes
Deliberately out of scope, matching #1744's own open questions:
commands/wrappers (open question 2's stated preference; the docs also say to preferskills/for new plugins, and a skill already runs as a command).vig-os/org-configwith agit-subdirentry without anything moving.Coordination with #1746 (Rust release-extension seams, in flight on
feature/1746-rust-release-extension-seams): therelease.ymledit here is nine self-contained lines inside the existing.vig-osbump step, so a merge conflict with that branch should be trivial./devkit:statusand/devkit:release-candidatetreat a pre-release as<base>-<anything>and readDEVKIT_PRERELEASE_FORMATrather than assuming-rc*, so they stay correct when #1746 makes the format configurable./devkit:pack-rustnames #1746's three contracts as open work and will encode them once it lands.First adopter (open question 5): devkit itself. The skills are written against devkit's own guards, and
/devkit:statusbranches explicitly where the consumer scaffold differs (no GHCR gate, no cross-repo smoke gate, floating-tag guard instead of the:latestguard, no release-neutral lane).Refs: #1744