dev-tddlisted
Install: claude install-skill talentedgeai/infinite-leverage
# Dev TDD
Strict red-green-refactor. No exceptions.
## The Law
1. **Red first.** Write a failing test before writing any implementation code.
2. **Green minimal.** Write the minimum code to make the test pass — nothing more.
3. **Refactor clean.** Clean up with all tests green. Do not add features during refactor.
Repeat. One cycle at a time. No skipping steps.
## Hard Rules
- **No implementation without a failing test.** If you write code before a test, stop. Delete the code. Write the test first.
- **No horizontal slicing.** Do not build "the data layer" then "the business layer" then "the UI layer". Build one complete vertical slice (input → output) at a time, tested end-to-end.
- **No green shortcuts.** Do not hard-code return values to pass tests (unless as a deliberate step in triangulation — but you must write another test that forces real logic within the same cycle).
- **Test must fail for the right reason.** Before writing implementation, confirm the test fails with the expected failure message — not a compile error, not a wrong error.
## Vertical Slice Pattern
Each TDD cycle targets one user-visible behaviour:
```
TEST: "given {input}, {system} produces {output}"
IMPL: minimal code to satisfy the test
REFACTOR: clean without changing behaviour
```
Examples of vertical slices:
- "Given a valid email, signup returns a user ID"
- "Given an invalid email, signup returns a 400 with a message"
- NOT: "Build the User model" (horizontal)
## Running tests vs. run