Test with confidence, code with clarity

Your home for mastering Test-Driven Development through real-world katas and expert guidance.

TDD Buddy Logo
Latest Red-Green-Refactor Was Always a Provenance Rule

Kata Catalog

Practice TDD with a curated set of real-world katas, each with clear requirements and test cases.

Browse Katas

Guides & References

Learn best practices, naming conventions, and advanced TDD techniques from industry experts.

Explore Guides

Interactive Learning

Discover the TDD Gears model and learn how to apply TDD principles in real-world scenarios.

Learn More

Why TDD Matters More in the AI Era

The bar for "good tests" just moved. Agents made it non-optional.

  • The temporal order was always a provenance claim. A test written before the code it validates is an oracle derived from the specification. A test written after the code is an oracle derived from the artifact under test. The industry treated the sequence as a style question; the fault-detection numbers say it was a provenance rule.
  • The numbers reproduce across two 2026 studies. Tests generated from the task description alone detect roughly 25% of injected faults. Tests generated after the model sees the implementation detect roughly 14%. Chain-of-thought and chain-of-verification prompting do not recover the gap. The fault is already in the context the oracle is derived from.
  • The mitigation is architectural, not procedural. Generate the test from the specification. Keep the implementation out of the context window until after the test is authored. Treat authoring order as a property of the suite, not a convention of the writer. A prompt that says 'do TDD' does not change which signal shaped the oracle.
  • Provenance applies at the unit level the way contracts apply at the seam. The contract test post named same-author blindness at the integration seam, with a second author as the mitigation. This post names the same shape at the unit level, with temporal order as the lever the human discipline enforced structurally and the agent workflow quietly abandoned.

Read the argument: Red-Green-Refactor Was Always a Provenance Rule

The Bar Moved

Old bar

Tests exist and pass. Good enough for humans with context.

New bar

Scenario names · builders · domain types · ubiquitous language. The test suite is the interface agents operate against.

TDD Gears

Shift gears based on context, not habit

TDD Gears model showing Low, Medium, High, and Reverse gears for test-driven development

Low Gear

New territory. Build context. Small steps. Learn the shape of the problem before solving it.

Medium Gear

Patterns emerge. Apply design principles. Let the tests guide you toward better abstractions.

High Gear

Known patterns. Follow existing architecture. Move fast because the structure is already proven.

Reverse Gear

Wrong direction. Back up. Delete the test. Try a different approach. This isn't failure — it's steering.