What problem does it solve?
Bug fixes applied without tests often fail to address the root cause or silently regress later. This Skill enforces a reproduce-first workflow so every fix is verified by a failing test that becomes a permanent regression guard.
Core Features & Use Cases
- Red-Green-Refactor Workflow: Reproduce the bug as a failing Swift Testing test, apply a minimal fix, then verify no regressions across the full test suite.
- Bug Test Templates: Ready-made templates for logic bugs, async bugs, state bugs, edge cases, and UI state bugs using Swift Testing (@Test, #expect).
- Verification Checklist: Confirms the test fails before the fix, passes after, and that all existing tests still pass.
- Use Case: A user reports that a 50% discount on $100 returns $0.50 instead of $50. Write a failing test reproducing the miscalculation, fix the double division in the source, and keep the test as a permanent regression guard.
Quick Start
Ask the AI to fix a reported bug using TDD by first writing a failing test that reproduces it, then making the test pass.