What problem does it solve?
This Skill solves the problem of fixed bugs reappearing (regressions) after code changes, refactoring, or requirement updates. Without structured regression guards, teams waste time rediscovering and refixing the same bugs, and critical root cause knowledge is lost over time.
Core Features & Use Cases
- Mandatory Regression Tests: Every bug fix must include a regression test to prevent the bug from reappearing.
- Root Cause Documentation: Requires detailed analysis explaining why the bug happened and how to prevent it in the future.
- Code Comment Markers: Adds RG-XXX comments in source code to protect invariants during refactoring.
- QA Regression Mode: Defines safe hooks and commands for QA to re-run and verify regression tests.
- Use Case: When a developer fixes an authentication bug, this Skill ensures they write a failing test first, document the root cause, add a code comment marker, create a QA hook, and commit with a message referencing the RG entry.
Quick Start
Use the regression-guard skill to fix the reported bug by reproducing it, writing a failing test, analyzing the root cause, implementing the fix, adding a regression test, documenting the entry in docs/REGRESSION-GUARD.md, adding a source code comment with the RG ID, and committing with a message that references the RG entry.