| name | tdd |
| description | Strict test-driven development workflow for implementing features Use when this capability is needed. |
| metadata | {"author":"cverrier"} |
Implement the following feature using strict TDD: $ARGUMENTS
Think about how to break down the feature into small, testable units (if applicable). Then, for each unit, follow the strict TDD workflow below:
- Write behavior-oriented tests based on expected input/output pairs - test WHAT the code does, not HOW it does it
- Do NOT create mock implementations, unless strictly necessary - write real tests that will fail
- Run
uv run pytest -v only on the new tests to confirm they fail
- Write code that passes the tests
- Do NOT modify the tests during implementation, unless strictly necessary - tests should verify behavior, not implementation details
- Run
uv run pytest -q --tb=short to verify tests pass (quiet mode, concise failures). If many tests fail, use -x to stop on first failure and fix incrementally
- Commit the implementation
Once all units are complete and passing, use gh pr create to open a PR with test and implementation commits.
IMPORTANT: Tests first, implementation second. Never modify tests during step 6. Tests should verify behavior (inputs/outputs), not implementation details.
Converted and distributed by TomeVault — claim your Tome and manage your conversions.