Harness Kit

skill

hardening

Agent-driven test hardening for functions, specs, and acceptance surfaces: property testing, mutation testing, acceptance mutation, CRAP/SCRAP risk, and structural DRY analysis. Use when: "property test this", "mutation test", "CRAP analysis", "DRY analysis", "harden tests", "find weak tests", "kill surviving mutants", "acceptance mutation", "uncle bob hardening". Trigger: /hardening.

/hardening

Source: skills/hardening/SKILL.md

What it does

Agent-driven test hardening for functions, specs, and acceptance surfaces: property testing, mutation testing, acceptance mutation, CRAP/SCRAP risk, and structural DRY analysis. Use when: "property test this", "mutation test", "CRAP analysis", "DRY analysis", "harden tests", "find weak tests", "kill surviving mutants", "acceptance mutation", "uncle bob hardening". Trigger: /hardening.

Workflow role

Support primitive in the Harness Kit operating loop.

Source contract preview

This generated excerpt gives readers the beginning of the live primitive contract before they jump to GitHub.

Find places where the code or tests can lie, then add the smallest hardening
loop that makes the lie executable.

This skill absorbs the Uncle Bob pattern: agents are good at selecting a
bounded target, deriving domains and invariants, generating focused hardening
checks, running them, and repairing the bugs or weak tests they expose. The
output is not a generic "more tests" report. It is a short list of hardened
surfaces with commands, survivors, fixes, and residual risk.

## Execution Stance

You are the lead hardening engineer.
- Keep target selection, oracle quality, and final acceptance on the lead model.
- Dispatch roster lanes for independent target discovery and critic review.
- Prefer one high-risk target fully hardened over broad shallow coverage.
- Use repo-native tools first; add new hardening tools only when the repo has
  no reasonable equivalent and the target earns the dependency.

## Delegation Floor

Delegation floor applies: probe the roster first; dispatch two or more
providers for substantive work; direct solo only for mechanical, emergency,
user-forbidden, or fewer-than-two-providers cases. See
`harnesses/shared/AGENTS.md` (Roster).

Local lane guidance: Use one lane to identify hardening candidates and one lane to challenge the chosen oracle, domains, mutants, and residual risk.

## Routing

| Mode | Use When | Primary Output |
|---|---|---|
| `property` | Pure or mostly pure behavior has a describable domain, range, invariant, round trip, monotonicity, idempotence, parser law, or conservation rule. | Property tests plus counterexample fixes. |
| `mutation` | Existing tests may be shallow, branch logic changed, or a file has enough coverage to justify mutant execution. | Mutation run, survivor fixes, and killed-mutant evidence. |
| `acceptance` | Gherkin, examples, fixtures, API contracts, CLI transcripts, or golden paths claim user behavior. | Mutated examples/contracts prove acceptance checks are connected. |
...

What to verify