Continue TDD implementation using orchestrator agent
Executes TDD orchestration using red, green, and refactor agents to implement scenarios.
/plugin marketplace add dgomezs/claude-code/plugin install tdd-specflow@tdd-specflow-marketplace<task-directory>Execute TDD orchestration for: $ARGUMENTS
STEP 0: Validate Prerequisites
Before starting TDD, verify task directory contains required files:
Parse task directory from $ARGUMENTS
Check required files exist using Read tool:
scenarios.md - REQUIRED (contains scenarios with TDD tracking checkboxes)test-scenarios/ directory - REQUIRED (contains happy-path.md, error-cases.md, edge-cases.md)tech-design.md - REQUIRED (provides architectural guidance and implementation strategy)If any required file missing:
❌ Prerequisites validation failed
Missing required files:
- [list missing files]
Run the workflow commands to generate required files:
/test-scenarios [task-directory]
/create-tech-design [task-directory]
STOP execution - do not proceed.
✅ Prerequisites validated
- scenarios.md ✓
- test-scenarios/ ✓
- tech-design.md ✓
Proceed to STEP 1.
STEP 1: Read scenarios.md in the task directory and find the first scenario that needs work.
STEP 2: Detect phase by checking the scenario's checkboxes:
[ ] [ ] [ ] = RED phase → Launch tdd-red agent[x] [ ] [ ] = GREEN phase → Launch tdd-green agent[x] [x] [ ] = REFACTOR phase → Launch tdd-refactor agent[x] [x] [x] = Complete → Move to next scenarioIf all scenarios are complete, report task completion.
STEP 3: Launch the appropriate agent with Task tool:
subagent_type: "tdd-red" - Agent will write failing testsubagent_type: "tdd-green" - Agent will implement minimal codesubagent_type: "tdd-refactor" - Agent will improve code qualityPass the task directory path to the agent. Agents will use tech-design.md for architectural guidance and implementation strategy, scenarios.md for tracking progress, and test-scenarios/ for detailed scenario specifications.
STEP 4: After agent completes, show:
STEP 5: Ask user what to do next:
Notes:
[x] [x] [ ])