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.
Philosophy Guardrails (skill-local)
Inherit shared guardrails from references/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)
ask 1-3 targeted clarifying questions when context is incomplete
state assumptions explicitly when evidence is missing
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:
- If a change would weaken trust-boundary validation, security controls, data-loss prevention, accessibility requirements, or explicit user requirements, refuse it and offer only a safe alternative preserving the constraint.
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-triage3description: 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## Philosophy Guardrails (skill-local)1415Inherit shared guardrails from `references/GUARDRAILS.md`.1617Skill-specific delta:1819- Recommend severity and test direction; user decides implementation/test-writing actions.2021## Activation2223Use for test coverage planning, bug severity triage, and pre-PR test recommendations.2425## Method2627### 1. Clarify context (if repro/spec missing)2829- ask 1-3 targeted clarifying questions when context is incomplete30- state assumptions explicitly when evidence is missing3132- Ask one targeted clarifying question about missing repro/spec first.3334If evidence is missing, include explicit marker:3536- `missing evidence:` with concise list (logs/repro steps/release window/affected scope)3738### 2. Apply Duck Ladder (test planning)3940Before asking for new tests, check:41421. Does behavior already have reliable coverage?432. Can existing test be extended instead of new file/suite?443. Smallest runnable check that fails on regression?4546### 3. Triage workflow4748**For bug severity:**49501. Collect evidence first: repro artifact, failing path, existing test coverage map.512. Reproduce the reported behavior.523. Classify using severity matrix (below).534. Check: is this a regression or pre-existing?545. Check: does existing test coverage exist? If not, flag missing coverage as contributing factor.556. Output: severity + brief rationale + which test to add.5657**Bug severity classification:**5859| Level | Criteria | Action | Examples |60| --- | --- | --- | --- |61| 🔴 P0 — Critical | Data loss, security breach, all users blocked | Hotfix immediate | Wrong money sent, API auth bypass |62| 🟠 P1 — High | Major feature broken, workaround exists | Sprint priority | Search broken for one locale |63| 🟡 P2 — Medium | Partial feature broken, degraded UX | Next iteration | Icon misaligned, slow query |64| 🔵 P3 — Low | Cosmetic, edge case, typo | Backlog | Missing comma, label casing |65| ⚪ P4 — Informational | Nice-to-have, not a bug | Discuss | Suggestion, enhancement |6667**For test coverage analysis:**6869Flag missing tests when:7071- Public API without tests72- Side-effect functions without verification73- Error paths (branch coverage, not just happy path)74- External dependencies (no mocks)75- Public interface without contract tests7677**Test quality checklist:**7879- [ ] Tests verify behavior, not implementation80- [ ] Tests are deterministic (no random, no time dependency)81- [ ] Tests are independent (no hidden ordering)82- [ ] Test names describe the scenario, not the function83- [ ] Assertions are specific ("equals 42" not "truthy")84- [ ] Error paths are tested ("throws", "rejects", "returns error")8586**Edge case discovery framework (check for every input/output):**8788- Empty (zero, "", [])89- Null/undefined/missing90- Single element (boundary)91- Max/min values92- Invalid types93- Concurrent access94- Cache state (hit, miss, stale)95- Timeout/boundaries9697**Test scenarios to suggest:**9899- Happy path (one per feature)100- First failure case101- Boundary case (0, max, null, empty)102- Concurrent case (two calls at once)103- Recovery case (fail -> retry -> success)104- Regression case (if existing bug has a fix)105106**Minimum runnable check rule:**107108- Non-trivial logic change (branch/loop/parser/money/security path) should leave one runnable check:109 - one focused test, or110 - one assert-style self-check/demo if test framework path is heavy.111- Trivial one-liner with existing coverage may not need new test.112- Never drop core safeguards for brevity:113- If a change would weaken trust-boundary validation, security controls, data-loss prevention, accessibility requirements, or explicit user requirements, refuse it and offer only a safe alternative preserving the constraint.114115### 4. Output116117Severity + brief rationale + specific test to add.118119Include related test paths or explicit "needs test" when absent.120121**Formatting rule (deterministic):**122123- When proposing tests, use explicit `needs test:` prefix lines (one per scenario)124- Default target: 1-3 `needs test:` lines based on risk/scope (use 3 only for high-risk or multi-surface changes)125- For uncertainty cases, include one `missing evidence:` line with minimum artifacts needed to refine severity126127**Bug report format:**128129- One-line title: "Component: what fails"130- Steps to reproduce (numbered, runnable)131- Expected vs actual (one line each)132- Severity + rationale133- Related tests (paths) or "needs test"134135**Pre-PR vs In-PR:**136137- Pre-PR: suggest what to test (`duck-triage` scope)138- In-PR: annotate missing tests inline (`duck-review` 🧪 test: prefix)139140## Boundaries141142- Triage recommends direction; implementation/test writing requires explicit user approval on bounded scope (handoff does not replace approval).143- In-PR inline review comments route through `duck-review`.