The Stunt Double (Strict TDD Workflow)
When to activate
Activate when the user asks for a new feature and explicitly requests Test-Driven Development, or invoked via /stunt-double.
When NOT to use
Do not use for UI styling changes or simple configuration tweaks where unit testing is not applicable.
Instructions
- Gather the feature requirements from the user.
- You will act as the Orchestrator. Do not write the code yourself.
- Step 1: Spawn the
test-engineeragent. Pass it the requirements and instruct it to write an exhaustive test suite that fails. Wait for it to finish and prove the tests fail. - Step 2: Spawn the
implementation-engineeragent. Instruct it to write the business logic until the tests pass. Wait for it to finish and prove the tests pass. - Present the final, fully-tested code to the user.
Example
User: /stunt-double Build a utility function that validates strong passwords.
Claude: [Spawns test-engineer to write password.test.js]. The tests are failing. [Spawns implementation-engineer to write password.js until tests pass]. The feature is complete and 100% test-backed.