test-qualitylisted
Install: claude install-skill hsb3/dotfiles-agents
# Test quality
A test earns its place by failing: one that cannot name the production
change that would break it pins nothing.
## The pre-write gate
Before writing a test, answer in one sentence: **what production change
should make this fail?** No answer means there is no test to write yet —
the behavior is not pinned down; go read or draft the contract. An answer
as vague as "if the code is wrong" means the assertion is not specific
enough to be worth making.
## The mutation check
For a test that already exists, break the production code on purpose and
confirm the test goes red. Five mutations, cheapest first:
| Mutation | Applied to |
| --- | --- |
| wrong constant | a returned or compared literal — off by one, or negated |
| wrong branch | flip a condition, or swap the arms |
| missing side effect | delete the write, emit, or call the test claims to check |
| empty return | return the empty value instead of the real one |
| missing validation | delete a guard, then feed it the input that guard rejects |
A mutation the suite survives is a hole: fix the test, then revert the
mutation. Apply this to the specific code the test names — a whole-file
mutation run is a different and much slower tool.
**On a defect, the defect is the mutation.** The test goes red against the
unfixed production code, and red again when the fix is reverted. That pair
is what "red observed" means; a suite inherited green earns the same check
before anyone trusts it.
Coverage counts lines exe