Repository navigation
feat: add the rust-toolchain-scaffold skill to aiplugins-devtools - #170
Merged
Merged
Conversation
Promote the SC2086 notes on the footprint-freshness step in ci.yml and the README's "latest release" wording, which disagrees with the per-plugin tag URLs in the marketplace manifest. A third anomaly, a stale Cargo.lock, was already fixed (9dd07b1, eebf56b) and is not recorded. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Design for a Rust port of the bun-toolchain-scaffold skill, shipped through the aiplugins-devtools plugin: lefthook from PATH with a fail-closed install, an excluded standalone test crate, and a three-OS end-to-end CI job. Also records the `just setup` defect found while measuring (lefthook is not a crates.io crate) in the roadmap. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Seven measured or read findings: the excluded test crate is not reached by cargo fmt --all, a justfile next to a Justfile makes just fail, a global core.hooksPath breaks lefthook install in test repositories, and the hook jobs and toolchain pins were unspecified. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Nine findings checked by measurement. Real: a step-level JUST_DRY_RUN turns the CI gate into a green no-op, the nested test crate needs a committed lock and an ignored target/, install-action cannot install gitleaks or lefthook, and the footprint cap is a hard requirement. Rejected with measurements: working-directory, a cargo deny crash, multi-minute pre-push latency and the OpenCode argument claim. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…old spec The nested test crate needs its own .gitignore (a root /target entry does not cover it, measured), the template deny.toml needs licenses.private ignore because publish = false alone still fails licenses, and the pre-commit clippy hook must run the same recipe as lint so it also covers toolchain-tests/. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…e spec Owner chose tiered workflow checks: the two shadowing rules on every workflow, the strict rules on ci.yml only, after a measurement showed 10 of this repository's 13 workflows have write permissions. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A re-run of apply.sh now reports drift against the templates, the gate-test speed is stated as a target and not a measurement, and the same-named-job precaution is recorded as unverified against GitHub. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…claim Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…caffold spec Panel round 4 came back clean, but its answer that this case was already covered was wrong: the spec dropped the Bun skill's step 5. Existing code that fails fmt or clippy -D warnings is reported and the user chooses; a gate is never loosened to reach green. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…or the plan The JUST_ rule is by prefix (39 variables today), the gate tests ran in 0.107 s and the toolchain tests in 14.7 s, the CI install route for gitleaks and lefthook is settled (pinned download in the scaffold, go install in this repository's job), and the existing .gitattributes pin already covers the skill's files. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Seven tasks, with the templates, the test crate, apply.sh and both scripts embedded as the exact bytes that were run in a scratch directory while the plan was written: the scaffold passes its own just check, nine seeded weakenings each turn a gate test red, the static gate catches eleven seeded defects, and the footprint fits the cap. Windows and macOS are left to the new three-system job, and the plan says so. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… plan The preflight now lists mlc and the zip tools that links and bundles need, the README opening-line edit has exact old and new text, a failed footprint ratchet is retried from the committed baseline, and the end-to-end script is committed as soon as it is written. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
SKILL.md, four references, two snippets and the OpenCode command, emitted into the four devtools plugins, with the footprint documents regenerated (+341 resident bytes on Claude Code and Antigravity, +418 on OpenCode, against a cap of 500). The templates and apply.sh follow. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The task review found two places where the spec disagreed with what the verified scaffold does: it listed a Cargo lints snippet that nothing consumes (a lint policy is repository-specific and the recipe already enforces clippy -D warnings), and its recipe table lacked fmt-check, which the justfile has. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Applies the scaffold to throwaway repositories, runs its own just check, and weakens nine gates one at a time. It fails until apply.sh and the templates land in the next commit, and nothing runs it yet. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
… in the end-to-end test The script now drops the same variable families as the scaffold's helpers, so an exported JUST_DRY_RUN cannot make just check pass without running a gate. It also runs the scaffolded just check and the toolchain suite in both the single-crate and the workspace repository. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
The scaffold: a justfile, lefthook hooks with a fail-closed install, deny, typos and toolchain settings, a pinned CI workflow, CODEOWNERS, and an excluded test crate with 26 gate tests and 27 toolchain tests. apply.sh never overwrites and reports drift. The end-to-end test from the previous commit now passes: it applies the scaffold to throwaway repositories, runs its own just check, and weakens nine gates one at a time. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…and CI scripts/check-rust-scaffold.sh checks that every template is a .tmpl, every file the skill names exists, the CI template pins its actions, the test crate stays outside the workspace, and the devtools LF pin is still there. Its mutation test seeds eleven defects. Wired into the check aggregate and the wiring job; test-rust-scaffold is the slow end-to-end recipe. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Applies the scaffold to throwaway repositories, runs its own just check, and weakens nine gates one at a time. This is the only measurement of Git Bash and macOS for the scaffold. lefthook and gitleaks come from a version-pinned go install. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
…in-scaffold skill A. The gate test rejects env keys from the JUST_, GITLEAKS_, LEFTHOOK, HOOK_ARG_, NEXTEST_ and TYPOS_ families in every workflow. B. CODEOWNERS (template and both gate-test lists) covers the tool config files that can switch a gate off; accepted-boundaries says review protects them. C. The pre-push glob and .gitattributes cover all three justfile spellings. D. rc.sh also unsets LEFTHOOK_EXCLUDE; the test, prose and spec follow. E. adapting.md gains mlc, license-header and gate-wiring rows; the static gate scans references/*.md for dangling paths; the spec sections 4.2, 4.4, 4.5 and 7 are corrected. F. Fix-now items: test script trap, grep class and full check output; ci.yml timeout; strict ci checks over every job; apply.sh top-level, dangling-symlink and read-only handling; READMEs list all six tools; accepted-boundaries wording; fake_token comment; pitfalls wording. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The snippet named two lefthook variables, only the JUST_ env-key rule and an old CODEOWNERS path list. It now names LEFTHOOK_EXCLUDE as well, the six tool-configuration env-key families, and describes the CODEOWNERS coverage by category with the file as the list. The four emitted copies are regenerated. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
apply.sh now treats the target as the top level when `git rev-parse --show-prefix` prints nothing, instead of comparing two pwd -P spellings, which can differ on a Windows runner (8.3 short names). Exit code 2 and the message naming the target and the top level are kept. The four emitted copies are regenerated. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…rate it apply.sh generated toolchain-tests/Cargo.lock only when it copied the manifest in the same run. A first run that failed (offline, no cargo) printed its ERROR and the next run saw an identical manifest, generated nothing, printed nothing and exited 0. The lock is now generated whenever the scaffold's own manifest is present (copied or identical) and no lock exists. The end-to-end test fails a first run, fails a second run, then proves a run with a working cargo generates the lock; the old apply.sh turns two of those checks red. Found by the agy capstone, round 2 (measured on a scratch repository). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…hain-scaffold suites - clippy_lints_every_target_and_denies_warnings_in_each_command: dropping --all-targets from either clippy command left every test green (measured); each command is now read on its own. - the_pre_push_fast_gate_is_an_unconditional_script_job: nothing pinned the pre-push check job as a script job with no glob, skip or run key. - apply.sh refusing a subdirectory of a repository (exit 2, nothing written) had no test; removing the guard left the quick end-to-end test green. Two new seeded weakenings (eleven) and the counts in SKILL.md and the spec (28 gate tests) follow. Test and documentation changes only; no implementation source changed. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The scaffold formats its own test crate, so the end-to-end run's fmt-check failed on one assert! that was one line too long. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The agy test audit named empty-commit, deletion-only and tag pushes as an absent category. Measured: with an upstream set, a run job with a glob prints 'check (skip) no matching push files' on an empty-commit push and the push succeeds, while the script job blocks it. The toolchain suite had no zero-change push, so a rewrite of the check job as a run job slipped past every behavioural test. The new test goes red under both a run job with glob and 'run: just check-fast'. 28 toolchain tests (25 on Windows) in SKILL.md and the spec. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
One round, GAPS FOUND: the three claimed gaps were measured and folded, and one driver-found behavioural gap (empty-commit push) was folded. The capstone GREEN stands: the folds changed tests and documentation only. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- test-rust-scaffold.sh: pass --color never to the gate suite. The job sets CARGO_TERM_COLOR=always, which wraps FAIL in escape codes, so the grep that checks each seeded weakening saw none and reported every weakening as not failing (all eleven, on Linux and Windows). Reproduced locally with the variable set; the full run now passes with it set. - ci.yml: install Go with actions/setup-go. The macOS runner has no go on PATH, so the go install step exited 127. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The rust-toolchain-scaffold skill text grew the invocation tier of the three devtools plugins by 117 bytes (51,788 to 51,905; 52,247 to 52,364 for OpenCode). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
BSD chmod takes the -- after the mode for a file name: 'chmod: --: No such file or directory' failed apply.sh on a fresh repository in the first macOS run of the rust-scaffold job (run 45491889787). The destination path is absolute, so it cannot be read as an option. Checked: no other chmod in the skill or its scripts passes --. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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 this adds
A new skill,
rust-toolchain-scaffold, in theaiplugins-devtoolsplugin. It is the Rust port of the personalbun-toolchain-scaffoldskill. It copies a tested quality toolchain into a Rust repository: just recipes, lefthook hooks (pre-commit, commit-msg, pre-push), rustfmt, clippy-D warnings, nextest, cargo-deny, typos, gitleaks, a SHA-pinned CI workflow and CODEOWNERS. It also installs an excluded test crate,toolchain-tests/, whose tests prove each gate blocks what it should.shared/devtools/skills/rust-toolchain-scaffold/;just emit-devtools-skillscopies them to the Claude Code, OpenCode, Qwen and Antigravity plugins (drift gate:scripts/check-devtools-skills.sh).scripts/apply.shcopies the 18 templates without overwriting anything, reports what it skipped, refuses a non-top-level target, and generates the test crate'sCargo.lock.scripts/check-rust-scaffold.sh(static structure gate with seeded defects, wired intojust checkand CI) andscripts/test-rust-scaffold.sh(applies the scaffold to throwaway repositories, runs the scaffold's ownjust check, then applies eleven weakenings and requires the named gate test to go red).rust-scaffoldruns that end-to-end test on Linux, Windows and macOS.Design:
docs/superpowers/specs/2026-11-24-rust-toolchain-scaffold-design.md; plan:docs/superpowers/plans/2026-11-24-rust-toolchain-scaffold.md.Stacking
This branch was cut from the branch of #169 (
docs/roadmap-triaged-anomalies) and targetsmain, becauseci.ymlruns only for pull requests that targetmain. Until #169 merges, this diff also shows #169's roadmap commits. Merge #169 first and they drop out. The remaining 27 commits are the spec and plan commits plus the implementation, its review fixes and the two agy review records.Review history
GITLEAKS_CONFIG_TOMLkey in CI made the secret scan pass on a committed token; tool config files could switch gates off; the pre-push glob missed theJustfilespelling), fixed in626432f,c6d947fandf411198.docs/agy-capstone-ledger.md): three rounds over4157343..b1fcc1a, GREEN. One defect, measured on a scratch repository and fixed inb1fcc1a: after a failed first run,apply.shnever retriedtoolchain-tests/Cargo.lock.docs/agy-test-audit-ledger.md): three claimed gaps, each measured with a mutant and closed (clippy--all-targets, the pre-push job being a script job, theapply.shsubdirectory refusal), plus a behavioural test that an empty-commit push is blocked. 28 gate tests and 28 toolchain tests (25 on Windows) now.What was verified
bash scripts/test-rust-scaffold.sh) at8d5736b: 0 FAIL; both scaffolded repositories pass their ownjust check; the new tests go red under their mutants.just devtools-skills,rust-scaffold,skills-bundles,skills-release-wiring,footprint-budgets,wiring,opencode-wiring,agy-wiring,doc-paths,spellcheck,gate-wiringandscripts/test-rust-scaffold.sh --quickpass at936b991(Linux).What was not verified
rust-scaffoldjob is the first measurement of them. The spec's section 7 lists the hypotheses to check first in its logs:justpicking WSL'sbash.exe,sort -Vinjust setup, and the extensionlesscargoshim withenv PATH=in the newapply.shtest.just checkin the author's worktree stops atfootprint-regenbecause thertk-mcp-ccbinary was not staged there; this does not depend on the branch.Test plan
rust-scaffoldjob on all three systems are greenrust-scaffoldlog against the spec section 7 watch list🤖 Generated with Claude Code