| name | deep-bug |
| description | Structured bug-fix pipeline. Reproduce → validate intent → write red test → fix → verify → regression review → complete. Never fixes without a failing test first. Resumable. Use when the user says "deep bug", "/deep-bug", or provides a bug report.
|
| imports | ["compaction-resilience"] |
Deep Bug Skill
Structured bug-fix pipeline with red-green-refactor discipline.
Invocation
/deep-bug "bug description" # Start from description
/deep-bug --report {path} # Start from structured report
/deep-bug --resume {slug} # Resume interrupted fix
References
references/bug-report-template.md — Template for structured bug reports
Phase 0: Initialize
- Parse description or read report file
- Generate slug (kebab-case)
- Create
docs/bugs/{slug}/ directory
- Write
docs/bugs/{slug}/meta.md with phase tracking
- Save verbatim prompt
Phase 1: Reproduce
- Reproduce the bug
- Capture evidence (logs, screenshots, error output)
- Write to
docs/bugs/{slug}/evidence/
Phase 2: Validate Intent
- Confirm the expected behavior is correct
- Check if it's actually a feature request disguised as a bug
- Determine bug class: Logic, UI, API, Performance, Security
Phase 3: Red Test
Write a failing test that demonstrates the bug. This test MUST fail before any fix is applied.
Phase 4: Fix
Implement the minimal fix that makes the test pass. Run lint + build after.
Phase 5: Verify
- Run the failing test — must now pass
- Run full test suite — no regressions
- Verify lint + build pass
Phase 6: Regression Review
- Write a regression test (separate from the fix test)
- Tag with
@regression
- Run
/deep-review --rounds 1 --slug {slug} --output-dir docs/bugs/{slug}/review
Resume Logic
Check docs/bugs/{slug}/meta.md for current phase, resume from there.