What problem does it solve?
Writing tests that survive refactors and actually verify behavior is hard. This Skill enforces the discipline of test-driven development in a Stacks project: choosing the right seam to test at, avoiding anti-patterns like tautological assertions and implementation-coupled mocks, and running the red-green loop correctly with bun test and @stacksjs/testing.
Core Features & Use Cases
- Seam Selection: Defines four test seams (route, action, model, function) and requires agreeing on seams with the user before any test is written.
- Anti-Pattern Detection: Identifies implementation-coupled tests, tautological assertions, horizontal slicing, and state leaking between test files, with side-by-side good and bad examples in EXAMPLES.md.
- Loop Rules: Enforces red-before-green, one vertical slice per cycle, narrow test runs during iteration, and typechecking alongside development.
- Use Case: When adding a checkout feature to a Stacks app, use this Skill to write a failing test at the action seam first, run
bun test on the narrow path, implement the minimal code to go green, then hand off to code review.
Quick Start
Ask the AI to build a new feature test-first in your Stacks project using the red-green-refactor loop with bun test.