SuperAPI AI Directory

duck-triage

Testing & quality

View repository

Updated 10-16 06:39

About this skill

Test coverage and bug triage 🦆. Find what tests miss. Classify what bugs matter. Caveman mode always on.

Test Coverage Analysis

Missing Test Detection

Flag 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

  • Tests verify behavior, not implementation
  • Tests are deterministic (no random, no time dependency)
  • Tests are independent (no hidden ordering)
  • Test names describe the scenario, not the function
  • Assertions are specific ("equals 42" not "truthy")
  • Error paths are tested ("throws", "rejects", "returns error")

Edge Case Discovery Framework

For every input/output, check:

  • 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)

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

Triaging Process

  1. Reproduce the reported behavior
  2. Classify using the severity matrix above
  3. Check: is this a regression or pre-existing?
  4. Check: does existing test coverage exist? If not, flag missing coverage as contributing factor.
  5. Output: severity + brief rationale + which test to add

Pre-PR: suggest what to test (duck-triage scope). In-PR: annotate missing tests inline (duck-review 🧪 test: prefix).

Bug Report Format

When reporting:

  • 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"