refactor: rename workflows for clarity

Renamed three implementation workflows to avoid confusion:
- batch-super-dev → batch-stories (processes multiple stories)
- super-dev-pipeline → story-full-pipeline (single story with validation/review)
- story-pipeline → story-dev-only (basic TDD implementation only)

Changes include:
- Renamed workflow directories
- Updated workflow.yaml name fields and installed_path references
- Updated all cross-references in workflow.md files
- Updated state file naming conventions for clarity
- Updated references in documentation and other workflows

This naming convention eliminates pattern-matching confusion by using
completely distinct names for each workflow level.
This commit is contained in:
Jonah Schulte 2026-01-28 02:47:19 -05:00
parent e38282b063
commit 2526e7c9cb
65 changed files with 595 additions and 1094 deletions

View File

@ -227,7 +227,7 @@ async function checkoutStory(storyKey) {
} }
``` ```
**Lock Verification** (before each task in super-dev-pipeline): **Lock Verification** (before each task in story-full-pipeline):
```javascript ```javascript
// Integrated into step-03-implement.md // Integrated into step-03-implement.md
@ -270,8 +270,8 @@ async function verifyLockBeforeTask(storyKey) {
**Files to Modify**: **Files to Modify**:
1. `src/modules/bmm/workflows/4-implementation/dev-story/instructions.xml` (Step 8, lines 502-533) 1. `src/modules/bmm/workflows/4-implementation/dev-story/instructions.xml` (Step 8, lines 502-533)
2. `src/modules/bmm/workflows/4-implementation/super-dev-pipeline/steps/step-03-implement.md` 2. `src/modules/bmm/workflows/4-implementation/story-full-pipeline/steps/step-03-implement.md`
3. `src/modules/bmm/workflows/4-implementation/batch-super-dev/step-4.5-reconcile-story-status.md` 3. `src/modules/bmm/workflows/4-implementation/batch-stories/step-4.5-reconcile-story-status.md`
**Add After Task Completion**: **Add After Task Completion**:
@ -391,8 +391,8 @@ Result:
**Files to Modify**: **Files to Modify**:
1. `super-dev-pipeline/steps/step-06-complete.md` - Add PR creation 1. `story-full-pipeline/steps/step-06-complete.md` - Add PR creation
2. Add new: `super-dev-pipeline/steps/step-07-sync-github.md` 2. Add new: `story-full-pipeline/steps/step-07-sync-github.md`
**PR Creation** (after git commit): **PR Creation** (after git commit):
@ -576,7 +576,7 @@ This is a HARD REQUIREMENT for team coordination.
└─────────────────────────────────────────────────────────────┘ └─────────────────────────────────────────────────────────────┘
┌─────────────────────────────────────────────────────────────┐ ┌─────────────────────────────────────────────────────────────┐
│ 3. IMPLEMENTATION (Developer via super-dev-pipeline) │ │ 3. IMPLEMENTATION (Developer via story-full-pipeline) │
├─────────────────────────────────────────────────────────────┤ ├─────────────────────────────────────────────────────────────┤
│ Step 1: Init │ │ Step 1: Init │
│ └─ Verify lock held (HALT if lost) │ │ └─ Verify lock held (HALT if lost) │
@ -750,9 +750,9 @@ try {
## Critical Integration Points ## Critical Integration Points
### Point 1: batch-super-dev Story Selection ### Point 1: batch-stories Story Selection
**File**: `batch-super-dev/instructions.md` (Step 2) **File**: `batch-stories/instructions.md` (Step 2)
**Change**: Filter locked stories BEFORE user selection **Change**: Filter locked stories BEFORE user selection
```xml ```xml
@ -794,9 +794,9 @@ try {
</step> </step>
``` ```
### Point 2: super-dev-pipeline Lock Verification ### Point 2: story-full-pipeline Lock Verification
**File**: `super-dev-pipeline/steps/step-03-implement.md` **File**: `story-full-pipeline/steps/step-03-implement.md`
**Change**: Add lock check before each task **Change**: Add lock check before each task
```markdown ```markdown
@ -1028,7 +1028,7 @@ Try: /available-stories
# → HALT # → HALT
# Developer fixes network, resumes: # Developer fixes network, resumes:
$ /super-dev-pipeline story_key=2-5-auth $ /story-full-pipeline story_key=2-5-auth
# System: # System:
# → Detects saved state # → Detects saved state
@ -1120,10 +1120,10 @@ $ /super-dev-pipeline story_key=2-5-auth
### MODIFIED Files (5 total) ### MODIFIED Files (5 total)
1. `batch-super-dev/instructions.md` (+150 lines) 1. `batch-stories/instructions.md` (+150 lines)
2. `super-dev-pipeline/steps/step-01-init.md` (+80 lines) 2. `story-full-pipeline/steps/step-01-init.md` (+80 lines)
3. `super-dev-pipeline/steps/step-03-implement.md` (+120 lines) 3. `story-full-pipeline/steps/step-03-implement.md` (+120 lines)
4. `super-dev-pipeline/steps/step-06-complete.md` (+100 lines) 4. `story-full-pipeline/steps/step-06-complete.md` (+100 lines)
5. `dev-story/instructions.xml` (+60 lines) 5. `dev-story/instructions.xml` (+60 lines)
**Total MODIFIED**: ~510 lines **Total MODIFIED**: ~510 lines
@ -1208,7 +1208,7 @@ $ /super-dev-pipeline story_key=2-5-auth
### Week 2-3 ### Week 2-3
1. Integrate with batch-super-dev 1. Integrate with batch-stories
2. Add progress sync to dev-story 2. Add progress sync to dev-story
3. Build PO agent + story creation workflow 3. Build PO agent + story creation workflow
4. Test with 3-5 developers 4. Test with 3-5 developers

View File

@ -33,8 +33,8 @@ Replace trust-based workflow with enforcement-based:
### 1. Auto-Fix Missing Prerequisites (Guardrail 1) ### 1. Auto-Fix Missing Prerequisites (Guardrail 1)
**Files Modified:** **Files Modified:**
- `src/modules/bmm/workflows/4-implementation/super-dev-pipeline/workflow.md` - `src/modules/bmm/workflows/4-implementation/story-full-pipeline/workflow.md`
- `src/modules/bmm/workflows/4-implementation/batch-super-dev/workflow.md` - `src/modules/bmm/workflows/4-implementation/batch-stories/workflow.md`
**What Changed:** **What Changed:**
- Old: Block with error if story file or gap analysis missing - Old: Block with error if story file or gap analysis missing
@ -60,10 +60,10 @@ fi
### 2. File-Based Completion Verification (Guardrail 2) ### 2. File-Based Completion Verification (Guardrail 2)
**Files Modified:** **Files Modified:**
- `src/modules/bmm/workflows/4-implementation/super-dev-pipeline/agents/builder.md` - `src/modules/bmm/workflows/4-implementation/story-full-pipeline/agents/builder.md`
- `src/modules/bmm/workflows/4-implementation/super-dev-pipeline/agents/inspector.md` - `src/modules/bmm/workflows/4-implementation/story-full-pipeline/agents/inspector.md`
- `src/modules/bmm/workflows/4-implementation/super-dev-pipeline/agents/reviewer.md` - `src/modules/bmm/workflows/4-implementation/story-full-pipeline/agents/reviewer.md`
- `src/modules/bmm/workflows/4-implementation/super-dev-pipeline/agents/fixer.md` - `src/modules/bmm/workflows/4-implementation/story-full-pipeline/agents/fixer.md`
**What Changed:** **What Changed:**
- Agents now MUST create completion artifact: `{{story_key}}-{{agent}}.json` - Agents now MUST create completion artifact: `{{story_key}}-{{agent}}.json`
@ -93,7 +93,7 @@ fi
### 3. Verification Gates Between Agents (Guardrail 4) ### 3. Verification Gates Between Agents (Guardrail 4)
**Files Modified:** **Files Modified:**
- `src/modules/bmm/workflows/4-implementation/super-dev-pipeline/workflow.md` - `src/modules/bmm/workflows/4-implementation/story-full-pipeline/workflow.md`
**What Changed:** **What Changed:**
- Added verification step after Builder agent - Added verification step after Builder agent
@ -126,8 +126,8 @@ done
### 4. Orchestrator-Driven Reconciliation (Guardrail 2 cont.) ### 4. Orchestrator-Driven Reconciliation (Guardrail 2 cont.)
**Files Modified:** **Files Modified:**
- `src/modules/bmm/workflows/4-implementation/super-dev-pipeline/workflow.md` - `src/modules/bmm/workflows/4-implementation/story-full-pipeline/workflow.md`
- `src/modules/bmm/workflows/4-implementation/batch-super-dev/workflow.md` - `src/modules/bmm/workflows/4-implementation/batch-stories/workflow.md`
**What Changed:** **What Changed:**
- Orchestrator reads Fixer completion artifact - Orchestrator reads Fixer completion artifact
@ -167,8 +167,8 @@ done
| File | Type | Lines Changed | Purpose | | File | Type | Lines Changed | Purpose |
|------|------|---------------|---------| |------|------|---------------|---------|
| super-dev-pipeline/workflow.md | Modified | ~100 | Add preconditions, verification gates, artifact-based reconciliation | | story-full-pipeline/workflow.md | Modified | ~100 | Add preconditions, verification gates, artifact-based reconciliation |
| batch-super-dev/workflow.md | Modified | ~80 | Add preconditions, artifact-based reconciliation | | batch-stories/workflow.md | Modified | ~80 | Add preconditions, artifact-based reconciliation |
| agents/builder.md | Modified | ~30 | Add completion artifact requirement | | agents/builder.md | Modified | ~30 | Add completion artifact requirement |
| agents/inspector.md | Modified | ~25 | Add completion artifact requirement | | agents/inspector.md | Modified | ~25 | Add completion artifact requirement |
| agents/reviewer.md | Modified | ~30 | Add completion artifact requirement | | agents/reviewer.md | Modified | ~30 | Add completion artifact requirement |
@ -189,7 +189,7 @@ done
rm docs/sprint-artifacts/test-story.md rm docs/sprint-artifacts/test-story.md
# Run workflow # Run workflow
/bmad_bmm_super-dev-pipeline test-story /bmad_bmm_story-full-pipeline test-story
# Expected: Workflow auto-creates story file and gap analysis # Expected: Workflow auto-creates story file and gap analysis
# Expected: Implementation proceeds without manual intervention # Expected: Implementation proceeds without manual intervention
@ -208,7 +208,7 @@ rm docs/sprint-artifacts/test-story.md
### Test 3: File-Based Reconciliation ✅ ### Test 3: File-Based Reconciliation ✅
```bash ```bash
# Run complete workflow # Run complete workflow
/bmad_bmm_super-dev-pipeline test-story /bmad_bmm_story-full-pipeline test-story
# After completion, verify: # After completion, verify:
CHECKED=$(grep -c "^- \[x\]" docs/sprint-artifacts/test-story.md) CHECKED=$(grep -c "^- \[x\]" docs/sprint-artifacts/test-story.md)
@ -223,7 +223,7 @@ grep -A 10 "### Dev Agent Record" docs/sprint-artifacts/test-story.md
### Test 4: Batch Sequential Processing ✅ ### Test 4: Batch Sequential Processing ✅
```bash ```bash
# Run batch in sequential mode # Run batch in sequential mode
/bmad_bmm_batch-super-dev /bmad_bmm_batch-stories
# Select: Sequential mode # Select: Sequential mode
# Select: Multiple stories # Select: Multiple stories

View File

@ -75,7 +75,7 @@ Implemented Phase 2 of GSD-style refactoring: pattern extraction and explicit st
### 2. Explicit Step Enumeration ### 2. Explicit Step Enumeration
**Added to super-dev-pipeline/workflow.md:** **Added to story-full-pipeline/workflow.md:**
```markdown ```markdown
<verification_checklist> <verification_checklist>
@ -154,7 +154,7 @@ Implemented Phase 2 of GSD-style refactoring: pattern extraction and explicit st
| patterns/verification.md | Created | Independent verification | | patterns/verification.md | Created | Independent verification |
| patterns/security-checklist.md | Created | Security review checklist | | patterns/security-checklist.md | Created | Security review checklist |
| patterns/README.md | Created | Patterns documentation | | patterns/README.md | Created | Patterns documentation |
| super-dev-pipeline/workflow.md | Modified | Add explicit step checklist | | story-full-pipeline/workflow.md | Modified | Add explicit step checklist |
| gsd-style-guardrails-phase2.md | Created | Phase 2 summary (this file) | | gsd-style-guardrails-phase2.md | Created | Phase 2 summary (this file) |
**Total:** **Total:**
@ -239,7 +239,7 @@ When workflow runs:
### Test 1: Pattern Resolution ✅ ### Test 1: Pattern Resolution ✅
```bash ```bash
# Verify patterns are properly resolved # Verify patterns are properly resolved
cat _bmad/bmm/workflows/4-implementation/super-dev-pipeline/agents/builder.md cat _bmad/bmm/workflows/4-implementation/story-full-pipeline/agents/builder.md
# Expected: Pattern content inlined in compiled agent # Expected: Pattern content inlined in compiled agent
# Expected: No @patterns/ references remain # Expected: No @patterns/ references remain
@ -248,7 +248,7 @@ cat _bmad/bmm/workflows/4-implementation/super-dev-pipeline/agents/builder.md
### Test 2: Step Enumeration Visible ✅ ### Test 2: Step Enumeration Visible ✅
```bash ```bash
# Run workflow # Run workflow
/bmad_bmm_super-dev-pipeline test-story /bmad_bmm_story-full-pipeline test-story
# Expected: User sees "Step 1.1: Builder agent spawned" # Expected: User sees "Step 1.1: Builder agent spawned"
# Expected: User sees "Step 1.2: Builder creates completion artifact" # Expected: User sees "Step 1.2: Builder creates completion artifact"
@ -264,7 +264,7 @@ echo "New quality standard" >> patterns/hospital-grade.md
bmad install bmad install
# Run workflow # Run workflow
/bmad_bmm_super-dev-pipeline test-story /bmad_bmm_story-full-pipeline test-story
# Expected: All agents receive updated pattern # Expected: All agents receive updated pattern
``` ```

View File

@ -73,7 +73,7 @@ Build it, one story at a time. All implementation workflows use a unified GSD-st
| Workflow | Purpose | Produces | | Workflow | Purpose | Produces |
| -------------------- | ------------------------------------------ | ---------------------------- | | -------------------- | ------------------------------------------ | ---------------------------- |
| `super-dev-story` | Dev + validation + review + push pipeline | Production-ready code | | `super-dev-story` | Dev + validation + review + push pipeline | Production-ready code |
| `batch-super-dev` | Parallel execution of multiple stories | Multiple stories completed | | `batch-stories` | Parallel execution of multiple stories | Multiple stories completed |
| `push-all` | Safe git staging/commit/push with checks | Committed and pushed changes | | `push-all` | Safe git staging/commit/push with checks | Committed and pushed changes |
### Maintenance & Recovery ### Maintenance & Recovery

View File

@ -1,6 +1,6 @@
# Agent Limitations in Batch Mode # Agent Limitations in Batch Mode
**CRITICAL:** Agents running in batch-super-dev have specific limitations. Understanding these prevents wasted time and sets correct expectations. **CRITICAL:** Agents running in batch-stories have specific limitations. Understanding these prevents wasted time and sets correct expectations.
--- ---
@ -93,7 +93,7 @@
## Pre-Batch Validation Checklist ## Pre-Batch Validation Checklist
**Before running /batch-super-dev, verify ALL selected stories:** **Before running /batch-stories, verify ALL selected stories:**
```bash ```bash
# 1. Check story files exist # 1. Check story files exist
@ -121,7 +121,7 @@ done
**If any checks fail:** **If any checks fail:**
1. Regenerate those stories: `/create-story-with-gap-analysis` 1. Regenerate those stories: `/create-story-with-gap-analysis`
2. Validate again 2. Validate again
3. THEN run batch-super-dev 3. THEN run batch-stories
--- ---
@ -150,7 +150,7 @@ done
**What it means:** Agent tried to create story but couldn't **What it means:** Agent tried to create story but couldn't
**Is this a bug?** ❌ NO - Agents can't create stories **Is this a bug?** ❌ NO - Agents can't create stories
**What to do:** **What to do:**
- Exit batch-super-dev - Exit batch-stories
- Manually run /create-story-with-gap-analysis - Manually run /create-story-with-gap-analysis
- Re-run batch after story created - Re-run batch after story created
@ -165,7 +165,7 @@ done
1. Plan epic → Identify stories → Create list 1. Plan epic → Identify stories → Create list
2. Generate stories: /create-story-with-gap-analysis (1-2 days) 2. Generate stories: /create-story-with-gap-analysis (1-2 days)
3. Validate stories: ./scripts/validate-all-stories.sh 3. Validate stories: ./scripts/validate-all-stories.sh
4. Execute stories: /batch-super-dev (parallel, fast) 4. Execute stories: /batch-stories (parallel, fast)
``` ```
### ✅ DO: Use Small Batches for Mixed Complexity ### ✅ DO: Use Small Batches for Mixed Complexity
@ -183,7 +183,7 @@ done
**Why it fails:** **Why it fails:**
``` ```
1. Create 20 skeleton files with just widget lists 1. Create 20 skeleton files with just widget lists
2. Run /batch-super-dev 2. Run /batch-stories
3. Expect agents to regenerate them 3. Expect agents to regenerate them
→ FAILS: Agents can't invoke /create-story workflow → FAILS: Agents can't invoke /create-story workflow
``` ```
@ -193,7 +193,7 @@ done
**Why it fails:** **Why it fails:**
``` ```
1. 10 proper BMAD stories + 10 skeletons 1. 10 proper BMAD stories + 10 skeletons
2. Run /batch-super-dev 2. Run /batch-stories
3. Expect batch to handle both 3. Expect batch to handle both
→ RESULT: 10 execute, 10 skipped (confusing) → RESULT: 10 execute, 10 skipped (confusing)
``` ```

View File

@ -9,9 +9,9 @@
## Critical Prerequisites ## Critical Prerequisites
> **⚠️ IMPORTANT: Read before running batch-super-dev!** > **⚠️ IMPORTANT: Read before running batch-stories!**
**BEFORE running batch-super-dev:** **BEFORE running batch-stories:**
### ✅ 1. All stories must be properly generated ### ✅ 1. All stories must be properly generated
@ -48,13 +48,13 @@ Required sections:
**What you might try:** **What you might try:**
``` ```
1. Create 20 skeleton story files (just headers + widget lists) 1. Create 20 skeleton story files (just headers + widget lists)
2. Run /batch-super-dev 2. Run /batch-stories
3. Expect agents to regenerate them 3. Expect agents to regenerate them
``` ```
**What happens:** **What happens:**
- Agents identify stories are incomplete - Agents identify stories are incomplete
- Agents correctly halt per super-dev-pipeline validation - Agents correctly halt per story-full-pipeline validation
- Stories get skipped (not regenerated) - Stories get skipped (not regenerated)
- You waste time - You waste time
@ -67,7 +67,7 @@ Required sections:
./scripts/validate-all-stories.sh ./scripts/validate-all-stories.sh
# 3. Execute (4-8 hours, parallel autonomous) # 3. Execute (4-8 hours, parallel autonomous)
/batch-super-dev /batch-stories
``` ```
See: `AGENT-LIMITATIONS.md` for full documentation on what agents can and cannot do. See: `AGENT-LIMITATIONS.md` for full documentation on what agents can and cannot do.
@ -76,7 +76,7 @@ See: `AGENT-LIMITATIONS.md` for full documentation on what agents can and cannot
## Overview ## Overview
Interactive batch workflow for processing multiple `ready-for-dev` stories sequentially or in parallel using the super-dev-pipeline with full quality gates. Interactive batch workflow for processing multiple `ready-for-dev` stories sequentially or in parallel using the story-full-pipeline with full quality gates.
**New in v1.2.0:** Smart Story Validation & Auto-Creation - validates story files, creates missing stories, regenerates invalid ones automatically. **New in v1.2.0:** Smart Story Validation & Auto-Creation - validates story files, creates missing stories, regenerates invalid ones automatically.
**New in v1.1.0:** Smart Story Reconciliation - automatically verifies story accuracy after each implementation. **New in v1.1.0:** Smart Story Reconciliation - automatically verifies story accuracy after each implementation.
@ -107,7 +107,7 @@ Interactive batch workflow for processing multiple `ready-for-dev` stories seque
- **Parallel:** Spawn Task agents to process stories concurrently (faster, autonomous) - **Parallel:** Spawn Task agents to process stories concurrently (faster, autonomous)
- Configurable parallelism: 2, 4, or all stories at once - Configurable parallelism: 2, 4, or all stories at once
4. **Full Quality Gates** (from super-dev-pipeline) 4. **Full Quality Gates** (from story-full-pipeline)
- Pre-gap analysis (validate story completeness) - Pre-gap analysis (validate story completeness)
- Test-driven implementation - Test-driven implementation
- Post-validation (verify requirements met) - Post-validation (verify requirements met)
@ -150,7 +150,7 @@ Before v1.2.0:
``` ```
User: "Process stories 3.1, 3.2, 3.3, 3.4" User: "Process stories 3.1, 3.2, 3.3, 3.4"
Workflow: "Story 3.3 file missing - please create it first" Workflow: "Story 3.3 file missing - please create it first"
User: Ctrl+C → /create-story → /batch-super-dev again User: Ctrl+C → /create-story → /batch-stories again
``` ```
After v1.2.0: After v1.2.0:
@ -232,7 +232,7 @@ validation:
### Example Session (v1.2.0) ### Example Session (v1.2.0)
``` ```
🤖 /batch-super-dev 🤖 /batch-stories
📊 Ready-for-Dev Stories (5) 📊 Ready-for-Dev Stories (5)
@ -398,7 +398,7 @@ sprint-status.yaml: done
```bash ```bash
# Process all ready-for-dev stories # Process all ready-for-dev stories
/batch-super-dev /batch-stories
# Follow prompts: # Follow prompts:
# 1. See list of ready stories # 1. See list of ready stories
@ -413,7 +413,7 @@ sprint-status.yaml: done
```bash ```bash
# Only process Epic 3 stories # Only process Epic 3 stories
/batch-super-dev filter_by_epic=3 /batch-stories filter_by_epic=3
``` ```
### Selection Syntax ### Selection Syntax
@ -444,7 +444,7 @@ All: all (processes all ready-for-dev stories)
## Workflow Configuration ## Workflow Configuration
**File:** `_bmad/bmm/workflows/4-implementation/batch-super-dev/workflow.yaml` **File:** `_bmad/bmm/workflows/4-implementation/batch-stories/workflow.yaml`
### Key Settings ### Key Settings
@ -503,7 +503,7 @@ reconciliation:
### 4. Process Stories ### 4. Process Stories
**Sequential Mode:** **Sequential Mode:**
- For each selected story: - For each selected story:
- Invoke super-dev-pipeline - Invoke story-full-pipeline
- Execute reconciliation (Step 4.5) - Execute reconciliation (Step 4.5)
- Report results - Report results
- Pause between stories - Pause between stories
@ -547,7 +547,7 @@ See: `step-4.5-reconcile-story-status.md` for detailed algorithm
### Batch Log ### Batch Log
**Location:** `docs/sprint-artifacts/batch-super-dev-{date}.log` **Location:** `docs/sprint-artifacts/batch-stories-{date}.log`
**Contains:** **Contains:**
- Start/end timestamps - Start/end timestamps
@ -628,7 +628,7 @@ See: `step-4.5-reconcile-story-status.md` for detailed algorithm
**Fix:** **Fix:**
1. Review listed stories manually 1. Review listed stories manually
2. Check Dev Agent Record has all required sections 2. Check Dev Agent Record has all required sections
3. Re-run super-dev-pipeline for problematic stories 3. Re-run story-full-pipeline for problematic stories
4. Manually reconcile checkboxes if needed 4. Manually reconcile checkboxes if needed
### Parallel Mode Hangs ### Parallel Mode Hangs
@ -713,24 +713,24 @@ See: `step-4.5-reconcile-story-status.md` for detailed algorithm
- Initial release - Initial release
- Interactive story selector - Interactive story selector
- Sequential and parallel execution modes - Sequential and parallel execution modes
- Integration with super-dev-pipeline - Integration with story-full-pipeline
- Batch summary and logging - Batch summary and logging
--- ---
## Related Workflows ## Related Workflows
- **super-dev-pipeline:** Individual story implementation (invoked by batch-super-dev) - **story-full-pipeline:** Individual story implementation (invoked by batch-stories)
- **create-story-with-gap-analysis:** Create new stories with codebase scan - **create-story-with-gap-analysis:** Create new stories with codebase scan
- **sprint-status:** View/update sprint status - **sprint-status:** View/update sprint status
- **multi-agent-review:** Standalone code review (part of super-dev-pipeline) - **multi-agent-review:** Standalone code review (part of story-full-pipeline)
--- ---
## Support ## Support
**Questions or Issues:** **Questions or Issues:**
- Check workflow logs: `docs/sprint-artifacts/batch-super-dev-*.log` - Check workflow logs: `docs/sprint-artifacts/batch-stories-*.log`
- Review reconciliation step: `step-4.5-reconcile-story-status.md` - Review reconciliation step: `step-4.5-reconcile-story-status.md`
- Check story file format: Ensure 12-section BMAD format - Check story file format: Ensure 12-section BMAD format
- Verify Dev Agent Record populated: Required for reconciliation - Verify Dev Agent Record populated: Required for reconciliation

View File

@ -81,7 +81,7 @@ This workflow requires:
``` ```
Must show: "✅ All 12 sections present" Must show: "✅ All 12 sections present"
4. **Re-run batch-super-dev:** 4. **Re-run batch-stories:**
- Story will now be properly formatted - Story will now be properly formatted
- Can be executed in next batch run - Can be executed in next batch run
@ -132,7 +132,7 @@ This workflow requires:
**After completing these actions:** **After completing these actions:**
1. Validate all stories: ./scripts/validate-all-stories.sh 1. Validate all stories: ./scripts/validate-all-stories.sh
2. Re-run batch-super-dev for these stories 2. Re-run batch-stories for these stories
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
</output> </output>
</check> </check>
@ -220,14 +220,14 @@ fi
## Documentation Update ## Documentation Update
**Add to:** `_bmad/bmm/workflows/4-implementation/batch-super-dev/README.md` **Add to:** `_bmad/bmm/workflows/4-implementation/batch-stories/README.md`
```markdown ```markdown
# Batch Super-Dev Workflow # Batch Super-Dev Workflow
## Critical Prerequisites ## Critical Prerequisites
**BEFORE running batch-super-dev:** **BEFORE running batch-stories:**
1. ✅ **All stories must be properly generated** 1. ✅ **All stories must be properly generated**
- Run: `/create-story-with-gap-analysis` for each story - Run: `/create-story-with-gap-analysis` for each story
@ -252,13 +252,13 @@ fi
**What you might try:** **What you might try:**
``` ```
1. Create 20 skeleton story files (just headers + widget lists) 1. Create 20 skeleton story files (just headers + widget lists)
2. Run /batch-super-dev 2. Run /batch-stories
3. Expect agents to regenerate them 3. Expect agents to regenerate them
``` ```
**What happens:** **What happens:**
- Agents identify stories are incomplete - Agents identify stories are incomplete
- Agents correctly halt per super-dev-pipeline validation - Agents correctly halt per story-full-pipeline validation
- Stories get skipped (not regenerated) - Stories get skipped (not regenerated)
- You waste time - You waste time
@ -270,7 +270,7 @@ fi
**Solution:** **Solution:**
- Generate ALL stories manually FIRST: /create-story-with-gap-analysis - Generate ALL stories manually FIRST: /create-story-with-gap-analysis
- Validate: ./scripts/validate-all-stories.sh - Validate: ./scripts/validate-all-stories.sh
- THEN run batch: /batch-super-dev - THEN run batch: /batch-stories
### ❌ Mixed Story Quality ### ❌ Mixed Story Quality
@ -301,7 +301,7 @@ done
./scripts/validate-all-stories.sh ./scripts/validate-all-stories.sh
# 3. Execute (4-8 hours, parallel autonomous) # 3. Execute (4-8 hours, parallel autonomous)
/batch-super-dev /batch-stories
# Select all 5 stories # Select all 5 stories
# Choose 2-4 agents parallel # Choose 2-4 agents parallel
@ -325,13 +325,13 @@ done
**To apply these improvements:** **To apply these improvements:**
- [ ] Update `batch-super-dev/instructions.md` Step 2.5 (lines 82-99) - [ ] Update `batch-stories/instructions.md` Step 2.5 (lines 82-99)
- [ ] Add `batch-super-dev/AGENT-LIMITATIONS.md` (new file) - [ ] Add `batch-stories/AGENT-LIMITATIONS.md` (new file)
- [ ] Add `batch-super-dev/BATCH-BEST-PRACTICES.md` (new file) - [ ] Add `batch-stories/BATCH-BEST-PRACTICES.md` (new file)
- [ ] Update `batch-super-dev/README.md` with prerequisites - [ ] Update `batch-stories/README.md` with prerequisites
- [ ] Create `scripts/validate-all-stories.sh` (new script) - [ ] Create `scripts/validate-all-stories.sh` (new script)
- [ ] Add manual actions tracking to Step 5 summary - [ ] Add manual actions tracking to Step 5 summary
- [ ] Update super-dev-pipeline Step 1.4.5 with agent guidance - [ ] Update story-full-pipeline Step 1.4.5 with agent guidance
**Testing:** **Testing:**
- Try batch with mixed story quality → Should skip skeletons gracefully - Try batch with mixed story quality → Should skip skeletons gracefully

View File

@ -1,7 +1,7 @@
# Step 4.5: Story Reconciliation (Orchestrator-Driven) # Step 4.5: Story Reconciliation (Orchestrator-Driven)
**Version:** 2.1.0 **Version:** 2.1.0
**Execute:** AFTER super-dev-pipeline completes, BEFORE marking story done **Execute:** AFTER story-full-pipeline completes, BEFORE marking story done
**Who:** Orchestrator (YOU) - not an agent **Who:** Orchestrator (YOU) - not an agent
--- ---

View File

@ -1,7 +1,7 @@
# Batch Super-Dev v3.0 - Unified Workflow # Batch Super-Dev v3.0 - Unified Workflow
<purpose> <purpose>
Interactive story selector for batch implementation. Scan codebase for gaps, select stories, process with super-dev-pipeline, reconcile results. Interactive story selector for batch implementation. Scan codebase for gaps, select stories, process with story-full-pipeline, reconcile results.
**AKA:** "Mend the Gap" - Mind the gap between story requirements and reality, then mend it. **AKA:** "Mend the Gap" - Mind the gap between story requirements and reality, then mend it.
</purpose> </purpose>
@ -18,7 +18,7 @@ Orchestrator coordinates. Agents do implementation. Orchestrator does reconcilia
</philosophy> </philosophy>
<config> <config>
name: batch-super-dev name: batch-stories
version: 3.1.0 version: 3.1.0
modes: modes:
@ -37,7 +37,7 @@ defaults:
<execution_context> <execution_context>
@patterns/hospital-grade.md @patterns/hospital-grade.md
@patterns/agent-completion.md @patterns/agent-completion.md
@super-dev-pipeline/workflow.md @story-full-pipeline/workflow.md
</execution_context> </execution_context>
<process> <process>
@ -203,16 +203,16 @@ If missing, auto-create using greenfield workflow:
echo "✅ Prerequisites satisfied" echo "✅ Prerequisites satisfied"
``` ```
**Step B: Invoke super-dev-pipeline** **Step B: Invoke story-full-pipeline**
Use super-dev-pipeline workflow with: Use story-full-pipeline workflow with:
- mode: batch - mode: batch
- story_key: {{story_key}} - story_key: {{story_key}}
- complexity_level: {{complexity}} - complexity_level: {{complexity}}
**Step C: Reconcile Using Completion Artifacts (orchestrator does this directly)** **Step C: Reconcile Using Completion Artifacts (orchestrator does this directly)**
After super-dev-pipeline completes: After story-full-pipeline completes:
**C1. Load Fixer completion artifact:** **C1. Load Fixer completion artifact:**
```bash ```bash
@ -294,10 +294,10 @@ Task({
subagent_type: "general-purpose", subagent_type: "general-purpose",
description: "Implement {{story_key}}", description: "Implement {{story_key}}",
prompt: ` prompt: `
Execute super-dev-pipeline for story {{story_key}}. Execute story-full-pipeline for story {{story_key}}.
<execution_context> <execution_context>
@super-dev-pipeline/workflow.md @story-full-pipeline/workflow.md
</execution_context> </execution_context>
<context> <context>

View File

@ -1,5 +1,5 @@
name: batch-super-dev name: batch-stories
description: "Interactive batch selector for super-dev-pipeline with complexity-based routing. Micro stories get lightweight path, standard stories get full pipeline, complex stories get enhanced validation." description: "Interactive batch selector for story-full-pipeline with complexity-based routing. Micro stories get lightweight path, standard stories get full pipeline, complex stories get enhanced validation."
author: "BMad" author: "BMad"
version: "1.3.0" version: "1.3.0"
@ -11,12 +11,12 @@ communication_language: "{config_source}:communication_language"
date: system-generated date: system-generated
# Workflow paths # Workflow paths
installed_path: "{project-root}/_bmad/bmm/workflows/4-implementation/batch-super-dev" installed_path: "{project-root}/_bmad/bmm/workflows/4-implementation/batch-stories"
instructions: "{installed_path}/instructions.md" instructions: "{installed_path}/instructions.md"
# State management # State management
sprint_status: "{sprint_artifacts}/sprint-status.yaml" sprint_status: "{sprint_artifacts}/sprint-status.yaml"
batch_log: "{sprint_artifacts}/batch-super-dev-{date}.log" batch_log: "{sprint_artifacts}/batch-stories-{date}.log"
# Variables # Variables
filter_by_epic: "" # Optional: Filter stories by epic number (e.g., "3" for only Epic 3 stories) filter_by_epic: "" # Optional: Filter stories by epic number (e.g., "3" for only Epic 3 stories)
@ -26,7 +26,7 @@ pause_between_stories: 5 # Seconds to pause between stories (allows monitoring,
# Super-dev-pipeline invocation settings # Super-dev-pipeline invocation settings
super_dev_settings: super_dev_settings:
mode: "batch" # Always use batch mode for autonomous execution mode: "batch" # Always use batch mode for autonomous execution
workflow_path: "{project-root}/_bmad/bmm/workflows/4-implementation/super-dev-pipeline" workflow_path: "{project-root}/_bmad/bmm/workflows/4-implementation/story-full-pipeline"
# Story validation settings (NEW in v1.2.0) # Story validation settings (NEW in v1.2.0)
validation: validation:

View File

@ -228,7 +228,7 @@ Ready for implementation.
Next Steps: Next Steps:
1. Review story for accuracy 1. Review story for accuracy
2. Use /story-pipeline or /super-dev-pipeline to implement 2. Use /story-dev-only or /story-full-pipeline to implement
3. All context loaded and ready 3. All context loaded and ready
[N] Create next story [N] Create next story

View File

@ -19,9 +19,9 @@ name: multi-agent-review
version: 3.0.0 version: 3.0.0
agent_selection: agent_selection:
micro: {count: 2, agents: [security, code_quality]} micro: {count: 1, agents: [security]}
standard: {count: 4, agents: [security, code_quality, architecture, testing]} standard: {count: 2, agents: [security, code_quality]}
complex: {count: 6, agents: [security, code_quality, architecture, testing, performance, domain_expert]} complex: {count: 3, agents: [security, code_quality, architecture]}
available_agents: available_agents:
security: "Identifies vulnerabilities and security risks" security: "Identifies vulnerabilities and security risks"
@ -41,21 +41,40 @@ available_agents:
<process> <process>
<step name="determine_agent_count" priority="first"> <step name="determine_agent_count" priority="first">
**Select agents based on complexity** **Select agents based on override or complexity**
``` ```
If complexity_level == "micro": # Priority 1: Check for explicit override
agents = ["security", "code_quality"] If override_agent_count is provided (not null):
Display: 🔍 MICRO Review (2 agents) agent_count = min(override_agent_count, 6) # Cap at 6 max
Select top N agents based on changed code patterns
Display: 🔧 CUSTOM Review ({{agent_count}} agents)
# Priority 2: Use complexity-based default
Else if complexity_level == "micro":
agent_count = 1
agents = ["security"]
Display: 🔍 MICRO Review (1 agent)
Else if complexity_level == "standard": Else if complexity_level == "standard":
agents = ["security", "code_quality", "architecture", "testing"] agent_count = 2
Display: 📋 STANDARD Review (4 agents) agents = ["security", "code_quality"]
Display: 📋 STANDARD Review (2 agents)
Else if complexity_level == "complex": Else if complexity_level == "complex":
agents = ALL 6 agents agent_count = 3
Display: 🔬 COMPLEX Review (6 agents) agents = ["security", "code_quality", "architecture"]
Display: 🔬 COMPLEX Review (3 agents)
``` ```
**Agent Selection Priority:**
1. Security (always first)
2. Code Quality (always second)
3-6. Selected based on code patterns:
- Architecture (for structural changes)
- Testing (for test coverage)
- Performance (for optimization)
- Domain Expert (for business logic)
</step> </step>
<step name="load_story_context"> <step name="load_story_context">
@ -183,6 +202,28 @@ If only LOW/INFO findings:
- Micro stories (≤3 tasks) - Micro stories (≤3 tasks)
- Standard stories with simple changes - Standard stories with simple changes
- Stories that passed adversarial review cleanly - Stories that passed adversarial review cleanly
**Usage Examples:**
```bash
# Default: Use complexity-based agent count
/bmad_bmm_multi-agent-review 28-1-volunteer-role-permissions
# Override: Force specific count (token-conscious)
/bmad_bmm_multi-agent-review 28-2-volunteer-profile --count 2
# Complex story but budget-conscious
/bmad_bmm_multi-agent-review 28-3-volunteer-opportunities --count 3
# Skip review entirely (micro story)
/bmad_bmm_multi-agent-review 28-4-tiny-fix --count 0
```
**Parameter:**
- `--count N` (optional): Override complexity-based count
- Range: 0-6 (0 = skip review)
- Default: null (uses complexity_level)
- Capped at 6 maximum for safety
</integration> </integration>
<failure_handling> <failure_handling>

View File

@ -17,29 +17,30 @@ instructions: "{installed_path}/instructions.md"
story_id: "{story_id}" # Required story_id: "{story_id}" # Required
story_file: "{sprint_artifacts}/story-{story_id}.md" story_file: "{sprint_artifacts}/story-{story_id}.md"
base_branch: "main" # Optional: branch to compare against base_branch: "main" # Optional: branch to compare against
complexity_level: "standard" # micro | standard | complex (passed from super-dev-pipeline) complexity_level: "standard" # micro | standard | complex (passed from story-full-pipeline)
override_agent_count: null # Optional: override complexity-based count (1-6, null = use complexity_level)
# Complexity-based agent selection (NEW v1.0.0) # Complexity-based agent selection (NEW v1.0.0)
# Cost-effective review depth based on story RISK and technical complexity # Cost-effective review depth based on story RISK and technical complexity
# Complexity determined by batch-super-dev based on: risk keywords, architectural impact, security concerns # Complexity determined by batch-stories based on: risk keywords, architectural impact, security concerns
complexity_routing: complexity_routing:
micro: micro:
agent_count: 2 agent_count: 1
agents: ["security", "code_quality"] agents: ["security"]
description: "Quick sanity check for low-risk stories" description: "Quick sanity check for low-risk stories"
examples: ["UI tweaks", "text changes", "simple CRUD", "documentation"] examples: ["UI tweaks", "text changes", "simple CRUD", "documentation"]
cost_multiplier: 1x cost_multiplier: 1x
standard: standard:
agent_count: 4 agent_count: 2
agents: ["security", "code_quality", "architecture", "testing"] agents: ["security", "code_quality"]
description: "Balanced multi-perspective review for medium-risk changes" description: "Balanced multi-perspective review for medium-risk changes"
examples: ["API endpoints", "business logic", "data validation", "component refactors"] examples: ["API endpoints", "business logic", "data validation", "component refactors"]
cost_multiplier: 2x cost_multiplier: 2x
complex: complex:
agent_count: 6 agent_count: 3
agents: ["security", "code_quality", "architecture", "testing", "performance", "domain_expert"] agents: ["security", "code_quality", "architecture"]
description: "Comprehensive review for high-risk/high-complexity changes" description: "Comprehensive review for high-risk/high-complexity changes"
examples: ["auth/security", "payments", "data migration", "architecture changes", "performance-critical", "complex algorithms"] examples: ["auth/security", "payments", "data migration", "architecture changes", "performance-critical", "complex algorithms"]
cost_multiplier: 3x cost_multiplier: 3x

View File

@ -101,7 +101,7 @@ Human-in-the-loop with approval at each step:
bmad build 1-4 bmad build 1-4
# Or invoke workflow directly # Or invoke workflow directly
claude -p "Load and execute: _bmad/bmm/workflows/4-implementation/story-pipeline/workflow.md claude -p "Load and execute: _bmad/bmm/workflows/4-implementation/story-dev-only/workflow.md
Story: 1-4" Story: 1-4"
``` ```
@ -121,7 +121,7 @@ Unattended execution for trusted stories:
bmad build 1-4 --batch bmad build 1-4 --batch
# Or use batch runner directly # Or use batch runner directly
./_bmad/bmm/workflows/4-implementation/story-pipeline/batch-runner.sh 1-4 ./_bmad/bmm/workflows/4-implementation/story-dev-only/batch-runner.sh 1-4
``` ```
Batch mode: Batch mode:
@ -148,7 +148,7 @@ Resume automatically:
## Directory Structure ## Directory Structure
``` ```
story-pipeline/ story-dev-only/
├── workflow.yaml # Configuration, agent mapping, quality gates ├── workflow.yaml # Configuration, agent mapping, quality gates
├── workflow.md # Interactive mode orchestration ├── workflow.md # Interactive mode orchestration
├── batch-runner.sh # Batch mode runner script ├── batch-runner.sh # Batch mode runner script
@ -178,7 +178,7 @@ story-pipeline/
### workflow.yaml ### workflow.yaml
```yaml ```yaml
name: story-pipeline name: story-dev-only
version: "2.0" version: "2.0"
description: "Single-session story implementation with step-file loading" description: "Single-session story implementation with step-file loading"

View File

@ -3,7 +3,7 @@ name: 'step-01-init'
description: 'Initialize story pipeline: load context, detect mode, cache documents' description: 'Initialize story pipeline: load context, detect mode, cache documents'
# Path Definitions # Path Definitions
workflow_path: '{project-root}/_bmad/bmm/workflows/4-implementation/story-pipeline' workflow_path: '{project-root}/_bmad/bmm/workflows/4-implementation/story-dev-only'
# File References # File References
thisStepFile: '{workflow_path}/steps/step-01-init.md' thisStepFile: '{workflow_path}/steps/step-01-init.md'

View File

@ -3,7 +3,7 @@ name: 'step-01b-resume'
description: 'Resume pipeline from checkpoint after failure or interruption' description: 'Resume pipeline from checkpoint after failure or interruption'
# Path Definitions # Path Definitions
workflow_path: '{project-root}/_bmad/bmm/workflows/4-implementation/story-pipeline' workflow_path: '{project-root}/_bmad/bmm/workflows/4-implementation/story-dev-only'
# File References # File References
thisStepFile: '{workflow_path}/steps/step-01b-resume.md' thisStepFile: '{workflow_path}/steps/step-01b-resume.md'

View File

@ -3,7 +3,7 @@ name: 'step-02-create-story'
description: 'Create detailed story file from epic definition with research' description: 'Create detailed story file from epic definition with research'
# Path Definitions # Path Definitions
workflow_path: '{project-root}/_bmad/bmm/workflows/4-implementation/story-pipeline' workflow_path: '{project-root}/_bmad/bmm/workflows/4-implementation/story-dev-only'
# File References # File References
thisStepFile: '{workflow_path}/steps/step-02-create-story.md' thisStepFile: '{workflow_path}/steps/step-02-create-story.md'

View File

@ -3,7 +3,7 @@ name: 'step-03-validate-story'
description: 'Adversarial validation of story completeness and quality' description: 'Adversarial validation of story completeness and quality'
# Path Definitions # Path Definitions
workflow_path: '{project-root}/_bmad/bmm/workflows/4-implementation/story-pipeline' workflow_path: '{project-root}/_bmad/bmm/workflows/4-implementation/story-dev-only'
# File References # File References
thisStepFile: '{workflow_path}/steps/step-03-validate-story.md' thisStepFile: '{workflow_path}/steps/step-03-validate-story.md'

View File

@ -3,7 +3,7 @@ name: 'step-04-atdd'
description: 'Generate failing acceptance tests before implementation (RED phase)' description: 'Generate failing acceptance tests before implementation (RED phase)'
# Path Definitions # Path Definitions
workflow_path: '{project-root}/_bmad/bmm/workflows/4-implementation/story-pipeline' workflow_path: '{project-root}/_bmad/bmm/workflows/4-implementation/story-dev-only'
# File References # File References
thisStepFile: '{workflow_path}/steps/step-04-atdd.md' thisStepFile: '{workflow_path}/steps/step-04-atdd.md'

View File

@ -3,7 +3,7 @@ name: 'step-05-implement'
description: 'Implement story to make tests pass (GREEN phase)' description: 'Implement story to make tests pass (GREEN phase)'
# Path Definitions # Path Definitions
workflow_path: '{project-root}/_bmad/bmm/workflows/4-implementation/story-pipeline' workflow_path: '{project-root}/_bmad/bmm/workflows/4-implementation/story-dev-only'
# File References # File References
thisStepFile: '{workflow_path}/steps/step-05-implement.md' thisStepFile: '{workflow_path}/steps/step-05-implement.md'

View File

@ -3,7 +3,7 @@ name: 'step-05b-post-validation'
description: 'Verify completed tasks against codebase reality (catch false positives)' description: 'Verify completed tasks against codebase reality (catch false positives)'
# Path Definitions # Path Definitions
workflow_path: '{project-root}/_bmad/bmm/workflows/4-implementation/story-pipeline' workflow_path: '{project-root}/_bmad/bmm/workflows/4-implementation/story-dev-only'
# File References # File References
thisStepFile: '{workflow_path}/steps/step-05b-post-validation.md' thisStepFile: '{workflow_path}/steps/step-05b-post-validation.md'

View File

@ -3,7 +3,7 @@ name: 'step-06-code-review'
description: 'Adversarial code review finding 3-10 specific issues' description: 'Adversarial code review finding 3-10 specific issues'
# Path Definitions # Path Definitions
workflow_path: '{project-root}/_bmad/bmm/workflows/4-implementation/story-pipeline' workflow_path: '{project-root}/_bmad/bmm/workflows/4-implementation/story-dev-only'
# File References # File References
thisStepFile: '{workflow_path}/steps/step-06-code-review.md' thisStepFile: '{workflow_path}/steps/step-06-code-review.md'

View File

@ -3,7 +3,7 @@ name: 'step-07-complete'
description: 'Update sprint status and create git commit' description: 'Update sprint status and create git commit'
# Path Definitions # Path Definitions
workflow_path: '{project-root}/_bmad/bmm/workflows/4-implementation/story-pipeline' workflow_path: '{project-root}/_bmad/bmm/workflows/4-implementation/story-dev-only'
# File References # File References
thisStepFile: '{workflow_path}/steps/step-07-complete.md' thisStepFile: '{workflow_path}/steps/step-07-complete.md'
@ -89,7 +89,7 @@ stories:
code_reviewed: true code_reviewed: true
issues_found: {count} issues_found: {count}
issues_fixed: {count} issues_fixed: {count}
pipeline_version: "story-pipeline-v2.0" pipeline_version: "story-dev-only-v2.0"
``` ```
### 4. Stage Git Changes ### 4. Stage Git Changes
@ -119,7 +119,7 @@ feat(epic-{epic_num}): complete story {story_id}
- Code reviewed: {issues_found} issues found and fixed - Code reviewed: {issues_found} issues found and fixed
Story: {story_title} Story: {story_title}
Pipeline: story-pipeline-v2.0 Pipeline: story-dev-only-v2.0
🤖 Generated with BMAD Story Pipeline 🤖 Generated with BMAD Story Pipeline

View File

@ -3,7 +3,7 @@ name: 'step-08-summary'
description: 'Generate audit trail and pipeline summary report' description: 'Generate audit trail and pipeline summary report'
# Path Definitions # Path Definitions
workflow_path: '{project-root}/_bmad/bmm/workflows/4-implementation/story-pipeline' workflow_path: '{project-root}/_bmad/bmm/workflows/4-implementation/story-dev-only'
# File References # File References
thisStepFile: '{workflow_path}/steps/step-08-summary.md' thisStepFile: '{workflow_path}/steps/step-08-summary.md'
@ -48,7 +48,7 @@ Create: `{auditFile}`
```yaml ```yaml
--- ---
audit_version: "1.0" audit_version: "1.0"
pipeline: "story-pipeline-v2.0" pipeline: "story-dev-only-v2.0"
story_id: "{story_id}" story_id: "{story_id}"
epic_num: {epic_num} epic_num: {epic_num}
--- ---

View File

@ -1,5 +1,5 @@
--- ---
name: story-pipeline name: story-dev-only
description: Automated story development pipeline with token-efficient step-file architecture. Single-session orchestration replacing multiple Claude calls. description: Automated story development pipeline with token-efficient step-file architecture. Single-session orchestration replacing multiple Claude calls.
web_bundle: true web_bundle: true
--- ---
@ -112,7 +112,7 @@ Load and cache these documents (read once, use across steps):
### 4. First Step Execution ### 4. First Step Execution
Load, read the full file and then execute: Load, read the full file and then execute:
`{project-root}/_bmad/bmm/workflows/4-implementation/story-pipeline/steps/step-01-init.md` `{project-root}/_bmad/bmm/workflows/4-implementation/story-dev-only/steps/step-01-init.md`
--- ---

View File

@ -1,5 +1,5 @@
name: story-pipeline name: story-dev-only
description: "Automated story development pipeline with token-efficient step-file architecture. Replaces separate Claude calls with single-session orchestration." description: "Basic TDD story development pipeline with token-efficient step-file architecture. Focuses on implementation without validation/review stages."
author: "BMad + digital-bridge" author: "BMad + digital-bridge"
version: "2.0.0" version: "2.0.0"
@ -11,14 +11,14 @@ communication_language: "{config_source}:communication_language"
date: system-generated date: system-generated
# Workflow paths # Workflow paths
installed_path: "{project-root}/_bmad/bmm/workflows/4-implementation/story-pipeline" installed_path: "{project-root}/_bmad/bmm/workflows/4-implementation/story-dev-only"
steps_path: "{installed_path}/steps" steps_path: "{installed_path}/steps"
templates_path: "{installed_path}/templates" templates_path: "{installed_path}/templates"
checklists_path: "{installed_path}/checklists" checklists_path: "{installed_path}/checklists"
# State management # State management
state_file: "{sprint_artifacts}/pipeline-state-{{story_id}}.yaml" state_file: "{sprint_artifacts}/story-dev-only-state-{{story_id}}.yaml"
audit_trail: "{sprint_artifacts}/audit-{{story_id}}-{{date}}.yaml" audit_trail: "{sprint_artifacts}/audit-story-dev-only-{{story_id}}-{{date}}.yaml"
# Workflow modes # Workflow modes
modes: modes:

View File

@ -8,7 +8,7 @@
```bash ```bash
# Run super-dev pipeline for a story # Run super-dev pipeline for a story
/super-dev-pipeline story_key=17-10 /story-full-pipeline story_key=17-10
``` ```
--- ---
@ -106,7 +106,7 @@ See `workflow.md` for complete architecture details.
**Directory Structure:** **Directory Structure:**
``` ```
super-dev-pipeline/ story-full-pipeline/
├── README.md (this file) ├── README.md (this file)
├── workflow.yaml (configuration) ├── workflow.yaml (configuration)
├── workflow.md (complete documentation) ├── workflow.md (complete documentation)

View File

@ -0,0 +1,215 @@
# Super-Dev-Pipeline v3.1 - Token-Efficient Multi-Agent Pipeline
<purpose>
Implement a story using parallel verification agents with Builder context reuse.
Each agent has single responsibility. Builder fixes issues in its own context (50-70% token savings).
Orchestrator handles bookkeeping (story file updates, verification).
</purpose>
<philosophy>
**Token-Efficient Multi-Agent Pipeline**
- Builder implements (creative, context preserved)
- Inspector + Reviewers validate in parallel (verification, fresh context)
- Builder fixes issues (creative, reuses context - 50-70% token savings)
- Inspector re-checks (verification, quick check)
- Orchestrator reconciles story file (mechanical)
**Key Innovation:** Resume Builder instead of spawning fresh Fixer.
Builder already knows the codebase - just needs to fix specific issues.
Trust but verify. Fresh context for verification. Reuse context for fixes.
</philosophy>
<config>
name: story-full-pipeline
version: 3.1.0
execution_mode: multi_agent
phases:
phase_1: Builder (saves agent_id)
phase_2: [Inspector + N Reviewers] in parallel (N = 1/2/3 based on complexity)
phase_3: Resume Builder with all findings (reuses context)
phase_4: Inspector re-check (quick verification)
phase_5: Orchestrator reconciliation
reviewer_counts:
micro: 1 reviewer (security only)
standard: 2 reviewers (security, performance)
complex: 3 reviewers (security, performance, code quality)
token_efficiency:
- Phase 2 agents spawn in parallel (same cost, faster)
- Phase 3 resumes Builder (50-70% token savings vs fresh Fixer)
- Phase 4 Inspector only (no full re-review)
</config>
<execution_context>
@patterns/hospital-grade.md
@patterns/agent-completion.md
</execution_context>
<process>
<step name="load_story" priority="first">
Load and validate the story file.
\`\`\`bash
STORY_FILE="docs/sprint-artifacts/{{story_key}}.md"
[ -f "$STORY_FILE" ] || { echo "ERROR: Story file not found"; exit 1; }
\`\`\`
Use Read tool on the story file. Parse:
- Complexity level (micro/standard/complex)
- Task count
- Acceptance criteria count
Determine which agents to spawn based on complexity routing.
</step>
<step name="spawn_builder">
**Phase 1: Builder Agent (Steps 1-4)**
\`\`\`
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔨 PHASE 1: BUILDER
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
\`\`\`
Spawn Builder agent and save agent_id for later resume.
**CRITICAL: Save Builder's agent_id for later resume**
\`\`\`
BUILDER_AGENT_ID={{agent_id_from_task_result}}
echo "Builder agent: $BUILDER_AGENT_ID"
\`\`\`
Wait for completion. Parse structured output. Verify files exist.
If files missing or status FAILED: halt pipeline.
</step>
<step name="spawn_verification_parallel">
**Phase 2: Parallel Verification (Inspector + Reviewers)**
\`\`\`
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔍 PHASE 2: PARALLEL VERIFICATION
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
\`\`\`
**CRITICAL: Spawn ALL verification agents in ONE message (parallel execution)**
Determine reviewer count based on complexity:
\`\`\`
if complexity == "micro": REVIEWER_COUNT = 1
if complexity == "standard": REVIEWER_COUNT = 2
if complexity == "complex": REVIEWER_COUNT = 3
\`\`\`
Spawn Inspector + N Reviewers in single message. Wait for ALL agents to complete. Collect findings.
Aggregate all findings from Inspector + Reviewers.
</step>
<step name="resume_builder_with_findings">
**Phase 3: Resume Builder with All Findings**
\`\`\`
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔧 PHASE 3: RESUME BUILDER (Fix Issues)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
\`\`\`
**CRITICAL: Resume Builder agent (reuses context!)**
Use Task tool with `resume: "{{BUILDER_AGENT_ID}}"` parameter.
Builder receives all consolidated findings and fixes:
1. ALL CRITICAL issues (security, blockers)
2. ALL HIGH issues (bugs, logic errors)
3. MEDIUM if quick (<30 min total)
4. Skip LOW (gold-plating)
5. Commit with descriptive message
Wait for completion. Parse commit hash and fix counts.
</step>
<step name="inspector_recheck">
**Phase 4: Quick Inspector Re-Check**
\`\`\`
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅ PHASE 4: RE-VERIFICATION
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
\`\`\`
Spawn Inspector only (not full review). Quick functional verification.
If FAIL: Resume Builder again with new issues.
If PASS: Proceed to reconciliation.
</step>
<step name="reconcile_story">
**Phase 5: Orchestrator Reconciliation**
\`\`\`
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔧 PHASE 5: RECONCILIATION (Orchestrator)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
\`\`\`
**YOU (orchestrator) do this directly. No agent spawn.**
1. Get what was built (git log, git diff)
2. Read story file
3. Check off completed tasks (Edit tool)
4. Fill Dev Agent Record with pipeline details
5. Verify updates (grep task checkboxes)
6. Update sprint-status.yaml to "done"
</step>
<step name="final_verification">
**Final Quality Gate**
Verify:
1. Git commit exists
2. Story tasks checked (count > 0)
3. Dev Agent Record filled
4. Sprint status updated
If verification fails: fix using Edit, then re-verify.
</step>
</process>
<failure_handling>
**Builder fails:** Don't spawn verification. Report failure and halt.
**Inspector fails (Phase 2):** Still run Reviewers in parallel, collect all findings together.
**Inspector fails (Phase 4):** Resume Builder again with new issues (iterative fix loop).
**Builder resume fails:** Report unfixed issues. Manual intervention needed.
**Reconciliation fails:** Fix using Edit tool. Re-verify checkboxes.
</failure_handling>
<complexity_routing>
| Complexity | Pipeline | Reviewers | Total Phase 2 Agents |
|------------|----------|-----------|---------------------|
| micro | Builder → [Inspector + 1 Reviewer] → Resume Builder → Inspector recheck | 1 (security) | 2 agents |
| standard | Builder → [Inspector + 2 Reviewers] → Resume Builder → Inspector recheck | 2 (security, performance) | 3 agents |
| complex | Builder → [Inspector + 3 Reviewers] → Resume Builder → Inspector recheck | 3 (security, performance, quality) | 4 agents |
**Key Improvement:** All verification agents spawn in parallel (single message, faster execution).
**Token Savings:** Builder resume in Phase 3 saves 50-70% tokens vs spawning fresh Fixer.
</complexity_routing>
<success_criteria>
- [ ] Builder spawned and agent_id saved
- [ ] All verification agents completed in parallel
- [ ] Builder resumed with consolidated findings
- [ ] Inspector recheck passed
- [ ] Git commit exists for story
- [ ] Story file has checked tasks (count > 0)
- [ ] Dev Agent Record filled with all phases
- [ ] Sprint status updated to "done"
</success_criteria>

View File

@ -1,4 +1,4 @@
name: super-dev-pipeline name: story-full-pipeline
description: "Multi-agent pipeline with wave-based execution, independent validation, and adversarial code review (GSDMAD)" description: "Multi-agent pipeline with wave-based execution, independent validation, and adversarial code review (GSDMAD)"
author: "BMAD Method + GSD" author: "BMAD Method + GSD"
version: "2.0.0" version: "2.0.0"
@ -14,7 +14,7 @@ communication_language: "{config_source}:communication_language"
date: system-generated date: system-generated
# Workflow paths # Workflow paths
installed_path: "{project-root}/_bmad/bmm/workflows/4-implementation/super-dev-pipeline" installed_path: "{project-root}/_bmad/bmm/workflows/4-implementation/story-full-pipeline"
agents_path: "{installed_path}/agents" agents_path: "{installed_path}/agents"
steps_path: "{installed_path}/steps" steps_path: "{installed_path}/steps"
@ -23,8 +23,8 @@ agent_history: "{sprint_artifacts}/agent-history.json"
current_agent_id: "{sprint_artifacts}/current-agent-id.txt" current_agent_id: "{sprint_artifacts}/current-agent-id.txt"
# State management # State management
state_file: "{sprint_artifacts}/super-dev-state-{{story_id}}.yaml" state_file: "{sprint_artifacts}/story-full-pipeline-state-{{story_id}}.yaml"
audit_trail: "{sprint_artifacts}/audit-super-dev-{{story_id}}-{{date}}.yaml" audit_trail: "{sprint_artifacts}/audit-story-full-pipeline-{{story_id}}-{{date}}.yaml"
# Multi-agent configuration # Multi-agent configuration
agents: agents:
@ -55,14 +55,15 @@ agents:
trust_level: "high" # Wants to find problems trust_level: "high" # Wants to find problems
timeout: 1800 # 30 minutes timeout: 1800 # 30 minutes
review_agent_count: review_agent_count:
micro: 2 micro: 1 # Minimal review (1 agent)
standard: 4 standard: 2 # Balanced review (2 agents)
complex: 6 complex: 3 # Full review (3 agents)
fixer: fixer:
description: "Issue resolution - fixes critical/high issues" description: "Issue resolution - fixes critical/high issues"
steps: [8, 9] steps: [8, 9]
subagent_type: "general-purpose" subagent_type: "general-purpose"
resume_builder: true # IMPORTANT: Resume Builder agent instead of spawning fresh
prompt_file: "{agents_path}/fixer.md" prompt_file: "{agents_path}/fixer.md"
trust_level: "medium" # Incentive to minimize work trust_level: "medium" # Incentive to minimize work
timeout: 2400 # 40 minutes timeout: 2400 # 40 minutes
@ -118,6 +119,6 @@ final_verification:
fallback_to_v1: fallback_to_v1:
enabled: true enabled: true
condition: "execution_mode == 'single_agent'" condition: "execution_mode == 'single_agent'"
workflow: "{project-root}/_bmad/bmm/workflows/4-implementation/super-dev-pipeline" workflow: "{project-root}/_bmad/bmm/workflows/4-implementation/story-full-pipeline"
standalone: true standalone: true

View File

@ -1,396 +0,0 @@
# Super-Dev-Pipeline v3.0 - Unified Workflow
<purpose>
Implement a story using 4 independent agents with orchestrator-driven reconciliation.
Each agent has single responsibility. No agent validates its own work.
Orchestrator handles bookkeeping (story file updates, verification).
</purpose>
<philosophy>
**Agents do creative work. Orchestrator does bookkeeping.**
- Builder implements (creative)
- Inspector validates (verification)
- Reviewer finds issues (adversarial)
- Fixer resolves issues (creative)
- Orchestrator reconciles story file (mechanical)
Trust but verify. Fresh context per phase. Adversarial review.
</philosophy>
<config>
name: super-dev-pipeline
version: 3.0.0
execution_mode: multi_agent
agents:
builder: {steps: 1-4, trust: low, timeout: 60min}
inspector: {steps: 5-6, trust: medium, fresh_context: true, timeout: 30min}
reviewer: {steps: 7, trust: high, adversarial: true, timeout: 30min}
fixer: {steps: 8-9, trust: medium, timeout: 40min}
complexity_routing:
micro: {skip: [reviewer], description: "Low-risk stories"}
standard: {skip: [], description: "Normal stories"}
complex: {skip: [], enhanced_review: true, description: "High-risk stories"}
</config>
<execution_context>
@patterns/hospital-grade.md
@patterns/agent-completion.md
</execution_context>
<process>
<step name="load_story" priority="first">
Load and validate the story file.
```bash
STORY_FILE="docs/sprint-artifacts/{{story_key}}.md"
[ -f "$STORY_FILE" ] || { echo "ERROR: Story file not found"; exit 1; }
```
Use Read tool on the story file. Parse:
- Complexity level (micro/standard/complex)
- Task count
- Acceptance criteria count
Determine which agents to spawn based on complexity routing.
</step>
<step name="spawn_builder">
**Phase 1: Builder Agent (Steps 1-4)**
```
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔨 PHASE 1: BUILDER
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
```
Spawn Builder agent:
```
Task({
subagent_type: "general-purpose",
description: "Implement story {{story_key}}",
prompt: `
You are the BUILDER agent for story {{story_key}}.
<execution_context>
@patterns/hospital-grade.md
@patterns/tdd.md
@patterns/agent-completion.md
</execution_context>
<context>
Story: [inline story file content]
</context>
<objective>
Implement the story requirements:
1. Load and understand requirements
2. Analyze what exists vs needed
3. Write tests first (TDD)
4. Implement production code
</objective>
<constraints>
- DO NOT validate your own work
- DO NOT review your code
- DO NOT update story checkboxes
- DO NOT commit changes
</constraints>
<success_criteria>
- [ ] Tests written for all requirements
- [ ] Production code implements tests
- [ ] Return ## AGENT COMPLETE with file lists
</success_criteria>
`
})
```
**Wait for completion. Parse structured output.**
Verify files exist:
```bash
# For each file in "Files Created" and "Files Modified":
[ -f "$file" ] || echo "MISSING: $file"
```
If files missing or status FAILED: halt pipeline.
</step>
<step name="spawn_inspector">
**Phase 2: Inspector Agent (Steps 5-6)**
```
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔍 PHASE 2: INSPECTOR
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
```
Spawn Inspector agent with **fresh context** (no Builder knowledge):
```
Task({
subagent_type: "general-purpose",
description: "Validate story {{story_key}} implementation",
prompt: `
You are the INSPECTOR agent for story {{story_key}}.
<execution_context>
@patterns/verification.md
@patterns/hospital-grade.md
@patterns/agent-completion.md
</execution_context>
<context>
Story: [inline story file content]
</context>
<objective>
Independently verify the implementation:
1. Verify files exist and have content
2. Run type-check, lint, build
3. Run tests yourself
4. Give honest PASS/FAIL verdict
</objective>
<constraints>
- You have NO KNOWLEDGE of what Builder did
- Run all checks yourself
- Don't trust any claims
</constraints>
<success_criteria>
- [ ] All files verified to exist
- [ ] Type check passes (0 errors)
- [ ] Lint passes (0 warnings)
- [ ] Tests pass
- [ ] Return ## AGENT COMPLETE with evidence
</success_criteria>
`
})
```
**Wait for completion. Parse verdict.**
If FAIL: halt pipeline, report specific failures.
</step>
<step name="spawn_reviewer" if="complexity != micro">
**Phase 3: Reviewer Agent (Step 7)**
```
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔎 PHASE 3: REVIEWER
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
```
Spawn Reviewer agent with **adversarial stance**:
```
Task({
subagent_type: "general-purpose",
description: "Review story {{story_key}} code",
prompt: `
You are the ADVERSARIAL REVIEWER for story {{story_key}}.
<execution_context>
@patterns/security-checklist.md
@patterns/hospital-grade.md
@patterns/agent-completion.md
</execution_context>
<context>
Story: [inline story file content]
</context>
<objective>
Find problems. Be critical. Look for:
- Security vulnerabilities (CRITICAL)
- Logic bugs and edge cases (HIGH)
- Performance issues (MEDIUM)
- Code style issues (LOW)
</objective>
<constraints>
- Your goal is to FIND ISSUES
- Don't rubber-stamp
- Be thorough
</constraints>
<success_criteria>
- [ ] All new files reviewed
- [ ] Security checks completed
- [ ] Issues categorized by severity
- [ ] Return ## AGENT COMPLETE with issue list
</success_criteria>
`
})
```
**Wait for completion. Parse issue counts.**
</step>
<step name="spawn_fixer">
**Phase 4: Fixer Agent (Steps 8-9)**
```
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔧 PHASE 4: FIXER
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
```
Spawn Fixer agent:
```
Task({
subagent_type: "general-purpose",
description: "Fix issues in story {{story_key}}",
prompt: `
You are the FIXER agent for story {{story_key}}.
<execution_context>
@patterns/hospital-grade.md
@patterns/agent-completion.md
</execution_context>
<context>
Story: [inline story file content]
Review issues: [inline reviewer findings]
</context>
<objective>
Fix CRITICAL and HIGH issues:
1. Fix ALL CRITICAL issues (security)
2. Fix ALL HIGH issues (bugs)
3. Fix MEDIUM if time allows
4. Skip LOW (gold-plating)
5. Commit with descriptive message
</objective>
<constraints>
- DO NOT skip CRITICAL issues
- DO NOT update story checkboxes (orchestrator does this)
- DO NOT update sprint-status (orchestrator does this)
</constraints>
<success_criteria>
- [ ] All CRITICAL fixed
- [ ] All HIGH fixed
- [ ] Tests still pass
- [ ] Git commit created
- [ ] Return ## AGENT COMPLETE with fix summary
</success_criteria>
`
})
```
**Wait for completion. Parse commit hash and fix counts.**
</step>
<step name="reconcile_story">
**Phase 5: Orchestrator Reconciliation**
```
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔧 PHASE 5: RECONCILIATION (Orchestrator)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
```
**YOU (orchestrator) do this directly. No agent spawn.**
**Step 5.1: Get what was built**
```bash
git log -3 --oneline | grep "{{story_key}}"
git diff HEAD~1 --name-only | head -20
```
**Step 5.2: Read story file**
Use Read tool: `docs/sprint-artifacts/{{story_key}}.md`
**Step 5.3: Check off completed tasks**
For each task related to files changed, use Edit tool:
```
old_string: "- [ ] Task description"
new_string: "- [x] Task description"
```
**Step 5.4: Fill Dev Agent Record**
Use Edit tool to update Dev Agent Record section with:
- Agent Model: Claude Sonnet 4 (multi-agent pipeline)
- Implementation Date: {{date}}
- Files Created/Modified: [list from git diff]
- Tests Added: [count from Inspector]
- Completion Notes: [brief summary]
**Step 5.5: Verify updates**
```bash
CHECKED=$(grep -c "^- \[x\]" docs/sprint-artifacts/{{story_key}}.md)
if [ "$CHECKED" -eq 0 ]; then
echo "❌ BLOCKER: Zero checked tasks"
exit 1
fi
echo "✅ Verified: $CHECKED tasks checked"
```
If verification fails: fix using Edit, then re-verify.
</step>
<step name="final_verification">
**Final Quality Gate**
```bash
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "🔍 FINAL VERIFICATION"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
# 1. Git commit exists
git log --oneline -3 | grep "{{story_key}}" || { echo "❌ No commit"; exit 1; }
echo "✅ Git commit found"
# 2. Story tasks checked
CHECKED=$(grep -c "^- \[x\]" docs/sprint-artifacts/{{story_key}}.md)
[ "$CHECKED" -gt 0 ] || { echo "❌ No tasks checked"; exit 1; }
echo "✅ $CHECKED tasks checked"
# 3. Dev Agent Record filled
grep -A 3 "### Dev Agent Record" docs/sprint-artifacts/{{story_key}}.md | grep -q "202" || { echo "❌ Record not filled"; exit 1; }
echo "✅ Dev Agent Record filled"
echo ""
echo "✅ STORY COMPLETE"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
```
**Update sprint-status.yaml:**
Use Edit tool to change story status from `ready-for-dev` to `done`.
</step>
</process>
<failure_handling>
**Builder fails:** Don't spawn Inspector. Report failure.
**Inspector fails:** Don't spawn Reviewer. Report specific failures.
**Reviewer finds CRITICAL:** Fixer must fix (not optional).
**Fixer fails:** Report unfixed issues. Manual intervention needed.
**Reconciliation fails:** Fix using Edit tool. Re-verify.
</failure_handling>
<complexity_routing>
| Complexity | Agents | Notes |
|------------|--------|-------|
| micro | Builder → Inspector → Fixer | Skip Reviewer (low risk) |
| standard | Builder → Inspector → Reviewer → Fixer | Full pipeline |
| complex | Builder → Inspector → Reviewer (enhanced) → Fixer | Extra scrutiny |
</complexity_routing>
<success_criteria>
- [ ] All agents completed successfully
- [ ] Git commit exists for story
- [ ] Story file has checked tasks (count > 0)
- [ ] Dev Agent Record filled
- [ ] Sprint status updated to "done"
</success_criteria>

View File

@ -29,7 +29,7 @@ super_dev_settings:
fail_on_critical_issues: true fail_on_critical_issues: true
max_fix_iterations: 3 max_fix_iterations: 3
# Autonomous mode settings (passed from parent workflow like batch-super-dev) # Autonomous mode settings (passed from parent workflow like batch-stories)
auto_accept_gap_analysis: false # When true, skip gap analysis approval prompt auto_accept_gap_analysis: false # When true, skip gap analysis approval prompt
standalone: true standalone: true

View File

@ -71,11 +71,11 @@ Instead of main agent trying to execute workflow:
```typescript ```typescript
// OLD (doesn't work - I skip steps): // OLD (doesn't work - I skip steps):
Execute super-dev-pipeline for story X Execute story-full-pipeline for story X
// NEW (enforcement active): // NEW (enforcement active):
Task agent: workflow-executor Task agent: workflow-executor
Prompt: Execute super-dev-pipeline for story 18-4 Prompt: Execute story-full-pipeline for story 18-4
- Load ALL step files into context at start - Load ALL step files into context at start
- Execute steps 1-11 in exact order - Execute steps 1-11 in exact order
- Spawn Task agents when step requires it - Spawn Task agents when step requires it

View File

@ -1,6 +1,6 @@
# Agent Limitations in Batch Mode # Agent Limitations in Batch Mode
**CRITICAL:** Agents running in batch-super-dev have specific limitations. Understanding these prevents wasted time and sets correct expectations. **CRITICAL:** Agents running in batch-stories have specific limitations. Understanding these prevents wasted time and sets correct expectations.
--- ---
@ -93,7 +93,7 @@
## Pre-Batch Validation Checklist ## Pre-Batch Validation Checklist
**Before running /batch-super-dev, verify ALL selected stories:** **Before running /batch-stories, verify ALL selected stories:**
```bash ```bash
# 1. Check story files exist # 1. Check story files exist
@ -121,7 +121,7 @@ done
**If any checks fail:** **If any checks fail:**
1. Regenerate those stories: `/create-story-with-gap-analysis` 1. Regenerate those stories: `/create-story-with-gap-analysis`
2. Validate again 2. Validate again
3. THEN run batch-super-dev 3. THEN run batch-stories
--- ---
@ -150,7 +150,7 @@ done
**What it means:** Agent tried to create story but couldn't **What it means:** Agent tried to create story but couldn't
**Is this a bug?** ❌ NO - Agents can't create stories **Is this a bug?** ❌ NO - Agents can't create stories
**What to do:** **What to do:**
- Exit batch-super-dev - Exit batch-stories
- Manually run /create-story-with-gap-analysis - Manually run /create-story-with-gap-analysis
- Re-run batch after story created - Re-run batch after story created
@ -165,7 +165,7 @@ done
1. Plan epic → Identify stories → Create list 1. Plan epic → Identify stories → Create list
2. Generate stories: /create-story-with-gap-analysis (1-2 days) 2. Generate stories: /create-story-with-gap-analysis (1-2 days)
3. Validate stories: ./scripts/validate-all-stories.sh 3. Validate stories: ./scripts/validate-all-stories.sh
4. Execute stories: /batch-super-dev (parallel, fast) 4. Execute stories: /batch-stories (parallel, fast)
``` ```
### ✅ DO: Use Small Batches for Mixed Complexity ### ✅ DO: Use Small Batches for Mixed Complexity
@ -183,7 +183,7 @@ done
**Why it fails:** **Why it fails:**
``` ```
1. Create 20 skeleton files with just widget lists 1. Create 20 skeleton files with just widget lists
2. Run /batch-super-dev 2. Run /batch-stories
3. Expect agents to regenerate them 3. Expect agents to regenerate them
→ FAILS: Agents can't invoke /create-story workflow → FAILS: Agents can't invoke /create-story workflow
``` ```
@ -193,7 +193,7 @@ done
**Why it fails:** **Why it fails:**
``` ```
1. 10 proper BMAD stories + 10 skeletons 1. 10 proper BMAD stories + 10 skeletons
2. Run /batch-super-dev 2. Run /batch-stories
3. Expect batch to handle both 3. Expect batch to handle both
→ RESULT: 10 execute, 10 skipped (confusing) → RESULT: 10 execute, 10 skipped (confusing)
``` ```

View File

@ -9,9 +9,9 @@
## Critical Prerequisites ## Critical Prerequisites
> **⚠️ IMPORTANT: Read before running batch-super-dev!** > **⚠️ IMPORTANT: Read before running batch-stories!**
**BEFORE running batch-super-dev:** **BEFORE running batch-stories:**
### ✅ 1. All stories must be properly generated ### ✅ 1. All stories must be properly generated
@ -48,13 +48,13 @@ Required sections:
**What you might try:** **What you might try:**
``` ```
1. Create 20 skeleton story files (just headers + widget lists) 1. Create 20 skeleton story files (just headers + widget lists)
2. Run /batch-super-dev 2. Run /batch-stories
3. Expect agents to regenerate them 3. Expect agents to regenerate them
``` ```
**What happens:** **What happens:**
- Agents identify stories are incomplete - Agents identify stories are incomplete
- Agents correctly halt per super-dev-pipeline validation - Agents correctly halt per story-full-pipeline validation
- Stories get skipped (not regenerated) - Stories get skipped (not regenerated)
- You waste time - You waste time
@ -67,7 +67,7 @@ Required sections:
./scripts/validate-all-stories.sh ./scripts/validate-all-stories.sh
# 3. Execute (4-8 hours, parallel autonomous) # 3. Execute (4-8 hours, parallel autonomous)
/batch-super-dev /batch-stories
``` ```
See: `AGENT-LIMITATIONS.md` for full documentation on what agents can and cannot do. See: `AGENT-LIMITATIONS.md` for full documentation on what agents can and cannot do.
@ -76,7 +76,7 @@ See: `AGENT-LIMITATIONS.md` for full documentation on what agents can and cannot
## Overview ## Overview
Interactive batch workflow for processing multiple `ready-for-dev` stories sequentially or in parallel using the super-dev-pipeline with full quality gates. Interactive batch workflow for processing multiple `ready-for-dev` stories sequentially or in parallel using the story-full-pipeline with full quality gates.
**New in v1.2.0:** Smart Story Validation & Auto-Creation - validates story files, creates missing stories, regenerates invalid ones automatically. **New in v1.2.0:** Smart Story Validation & Auto-Creation - validates story files, creates missing stories, regenerates invalid ones automatically.
**New in v1.1.0:** Smart Story Reconciliation - automatically verifies story accuracy after each implementation. **New in v1.1.0:** Smart Story Reconciliation - automatically verifies story accuracy after each implementation.
@ -107,7 +107,7 @@ Interactive batch workflow for processing multiple `ready-for-dev` stories seque
- **Parallel:** Spawn Task agents to process stories concurrently (faster, autonomous) - **Parallel:** Spawn Task agents to process stories concurrently (faster, autonomous)
- Configurable parallelism: 2, 4, or all stories at once - Configurable parallelism: 2, 4, or all stories at once
4. **Full Quality Gates** (from super-dev-pipeline) 4. **Full Quality Gates** (from story-full-pipeline)
- Pre-gap analysis (validate story completeness) - Pre-gap analysis (validate story completeness)
- Test-driven implementation - Test-driven implementation
- Post-validation (verify requirements met) - Post-validation (verify requirements met)
@ -150,7 +150,7 @@ Before v1.2.0:
``` ```
User: "Process stories 3.1, 3.2, 3.3, 3.4" User: "Process stories 3.1, 3.2, 3.3, 3.4"
Workflow: "Story 3.3 file missing - please create it first" Workflow: "Story 3.3 file missing - please create it first"
User: Ctrl+C → /create-story → /batch-super-dev again User: Ctrl+C → /create-story → /batch-stories again
``` ```
After v1.2.0: After v1.2.0:
@ -232,7 +232,7 @@ validation:
### Example Session (v1.2.0) ### Example Session (v1.2.0)
``` ```
🤖 /batch-super-dev 🤖 /batch-stories
📊 Ready-for-Dev Stories (5) 📊 Ready-for-Dev Stories (5)
@ -398,7 +398,7 @@ sprint-status.yaml: done
```bash ```bash
# Process all ready-for-dev stories # Process all ready-for-dev stories
/batch-super-dev /batch-stories
# Follow prompts: # Follow prompts:
# 1. See list of ready stories # 1. See list of ready stories
@ -413,7 +413,7 @@ sprint-status.yaml: done
```bash ```bash
# Only process Epic 3 stories # Only process Epic 3 stories
/batch-super-dev filter_by_epic=3 /batch-stories filter_by_epic=3
``` ```
### Selection Syntax ### Selection Syntax
@ -444,7 +444,7 @@ All: all (processes all ready-for-dev stories)
## Workflow Configuration ## Workflow Configuration
**File:** `_bmad/bmm/workflows/4-implementation/batch-super-dev/workflow.yaml` **File:** `_bmad/bmm/workflows/4-implementation/batch-stories/workflow.yaml`
### Key Settings ### Key Settings
@ -503,7 +503,7 @@ reconciliation:
### 4. Process Stories ### 4. Process Stories
**Sequential Mode:** **Sequential Mode:**
- For each selected story: - For each selected story:
- Invoke super-dev-pipeline - Invoke story-full-pipeline
- Execute reconciliation (Step 4.5) - Execute reconciliation (Step 4.5)
- Report results - Report results
- Pause between stories - Pause between stories
@ -547,7 +547,7 @@ See: `step-4.5-reconcile-story-status.md` for detailed algorithm
### Batch Log ### Batch Log
**Location:** `docs/sprint-artifacts/batch-super-dev-{date}.log` **Location:** `docs/sprint-artifacts/batch-stories-{date}.log`
**Contains:** **Contains:**
- Start/end timestamps - Start/end timestamps
@ -628,7 +628,7 @@ See: `step-4.5-reconcile-story-status.md` for detailed algorithm
**Fix:** **Fix:**
1. Review listed stories manually 1. Review listed stories manually
2. Check Dev Agent Record has all required sections 2. Check Dev Agent Record has all required sections
3. Re-run super-dev-pipeline for problematic stories 3. Re-run story-full-pipeline for problematic stories
4. Manually reconcile checkboxes if needed 4. Manually reconcile checkboxes if needed
### Parallel Mode Hangs ### Parallel Mode Hangs
@ -713,24 +713,24 @@ See: `step-4.5-reconcile-story-status.md` for detailed algorithm
- Initial release - Initial release
- Interactive story selector - Interactive story selector
- Sequential and parallel execution modes - Sequential and parallel execution modes
- Integration with super-dev-pipeline - Integration with story-full-pipeline
- Batch summary and logging - Batch summary and logging
--- ---
## Related Workflows ## Related Workflows
- **super-dev-pipeline:** Individual story implementation (invoked by batch-super-dev) - **story-full-pipeline:** Individual story implementation (invoked by batch-stories)
- **create-story-with-gap-analysis:** Create new stories with codebase scan - **create-story-with-gap-analysis:** Create new stories with codebase scan
- **sprint-status:** View/update sprint status - **sprint-status:** View/update sprint status
- **multi-agent-review:** Standalone code review (part of super-dev-pipeline) - **multi-agent-review:** Standalone code review (part of story-full-pipeline)
--- ---
## Support ## Support
**Questions or Issues:** **Questions or Issues:**
- Check workflow logs: `docs/sprint-artifacts/batch-super-dev-*.log` - Check workflow logs: `docs/sprint-artifacts/batch-stories-*.log`
- Review reconciliation step: `step-4.5-reconcile-story-status.md` - Review reconciliation step: `step-4.5-reconcile-story-status.md`
- Check story file format: Ensure 12-section BMAD format - Check story file format: Ensure 12-section BMAD format
- Verify Dev Agent Record populated: Required for reconciliation - Verify Dev Agent Record populated: Required for reconciliation

View File

@ -47,7 +47,7 @@ Story 18-5:
### Add state file tracking: ### Add state file tracking:
```yaml ```yaml
# In batch-super-dev/workflow.yaml # In batch-stories/workflow.yaml
state_tracking: state_tracking:
enabled: true enabled: true
state_file: "{sprint_artifacts}/batch-execution-state-{batch_id}.yaml" state_file: "{sprint_artifacts}/batch-execution-state-{batch_id}.yaml"
@ -92,7 +92,7 @@ stories:
### Resume logic: ### Resume logic:
```bash ```bash
# At batch-super-dev start, check for existing state file # At batch-stories start, check for existing state file
state_file="{sprint_artifacts}/batch-execution-state-*.yaml" state_file="{sprint_artifacts}/batch-execution-state-*.yaml"
if ls $state_file 2>/dev/null; then if ls $state_file 2>/dev/null; then
@ -172,7 +172,7 @@ story_content=$(read_with_retry "$story_file") || {
## Implementation ## Implementation
Add to batch-super-dev Step 4-Sequential: Add to batch-stories Step 4-Sequential:
```xml ```xml
<substep n="4s-0" title="Check for previous execution state"> <substep n="4s-0" title="Check for previous execution state">
@ -204,7 +204,7 @@ Add to batch-super-dev Step 4-Sequential:
<try> <try>
<action>Read story file with retry</action> <action>Read story file with retry</action>
<action>Execute super-dev-pipeline</action> <action>Execute story-full-pipeline</action>
<action>Save state: story completed</action> <action>Save state: story completed</action>
</try> </try>
@ -236,7 +236,7 @@ Story 18-5: ❌ Crashed (state saved with error)
State file created: batch-execution-state-epic-18.yaml State file created: batch-execution-state-epic-18.yaml
User re-runs: /batch-super-dev User re-runs: /batch-stories
Workflow: "🔄 Found interrupted batch. Resume? (yes/no)" Workflow: "🔄 Found interrupted batch. Resume? (yes/no)"
User: "yes" User: "yes"

View File

@ -81,7 +81,7 @@ This workflow requires:
``` ```
Must show: "✅ All 12 sections present" Must show: "✅ All 12 sections present"
4. **Re-run batch-super-dev:** 4. **Re-run batch-stories:**
- Story will now be properly formatted - Story will now be properly formatted
- Can be executed in next batch run - Can be executed in next batch run
@ -132,7 +132,7 @@ This workflow requires:
**After completing these actions:** **After completing these actions:**
1. Validate all stories: ./scripts/validate-all-stories.sh 1. Validate all stories: ./scripts/validate-all-stories.sh
2. Re-run batch-super-dev for these stories 2. Re-run batch-stories for these stories
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
</output> </output>
</check> </check>
@ -220,14 +220,14 @@ fi
## Documentation Update ## Documentation Update
**Add to:** `_bmad/bmm/workflows/4-implementation/batch-super-dev/README.md` **Add to:** `_bmad/bmm/workflows/4-implementation/batch-stories/README.md`
```markdown ```markdown
# Batch Super-Dev Workflow # Batch Super-Dev Workflow
## Critical Prerequisites ## Critical Prerequisites
**BEFORE running batch-super-dev:** **BEFORE running batch-stories:**
1. ✅ **All stories must be properly generated** 1. ✅ **All stories must be properly generated**
- Run: `/create-story-with-gap-analysis` for each story - Run: `/create-story-with-gap-analysis` for each story
@ -252,13 +252,13 @@ fi
**What you might try:** **What you might try:**
``` ```
1. Create 20 skeleton story files (just headers + widget lists) 1. Create 20 skeleton story files (just headers + widget lists)
2. Run /batch-super-dev 2. Run /batch-stories
3. Expect agents to regenerate them 3. Expect agents to regenerate them
``` ```
**What happens:** **What happens:**
- Agents identify stories are incomplete - Agents identify stories are incomplete
- Agents correctly halt per super-dev-pipeline validation - Agents correctly halt per story-full-pipeline validation
- Stories get skipped (not regenerated) - Stories get skipped (not regenerated)
- You waste time - You waste time
@ -270,7 +270,7 @@ fi
**Solution:** **Solution:**
- Generate ALL stories manually FIRST: /create-story-with-gap-analysis - Generate ALL stories manually FIRST: /create-story-with-gap-analysis
- Validate: ./scripts/validate-all-stories.sh - Validate: ./scripts/validate-all-stories.sh
- THEN run batch: /batch-super-dev - THEN run batch: /batch-stories
### ❌ Mixed Story Quality ### ❌ Mixed Story Quality
@ -301,7 +301,7 @@ done
./scripts/validate-all-stories.sh ./scripts/validate-all-stories.sh
# 3. Execute (4-8 hours, parallel autonomous) # 3. Execute (4-8 hours, parallel autonomous)
/batch-super-dev /batch-stories
# Select all 5 stories # Select all 5 stories
# Choose 2-4 agents parallel # Choose 2-4 agents parallel
@ -325,13 +325,13 @@ done
**To apply these improvements:** **To apply these improvements:**
- [ ] Update `batch-super-dev/instructions.md` Step 2.5 (lines 82-99) - [ ] Update `batch-stories/instructions.md` Step 2.5 (lines 82-99)
- [ ] Add `batch-super-dev/AGENT-LIMITATIONS.md` (new file) - [ ] Add `batch-stories/AGENT-LIMITATIONS.md` (new file)
- [ ] Add `batch-super-dev/BATCH-BEST-PRACTICES.md` (new file) - [ ] Add `batch-stories/BATCH-BEST-PRACTICES.md` (new file)
- [ ] Update `batch-super-dev/README.md` with prerequisites - [ ] Update `batch-stories/README.md` with prerequisites
- [ ] Create `scripts/validate-all-stories.sh` (new script) - [ ] Create `scripts/validate-all-stories.sh` (new script)
- [ ] Add manual actions tracking to Step 5 summary - [ ] Add manual actions tracking to Step 5 summary
- [ ] Update super-dev-pipeline Step 1.4.5 with agent guidance - [ ] Update story-full-pipeline Step 1.4.5 with agent guidance
**Testing:** **Testing:**
- Try batch with mixed story quality → Should skip skeletons gracefully - Try batch with mixed story quality → Should skip skeletons gracefully

View File

@ -1,7 +1,7 @@
# Step 4.5: Story Reconciliation (Orchestrator-Driven) # Step 4.5: Story Reconciliation (Orchestrator-Driven)
**Version:** 2.1.0 **Version:** 2.1.0
**Execute:** AFTER super-dev-pipeline completes, BEFORE marking story done **Execute:** AFTER story-full-pipeline completes, BEFORE marking story done
**Who:** Orchestrator (YOU) - not an agent **Who:** Orchestrator (YOU) - not an agent
--- ---

View File

@ -1,7 +1,7 @@
# Batch Super-Dev v3.0 - Unified Workflow # Batch Super-Dev v3.0 - Unified Workflow
<purpose> <purpose>
Interactive story selector for batch implementation. Scan codebase for gaps, select stories, process with super-dev-pipeline, reconcile results. Interactive story selector for batch implementation. Scan codebase for gaps, select stories, process with story-full-pipeline, reconcile results.
**AKA:** "Mend the Gap" - Mind the gap between story requirements and reality, then mend it. **AKA:** "Mend the Gap" - Mind the gap between story requirements and reality, then mend it.
</purpose> </purpose>
@ -18,7 +18,7 @@ Orchestrator coordinates. Agents do implementation. Orchestrator does reconcilia
</philosophy> </philosophy>
<config> <config>
name: batch-super-dev name: batch-stories
version: 3.1.0 version: 3.1.0
modes: modes:
@ -37,7 +37,7 @@ defaults:
<execution_context> <execution_context>
@patterns/hospital-grade.md @patterns/hospital-grade.md
@patterns/agent-completion.md @patterns/agent-completion.md
@super-dev-pipeline/workflow.md @story-full-pipeline/workflow.md
</execution_context> </execution_context>
<process> <process>
@ -203,16 +203,16 @@ If missing, auto-create using greenfield workflow:
echo "✅ Prerequisites satisfied" echo "✅ Prerequisites satisfied"
``` ```
**Step B: Invoke super-dev-pipeline** **Step B: Invoke story-full-pipeline**
Use super-dev-pipeline workflow with: Use story-full-pipeline workflow with:
- mode: batch - mode: batch
- story_key: {{story_key}} - story_key: {{story_key}}
- complexity_level: {{complexity}} - complexity_level: {{complexity}}
**Step C: Reconcile Using Completion Artifacts (orchestrator does this directly)** **Step C: Reconcile Using Completion Artifacts (orchestrator does this directly)**
After super-dev-pipeline completes: After story-full-pipeline completes:
**C1. Load Fixer completion artifact:** **C1. Load Fixer completion artifact:**
```bash ```bash
@ -294,10 +294,10 @@ Task({
subagent_type: "general-purpose", subagent_type: "general-purpose",
description: "Implement {{story_key}}", description: "Implement {{story_key}}",
prompt: ` prompt: `
Execute super-dev-pipeline for story {{story_key}}. Execute story-full-pipeline for story {{story_key}}.
<execution_context> <execution_context>
@super-dev-pipeline/workflow.md @story-full-pipeline/workflow.md
</execution_context> </execution_context>
<context> <context>

View File

@ -228,7 +228,7 @@ Ready for implementation.
Next Steps: Next Steps:
1. Review story for accuracy 1. Review story for accuracy
2. Use /story-pipeline or /super-dev-pipeline to implement 2. Use /story-dev-only or /story-full-pipeline to implement
3. All context loaded and ready 3. All context loaded and ready
[N] Create next story [N] Create next story

View File

@ -101,7 +101,7 @@ Human-in-the-loop with approval at each step:
bmad build 1-4 bmad build 1-4
# Or invoke workflow directly # Or invoke workflow directly
claude -p "Load and execute: _bmad/bmm/workflows/4-implementation/story-pipeline/workflow.md claude -p "Load and execute: _bmad/bmm/workflows/4-implementation/story-dev-only/workflow.md
Story: 1-4" Story: 1-4"
``` ```
@ -121,7 +121,7 @@ Unattended execution for trusted stories:
bmad build 1-4 --batch bmad build 1-4 --batch
# Or use batch runner directly # Or use batch runner directly
./_bmad/bmm/workflows/4-implementation/story-pipeline/batch-runner.sh 1-4 ./_bmad/bmm/workflows/4-implementation/story-dev-only/batch-runner.sh 1-4
``` ```
Batch mode: Batch mode:
@ -148,7 +148,7 @@ Resume automatically:
## Directory Structure ## Directory Structure
``` ```
story-pipeline/ story-dev-only/
├── workflow.yaml # Configuration, agent mapping, quality gates ├── workflow.yaml # Configuration, agent mapping, quality gates
├── workflow.md # Interactive mode orchestration ├── workflow.md # Interactive mode orchestration
├── batch-runner.sh # Batch mode runner script ├── batch-runner.sh # Batch mode runner script
@ -178,7 +178,7 @@ story-pipeline/
### workflow.yaml ### workflow.yaml
```yaml ```yaml
name: story-pipeline name: story-dev-only
version: "2.0" version: "2.0"
description: "Single-session story implementation with step-file loading" description: "Single-session story implementation with step-file loading"

View File

@ -3,7 +3,7 @@ name: 'step-01-init'
description: 'Initialize story pipeline: load context, detect mode, cache documents' description: 'Initialize story pipeline: load context, detect mode, cache documents'
# Path Definitions # Path Definitions
workflow_path: '{project-root}/_bmad/bmm/workflows/4-implementation/story-pipeline' workflow_path: '{project-root}/_bmad/bmm/workflows/4-implementation/story-dev-only'
# File References # File References
thisStepFile: '{workflow_path}/steps/step-01-init.md' thisStepFile: '{workflow_path}/steps/step-01-init.md'

View File

@ -3,7 +3,7 @@ name: 'step-01b-resume'
description: 'Resume pipeline from checkpoint after failure or interruption' description: 'Resume pipeline from checkpoint after failure or interruption'
# Path Definitions # Path Definitions
workflow_path: '{project-root}/_bmad/bmm/workflows/4-implementation/story-pipeline' workflow_path: '{project-root}/_bmad/bmm/workflows/4-implementation/story-dev-only'
# File References # File References
thisStepFile: '{workflow_path}/steps/step-01b-resume.md' thisStepFile: '{workflow_path}/steps/step-01b-resume.md'

View File

@ -3,7 +3,7 @@ name: 'step-02-create-story'
description: 'Create detailed story file from epic definition with research' description: 'Create detailed story file from epic definition with research'
# Path Definitions # Path Definitions
workflow_path: '{project-root}/_bmad/bmm/workflows/4-implementation/story-pipeline' workflow_path: '{project-root}/_bmad/bmm/workflows/4-implementation/story-dev-only'
# File References # File References
thisStepFile: '{workflow_path}/steps/step-02-create-story.md' thisStepFile: '{workflow_path}/steps/step-02-create-story.md'

View File

@ -3,7 +3,7 @@ name: 'step-03-validate-story'
description: 'Adversarial validation of story completeness and quality' description: 'Adversarial validation of story completeness and quality'
# Path Definitions # Path Definitions
workflow_path: '{project-root}/_bmad/bmm/workflows/4-implementation/story-pipeline' workflow_path: '{project-root}/_bmad/bmm/workflows/4-implementation/story-dev-only'
# File References # File References
thisStepFile: '{workflow_path}/steps/step-03-validate-story.md' thisStepFile: '{workflow_path}/steps/step-03-validate-story.md'

View File

@ -3,7 +3,7 @@ name: 'step-04-atdd'
description: 'Generate failing acceptance tests before implementation (RED phase)' description: 'Generate failing acceptance tests before implementation (RED phase)'
# Path Definitions # Path Definitions
workflow_path: '{project-root}/_bmad/bmm/workflows/4-implementation/story-pipeline' workflow_path: '{project-root}/_bmad/bmm/workflows/4-implementation/story-dev-only'
# File References # File References
thisStepFile: '{workflow_path}/steps/step-04-atdd.md' thisStepFile: '{workflow_path}/steps/step-04-atdd.md'

View File

@ -3,7 +3,7 @@ name: 'step-05-implement'
description: 'Implement story to make tests pass (GREEN phase)' description: 'Implement story to make tests pass (GREEN phase)'
# Path Definitions # Path Definitions
workflow_path: '{project-root}/_bmad/bmm/workflows/4-implementation/story-pipeline' workflow_path: '{project-root}/_bmad/bmm/workflows/4-implementation/story-dev-only'
# File References # File References
thisStepFile: '{workflow_path}/steps/step-05-implement.md' thisStepFile: '{workflow_path}/steps/step-05-implement.md'

View File

@ -3,7 +3,7 @@ name: 'step-05b-post-validation'
description: 'Verify completed tasks against codebase reality (catch false positives)' description: 'Verify completed tasks against codebase reality (catch false positives)'
# Path Definitions # Path Definitions
workflow_path: '{project-root}/_bmad/bmm/workflows/4-implementation/story-pipeline' workflow_path: '{project-root}/_bmad/bmm/workflows/4-implementation/story-dev-only'
# File References # File References
thisStepFile: '{workflow_path}/steps/step-05b-post-validation.md' thisStepFile: '{workflow_path}/steps/step-05b-post-validation.md'

View File

@ -3,7 +3,7 @@ name: 'step-06-code-review'
description: 'Adversarial code review finding 3-10 specific issues' description: 'Adversarial code review finding 3-10 specific issues'
# Path Definitions # Path Definitions
workflow_path: '{project-root}/_bmad/bmm/workflows/4-implementation/story-pipeline' workflow_path: '{project-root}/_bmad/bmm/workflows/4-implementation/story-dev-only'
# File References # File References
thisStepFile: '{workflow_path}/steps/step-06-code-review.md' thisStepFile: '{workflow_path}/steps/step-06-code-review.md'

View File

@ -3,7 +3,7 @@ name: 'step-07-complete'
description: 'Update sprint status and create git commit' description: 'Update sprint status and create git commit'
# Path Definitions # Path Definitions
workflow_path: '{project-root}/_bmad/bmm/workflows/4-implementation/story-pipeline' workflow_path: '{project-root}/_bmad/bmm/workflows/4-implementation/story-dev-only'
# File References # File References
thisStepFile: '{workflow_path}/steps/step-07-complete.md' thisStepFile: '{workflow_path}/steps/step-07-complete.md'
@ -89,7 +89,7 @@ stories:
code_reviewed: true code_reviewed: true
issues_found: {count} issues_found: {count}
issues_fixed: {count} issues_fixed: {count}
pipeline_version: "story-pipeline-v2.0" pipeline_version: "story-dev-only-v2.0"
``` ```
### 4. Stage Git Changes ### 4. Stage Git Changes
@ -119,7 +119,7 @@ feat(epic-{epic_num}): complete story {story_id}
- Code reviewed: {issues_found} issues found and fixed - Code reviewed: {issues_found} issues found and fixed
Story: {story_title} Story: {story_title}
Pipeline: story-pipeline-v2.0 Pipeline: story-dev-only-v2.0
🤖 Generated with BMAD Story Pipeline 🤖 Generated with BMAD Story Pipeline

View File

@ -3,7 +3,7 @@ name: 'step-08-summary'
description: 'Generate audit trail and pipeline summary report' description: 'Generate audit trail and pipeline summary report'
# Path Definitions # Path Definitions
workflow_path: '{project-root}/_bmad/bmm/workflows/4-implementation/story-pipeline' workflow_path: '{project-root}/_bmad/bmm/workflows/4-implementation/story-dev-only'
# File References # File References
thisStepFile: '{workflow_path}/steps/step-08-summary.md' thisStepFile: '{workflow_path}/steps/step-08-summary.md'
@ -48,7 +48,7 @@ Create: `{auditFile}`
```yaml ```yaml
--- ---
audit_version: "1.0" audit_version: "1.0"
pipeline: "story-pipeline-v2.0" pipeline: "story-dev-only-v2.0"
story_id: "{story_id}" story_id: "{story_id}"
epic_num: {epic_num} epic_num: {epic_num}
--- ---

View File

@ -1,5 +1,5 @@
--- ---
name: story-pipeline name: story-dev-only
description: Automated story development pipeline with token-efficient step-file architecture. Single-session orchestration replacing multiple Claude calls. description: Automated story development pipeline with token-efficient step-file architecture. Single-session orchestration replacing multiple Claude calls.
web_bundle: true web_bundle: true
--- ---
@ -112,7 +112,7 @@ Load and cache these documents (read once, use across steps):
### 4. First Step Execution ### 4. First Step Execution
Load, read the full file and then execute: Load, read the full file and then execute:
`{project-root}/_bmad/bmm/workflows/4-implementation/story-pipeline/steps/step-01-init.md` `{project-root}/_bmad/bmm/workflows/4-implementation/story-dev-only/steps/step-01-init.md`
--- ---

View File

@ -8,10 +8,10 @@
```bash ```bash
# Use v2.0 for a story # Use v2.0 for a story
/super-dev-pipeline mode=multi_agent story_key=17-10 /story-full-pipeline mode=multi_agent story_key=17-10
# Use v1.x (fallback) # Use v1.x (fallback)
/super-dev-pipeline mode=single_agent story_key=17-10 /story-full-pipeline mode=single_agent story_key=17-10
``` ```
--- ---
@ -107,7 +107,7 @@ Separate agents for each phase:
## Files in This Directory ## Files in This Directory
``` ```
super-dev-pipeline/ story-full-pipeline/
├── README.md (this file) ├── README.md (this file)
├── workflow.yaml (configuration) ├── workflow.yaml (configuration)
├── workflow.md (complete documentation) ├── workflow.md (complete documentation)

View File

@ -1,38 +1,47 @@
# Super-Dev-Pipeline v3.0 - Unified Workflow # Super-Dev-Pipeline v3.1 - Token-Efficient Multi-Agent Pipeline
<purpose> <purpose>
Implement a story using 4 independent agents with orchestrator-driven reconciliation. Implement a story using parallel verification agents with Builder context reuse.
Each agent has single responsibility. No agent validates its own work. Each agent has single responsibility. Builder fixes issues in its own context (50-70% token savings).
Orchestrator handles bookkeeping (story file updates, verification). Orchestrator handles bookkeeping (story file updates, verification).
</purpose> </purpose>
<philosophy> <philosophy>
**Agents do creative work. Orchestrator does bookkeeping.** **Token-Efficient Multi-Agent Pipeline**
- Builder implements (creative) - Builder implements (creative, context preserved)
- Inspector validates (verification) - Inspector + Reviewers validate in parallel (verification, fresh context)
- Reviewer finds issues (adversarial) - Builder fixes issues (creative, reuses context - 50-70% token savings)
- Fixer resolves issues (creative) - Inspector re-checks (verification, quick check)
- Orchestrator reconciles story file (mechanical) - Orchestrator reconciles story file (mechanical)
Trust but verify. Fresh context per phase. Adversarial review. **Key Innovation:** Resume Builder instead of spawning fresh Fixer.
Builder already knows the codebase - just needs to fix specific issues.
Trust but verify. Fresh context for verification. Reuse context for fixes.
</philosophy> </philosophy>
<config> <config>
name: super-dev-pipeline name: story-full-pipeline
version: 3.0.0 version: 3.1.0
execution_mode: multi_agent execution_mode: multi_agent
agents: phases:
builder: {steps: 1-4, trust: low, timeout: 60min} phase_1: Builder (saves agent_id)
inspector: {steps: 5-6, trust: medium, fresh_context: true, timeout: 30min} phase_2: [Inspector + N Reviewers] in parallel (N = 1/2/3 based on complexity)
reviewer: {steps: 7, trust: high, adversarial: true, timeout: 30min} phase_3: Resume Builder with all findings (reuses context)
fixer: {steps: 8-9, trust: medium, timeout: 40min} phase_4: Inspector re-check (quick verification)
phase_5: Orchestrator reconciliation
complexity_routing: reviewer_counts:
micro: {skip: [reviewer], description: "Low-risk stories"} micro: 1 reviewer (security only)
standard: {skip: [], description: "Normal stories"} standard: 2 reviewers (security, performance)
complex: {skip: [], enhanced_review: true, description: "High-risk stories"} complex: 3 reviewers (security, performance, code quality)
token_efficiency:
- Phase 2 agents spawn in parallel (same cost, faster)
- Phase 3 resumes Builder (50-70% token savings vs fresh Fixer)
- Phase 4 Inspector only (no full re-review)
</config> </config>
<execution_context> <execution_context>
@ -42,109 +51,13 @@ complexity_routing:
<process> <process>
<verification_checklist> <step name="load_story" priority="first">
## Implementation Execution Checklist Load and validate the story file.
**Story {{story_key}} requires these exact steps (cannot skip):** \`\`\`bash
### Prerequisites (Auto-Fixed)
- [ ] **Step 0.1:** Story file exists (auto-create if missing)
- [ ] **Step 0.2:** Gap analysis complete (auto-run if missing)
### Phase 1: Builder (Steps 1-4)
- [ ] **Step 1.1:** Builder agent spawned
- [ ] **Step 1.2:** Builder creates completion artifact
- [ ] **Step 1.3:** Verify artifact exists (file check)
- [ ] **Step 1.4:** Verify claimed files exist
### Phase 2: Inspector (Steps 5-6)
- [ ] **Step 2.1:** Inspector agent spawned (fresh context)
- [ ] **Step 2.2:** Inspector runs all quality checks
- [ ] **Step 2.3:** Inspector creates completion artifact
- [ ] **Step 2.4:** Verify PASS verdict
### Phase 3: Reviewer (Step 7) [Skip if micro complexity]
- [ ] **Step 3.1:** Reviewer agent spawned (adversarial)
- [ ] **Step 3.2:** Reviewer finds issues
- [ ] **Step 3.3:** Reviewer creates completion artifact
- [ ] **Step 3.4:** Categorize issues (CRITICAL/HIGH/MEDIUM/LOW)
### Phase 4: Fixer (Steps 8-9)
- [ ] **Step 4.1:** Fixer agent spawned
- [ ] **Step 4.2:** Fixer resolves CRITICAL + HIGH issues
- [ ] **Step 4.3:** Fixer creates completion artifact
- [ ] **Step 4.4:** Fixer commits changes
- [ ] **Step 4.5:** Verify git commit exists
### Phase 5: Reconciliation (Orchestrator)
- [ ] **Step 5.1:** Load Fixer completion artifact
- [ ] **Step 5.2:** Parse JSON for structured data
- [ ] **Step 5.3:** Update story file tasks (check off completed)
- [ ] **Step 5.4:** Fill Dev Agent Record
- [ ] **Step 5.5:** Verify story file updated (bash check)
### Final Verification
- [ ] **Step 6.1:** Git commit exists for story
- [ ] **Step 6.2:** Story has checked tasks (count > 0)
- [ ] **Step 6.3:** Dev Agent Record filled
- [ ] **Step 6.4:** Sprint status updated to "done"
**If any step fails:**
- HALT immediately
- Report which step failed
- Fix before proceeding
- Cannot skip steps
</verification_checklist>
<step name="ensure_prerequisites" priority="first">
**AUTO-FIX MISSING PREREQUISITES**
```bash
STORY_FILE="docs/sprint-artifacts/{{story_key}}.md" STORY_FILE="docs/sprint-artifacts/{{story_key}}.md"
[ -f "$STORY_FILE" ] || { echo "ERROR: Story file not found"; exit 1; }
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" \`\`\`
echo "🔍 CHECKING PREREQUISITES"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
```
**Check 1: Story file exists?**
```bash
if [ ! -f "$STORY_FILE" ]; then
echo "⚠️ Story file not found, creating it..."
fi
```
If story file missing:
- Use Skill tool to invoke: `/bmad_bmm_create-story {{story_key}}`
- Wait for completion
- Verify file created: `[ -f "$STORY_FILE" ] || exit 1`
```bash
echo "✅ Story file exists: $STORY_FILE"
```
**Check 2: Gap analysis complete?**
```bash
GAP_COUNT=$(grep -c "^✅\|^❌" "$STORY_FILE" || echo "0")
if [ "$GAP_COUNT" -eq 0 ]; then
echo "⚠️ Gap analysis missing, running it..."
fi
```
If gap analysis missing:
- Use Skill tool to invoke: `/bmad_bmm_gap-analysis {{story_key}}`
- Wait for completion
- Verify markers exist: `GAP_COUNT=$(grep -c "^✅\|^❌" "$STORY_FILE")`
- If still 0: exit 1 (can't auto-fix)
```bash
echo "✅ Gap analysis complete: $GAP_COUNT markers found"
echo "✅ All prerequisites satisfied"
echo ""
```
**Load story metadata:**
Use Read tool on the story file. Parse: Use Read tool on the story file. Parse:
- Complexity level (micro/standard/complex) - Complexity level (micro/standard/complex)
@ -157,420 +70,146 @@ Determine which agents to spawn based on complexity routing.
<step name="spawn_builder"> <step name="spawn_builder">
**Phase 1: Builder Agent (Steps 1-4)** **Phase 1: Builder Agent (Steps 1-4)**
``` \`\`\`
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔨 PHASE 1: BUILDER 🔨 PHASE 1: BUILDER
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
``` \`\`\`
Spawn Builder agent: Spawn Builder agent and save agent_id for later resume.
``` **CRITICAL: Save Builder's agent_id for later resume**
Task({
subagent_type: "general-purpose",
description: "Implement story {{story_key}}",
prompt: `
You are the BUILDER agent for story {{story_key}}.
<execution_context> \`\`\`
@patterns/hospital-grade.md BUILDER_AGENT_ID={{agent_id_from_task_result}}
@patterns/tdd.md echo "Builder agent: $BUILDER_AGENT_ID"
@patterns/agent-completion.md \`\`\`
</execution_context>
<context> Wait for completion. Parse structured output. Verify files exist.
Story: [inline story file content]
</context>
<objective> If files missing or status FAILED: halt pipeline.
Implement the story requirements:
1. Load and understand requirements
2. Analyze what exists vs needed
3. Write tests first (TDD)
4. Implement production code
</objective>
<constraints>
- DO NOT validate your own work
- DO NOT review your code
- DO NOT update story checkboxes
- DO NOT commit changes
</constraints>
<success_criteria>
- [ ] Tests written for all requirements
- [ ] Production code implements tests
- [ ] Return ## AGENT COMPLETE with file lists
</success_criteria>
`
})
```
**Wait for completion.**
**VERIFICATION GATE: Builder Completion**
```bash
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "🔍 VERIFYING BUILDER COMPLETION"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
# Check completion artifact exists
COMPLETION_FILE="docs/sprint-artifacts/completions/{{story_key}}-builder.json"
if [ ! -f "$COMPLETION_FILE" ]; then
echo ""
echo "❌ BLOCKER: Builder failed to create completion artifact"
echo "Expected: $COMPLETION_FILE"
echo ""
echo "Pipeline halted. Builder must create completion.json"
exit 1
fi
echo "✅ Completion artifact found"
# Verify files claimed in artifact actually exist
echo "Verifying claimed files..."
# Parse files from JSON and verify existence
# (Simplified - orchestrator will do full JSON parsing)
FILES_MISSING=0
while IFS= read -r file; do
if [ ! -f "$file" ]; then
echo "❌ MISSING: $file"
FILES_MISSING=$((FILES_MISSING + 1))
else
echo "✅ Found: $file"
fi
done < <(grep -o '"[^"]*\.\(ts\|tsx\|js\|jsx\)"' "$COMPLETION_FILE" | tr -d '"')
if [ "$FILES_MISSING" -gt 0 ]; then
echo ""
echo "❌ BLOCKER: $FILES_MISSING files missing"
echo "Builder claimed to create files that don't exist"
exit 1
fi
echo "✅ All claimed files verified"
echo ""
```
If verification fails: halt pipeline.
</step> </step>
<step name="spawn_inspector"> <step name="spawn_verification_parallel">
**Phase 2: Inspector Agent (Steps 5-6)** **Phase 2: Parallel Verification (Inspector + Reviewers)**
``` \`\`\`
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔍 PHASE 2: INSPECTOR 🔍 PHASE 2: PARALLEL VERIFICATION
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
``` \`\`\`
Spawn Inspector agent with **fresh context** (no Builder knowledge): **CRITICAL: Spawn ALL verification agents in ONE message (parallel execution)**
``` Determine reviewer count based on complexity:
Task({ \`\`\`
subagent_type: "general-purpose", if complexity == "micro": REVIEWER_COUNT = 1
description: "Validate story {{story_key}} implementation", if complexity == "standard": REVIEWER_COUNT = 2
prompt: ` if complexity == "complex": REVIEWER_COUNT = 3
You are the INSPECTOR agent for story {{story_key}}. \`\`\`
<execution_context> Spawn Inspector + N Reviewers in single message. Wait for ALL agents to complete. Collect findings.
@patterns/verification.md
@patterns/hospital-grade.md
@patterns/agent-completion.md
</execution_context>
<context> Aggregate all findings from Inspector + Reviewers.
Story: [inline story file content]
</context>
<objective>
Independently verify the implementation:
1. Verify files exist and have content
2. Run type-check, lint, build
3. Run tests yourself
4. Give honest PASS/FAIL verdict
</objective>
<constraints>
- You have NO KNOWLEDGE of what Builder did
- Run all checks yourself
- Don't trust any claims
</constraints>
<success_criteria>
- [ ] All files verified to exist
- [ ] Type check passes (0 errors)
- [ ] Lint passes (0 warnings)
- [ ] Tests pass
- [ ] Return ## AGENT COMPLETE with evidence
</success_criteria>
`
})
```
**Wait for completion. Parse verdict.**
If FAIL: halt pipeline, report specific failures.
</step> </step>
<step name="spawn_reviewer" if="complexity != micro"> <step name="resume_builder_with_findings">
**Phase 3: Reviewer Agent (Step 7)** **Phase 3: Resume Builder with All Findings**
``` \`\`\`
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔎 PHASE 3: REVIEWER 🔧 PHASE 3: RESUME BUILDER (Fix Issues)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
``` \`\`\`
Spawn Reviewer agent with **adversarial stance**: **CRITICAL: Resume Builder agent (reuses context!)**
``` Use Task tool with `resume: "{{BUILDER_AGENT_ID}}"` parameter.
Task({
subagent_type: "general-purpose",
description: "Review story {{story_key}} code",
prompt: `
You are the ADVERSARIAL REVIEWER for story {{story_key}}.
<execution_context> Builder receives all consolidated findings and fixes:
@patterns/security-checklist.md 1. ALL CRITICAL issues (security, blockers)
@patterns/hospital-grade.md 2. ALL HIGH issues (bugs, logic errors)
@patterns/agent-completion.md 3. MEDIUM if quick (<30 min total)
</execution_context>
<context>
Story: [inline story file content]
</context>
<objective>
Find problems. Be critical. Look for:
- Security vulnerabilities (CRITICAL)
- Logic bugs and edge cases (HIGH)
- Performance issues (MEDIUM)
- Code style issues (LOW)
</objective>
<constraints>
- Your goal is to FIND ISSUES
- Don't rubber-stamp
- Be thorough
</constraints>
<success_criteria>
- [ ] All new files reviewed
- [ ] Security checks completed
- [ ] Issues categorized by severity
- [ ] Return ## AGENT COMPLETE with issue list
</success_criteria>
`
})
```
**Wait for completion. Parse issue counts.**
</step>
<step name="spawn_fixer">
**Phase 4: Fixer Agent (Steps 8-9)**
```
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔧 PHASE 4: FIXER
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
```
Spawn Fixer agent:
```
Task({
subagent_type: "general-purpose",
description: "Fix issues in story {{story_key}}",
prompt: `
You are the FIXER agent for story {{story_key}}.
<execution_context>
@patterns/hospital-grade.md
@patterns/agent-completion.md
</execution_context>
<context>
Story: [inline story file content]
Review issues: [inline reviewer findings]
</context>
<objective>
Fix CRITICAL and HIGH issues:
1. Fix ALL CRITICAL issues (security)
2. Fix ALL HIGH issues (bugs)
3. Fix MEDIUM if time allows
4. Skip LOW (gold-plating) 4. Skip LOW (gold-plating)
5. Commit with descriptive message 5. Commit with descriptive message
</objective>
<constraints> Wait for completion. Parse commit hash and fix counts.
- DO NOT skip CRITICAL issues </step>
- DO NOT update story checkboxes (orchestrator does this)
- DO NOT update sprint-status (orchestrator does this)
</constraints>
<success_criteria> <step name="inspector_recheck">
- [ ] All CRITICAL fixed **Phase 4: Quick Inspector Re-Check**
- [ ] All HIGH fixed
- [ ] Tests still pass
- [ ] Git commit created
- [ ] Return ## AGENT COMPLETE with fix summary
</success_criteria>
`
})
```
**Wait for completion. Parse commit hash and fix counts.** \`\`\`
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅ PHASE 4: RE-VERIFICATION
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
\`\`\`
Spawn Inspector only (not full review). Quick functional verification.
If FAIL: Resume Builder again with new issues.
If PASS: Proceed to reconciliation.
</step> </step>
<step name="reconcile_story"> <step name="reconcile_story">
**Phase 5: Orchestrator Reconciliation** **Phase 5: Orchestrator Reconciliation**
``` \`\`\`
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔧 PHASE 5: RECONCILIATION (Orchestrator) 🔧 PHASE 5: RECONCILIATION (Orchestrator)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
``` \`\`\`
**YOU (orchestrator) do this directly. No agent spawn.** **YOU (orchestrator) do this directly. No agent spawn.**
**Step 5.1: Verify completion artifact exists** 1. Get what was built (git log, git diff)
```bash 2. Read story file
FIXER_COMPLETION="docs/sprint-artifacts/completions/{{story_key}}-fixer.json" 3. Check off completed tasks (Edit tool)
4. Fill Dev Agent Record with pipeline details
if [ ! -f "$FIXER_COMPLETION" ]; then 5. Verify updates (grep task checkboxes)
echo "❌ BLOCKER: Fixer completion artifact missing" 6. Update sprint-status.yaml to "done"
echo "Cannot reconcile without completion data"
exit 1
fi
echo "✅ Completion artifact found"
```
**Step 5.2: Load completion data**
Use Read tool on the Fixer completion artifact:
- `docs/sprint-artifacts/completions/{{story_key}}-fixer.json`
Parse JSON to extract:
- files_modified array
- files_created array (from Builder artifact if needed)
- git_commit hash
- quality_checks results
- tests counts
**Step 5.3: Read story file**
Use Read tool: `docs/sprint-artifacts/{{story_key}}.md`
**Step 5.4: Check off completed tasks**
For each task in the story:
- Match task description to files in completion artifact
- If file mentioned in task was created/modified, check off task
- Use Edit tool to change `- [ ]` to `- [x]`
**Step 5.5: Fill Dev Agent Record**
Use Edit tool to update Dev Agent Record section with data from completion.json:
```markdown
### Dev Agent Record
**Implementation Date:** {{timestamp from completion.json}}
**Agent Model:** Claude Sonnet 4.5 (multi-agent pipeline)
**Git Commit:** {{git_commit from completion.json}}
**Files Created:**
{{files_created from Builder completion.json}}
**Files Modified:**
{{files_modified from Fixer completion.json}}
**Tests:**
- Passing: {{tests.passing from Fixer completion.json}}
- Total: {{tests.total from Fixer completion.json}}
- Coverage: {{tests.coverage from Fixer completion.json}}%
**Quality Checks:**
{{quality_checks from Fixer completion.json}}
**Issues Fixed:**
{{fixes_applied from Fixer completion.json}}
```
**Step 5.6: Verify updates**
```bash
CHECKED=$(grep -c "^- \[x\]" docs/sprint-artifacts/{{story_key}}.md)
if [ "$CHECKED" -eq 0 ]; then
echo "❌ BLOCKER: Zero checked tasks"
echo "Orchestrator failed to update story file"
exit 1
fi
echo "✅ Verified: $CHECKED tasks checked"
# Verify Dev Agent Record has timestamp
grep -A 10 "### Dev Agent Record" docs/sprint-artifacts/{{story_key}}.md | grep -q "202" || {
echo "❌ BLOCKER: Dev Agent Record not filled"
exit 1
}
echo "✅ Dev Agent Record filled"
```
If verification fails: fix using Edit, then re-verify.
</step> </step>
<step name="final_verification"> <step name="final_verification">
**Final Quality Gate** **Final Quality Gate**
```bash Verify:
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" 1. Git commit exists
echo "🔍 FINAL VERIFICATION" 2. Story tasks checked (count > 0)
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" 3. Dev Agent Record filled
4. Sprint status updated
# 1. Git commit exists If verification fails: fix using Edit, then re-verify.
git log --oneline -3 | grep "{{story_key}}" || { echo "❌ No commit"; exit 1; }
echo "✅ Git commit found"
# 2. Story tasks checked
CHECKED=$(grep -c "^- \[x\]" docs/sprint-artifacts/{{story_key}}.md)
[ "$CHECKED" -gt 0 ] || { echo "❌ No tasks checked"; exit 1; }
echo "✅ $CHECKED tasks checked"
# 3. Dev Agent Record filled
grep -A 3 "### Dev Agent Record" docs/sprint-artifacts/{{story_key}}.md | grep -q "202" || { echo "❌ Record not filled"; exit 1; }
echo "✅ Dev Agent Record filled"
echo ""
echo "✅ STORY COMPLETE"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
```
**Update sprint-status.yaml:**
Use Edit tool to change story status from `ready-for-dev` to `done`.
</step> </step>
</process> </process>
<failure_handling> <failure_handling>
**Builder fails:** Don't spawn Inspector. Report failure. **Builder fails:** Don't spawn verification. Report failure and halt.
**Inspector fails:** Don't spawn Reviewer. Report specific failures. **Inspector fails (Phase 2):** Still run Reviewers in parallel, collect all findings together.
**Reviewer finds CRITICAL:** Fixer must fix (not optional). **Inspector fails (Phase 4):** Resume Builder again with new issues (iterative fix loop).
**Fixer fails:** Report unfixed issues. Manual intervention needed. **Builder resume fails:** Report unfixed issues. Manual intervention needed.
**Reconciliation fails:** Fix using Edit tool. Re-verify. **Reconciliation fails:** Fix using Edit tool. Re-verify checkboxes.
</failure_handling> </failure_handling>
<complexity_routing> <complexity_routing>
| Complexity | Agents | Notes | | Complexity | Pipeline | Reviewers | Total Phase 2 Agents |
|------------|--------|-------| |------------|----------|-----------|---------------------|
| micro | Builder → Inspector → Fixer | Skip Reviewer (low risk) | | micro | Builder → [Inspector + 1 Reviewer] → Resume Builder → Inspector recheck | 1 (security) | 2 agents |
| standard | Builder → Inspector → Reviewer → Fixer | Full pipeline | | standard | Builder → [Inspector + 2 Reviewers] → Resume Builder → Inspector recheck | 2 (security, performance) | 3 agents |
| complex | Builder → Inspector → Reviewer (enhanced) → Fixer | Extra scrutiny | | complex | Builder → [Inspector + 3 Reviewers] → Resume Builder → Inspector recheck | 3 (security, performance, quality) | 4 agents |
**Key Improvement:** All verification agents spawn in parallel (single message, faster execution).
**Token Savings:** Builder resume in Phase 3 saves 50-70% tokens vs spawning fresh Fixer.
</complexity_routing> </complexity_routing>
<success_criteria> <success_criteria>
- [ ] All agents completed successfully - [ ] Builder spawned and agent_id saved
- [ ] All verification agents completed in parallel
- [ ] Builder resumed with consolidated findings
- [ ] Inspector recheck passed
- [ ] Git commit exists for story - [ ] Git commit exists for story
- [ ] Story file has checked tasks (count > 0) - [ ] Story file has checked tasks (count > 0)
- [ ] Dev Agent Record filled - [ ] Dev Agent Record filled with all phases
- [ ] Sprint status updated to "done" - [ ] Sprint status updated to "done"
</success_criteria> </success_criteria>