5.4 KiB
Skill Test Spec: /bug-triage
Skill Summary
/bug-triage reads all open bug reports in production/bugs/ and produces a
prioritized triage table sorted by severity (CRITICAL → HIGH → MEDIUM → LOW).
It runs on the Haiku model (read-only, formatting/sorting task) and produces no
file writes — the triage output is conversational. The skill flags bugs missing
reproduction steps and identifies possible duplicates by comparing titles and
affected systems.
The verdict is always TRIAGED — the skill is advisory and informational. No director gates apply. The output is intended to help a producer or QA lead prioritize which bugs to address next.
Static Assertions (Structural)
Verified automatically by /skill-test static — no fixture needed.
- Has required frontmatter fields:
name,description,argument-hint,user-invocable,allowed-tools - Has ≥2 phase headings
- Contains verdict keyword: TRIAGED
- Does NOT contain "May I write" language (skill is read-only)
- Has a next-step handoff (e.g.,
/bug-reportto create new reports,/hotfixfor critical bugs)
Director Gate Checks
None. /bug-triage is a read-only advisory skill. No director gates apply.
Test Cases
Case 1: Happy Path — 5 bugs of varying severity, sorted table produced
Fixture:
production/bugs/contains 5 bug report files:- bug-2026-03-10-audio-crash.md (CRITICAL)
- bug-2026-03-12-score-overflow.md (HIGH)
- bug-2026-03-14-ui-overlap.md (MEDIUM)
- bug-2026-03-15-typo-tutorial.md (LOW)
- bug-2026-03-16-vfx-flicker.md (HIGH)
Input: /bug-triage
Expected behavior:
- Skill reads all 5 bug report files
- Skill extracts severity, title, system, and repro status from each
- Skill produces a triage table sorted: CRITICAL first, then HIGH, MEDIUM, LOW
- Within the same severity, bugs are ordered by date (oldest first)
- Verdict is TRIAGED
Assertions:
- Triage table has exactly 5 rows
- CRITICAL bug appears before both HIGH bugs
- HIGH bugs appear before MEDIUM and LOW bugs
- Verdict is TRIAGED
- No files are written
Case 2: No Bug Reports Found — Guidance to run /bug-report
Fixture:
production/bugs/directory exists but is empty (or does not exist)
Input: /bug-triage
Expected behavior:
- Skill scans
production/bugs/and finds no reports - Skill outputs: "No open bug reports found in production/bugs/"
- Skill suggests running
/bug-reportto create a bug report - No triage table is produced
Assertions:
- Output explicitly states no bugs were found
/bug-reportis suggested as the next step- Skill does not error out — it handles empty directory gracefully
- Verdict is TRIAGED (with "no bugs found" context)
Case 3: Bug Missing Reproduction Steps — Flagged as NEEDS REPRO INFO
Fixture:
production/bugs/contains 3 bug reports; one has an empty "Repro Steps" section
Input: /bug-triage
Expected behavior:
- Skill reads all 3 reports
- Skill detects the report with no repro steps
- That bug appears in the triage table with a
NEEDS REPRO INFOtag - Other bugs are triaged normally
- Verdict is TRIAGED
Assertions:
NEEDS REPRO INFOtag appears next to the bug missing repro steps- The flagged bug is still included in the table (not excluded)
- Other bugs are unaffected
- Verdict is TRIAGED
Case 4: Possible Duplicate Bugs — Flagged in triage output
Fixture:
production/bugs/contains 2 bug reports with similar titles:- bug-2026-03-18-player-fall-through-floor.md
- bug-2026-03-20-player-clips-through-floor.md
- Both affect the "Physics" system with identical severity
Input: /bug-triage
Expected behavior:
- Skill reads both reports and detects similar title + same system + same severity
- Both bugs are included in the triage table
- Each is tagged with
POSSIBLE DUPLICATEand cross-references the other report - No bugs are merged or deleted — flagging is advisory
- Verdict is TRIAGED
Assertions:
- Both bugs appear in the table (not merged)
- Both are tagged
POSSIBLE DUPLICATE - Each cross-references the other (by filename or title)
- Verdict is TRIAGED
Case 5: Director Gate Check — No gate; triage is advisory
Fixture:
production/bugs/contains any number of reports
Input: /bug-triage
Expected behavior:
- Skill produces the triage table
- No director agents are spawned
- No gate IDs appear in output
- No write tool is called
Assertions:
- No director gate is invoked
- No write tool is called
- No gate skip messages appear
- Verdict is TRIAGED without any gate check
Protocol Compliance
- Reads all files in
production/bugs/before generating the table - Sorts by severity (CRITICAL → HIGH → MEDIUM → LOW)
- Flags bugs missing repro steps
- Flags possible duplicates by title/system similarity
- Does not write any files
- Verdict is TRIAGED in all cases (even empty)
Coverage Notes
- The case where a bug report is malformed (missing severity field entirely)
is not fixture-tested; skill would flag it as
UNKNOWN SEVERITYand sort it last in the table. - Status transitions (marking bugs as resolved) are outside this skill's scope — bug-triage is read-only.
- The duplicate detection heuristic (title similarity + same system) is approximate; exact matching logic is defined in the skill body.