What does this skill do?

The AI Development Regression Testing Skill teaches you how to build a network of automated tests that detect blind spots in AI systems that write and review their own code. Using database-less API tests in sandbox mode, it validates response contracts and prevents divergence between sandbox and production paths—all in milliseconds and without external dependencies.

After bug fixes
Add a regression test named after the bug ID to prevent the issue from reoccurring in future changes.
Sandbox/Production Discrepancy
It automatically detects when AI adds a field in production and forgets the sandbox path.
Automated bug check
Run tests and builds before the manual review; if they fail, they are reported as a top-priority bug.
API Contracts
Define required fields by endpoint and verify that every response includes them without relying on the model's judgment.

Usage examples

🧪 Contract Test
Write a regression test for the GET /api/user/profile endpoint that verifies that the response includes all required fields.
🔀 Sandbox divergence
Create a test that forces sandbox mode and verifies that /api/user/messages returns the same fields as in production.
🔍 Full bug check
Run the bug-check workflow: first, run `npm run test`, then `npm run build`, and report any failures as high-priority bugs.
🐛 After fixing a bug
I just fixed bug BUG-R1, where the `notification_settings` field was missing from the profile response. Please add a regression test.

Features

Tests Without a Database Sandbox mode eliminates external dependencies: tests run in milliseconds without setting up infrastructure.
Request Helper Build a NextRequest with a method, body, headers, and a sandbox user in a reusable way using `createTestRequest` and `parseResponse`.
Detecting AI Blind Spots It covers typical regression patterns: sandbox/production divergence, omitted columns in SELECT statements, error state leakage, and casts that mask undefined values.
Two-phase bug-check flow First, mechanical detection through tests and builds; then, AI review. Errors are reported without requiring an assessment of the model.
Tests named after bugs Each test bears the identifier of the bug it prevents, creating an organic suite that evolves with each fix.

Frequently asked questions

This skill is geared toward Vitest, but the contract testing and bug-check patterns are applicable to any Node.js testing framework.
You need a sandbox or mock mode that allows you to run API routes without a database. If one doesn't exist, the skill provides instructions on how to set it up.
No. The golden rule is to prevent regressions, not to chase coverage. Tests are written only where bugs have occurred, not for code that has never failed.
Yes. The bug-check and regression test patterns are independent of the AI agent that writes the code.
Regression Testing for AI-Driven Development

¿Prefieres escuchar el contenido? Genera la narración de audio con un clic.