red-green

Installation
SKILL.md

Red-Green

Build the feature one tracer bullet at a time. A tracer bullet is one test plus the minimal code that makes it pass, proving one real path through the system end to end. You write a test, watch it fail, make it pass, then go again. Each cycle teaches you what the next one should be.

This is the build phase of the Honest Loop. It runs on the issues that slice produced.

Philosophy

Test behavior through public interfaces, not implementation details. Code can change entirely; tests should not. A good test reads like a specification: "user can checkout with valid cart" tells you exactly what capability exists. It survives a refactor because it does not care about internal structure.

Bad tests are coupled to implementation. They mock internal collaborators, test private methods, or verify by reaching around the interface (querying the database directly instead of asking through the API). The warning sign: you rename an internal function and tests fail, but behavior never changed. Those tests were testing the how, not the what.

See tests.md for good and bad examples, and mocking.md for where mocking is allowed.

The anti-pattern: horizontal slices

Do NOT write all the tests first, then all the implementation. Treating RED as "write every test" and GREEN as "write every line of code" produces garbage tests:

Installs
4
Repository
dan86de/skills
First Seen
Jun 3, 2026