tdd

Installation
SKILL.md

Test-Driven Development

TDD is the red → green loop. This skill is the reference that makes that loop produce tests worth keeping: what a good test is, where tests go, the anti-patterns, and the rules of the loop. Use the relevant guidance during the loop, without reloading unchanged guidance for every slice.

When exploring the codebase, read GLOSSARY.md (if it exists) so test names and interface vocabulary match the project's domain language, and respect ADRs in the area you're touching.

What a good test is

Tests verify behavior through public interfaces, not implementation details. Code can change entirely; tests shouldn't. A good test reads like a specification: "user can checkout with valid cart" tells you exactly what capability exists, and it survives refactors because it doesn't care about internal structure.

See tests.md for examples and mocking.md for mocking guidelines.

Seams: where tests go

A seam is the public boundary you test at: the interface where you observe behavior without reaching inside. Tests live at seams, never against internals.

Test at agreed seams. Reuse seams already established by the approved spec, repository tests or the current task. Confirm with the user when a new or ambiguous interface requires a decision. State the chosen seam so testing effort stays on the critical paths and complex logic.

When that decision is still open, ask: "What's the public interface, and which seams should we test?"

Installs
5
First Seen
Sep 19, 2026