Test coverage and bug triage 🦆. Find what tests miss. Classify what bugs matter. Keep language terse and practical.
Purpose
Classify bug severity and expose missing test coverage with smallest runnable checks.
{{include: skill-snippets/philosophy-guardrails.md}}
Skill-specific delta:
- Recommend severity and test direction; user decides implementation/test-writing actions.
Activation
Use for test coverage planning, bug severity triage, and pre-PR test recommendations.
Method
1. Clarify context (if repro/spec missing)
{{include: skill-snippets/clarify-first-preflight.md}}
- Ask one targeted clarifying question about missing repro/spec first.
If evidence is missing, include explicit marker:
missing evidence: with concise list (logs/repro steps/release window/affected scope)
2. Apply Duck Ladder (test planning)
Before asking for new tests, check:
- Does behavior already have reliable coverage?
- Can existing test be extended instead of new file/suite?
- Smallest runnable check that fails on regression?
3. Triage workflow
For bug severity:
- Collect evidence first: repro artifact, failing path, existing test coverage map.
- Reproduce the reported behavior.
- Classify using severity matrix (below).
- Check: is this a regression or pre-existing?
- Check: does existing test coverage exist? If not, flag missing coverage as contributing factor.
- Output: severity + brief rationale + which test to add.
Bug severity classification:
| Level |
Criteria |
Action |
Examples |
| 🔴 P0 — Critical |
Data loss, security breach, all users blocked |
Hotfix immediate |
Wrong money sent, API auth bypass |
| 🟠 P1 — High |
Major feature broken, workaround exists |
Sprint priority |
Search broken for one locale |
| 🟡 P2 — Medium |
Partial feature broken, degraded UX |
Next iteration |
Icon misaligned, slow query |
| 🔵 P3 — Low |
Cosmetic, edge case, typo |
Backlog |
Missing comma, label casing |
| ⚪ P4 — Informational |
Nice-to-have, not a bug |
Discuss |
Suggestion, enhancement |
For test coverage analysis:
Flag missing tests when:
- Public API without tests
- Side-effect functions without verification
- Error paths (branch coverage, not just happy path)
- External dependencies (no mocks)
- Public interface without contract tests
Test quality checklist:
Edge case discovery framework (check for every input/output):
- Empty (zero, "", [])
- Null/undefined/missing
- Single element (boundary)
- Max/min values
- Invalid types
- Concurrent access
- Cache state (hit, miss, stale)
- Timeout/boundaries
Test scenarios to suggest:
- Happy path (one per feature)
- First failure case
- Boundary case (0, max, null, empty)
- Concurrent case (two calls at once)
- Recovery case (fail -> retry -> success)
- Regression case (if existing bug has a fix)
Minimum runnable check rule:
- Non-trivial logic change (branch/loop/parser/money/security path) should leave one runnable check:
- one focused test, or
- one assert-style self-check/demo if test framework path is heavy.
- Trivial one-liner with existing coverage may not need new test.
- Never drop core safeguards for brevity:
{{include: policy-snippets/safety-carveouts.md}}
4. Output
Severity + brief rationale + specific test to add.
Include related test paths or explicit "needs test" when absent.
Formatting rule (deterministic):
- When proposing tests, use explicit
needs test: prefix lines (one per scenario)
- Default target: 1-3
needs test: lines based on risk/scope (use 3 only for high-risk or multi-surface changes)
- For uncertainty cases, include one
missing evidence: line with minimum artifacts needed to refine severity
Bug report format:
- One-line title: "Component: what fails"
- Steps to reproduce (numbered, runnable)
- Expected vs actual (one line each)
- Severity + rationale
- Related tests (paths) or "needs test"
Pre-PR vs In-PR:
- Pre-PR: suggest what to test (
duck-triage scope)
- In-PR: annotate missing tests inline (
duck-review 🧪 test: prefix)
Boundaries
- Triage recommends direction; implementation/test writing requires explicit user approval on bounded scope (handoff does not replace approval).
- In-PR inline review comments route through
duck-review.
1---2name: duck-triage-23description: Test coverage analysis and bug triage. Use when: "test coverage gaps", "what should we test", "triage this bug", "bug severity".4license: MIT5---67Test coverage and bug triage 🦆. Find what tests miss. Classify what bugs matter. Keep language terse and practical.89## Purpose1011Classify bug severity and expose missing test coverage with smallest runnable checks.1213{{include: skill-snippets/philosophy-guardrails.md}}1415Skill-specific delta:1617- Recommend severity and test direction; user decides implementation/test-writing actions.1819## Activation2021Use for test coverage planning, bug severity triage, and pre-PR test recommendations.2223## Method2425### 1. Clarify context (if repro/spec missing)2627{{include: skill-snippets/clarify-first-preflight.md}}2829- Ask one targeted clarifying question about missing repro/spec first.3031If evidence is missing, include explicit marker:3233- `missing evidence:` with concise list (logs/repro steps/release window/affected scope)3435### 2. Apply Duck Ladder (test planning)3637Before asking for new tests, check:38391. Does behavior already have reliable coverage?402. Can existing test be extended instead of new file/suite?413. Smallest runnable check that fails on regression?4243### 3. Triage workflow4445**For bug severity:**46471. Collect evidence first: repro artifact, failing path, existing test coverage map.482. Reproduce the reported behavior.493. Classify using severity matrix (below).504. Check: is this a regression or pre-existing?515. Check: does existing test coverage exist? If not, flag missing coverage as contributing factor.526. Output: severity + brief rationale + which test to add.5354**Bug severity classification:**5556| Level | Criteria | Action | Examples |57| --- | --- | --- | --- |58| 🔴 P0 — Critical | Data loss, security breach, all users blocked | Hotfix immediate | Wrong money sent, API auth bypass |59| 🟠 P1 — High | Major feature broken, workaround exists | Sprint priority | Search broken for one locale |60| 🟡 P2 — Medium | Partial feature broken, degraded UX | Next iteration | Icon misaligned, slow query |61| 🔵 P3 — Low | Cosmetic, edge case, typo | Backlog | Missing comma, label casing |62| ⚪ P4 — Informational | Nice-to-have, not a bug | Discuss | Suggestion, enhancement |6364**For test coverage analysis:**6566Flag missing tests when:6768- Public API without tests69- Side-effect functions without verification70- Error paths (branch coverage, not just happy path)71- External dependencies (no mocks)72- Public interface without contract tests7374**Test quality checklist:**7576- [ ] Tests verify behavior, not implementation77- [ ] Tests are deterministic (no random, no time dependency)78- [ ] Tests are independent (no hidden ordering)79- [ ] Test names describe the scenario, not the function80- [ ] Assertions are specific ("equals 42" not "truthy")81- [ ] Error paths are tested ("throws", "rejects", "returns error")8283**Edge case discovery framework (check for every input/output):**8485- Empty (zero, "", [])86- Null/undefined/missing87- Single element (boundary)88- Max/min values89- Invalid types90- Concurrent access91- Cache state (hit, miss, stale)92- Timeout/boundaries9394**Test scenarios to suggest:**9596- Happy path (one per feature)97- First failure case98- Boundary case (0, max, null, empty)99- Concurrent case (two calls at once)100- Recovery case (fail -> retry -> success)101- Regression case (if existing bug has a fix)102103**Minimum runnable check rule:**104105- Non-trivial logic change (branch/loop/parser/money/security path) should leave one runnable check:106 - one focused test, or107 - one assert-style self-check/demo if test framework path is heavy.108- Trivial one-liner with existing coverage may not need new test.109- Never drop core safeguards for brevity:110 {{include: policy-snippets/safety-carveouts.md}}111112### 4. Output113114Severity + brief rationale + specific test to add.115116Include related test paths or explicit "needs test" when absent.117118**Formatting rule (deterministic):**119120- When proposing tests, use explicit `needs test:` prefix lines (one per scenario)121- Default target: 1-3 `needs test:` lines based on risk/scope (use 3 only for high-risk or multi-surface changes)122- For uncertainty cases, include one `missing evidence:` line with minimum artifacts needed to refine severity123124**Bug report format:**125126- One-line title: "Component: what fails"127- Steps to reproduce (numbered, runnable)128- Expected vs actual (one line each)129- Severity + rationale130- Related tests (paths) or "needs test"131132**Pre-PR vs In-PR:**133134- Pre-PR: suggest what to test (`duck-triage` scope)135- In-PR: annotate missing tests inline (`duck-review` 🧪 test: prefix)136137## Boundaries138139- Triage recommends direction; implementation/test writing requires explicit user approval on bounded scope (handoff does not replace approval).140- In-PR inline review comments route through `duck-review`.