Test Driven Development
When to Use
Use when the user asks to implement code, add a feature, fix a bug, change behavior, or build production functionality in a repository.
Do Not Use When
Do not use when the user only asks for diagnosis without changing code, an independent code review, or a paper literature search.
Required Inputs
A code repository, desired behavior, and a runnable test command.
Workflow
- Write a focused failing test that describes the desired behavior.
- Run the test and confirm it fails for the expected reason.
- Implement the smallest code change to pass.
- Run targeted and full tests, then refactor safely.