mcpField
D
duck-triage

duck-triage

github.com/sprngrTesting & quality882 installsUpdated 3w ago
Repository

About duck-triage

duck-triage is an agent skill for assessing bug severity and identifying test coverage gaps. It gathers evidence, checks existing tests, and recommends focused runnable checks while leaving implementation decisions to the user.

Key features

  1. 01Bug severity classification
  2. 02Test coverage gap analysis
  3. 03Evidence-first triage workflow
  4. 04Smallest runnable check recommendations
  5. 05Test quality and edge-case checklists

Use cases

  1. 01Prioritize a reported bug
  2. 02Plan tests before a pull request
  3. 03Find missing error-path or boundary tests

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/sprngr/rubber-duck --skill duck-triage

After installing, type/duck-triagein Claude Code to confirm it loaded.

Bundled filesreferences/GUARDRAILS.md

Details

From the project README

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:

  1. Does behavior already have reliable coverage?
  2. Can existing test be extended instead of new file/suite?
  3. Smallest runnable check that fails on regression?
3. Triage workflow

For bug severity:

  1. Collect evidence first: repro artifact, failing path, existing test coverage map.
  2. Reproduce the reported behavior.
  3. Classify using severity matrix (below).
  4. Check: is this a regression or pre-existing?
  5. Check: does existing test coverage exist? If not, flag missing coverage as contributing factor.
  6. Output: severity + brief rationale + which test to add.

Bug severity classification:

LevelCriteriaActionExamples
🔴 P0 — CriticalData loss, security breach, all users blockedHotfix immediateWrong money sent, API auth bypass
🟠 P1 — HighMajor feature broken, workaround existsSprint prioritySearch broken for one locale
🟡 P2 — MediumPartial feature broken, degraded UXNext iterationIcon misaligned, slow query
🔵 P3 — LowCosmetic, edge case, typoBacklogMissing comma, label casing
⚪ P4 — InformationalNice-to-have, not a bugDiscussSuggestion, 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:

  • 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 (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.

Comments

Markdown supported