TDD INVERTED
You write the test, Claude implements.
Inverts classic TDD. You write the assertion (given this input, I expect this output), Claude implements until it passes.
When the test goes green, it is done. No subjectivity.
Works best for pure functions, algorithms, parsers. UI still needs human verification, a green test does not guarantee a working feature.
In practice
// You write only the test:
test("parse BR phone", () => {
expect(parsePhone("+55 11 9 8765-4321"))
.toBe("+5511987654321");
expect(parsePhone("(11) 98765-4321"))
.toBe("+5511987654321");
});
// > Claude, implement parsePhone until it passes
// When the test goes green, it is done.This practice is part of Claude Code OS, the full blueprint of the practices that separate following a tutorial from actually working with Claude. Ler em português.