What problem does it solve?
Test-Driven Development (TDD) solves the problem of shipping unverified code by forcing you to define expected behavior in a failing test before writing production logic, reducing regressions and hidden bugs.
Core Features & Use Cases
- RED-GREEN-REFACTOR discipline: Write a minimal failing test (RED), add the simplest code to pass (GREEN), then clean up design without breaking behavior (REFACTOR).
- Verification at each step: Explicitly run the targeted test to confirm the correct failure reason and confirm passing before moving on.
- Regressive-proof workflow: Use the full test suite after each change to ensure new code does not break existing behavior.
Use cases:
- Implementing new features with clear acceptance criteria
- Fixing bugs by reproducing them in a failing test before coding the fix
- Refactoring or changing behavior while keeping tests green to guard against unintended changes
Quick Start
Tell Titan to follow strict TDD for a feature by first writing a failing test, running it to confirm failure, then writing the minimal code to pass, and finally running the full test suite to ensure no regressions.