npx skills add ...
npx skills add affaan-m/ecc --skill ai-regression-testing
Regression testing strategies for AI-assisted development. Sandbox-mode API testing without database dependencies, automated bug-check workflows, and patterns to catch AI blind spots where the same model writes and reviews code. Use when adding regression coverage to AI-assisted code, or when the same model both wrote and reviewed a change.
npx skills add affaan-m/ecc --skill ai-regression-testing
Testing patterns specifically designed for AI-assisted development, where the same model writes code and reviews it — creating systematic blind spots that only automated tests can catch.
/bug-check or similar review commands after code changesWhen an AI writes code and then reviews its own work, it carries the same assumptions into both steps. This creates a predictable failure pattern:
Real-world example (observed in production):
The pattern: sandbox/production path inconsistency is the #1 AI-introduced regression.
Most projects with AI-friendly architecture have a sandbox/mock mode. This is the key to fast, DB-free API testing.
The key principle: write tests for bugs that were found, not for code that works.
The most common AI regression: fixing production path but forgetting sandbox path (or vice versa).
Frequency: Most common (observed in 3 out of 4 regressions)
Test to catch it:
Frequency: Common with Supabase/Prisma when adding new columns
Frequency: Moderate — when adding error handling to existing components
Don't aim for 100% coverage. Instead:
Why this works with AI development:
| AI Regression Pattern | Test Strategy | Priority |
|---|---|---|
| Sandbox/production mismatch | Assert same response shape in sandbox mode | High |
| SELECT clause omission | Assert all required fields in response | High |
| Error state leakage | Assert state cleanup on error | Medium |
| Missing rollback | Assert state restored on API failure | Medium |
| Type cast masking null | Assert field is not undefined | Medium |
DO:
DON'T: