Use when you need to run "the smallest test that could still catch this change" instead of blindly running the whole suite (or nothing). Provides an invocable L0 to L3 ladder - L0 lint the edited file, L1 impacted tests via deterministic selectors, L2 full suite via longrun, L3 e2e - so a "tests pass" claim is backed by a proportionate check. Never ML "predictive test selection".
How this skill is triggered — by the user, by Claude, or both
Slash command
/agent-skills-toolchain:smallest-check-ladderThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Pick the **smallest rung that could still falsify the change**, run it for real, and
Pick the smallest rung that could still falsify the change, run it for real, and escalate only when the rung passes and you need broader confidence. The point is to make "I ran the relevant tests" a concrete, reproducible command — not a vibe — while staying proportionate to the size of the diff.
Deterministic only. Every selector on this ladder chooses tests from a dependency graph or a coverage map (a fact about the code), never from a learned model that predicts which tests are "probably" relevant. ML predictive test selection is explicitly out of scope: it can silently drop a test that actually covers the change, which defeats the purpose of the rung.
| Rung | Scope | Cost | Run when |
|---|---|---|---|
| L0 | Lint / typecheck the edited file(s) only | ~1s | Every save. Always cheap enough to skip nothing. |
| L1 | Impacted tests — the tests that exercise the changed files | seconds–low tens of s | Default for any code change before claiming "tests pass". |
| L2 | Full suite (+ coverage) | minutes | L1 passed and the change is cross-cutting, or before a PR / task-completion gate. |
| L3 | E2E against the built/packaged artifact | minutes+ | Packaging, wiring, or user-journey surface touched (see packaged-artifact smoke gate). |
Climb from the lowest rung that can catch this class of defect. A one-line pure-function fix rarely needs L3; a change to the Electron main process or the ffmpeg argv builder does.
Substitute the actual changed paths for <files>.
# Python (Reframe: ruff + basedpyright)
ruff check <files>
basedpyright <files>
# TypeScript (Reframe app/)
npx tsc --noEmit # project-wide but fast; or eslint just the files:
npx eslint <files>
# Python — pytest-testmon: selects tests whose recorded coverage touches the changed code.
# Deterministic: it replays a stored per-test coverage map, it does not predict.
# Prerequisite (one-time): pip install pytest-testmon # the --testmon flag is absent until installed
pytest --testmon # uses the .testmondata db built on the prior run
pytest --testmon-noselect <files> # first run / to (re)seed the db for these files
# JavaScript/TypeScript — dependency-graph selection (deterministic: static import graph)
npx jest --findRelatedTests <files> # jest projects
npx vitest related <files> --run # vitest projects (Reframe app/ uses vitest)
--testmon needs its .testmondata db seeded once (run the suite under testmon, or use
--testmon-noselect); if the db is stale or missing it falls back to running everything, so
treat a suspiciously-large L1 selection as "seed first, then reselect".
# Wrap in longrun per the >60s rule; never a blocking foreground call.
~/source/agent-skills-toolchain/scripts/longrun.ps1 -Id l2-full -HangTimeoutSec 300 \
-Cmd pytest --cov --cov-report=term-missing
# TS:
~/source/agent-skills-toolchain/scripts/longrun.ps1 -Id l2-vitest -HangTimeoutSec 300 \
-Cmd npx vitest run --coverage
Coverage thresholds are not decided here — .coverage-thresholds.json remains the single
source of truth and its enforcement command is the blocking gate. L2 just runs the suite.
# Run the project's e2e journeys against the packaged deliverable, not the source tree.
npx vitest run --config vitest.e2e.config.ts # Reframe DOM e2e
# packaged smoke: _electron.launch({executablePath}) / pip install dist/*.whl in a fresh venv
# "Did the lines I changed get exercised?" — deterministic, reads coverage.xml vs the diff.
diff-cover coverage.xml --compare-branch=main
--testmon / related). Capture the actual pass/fail output as evidence..coverage-thresholds.json.SUCCESS:<id> L1 12 passed /
FAILED:<id> L1 2 failed …. Never claim "tests pass" from L0 alone.related with an empty match both tend to run more (or, for related, nothing) — inspect
the selected count; an empty L1 selection means "seed the db / check the path globs", never
"there's nothing to run, ship it".tdd-workflow / test-driven-development (write the test
first, watch it fail). This ladder only selects and runs existing tests..coverage-thresholds.json does.ClaimWarningModule /
claim_warning so a "tests pass" claim is auto-annotated with (or checked against) the
smallest-check command that was actually run. That integration ships separately and, per
council C5, in shadow mode (observe/annotate only — never blocks, never nags). This skill
is the deterministic-command reference it will point at.Evidence: gem-hunt-2026-07-12 MASTER decision queue, A-Tier2 "Smallest-check ladder L0->L3 (testmon / jest-related / diff-cover)", verification-gates streams #4/#5. Additive doc; ships no gate. Deterministic dependency/coverage-map selectors only.
npx claudepluginhub prekzursil/agent-skills-toolchain --plugin agent-skills-toolchainGuides collaborative design exploration before implementation: explores context, asks clarifying questions, proposes approaches, and writes a design doc for user approval.
Creates structured, bite-sized implementation plans from specs or requirements before writing code. Useful for breaking down multi-step tasks into testable steps with file structure and task boundaries.
Resolves in-progress git merge or rebase conflicts by analyzing history, understanding intent, and preserving both changes where possible. Runs automated checks after resolution.