Test Heuristics
Practical test-suite review, design, triage, strategy, and pruning for any
testing layer a developer writes, runs, debugs, or maintains. Provenance and
grounding sources live in skill.json; this file is runtime routing only.
Core principle
A test exists to catch the bugs that ship in this code class — and to be
diagnosable when it fails. A test that passes regardless of bug presence,
breaks on legitimate refactor, or fails uninformatively is failing at its job.
Activation
- Bare invocation (
"use test-heuristics", "test review", "start"):
load references/activity-router.csv, show the activity menu, wait. No
file inspection, no network calls, no writes.
- Concrete invocation with both activity and layer inferable: skip to
step 3 of the workflow.
- Concrete invocation with ambiguous scope: ask one blocker question
identifying activity or layer; do not inspect private systems first.
Workflow
- Pick activity. Load
references/activity-router.csv. Match the
prompt to: triage, review, author, strategize, prune.
Ambiguous → ask once.
- Pick layer. Load
references/activities/<activity>.csv. Match to
one or more layers, or all for cross-layer treatment (review
fan-out, strategize integrative pass). Ambiguous → ask with the
menu.
- Load grounded context. Load the files in the chosen row's
playbook column — most rows reference one playbook; cross-layer
rows list many — plus the listed core_refs. For review/all,
skip: each spawned layer agent loads its own.
- Identify the target persona from
references/core/personas.md.
- Handle purpose (
spec, regression, characterization,
exploration, gate). For review/author/triage/prune, ask
which applies (multiple can); heuristics for that purpose apply
first. For strategize, skip — the strategy template covers all
purposes via its purpose-by-purpose table.
- Spawn sub-agents in parallel (default for
review and prune).
Single-layer: one lens per agent. review/all: one layer per agent;
each runs the three lenses sequentially inside itself.
strategize/all: single integrative pass — no fan-out. See
references/subagent-dispatch.md. Fall back to sequential lenses
only if the host has no delegation primitive.
- Apply the playbook. Use heuristics tagged for this activity. For
review, score 0–10 using references/core/score-rubric.md. For
author, name the good-shaped pattern. For triage, rank hypotheses
before fixes. For strategize, produce a per-layer investment
recommendation. For prune, produce a deletion list with rationale.
Synthesize sub-agent findings here.
- Apply severity from
references/core/severity-rubric.md (0–4)
and tag failure modes from references/core/failure-modes.md on
every finding.
- Emit output per the default template in the activity router row.
Modes
- Guided Draft (default): one optionized question at a time, 3–4 likely
choices plus a freeform path.
- Autopilot: proceed from available context; state assumptions when the
task is clear and low-risk.
- Grill Me: open-ended questions, one at a time, when audience,
constraints, or trade-offs materially change the result.
Output requirements
Every output includes:
- Target persona.
- Layer(s) and purpose(s).
- Activity-specific load-bearing section per the template.
- Failure mode(s) tagged on every finding.
- Verification — how to prove the change worked.
Subagent dispatch
Independent perspectives catch issues a single pass misses. Default
for review and prune. Preferred for author when comparing
approaches. Optional for triage when ranking hypotheses. Skip for
tiny edits, deterministic single-step checks, or tasks requiring
secrets or production access.
Spawn three sub-agents — one per lens: intent reader, refactor
adversary, bug-shape hunter — and run them in parallel. Some
hosts do not auto-dispatch; instruct the main agent explicitly
("spawn three agents," "delegate this in parallel"). Load
references/subagent-dispatch.md for per-lens prompts, the dispatch
template, and the synthesis step. The three lenses each produce a
finding list; the synthesizing pass deduplicates, preserves
disagreements as open questions, and emits the template-shaped
output. Fall back to sequential only when the host has no delegation
primitive — the discipline of switching lens between passes matters
more than the parallelism.
Reference map
references/activity-router.csv — level-1 router (activity).
references/activities/<activity>.csv — level-2 router (layer) per activity.
references/layers/<layer>.md — layer-specific playbooks (one per layer
listed in the activity CSVs).
references/subagent-dispatch.md — three-lens prompts and synthesis.
references/core/severity-rubric.md — 0–4 severity scale.
references/core/score-rubric.md — 0–10 test-quality scale.
references/core/personas.md — target persona list.
references/core/failure-modes.md — six-mode test failure taxonomy.
references/core/oracles.md — SFDIPOT and FEW HICCUPPS oracles for
exploratory work and the bug-shape hunter lens.
templates/*.md — five activity-specific output templates.
evals/activation-cases.md — activation and behavioral cases (positive
and negative).
evals/run-static-checks.sh — structural and schema gates run in CI.
evals/trigger-evals.json — queries for the description-optimization loop.
skill.json — provenance, grounding sources, version, status.
1---
2name: test-heuristics
3description: Use when reviewing, designing, triaging, or rationalizing test suites — unit, integration, e2e/UI, exploratory, property-based, contract, snapshot, mutation, or performance tests. Trigger for flakiness triage, false-pass risk, brittleness on refactor, suite pruning, test-pyramid/trophy decisions, exploratory charters, and snapshot review. Routes by activity (triage / review / author / strategize / prune) and layer.
4license: MIT
5metadata:
6 source: https://skillmd.com/skills/aibot88/test-heuristics
7---
8
9# Test Heuristics
10
11Practical test-suite review, design, triage, strategy, and pruning for any
12testing layer a developer writes, runs, debugs, or maintains. Provenance and
13grounding sources live in `skill.json`; this file is runtime routing only.
14
15## Core principle
16
17**A test exists to catch the bugs that ship in this code class — and to be
18diagnosable when it fails.** A test that passes regardless of bug presence,
19breaks on legitimate refactor, or fails uninformatively is failing at its job.
20
21## Activation
22
23- **Bare invocation** (`"use test-heuristics"`, `"test review"`, `"start"`):
24 load `references/activity-router.csv`, show the activity menu, wait. No
25 file inspection, no network calls, no writes.
26- **Concrete invocation** with both activity and layer inferable: skip to
27 step 3 of the workflow.
28- **Concrete invocation with ambiguous scope**: ask one blocker question
29 identifying activity or layer; do not inspect private systems first.
30
31## Workflow
32
331. **Pick activity.** Load `references/activity-router.csv`. Match the
34 prompt to: `triage`, `review`, `author`, `strategize`, `prune`.
35 Ambiguous → ask once.
362. **Pick layer.** Load `references/activities/<activity>.csv`. Match to
37 one or more layers, or `all` for cross-layer treatment (`review`
38 fan-out, `strategize` integrative pass). Ambiguous → ask with the
39 menu.
403. **Load grounded context.** Load the files in the chosen row's
41 `playbook` column — most rows reference one playbook; cross-layer
42 rows list many — plus the listed `core_refs`. For `review/all`,
43 skip: each spawned layer agent loads its own.
444. **Identify the target persona** from `references/core/personas.md`.
455. **Handle purpose** (`spec`, `regression`, `characterization`,
46 `exploration`, `gate`). For `review`/`author`/`triage`/`prune`, ask
47 which applies (multiple can); heuristics for that purpose apply
48 first. For `strategize`, skip — the strategy template covers all
49 purposes via its purpose-by-purpose table.
506. **Spawn sub-agents in parallel** (default for `review` and `prune`).
51 Single-layer: one lens per agent. `review/all`: one layer per agent;
52 each runs the three lenses sequentially inside itself.
53 `strategize/all`: single integrative pass — no fan-out. See
54 `references/subagent-dispatch.md`. Fall back to sequential lenses
55 only if the host has no delegation primitive.
567. **Apply the playbook.** Use heuristics tagged for this activity. For
57 `review`, score 0–10 using `references/core/score-rubric.md`. For
58 `author`, name the good-shaped pattern. For `triage`, rank hypotheses
59 before fixes. For `strategize`, produce a per-layer investment
60 recommendation. For `prune`, produce a deletion list with rationale.
61 Synthesize sub-agent findings here.
628. **Apply severity** from `references/core/severity-rubric.md` (0–4)
63 and tag failure modes from `references/core/failure-modes.md` on
64 every finding.
659. **Emit output** per the default template in the activity router row.
66
67## Modes
68
69- **Guided Draft (default):** one optionized question at a time, 3–4 likely
70 choices plus a freeform path.
71- **Autopilot:** proceed from available context; state assumptions when the
72 task is clear and low-risk.
73- **Grill Me:** open-ended questions, one at a time, when audience,
74 constraints, or trade-offs materially change the result.
75
76## Output requirements
77
78Every output includes:
79
80- Target persona.
81- Layer(s) and purpose(s).
82- Activity-specific load-bearing section per the template.
83- Failure mode(s) tagged on every finding.
84- Verification — how to prove the change worked.
85
86## Subagent dispatch
87
88Independent perspectives catch issues a single pass misses. **Default
89for `review` and `prune`.** Preferred for `author` when comparing
90approaches. Optional for `triage` when ranking hypotheses. Skip for
91tiny edits, deterministic single-step checks, or tasks requiring
92secrets or production access.
93
94Spawn three sub-agents — one per lens: **intent reader**, **refactor
95adversary**, **bug-shape hunter** — and run them in parallel. Some
96hosts do not auto-dispatch; instruct the main agent explicitly
97("spawn three agents," "delegate this in parallel"). Load
98`references/subagent-dispatch.md` for per-lens prompts, the dispatch
99template, and the synthesis step. The three lenses each produce a
100finding list; the synthesizing pass deduplicates, preserves
101disagreements as open questions, and emits the template-shaped
102output. Fall back to sequential only when the host has no delegation
103primitive — the discipline of switching lens between passes matters
104more than the parallelism.
105
106## Reference map
107
108- `references/activity-router.csv` — level-1 router (activity).
109- `references/activities/<activity>.csv` — level-2 router (layer) per activity.
110- `references/layers/<layer>.md` — layer-specific playbooks (one per layer
111 listed in the activity CSVs).
112- `references/subagent-dispatch.md` — three-lens prompts and synthesis.
113- `references/core/severity-rubric.md` — 0–4 severity scale.
114- `references/core/score-rubric.md` — 0–10 test-quality scale.
115- `references/core/personas.md` — target persona list.
116- `references/core/failure-modes.md` — six-mode test failure taxonomy.
117- `references/core/oracles.md` — SFDIPOT and FEW HICCUPPS oracles for
118 exploratory work and the bug-shape hunter lens.
119- `templates/*.md` — five activity-specific output templates.
120- `evals/activation-cases.md` — activation and behavioral cases (positive
121 and negative).
122- `evals/run-static-checks.sh` — structural and schema gates run in CI.
123- `evals/trigger-evals.json` — queries for the description-optimization loop.
124- `skill.json` — provenance, grounding sources, version, status.