TDD-paired Gantt-style execution with compact waves. Each story gets tester agent (writes tests) BEFORE implementation agent (passes tests). Waves execute continuously with /compact between each wave. Respects dependencies, spawns up to 10 concurrent agents. Use when orchestrating parallel implementation workflows with test-first discipline.
Executes TDD-paired implementation workflows using tester and coder agents. Triggered after design-phase completes, orchestrating parallel waves with test-first discipline and automatic context compaction.
/plugin marketplace add metasaver/claude-marketplace/plugin install core-claude-plugin@metasaver-marketplaceThis skill inherits all available tools. When active, it can use any tool Claude has access to.
ROOT AGENT ONLY - Called by commands only, never by subagents.
Purpose: Execute implementation tasks via TDD-paired domain worker agents Trigger: After design-phase completes Input: Execution plan with task dependencies, wave batching Output: Collection of all worker outputs with test coverage
The orchestrator spawns agents and tracks progress. All implementation happens inside spawned agents.
The execution phase orchestrates parallel work through agent spawning and state management. The orchestrator ALWAYS spawns domain workers (tester and coder agents) to perform implementation. The orchestrator NEVER writes implementation code directly—it coordinates, tracks progress, and manages state across waves.
Load execution plan from design-phase (tasks + dependencies + story files, grouped into waves)
For each wave:
a. Update workflow state: Use /skill state-management to track wave progress
updateWorkflowState(projectFolder, {
currentWave: waveNumber,
status: "executing",
stories: {
...state.stories,
inProgress: waveStoryIds,
},
});
b. Persist progress: Update all story files with current state (AC checkboxes, completion notes)
c. Compact context: Run /compact to free context before spawning new agents
d. Spawn paired agents (sequential per story, parallel across stories):
e. Run pairs sequentially: Tester → Implementation (one story pair at a time within max 10 concurrent limit)
f. Wait for ALL stories in wave to complete before advancing to next wave
On task completion (tester or implementation):
const state = readWorkflowState(projectFolder);
markStoryComplete(state, storyId);
writeWorkflowState(projectFolder, state);
Production verification check:
On task failure: Log error, update story status to ❌ Failed, continue (validation phase handles retries)
Wave completion:
Return: All results with status, files modified, errors, test coverage, story completion tracking
Use /skill state-management for all workflow state operations. State tracking occurs at four key checkpoints:
At the start of each wave, update workflow-state.json with current wave and in-progress stories:
updateWorkflowState(projectFolder, {
currentWave: waveNumber,
status: "executing",
stories: {
...state.stories,
inProgress: waveStoryIds, // e.g., ["msm-feat-003", "msm-feat-004", "msm-feat-005"]
},
});
After each story completes (both tester and implementation phases):
const state = readWorkflowState(projectFolder);
markStoryComplete(state, storyId); // Moves from inProgress to completed
updateEpicProgress(state, storyId); // ALWAYS update parent epic counter
writeWorkflowState(projectFolder, state);
After final wave and validation phase:
updateWorkflowState(projectFolder, {
status: "complete",
lastUpdate: new Date().toISOString(),
});
State persistence rationale:
Save state early and often for reliable workflow resumption:
inProgresscompleted and epic counter incrementedstatus: "error" and error detailsThis ensures workflows can resume correctly after user interruption or context clear.
waves = [[Story prj-epc-001], [Story prj-epc-002, prj-epc-003]]
completed = new Set()
for each wave in waves:
// Update workflow state - wave start
updateWorkflowState(projectFolder, {
currentWave: waveNumber,
status: "executing",
stories: { ...state.stories, inProgress: waveStoryIds }
})
updateStoryFiles(wave, current state)
runCompact() // Free context
for each story in wave:
tester_promise = spawnAgent(tester, story)
await tester_promise
impl_promise = spawnAgent(implementation, story)
await impl_promise
runProductionCheck(story)
// Update workflow state - story completion
state = readWorkflowState(projectFolder)
markStoryComplete(state, story.id)
writeWorkflowState(projectFolder, state)
// All stories in wave complete before next wave
completed += wave
// Workflow complete
updateWorkflowState(projectFolder, { status: "complete" })
return allResults
TDD Pairing Model:
Agent Announcement (ALWAYS do this before spawning):
Before spawning any agent, announce the selection: "Spawning {agent-type} agent ({agent-name}) for {story-id}"
Example: "Spawning tester agent (core-claude-plugin:generic:tester) for msm-auth-001"
Tester spawn template:
CONSTITUTION: 1) Change only what must change 2) Fix root cause 3) Read first 4) Verify before done 5) Do exactly what asked
ROLE: Tester Agent (TDD Pairing)
TASK: Write comprehensive tests for story acceptance criteria
STORY: Read {storyFilePath}
- Extract acceptance criteria
- Write test file with passing & failing scenarios
- Update story: Status → 🧪 Testing
FILES: Write tests to {testFilePath}
VERIFY: Tests compile and run (no passing yet - implementation comes next)
Implementation spawn template:
CONSTITUTION: 1) Change only what must change 2) Fix root cause 3) Read first 4) Verify before done 5) Do exactly what asked
ROLE: Implementation Agent (TDD Pairing)
TASK: Implement features to pass all tests
STORY: Read {storyFilePath}
TESTS: Run {testFilePath} - ALL must pass
- Implement code to satisfy acceptance criteria
- Update story: Status → 🔄 Implementing
- Verify all tests pass before submitting
FILES: Report files modified for PM tracking
UPDATE: Story status → ✅ Complete (tests passing)
Key Changes:
| Phase | Category | Agents |
|---|---|---|
| Tester | Testing | unit-test, integration-test, e2e-test |
| Impl | Backend | backend-dev, data-service, integration-service |
| Impl | Frontend | react-component, shadcn |
| Impl | Database | prisma-database |
| Impl | Config | 26+ config agents (for /audit) |
Tester selection: Choose by test scope (unit → integration → e2e)
| Constraint | Value | Rationale |
|---|---|---|
| Max concurrent | 10 | Prevent resource exhaustion |
{
"totalWaves": 2,
"totalStories": 5,
"storiesCompleted": ["msm-auth-001", "msm-auth-002", "msm-auth-003"],
"storiesFailed": ["msm-auth-004"],
"storiesRemaining": ["msm-auth-005"],
"results": [
{
"storyId": "msm-auth-001",
"wave": 1,
"testerAgent": "unit-test",
"testFile": "src/__tests__/auth.test.ts",
"testsPassed": true,
"implAgent": "backend-dev",
"implStatus": "success",
"filesModified": ["src/auth.ts", "src/__tests__/auth.test.ts"],
"acChecklistComplete": true,
"verifiedProduction": true
}
],
"totalTestsCovered": 45,
"totalTestsPassed": 45
}
Called by: /audit, /build, /ms (complexity ≥15) Calls: Domain agents, vibe_learn MCP (errors) Next phase: validation-phase
/build JWT authentication API
Wave 1: msm-auth-001 (Schema + AuthService)
1. updateStoryFiles(msm-auth-001)
2. runCompact()
3. T-001 (unit-test): Write auth.test.ts (mocks User model + AuthService)
4. I-001 (backend-dev): Implement User model + AuthService (pass T-001)
5. productionCheck: tests still pass, AC marked
Wave 2: msm-auth-002 (TokenService) | msm-auth-003 (API integration)
1. updateStoryFiles(msm-auth-002, msm-auth-003)
2. runCompact()
3a. T-002 (unit-test): Write token.test.ts (parallel)
3b. T-003 (integration-test): Write api.test.ts (parallel)
4a. I-002 (backend-dev): Implement TokenService (pass T-002) (parallel)
4b. I-003 (coder): Implement API routes (pass T-003) (parallel)
5. productionCheck: all tests pass, AC marked
PM Gantt Format:
Wave 1: [T-001]→[I-001] (sequential pair)
Wave 2: [T-002]→[I-002] | [T-003]→[I-003] (parallel pairs)
Output: 3 stories completed, 45 tests passed, 12 files modified