/whetstone:ia-test-auditfrom whetstone
Audits tests for false confidence by detecting regressions that tests fail to catch. Finds mocked-away subjects, weak assertions, undiscriminating fixtures, and tests missing from CI gates.
Ships in whetstone. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Find tests that remain green when their claimed behavior breaks. Assess behavior, not apparent authorship, mock count, assertion count, or a target finding percentage. Default to a read-only audit. Change tests or production code only when requested.
Adapted from the OpenClaw test-audit skill (MIT).
Evaluate each claimed behavior separately. A test can protect one obligation and miss another. Use these dispositions:
A missing additional edge case is not automatically a defective existing test. Tie each quality finding to an existing claim, documented contract, or misleading assertion. Distinguish an individual test's weakness from a suite-wide coverage gap.
Read repository instructions, runner configuration, shared fixtures, test helpers, and CI commands. Record the exact focused command and applicable completion gates. Determine which tests are collected, execute, and block a merge. An advisory job is not a blocking gate. A local green result does not establish CI enforcement.
Build an inventory from the runner's collection output when practical. Otherwise label the source inventory approximate. Count files, test definitions, and parameter cases separately. Do not treat helpers as tests or silently omit unrecognized syntax.
For a bounded request, inspect every in-scope test. For a large suite, declare the review budget and selection method before discovery. Cover distinct layers, major fixtures, and mocking styles. Combine risk-directed selection with a reproducible sample independent of detector hits. Keep those two sample results separate. Record the seed and sample unit if claiming random sampling. Expand recurring patterns into their owner family when practical; report anything left unreviewed.
Do not infer suite prevalence from targeted examples. If a prevalence estimate is requested, use a representative sample with an explicit denominator and uncertainty. Do not tune findings to an expected rate such as 10–20%.
Read behavioral-review.md before auditing test bodies. For each reviewed test, trace:
Construct a concrete counterexample before declaring an assertion sufficient. Examples include ignoring one filter, selecting the first item instead of the minimum, dropping a forwarded prop, or returning an empty result where only the type is asserted. Prefer a changed observable result over a crash or syntax error.
Inspect both positive and negative tests. Trace assertion helpers to their actual checks. Read the relevant implementation and neighboring tests before reporting a gap. For mocks, identify whether the replaced operation owns the claimed behavior or is a collaborator of a real subject. Check arguments, call requirements, returned data, and observable effects at that boundary.
When delegation is available, split semantic discovery by owner or directory. Each reviewer discovers independently of detector output. Require exact locations, real subject, surviving regression, retained value, and evidence status. Independently verify the strongest findings before reporting them.
Run each script by its path in this skill's directory, not the audited repository's
scripts/, with the audited repository root as the working directory. Write output
to a temporary directory.
Use the repository's pinned tooling for runner commands. The scripts require Python
3.11+ and the standard library.
| Script | What its results mean |
|---|---|
weak_negatives.py <test globs> | Heuristic candidates for ambiguous refusal assertions. Does not assess positive behavior or assertion data flow. |
duplicate_tests.py <test globs> --json | Structural duplicate/consolidation candidates, not an effectiveness score. |
junit_census.py <report.xml> --test-files <glob> | Reported skips, possible collection gaps, and PHPUnit zero-assertion leads (adequate when not throwing is the documented contract). |
guard_pins.py --src <glob> --tests <glob> | Refusal strings without textual matches; not proof of guard coverage. |
| pytest_reach_probe.py | Runs the target suite with a recording plugin; use a scratch copy. See stacks.md. |
Before trusting any output, read detectors.md: for the four static detectors, status 2 means known incomplete input, and each detector has blind spots that require source review. Read stacks.md for runner/probe commands and duplicate parser limits. Confirm tool flags locally before use. No detector hits means only no matches to that detector's rules; continue the semantic sample.
Static evidence can establish a finding when the data flow is explicit, such as a test asserting a value it assigned itself. Label it source-confirmed. Otherwise state the counterexample as inferred until executed. Use execution-confirmed only when the exact test ran against a verified behavioral change.
For high-impact or uncertain findings, use a focused mutation in an isolated scratch copy. Do not mutate the user's checkout for an audit. Keep network calls, paid APIs, and shared databases outside the probe unless separately authorized and isolated. Before running a mutation, read mutation-and-repair.md for the procedure and how to read a surviving mutant.
For each finding, give:
file:line, plus the relevant production location.Report reviewed scope and selection method alongside findings. Separate confirmed findings, unresolved candidates, and retained counterexamples. Do not count every missing obligation as a separate bad test. State commands not run and reasons.
Before proposing deletion of a production seam or a test, or when changes are authorized, or when authoring a new test, read mutation-and-repair.md.
SPEC.md (opens in a new tab)references/behavioral-review.md (opens in a new tab)references/detectors.md (opens in a new tab)references/mutation-and-repair.md (opens in a new tab)references/stacks.md (opens in a new tab)scripts/duplicate_tests.py (opens in a new tab)scripts/guard_pins.py (opens in a new tab)scripts/junit_census.py (opens in a new tab)scripts/pytest_reach_probe.py (opens in a new tab)scripts/weak_negatives.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub iliaal/whetstone --plugin whetstone29 skills in this plugin
/ia-agent-native-architectureDesign agent-native applications where agents replace UI users as the primary actor. Use when designing MCP tools, agent-loop architectures, system prompt design, hooks policy, shared-workspace file patterns, or self-modifying agent systems./ia-brainstormingPre-implementation exploration: deep interview, approach comparison, design doc. Use when exploring a vague feature idea, clarifying ambiguous requirements, or comparing approaches before coding. For the full workflow, use the ia-brainstorm command (Claude Code)./ia-code-reviewStructured code reviews with severity-ranked findings and deep multi-agent mode. Use when performing a code review, auditing code quality, or critiquing PRs, MRs, or diffs, including a diff or patch pasted inline, even when the review looks quick from reading it. For the full multi-agent workflow, use the ia-review command (/ia-review in Claude Code)./ia-cpp-systemsModern C++ patterns: RAII and ownership, rule of zero/five, exceptions and error handling, API and ABI boundaries, templates, and CMake tooling. Use when writing, reviewing, refactoring, or debugging C++, working with smart pointers, move semantics, memory leaks, template errors, or gtest. For plain C, see ia-c-systems./ia-c-systemsC patterns for systems code, libraries, and native extensions: module layout, function decomposition, status-enum errors, memory safety, undefined behavior, and performance measurement. Use when writing, reviewing, refactoring, or debugging C, working with malloc lifetimes, buffer overflows, sanitizers, or Valgrind, or building native extensions. For C++, see ia-cpp-systems./ia-debuggingSystematic root-cause debugging with verification. Use for errors, stack traces, broken tests, flaky tests, regressions, or anything not working as expected, including a pasted stack trace or failing test whose cause looks obvious from reading it. For validating bug reports before fixing, use bug-reproduction-validator agent.Other plugins' skills for the same job