TDD
On this page 5
stacks-tdd · Engineering craft · model-invoked
The red-green discipline, as opposed to the test utilities that Testing documents. It names the four seams a Stacks app has and which one a given behaviour belongs at, and it is blunt about the database: the framework hands you a real one, so a test that mocks the ORM is testing the mock.
Covers
red-green loop over bun test, @stacksjs/testing, seam selection, the test anti-patterns.
Inside the skill
The sections an agent reads once the skill loads.
- What a good test is
- Seams: where tests go
- The database is not a boundary to mock
- Anti-patterns
- Rules of the loop
- Model-first order
Supporting files
Reference and scripts the skill reaches for on demand, rather than loading up front.
Related skills
Using it
This one is model-invoked. Your agent reaches for it on its own when the task matches, and you can also call it by name:
/stacks-tdd
Source: stacks-tdd/SKILL.md.
Shadow it for one project with app/Skills/stacks-tdd/SKILL.md, then re-run
buddy setup:ai. See Writing your own.