diff --git a/docs/ENTERPRISE-GITHUB-INTEGRATION.md b/docs/ENTERPRISE-GITHUB-INTEGRATION.md index cf0adfd0..d09914ad 100644 --- a/docs/ENTERPRISE-GITHUB-INTEGRATION.md +++ b/docs/ENTERPRISE-GITHUB-INTEGRATION.md @@ -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 // Integrated into step-03-implement.md @@ -270,8 +270,8 @@ async function verifyLockBeforeTask(storyKey) { **Files to Modify**: 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` -3. `src/modules/bmm/workflows/4-implementation/batch-super-dev/step-4.5-reconcile-story-status.md` +2. `src/modules/bmm/workflows/4-implementation/story-full-pipeline/steps/step-03-implement.md` +3. `src/modules/bmm/workflows/4-implementation/batch-stories/step-4.5-reconcile-story-status.md` **Add After Task Completion**: @@ -391,8 +391,8 @@ Result: **Files to Modify**: -1. `super-dev-pipeline/steps/step-06-complete.md` - Add PR creation -2. Add new: `super-dev-pipeline/steps/step-07-sync-github.md` +1. `story-full-pipeline/steps/step-06-complete.md` - Add PR creation +2. Add new: `story-full-pipeline/steps/step-07-sync-github.md` **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 │ │ └─ Verify lock held (HALT if lost) │ @@ -750,9 +750,9 @@ try { ## 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 ```xml @@ -794,9 +794,9 @@ try { ``` -### 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 ```markdown @@ -1028,7 +1028,7 @@ Try: /available-stories # → HALT # Developer fixes network, resumes: -$ /super-dev-pipeline story_key=2-5-auth +$ /story-full-pipeline story_key=2-5-auth # System: # → Detects saved state @@ -1120,10 +1120,10 @@ $ /super-dev-pipeline story_key=2-5-auth ### MODIFIED Files (5 total) -1. `batch-super-dev/instructions.md` (+150 lines) -2. `super-dev-pipeline/steps/step-01-init.md` (+80 lines) -3. `super-dev-pipeline/steps/step-03-implement.md` (+120 lines) -4. `super-dev-pipeline/steps/step-06-complete.md` (+100 lines) +1. `batch-stories/instructions.md` (+150 lines) +2. `story-full-pipeline/steps/step-01-init.md` (+80 lines) +3. `story-full-pipeline/steps/step-03-implement.md` (+120 lines) +4. `story-full-pipeline/steps/step-06-complete.md` (+100 lines) 5. `dev-story/instructions.xml` (+60 lines) **Total MODIFIED**: ~510 lines @@ -1208,7 +1208,7 @@ $ /super-dev-pipeline story_key=2-5-auth ### Week 2-3 -1. Integrate with batch-super-dev +1. Integrate with batch-stories 2. Add progress sync to dev-story 3. Build PO agent + story creation workflow 4. Test with 3-5 developers diff --git a/docs/implementation-notes/gsd-style-guardrails-phase1.md b/docs/implementation-notes/gsd-style-guardrails-phase1.md index 4d2ce020..5d5c959c 100644 --- a/docs/implementation-notes/gsd-style-guardrails-phase1.md +++ b/docs/implementation-notes/gsd-style-guardrails-phase1.md @@ -33,8 +33,8 @@ Replace trust-based workflow with enforcement-based: ### 1. Auto-Fix Missing Prerequisites (Guardrail 1) **Files Modified:** -- `src/modules/bmm/workflows/4-implementation/super-dev-pipeline/workflow.md` -- `src/modules/bmm/workflows/4-implementation/batch-super-dev/workflow.md` +- `src/modules/bmm/workflows/4-implementation/story-full-pipeline/workflow.md` +- `src/modules/bmm/workflows/4-implementation/batch-stories/workflow.md` **What Changed:** - Old: Block with error if story file or gap analysis missing @@ -60,10 +60,10 @@ fi ### 2. File-Based Completion Verification (Guardrail 2) **Files Modified:** -- `src/modules/bmm/workflows/4-implementation/super-dev-pipeline/agents/builder.md` -- `src/modules/bmm/workflows/4-implementation/super-dev-pipeline/agents/inspector.md` -- `src/modules/bmm/workflows/4-implementation/super-dev-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/builder.md` +- `src/modules/bmm/workflows/4-implementation/story-full-pipeline/agents/inspector.md` +- `src/modules/bmm/workflows/4-implementation/story-full-pipeline/agents/reviewer.md` +- `src/modules/bmm/workflows/4-implementation/story-full-pipeline/agents/fixer.md` **What Changed:** - Agents now MUST create completion artifact: `{{story_key}}-{{agent}}.json` @@ -93,7 +93,7 @@ fi ### 3. Verification Gates Between Agents (Guardrail 4) **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:** - Added verification step after Builder agent @@ -126,8 +126,8 @@ done ### 4. Orchestrator-Driven Reconciliation (Guardrail 2 cont.) **Files Modified:** -- `src/modules/bmm/workflows/4-implementation/super-dev-pipeline/workflow.md` -- `src/modules/bmm/workflows/4-implementation/batch-super-dev/workflow.md` +- `src/modules/bmm/workflows/4-implementation/story-full-pipeline/workflow.md` +- `src/modules/bmm/workflows/4-implementation/batch-stories/workflow.md` **What Changed:** - Orchestrator reads Fixer completion artifact @@ -167,8 +167,8 @@ done | File | Type | Lines Changed | Purpose | |------|------|---------------|---------| -| super-dev-pipeline/workflow.md | Modified | ~100 | Add preconditions, verification gates, artifact-based reconciliation | -| batch-super-dev/workflow.md | Modified | ~80 | Add preconditions, artifact-based reconciliation | +| story-full-pipeline/workflow.md | Modified | ~100 | Add preconditions, verification gates, artifact-based reconciliation | +| batch-stories/workflow.md | Modified | ~80 | Add preconditions, artifact-based reconciliation | | agents/builder.md | Modified | ~30 | Add completion artifact requirement | | agents/inspector.md | Modified | ~25 | 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 # 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: Implementation proceeds without manual intervention @@ -208,7 +208,7 @@ rm docs/sprint-artifacts/test-story.md ### Test 3: File-Based Reconciliation ✅ ```bash # Run complete workflow -/bmad_bmm_super-dev-pipeline test-story +/bmad_bmm_story-full-pipeline test-story # After completion, verify: 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 ✅ ```bash # Run batch in sequential mode -/bmad_bmm_batch-super-dev +/bmad_bmm_batch-stories # Select: Sequential mode # Select: Multiple stories diff --git a/docs/implementation-notes/gsd-style-guardrails-phase2.md b/docs/implementation-notes/gsd-style-guardrails-phase2.md index 3cab4012..c066a1c2 100644 --- a/docs/implementation-notes/gsd-style-guardrails-phase2.md +++ b/docs/implementation-notes/gsd-style-guardrails-phase2.md @@ -75,7 +75,7 @@ Implemented Phase 2 of GSD-style refactoring: pattern extraction and explicit st ### 2. Explicit Step Enumeration -**Added to super-dev-pipeline/workflow.md:** +**Added to story-full-pipeline/workflow.md:** ```markdown @@ -154,7 +154,7 @@ Implemented Phase 2 of GSD-style refactoring: pattern extraction and explicit st | patterns/verification.md | Created | Independent verification | | patterns/security-checklist.md | Created | Security review checklist | | 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) | **Total:** @@ -239,7 +239,7 @@ When workflow runs: ### Test 1: Pattern Resolution ✅ ```bash # 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: 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 ✅ ```bash # 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.2: Builder creates completion artifact" @@ -264,7 +264,7 @@ echo "New quality standard" >> patterns/hospital-grade.md bmad install # Run workflow -/bmad_bmm_super-dev-pipeline test-story +/bmad_bmm_story-full-pipeline test-story # Expected: All agents receive updated pattern ``` diff --git a/docs/reference/workflow-map.md b/docs/reference/workflow-map.md index b152cc7d..337287c6 100644 --- a/docs/reference/workflow-map.md +++ b/docs/reference/workflow-map.md @@ -73,7 +73,7 @@ Build it, one story at a time. All implementation workflows use a unified GSD-st | Workflow | Purpose | Produces | | -------------------- | ------------------------------------------ | ---------------------------- | | `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 | ### Maintenance & Recovery diff --git a/src/bmm/workflows/4-implementation/batch-super-dev/AGENT-LIMITATIONS.md b/src/bmm/workflows/4-implementation/batch-stories/AGENT-LIMITATIONS.md similarity index 93% rename from src/bmm/workflows/4-implementation/batch-super-dev/AGENT-LIMITATIONS.md rename to src/bmm/workflows/4-implementation/batch-stories/AGENT-LIMITATIONS.md index a0561db9..8e218632 100644 --- a/src/bmm/workflows/4-implementation/batch-super-dev/AGENT-LIMITATIONS.md +++ b/src/bmm/workflows/4-implementation/batch-stories/AGENT-LIMITATIONS.md @@ -1,6 +1,6 @@ # 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 -**Before running /batch-super-dev, verify ALL selected stories:** +**Before running /batch-stories, verify ALL selected stories:** ```bash # 1. Check story files exist @@ -121,7 +121,7 @@ done **If any checks fail:** 1. Regenerate those stories: `/create-story-with-gap-analysis` 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 **Is this a bug?** ❌ NO - Agents can't create stories **What to do:** -- Exit batch-super-dev +- Exit batch-stories - Manually run /create-story-with-gap-analysis - Re-run batch after story created @@ -165,7 +165,7 @@ done 1. Plan epic → Identify stories → Create list 2. Generate stories: /create-story-with-gap-analysis (1-2 days) 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 @@ -183,7 +183,7 @@ done **Why it fails:** ``` 1. Create 20 skeleton files with just widget lists -2. Run /batch-super-dev +2. Run /batch-stories 3. Expect agents to regenerate them → FAILS: Agents can't invoke /create-story workflow ``` @@ -193,7 +193,7 @@ done **Why it fails:** ``` 1. 10 proper BMAD stories + 10 skeletons -2. Run /batch-super-dev +2. Run /batch-stories 3. Expect batch to handle both → RESULT: 10 execute, 10 skipped (confusing) ``` diff --git a/src/bmm/workflows/4-implementation/batch-super-dev/README.md b/src/bmm/workflows/4-implementation/batch-stories/README.md similarity index 95% rename from src/bmm/workflows/4-implementation/batch-super-dev/README.md rename to src/bmm/workflows/4-implementation/batch-stories/README.md index b0c6ebaf..375c381a 100644 --- a/src/bmm/workflows/4-implementation/batch-super-dev/README.md +++ b/src/bmm/workflows/4-implementation/batch-stories/README.md @@ -9,9 +9,9 @@ ## 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 @@ -48,13 +48,13 @@ Required sections: **What you might try:** ``` 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 ``` **What happens:** - 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) - You waste time @@ -67,7 +67,7 @@ Required sections: ./scripts/validate-all-stories.sh # 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. @@ -76,7 +76,7 @@ See: `AGENT-LIMITATIONS.md` for full documentation on what agents can and cannot ## 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.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) - 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) - Test-driven implementation - Post-validation (verify requirements met) @@ -150,7 +150,7 @@ Before v1.2.0: ``` User: "Process stories 3.1, 3.2, 3.3, 3.4" 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: @@ -232,7 +232,7 @@ validation: ### Example Session (v1.2.0) ``` -🤖 /batch-super-dev +🤖 /batch-stories 📊 Ready-for-Dev Stories (5) @@ -398,7 +398,7 @@ sprint-status.yaml: done ```bash # Process all ready-for-dev stories -/batch-super-dev +/batch-stories # Follow prompts: # 1. See list of ready stories @@ -413,7 +413,7 @@ sprint-status.yaml: done ```bash # Only process Epic 3 stories -/batch-super-dev filter_by_epic=3 +/batch-stories filter_by_epic=3 ``` ### Selection Syntax @@ -444,7 +444,7 @@ All: all (processes all ready-for-dev stories) ## 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 @@ -503,7 +503,7 @@ reconciliation: ### 4. Process Stories **Sequential Mode:** - For each selected story: - - Invoke super-dev-pipeline + - Invoke story-full-pipeline - Execute reconciliation (Step 4.5) - Report results - Pause between stories @@ -547,7 +547,7 @@ See: `step-4.5-reconcile-story-status.md` for detailed algorithm ### Batch Log -**Location:** `docs/sprint-artifacts/batch-super-dev-{date}.log` +**Location:** `docs/sprint-artifacts/batch-stories-{date}.log` **Contains:** - Start/end timestamps @@ -628,7 +628,7 @@ See: `step-4.5-reconcile-story-status.md` for detailed algorithm **Fix:** 1. Review listed stories manually 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 ### Parallel Mode Hangs @@ -713,24 +713,24 @@ See: `step-4.5-reconcile-story-status.md` for detailed algorithm - Initial release - Interactive story selector - Sequential and parallel execution modes -- Integration with super-dev-pipeline +- Integration with story-full-pipeline - Batch summary and logging --- ## 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 - **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 **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` - Check story file format: Ensure 12-section BMAD format - Verify Dev Agent Record populated: Required for reconciliation diff --git a/src/bmm/workflows/4-implementation/batch-super-dev/WORKFLOW-PATCH-STEP-2.5.md b/src/bmm/workflows/4-implementation/batch-stories/WORKFLOW-PATCH-STEP-2.5.md similarity index 93% rename from src/bmm/workflows/4-implementation/batch-super-dev/WORKFLOW-PATCH-STEP-2.5.md rename to src/bmm/workflows/4-implementation/batch-stories/WORKFLOW-PATCH-STEP-2.5.md index d11ac616..837ee7e4 100644 --- a/src/bmm/workflows/4-implementation/batch-super-dev/WORKFLOW-PATCH-STEP-2.5.md +++ b/src/bmm/workflows/4-implementation/batch-stories/WORKFLOW-PATCH-STEP-2.5.md @@ -81,7 +81,7 @@ This workflow requires: ``` Must show: "✅ All 12 sections present" -4. **Re-run batch-super-dev:** +4. **Re-run batch-stories:** - Story will now be properly formatted - Can be executed in next batch run @@ -132,7 +132,7 @@ This workflow requires: **After completing these actions:** 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 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ @@ -220,14 +220,14 @@ fi ## 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 # Batch Super-Dev Workflow ## Critical Prerequisites -**BEFORE running batch-super-dev:** +**BEFORE running batch-stories:** 1. ✅ **All stories must be properly generated** - Run: `/create-story-with-gap-analysis` for each story @@ -252,13 +252,13 @@ fi **What you might try:** ``` 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 ``` **What happens:** - 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) - You waste time @@ -270,7 +270,7 @@ fi **Solution:** - Generate ALL stories manually FIRST: /create-story-with-gap-analysis - Validate: ./scripts/validate-all-stories.sh -- THEN run batch: /batch-super-dev +- THEN run batch: /batch-stories ### ❌ Mixed Story Quality @@ -301,7 +301,7 @@ done ./scripts/validate-all-stories.sh # 3. Execute (4-8 hours, parallel autonomous) -/batch-super-dev +/batch-stories # Select all 5 stories # Choose 2-4 agents parallel @@ -325,13 +325,13 @@ done **To apply these improvements:** -- [ ] Update `batch-super-dev/instructions.md` Step 2.5 (lines 82-99) -- [ ] Add `batch-super-dev/AGENT-LIMITATIONS.md` (new file) -- [ ] Add `batch-super-dev/BATCH-BEST-PRACTICES.md` (new file) -- [ ] Update `batch-super-dev/README.md` with prerequisites +- [ ] Update `batch-stories/instructions.md` Step 2.5 (lines 82-99) +- [ ] Add `batch-stories/AGENT-LIMITATIONS.md` (new file) +- [ ] Add `batch-stories/BATCH-BEST-PRACTICES.md` (new file) +- [ ] Update `batch-stories/README.md` with prerequisites - [ ] Create `scripts/validate-all-stories.sh` (new script) - [ ] 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:** - Try batch with mixed story quality → Should skip skeletons gracefully diff --git a/src/bmm/workflows/4-implementation/batch-super-dev/step-4.5-reconcile-story-status.md b/src/bmm/workflows/4-implementation/batch-stories/step-4.5-reconcile-story-status.md similarity index 98% rename from src/bmm/workflows/4-implementation/batch-super-dev/step-4.5-reconcile-story-status.md rename to src/bmm/workflows/4-implementation/batch-stories/step-4.5-reconcile-story-status.md index daf96e00..eddd36c1 100644 --- a/src/bmm/workflows/4-implementation/batch-super-dev/step-4.5-reconcile-story-status.md +++ b/src/bmm/workflows/4-implementation/batch-stories/step-4.5-reconcile-story-status.md @@ -1,7 +1,7 @@ # Step 4.5: Story Reconciliation (Orchestrator-Driven) **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 --- diff --git a/src/bmm/workflows/4-implementation/batch-super-dev/workflow.md b/src/bmm/workflows/4-implementation/batch-stories/workflow.md similarity index 96% rename from src/bmm/workflows/4-implementation/batch-super-dev/workflow.md rename to src/bmm/workflows/4-implementation/batch-stories/workflow.md index c54616af..850e81f4 100644 --- a/src/bmm/workflows/4-implementation/batch-super-dev/workflow.md +++ b/src/bmm/workflows/4-implementation/batch-stories/workflow.md @@ -1,7 +1,7 @@ # Batch Super-Dev v3.0 - Unified Workflow -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. @@ -18,7 +18,7 @@ Orchestrator coordinates. Agents do implementation. Orchestrator does reconcilia -name: batch-super-dev +name: batch-stories version: 3.1.0 modes: @@ -37,7 +37,7 @@ defaults: @patterns/hospital-grade.md @patterns/agent-completion.md -@super-dev-pipeline/workflow.md +@story-full-pipeline/workflow.md @@ -203,16 +203,16 @@ If missing, auto-create using greenfield workflow: 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 - story_key: {{story_key}} - complexity_level: {{complexity}} **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:** ```bash @@ -294,10 +294,10 @@ Task({ subagent_type: "general-purpose", description: "Implement {{story_key}}", prompt: ` -Execute super-dev-pipeline for story {{story_key}}. +Execute story-full-pipeline for story {{story_key}}. -@super-dev-pipeline/workflow.md +@story-full-pipeline/workflow.md diff --git a/src/bmm/workflows/4-implementation/batch-super-dev/workflow.yaml b/src/bmm/workflows/4-implementation/batch-stories/workflow.yaml similarity index 91% rename from src/bmm/workflows/4-implementation/batch-super-dev/workflow.yaml rename to src/bmm/workflows/4-implementation/batch-stories/workflow.yaml index b93b2b9e..51764a3f 100644 --- a/src/bmm/workflows/4-implementation/batch-super-dev/workflow.yaml +++ b/src/bmm/workflows/4-implementation/batch-stories/workflow.yaml @@ -1,5 +1,5 @@ -name: batch-super-dev -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." +name: batch-stories +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" version: "1.3.0" @@ -11,12 +11,12 @@ communication_language: "{config_source}:communication_language" date: system-generated # 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" # State management 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 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_settings: 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) validation: diff --git a/src/bmm/workflows/4-implementation/create-story/workflow.md b/src/bmm/workflows/4-implementation/create-story/workflow.md index dc7b74b9..f581efbe 100644 --- a/src/bmm/workflows/4-implementation/create-story/workflow.md +++ b/src/bmm/workflows/4-implementation/create-story/workflow.md @@ -228,7 +228,7 @@ Ready for implementation. Next Steps: 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 [N] Create next story diff --git a/src/bmm/workflows/4-implementation/multi-agent-review/workflow.md b/src/bmm/workflows/4-implementation/multi-agent-review/workflow.md index 2d32d036..1d774706 100644 --- a/src/bmm/workflows/4-implementation/multi-agent-review/workflow.md +++ b/src/bmm/workflows/4-implementation/multi-agent-review/workflow.md @@ -19,9 +19,9 @@ name: multi-agent-review version: 3.0.0 agent_selection: - micro: {count: 2, agents: [security, code_quality]} - standard: {count: 4, agents: [security, code_quality, architecture, testing]} - complex: {count: 6, agents: [security, code_quality, architecture, testing, performance, domain_expert]} + micro: {count: 1, agents: [security]} + standard: {count: 2, agents: [security, code_quality]} + complex: {count: 3, agents: [security, code_quality, architecture]} available_agents: security: "Identifies vulnerabilities and security risks" @@ -41,21 +41,40 @@ available_agents: -**Select agents based on complexity** +**Select agents based on override or complexity** ``` -If complexity_level == "micro": - agents = ["security", "code_quality"] - Display: 🔍 MICRO Review (2 agents) +# Priority 1: Check for explicit override +If override_agent_count is provided (not null): + 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": - agents = ["security", "code_quality", "architecture", "testing"] - Display: 📋 STANDARD Review (4 agents) + agent_count = 2 + agents = ["security", "code_quality"] + Display: 📋 STANDARD Review (2 agents) Else if complexity_level == "complex": - agents = ALL 6 agents - Display: 🔬 COMPLEX Review (6 agents) + agent_count = 3 + 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) @@ -183,6 +202,28 @@ If only LOW/INFO findings: - Micro stories (≤3 tasks) - Standard stories with simple changes - 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 diff --git a/src/bmm/workflows/4-implementation/multi-agent-review/workflow.yaml b/src/bmm/workflows/4-implementation/multi-agent-review/workflow.yaml index d62dd9c4..e554cccd 100644 --- a/src/bmm/workflows/4-implementation/multi-agent-review/workflow.yaml +++ b/src/bmm/workflows/4-implementation/multi-agent-review/workflow.yaml @@ -17,29 +17,30 @@ instructions: "{installed_path}/instructions.md" story_id: "{story_id}" # Required story_file: "{sprint_artifacts}/story-{story_id}.md" 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) # 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: micro: - agent_count: 2 - agents: ["security", "code_quality"] + agent_count: 1 + agents: ["security"] description: "Quick sanity check for low-risk stories" examples: ["UI tweaks", "text changes", "simple CRUD", "documentation"] cost_multiplier: 1x standard: - agent_count: 4 - agents: ["security", "code_quality", "architecture", "testing"] + agent_count: 2 + agents: ["security", "code_quality"] description: "Balanced multi-perspective review for medium-risk changes" examples: ["API endpoints", "business logic", "data validation", "component refactors"] cost_multiplier: 2x complex: - agent_count: 6 - agents: ["security", "code_quality", "architecture", "testing", "performance", "domain_expert"] + agent_count: 3 + agents: ["security", "code_quality", "architecture"] description: "Comprehensive review for high-risk/high-complexity changes" examples: ["auth/security", "payments", "data migration", "architecture changes", "performance-critical", "complex algorithms"] cost_multiplier: 3x diff --git a/src/bmm/workflows/4-implementation/story-pipeline/README.md b/src/bmm/workflows/4-implementation/story-dev-only/README.md similarity index 99% rename from src/bmm/workflows/4-implementation/story-pipeline/README.md rename to src/bmm/workflows/4-implementation/story-dev-only/README.md index a7edf118..79d6ebd6 100644 --- a/src/bmm/workflows/4-implementation/story-pipeline/README.md +++ b/src/bmm/workflows/4-implementation/story-dev-only/README.md @@ -101,7 +101,7 @@ Human-in-the-loop with approval at each step: bmad build 1-4 # 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" ``` @@ -121,7 +121,7 @@ Unattended execution for trusted stories: bmad build 1-4 --batch # 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: @@ -148,7 +148,7 @@ Resume automatically: ## Directory Structure ``` -story-pipeline/ +story-dev-only/ ├── workflow.yaml # Configuration, agent mapping, quality gates ├── workflow.md # Interactive mode orchestration ├── batch-runner.sh # Batch mode runner script @@ -178,7 +178,7 @@ story-pipeline/ ### workflow.yaml ```yaml -name: story-pipeline +name: story-dev-only version: "2.0" description: "Single-session story implementation with step-file loading" diff --git a/src/bmm/workflows/4-implementation/story-pipeline/batch-runner.sh b/src/bmm/workflows/4-implementation/story-dev-only/batch-runner.sh similarity index 100% rename from src/bmm/workflows/4-implementation/story-pipeline/batch-runner.sh rename to src/bmm/workflows/4-implementation/story-dev-only/batch-runner.sh diff --git a/src/bmm/workflows/4-implementation/story-pipeline/checklists/atdd.md b/src/bmm/workflows/4-implementation/story-dev-only/checklists/atdd.md similarity index 100% rename from src/bmm/workflows/4-implementation/story-pipeline/checklists/atdd.md rename to src/bmm/workflows/4-implementation/story-dev-only/checklists/atdd.md diff --git a/src/bmm/workflows/4-implementation/story-pipeline/checklists/code-review.md b/src/bmm/workflows/4-implementation/story-dev-only/checklists/code-review.md similarity index 100% rename from src/bmm/workflows/4-implementation/story-pipeline/checklists/code-review.md rename to src/bmm/workflows/4-implementation/story-dev-only/checklists/code-review.md diff --git a/src/bmm/workflows/4-implementation/story-pipeline/checklists/implementation.md b/src/bmm/workflows/4-implementation/story-dev-only/checklists/implementation.md similarity index 100% rename from src/bmm/workflows/4-implementation/story-pipeline/checklists/implementation.md rename to src/bmm/workflows/4-implementation/story-dev-only/checklists/implementation.md diff --git a/src/bmm/workflows/4-implementation/story-pipeline/checklists/story-creation.md b/src/bmm/workflows/4-implementation/story-dev-only/checklists/story-creation.md similarity index 100% rename from src/bmm/workflows/4-implementation/story-pipeline/checklists/story-creation.md rename to src/bmm/workflows/4-implementation/story-dev-only/checklists/story-creation.md diff --git a/src/bmm/workflows/4-implementation/story-pipeline/checklists/story-validation.md b/src/bmm/workflows/4-implementation/story-dev-only/checklists/story-validation.md similarity index 100% rename from src/bmm/workflows/4-implementation/story-pipeline/checklists/story-validation.md rename to src/bmm/workflows/4-implementation/story-dev-only/checklists/story-validation.md diff --git a/src/bmm/workflows/4-implementation/story-pipeline/steps/step-01-init.md b/src/bmm/workflows/4-implementation/story-dev-only/steps/step-01-init.md similarity index 99% rename from src/bmm/workflows/4-implementation/story-pipeline/steps/step-01-init.md rename to src/bmm/workflows/4-implementation/story-dev-only/steps/step-01-init.md index 12501cd6..4e25ce72 100644 --- a/src/bmm/workflows/4-implementation/story-pipeline/steps/step-01-init.md +++ b/src/bmm/workflows/4-implementation/story-dev-only/steps/step-01-init.md @@ -3,7 +3,7 @@ name: 'step-01-init' description: 'Initialize story pipeline: load context, detect mode, cache documents' # 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 thisStepFile: '{workflow_path}/steps/step-01-init.md' diff --git a/src/bmm/workflows/4-implementation/story-pipeline/steps/step-01b-resume.md b/src/bmm/workflows/4-implementation/story-dev-only/steps/step-01b-resume.md similarity index 99% rename from src/bmm/workflows/4-implementation/story-pipeline/steps/step-01b-resume.md rename to src/bmm/workflows/4-implementation/story-dev-only/steps/step-01b-resume.md index 590bc652..d6fb3d3b 100644 --- a/src/bmm/workflows/4-implementation/story-pipeline/steps/step-01b-resume.md +++ b/src/bmm/workflows/4-implementation/story-dev-only/steps/step-01b-resume.md @@ -3,7 +3,7 @@ name: 'step-01b-resume' description: 'Resume pipeline from checkpoint after failure or interruption' # 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 thisStepFile: '{workflow_path}/steps/step-01b-resume.md' diff --git a/src/bmm/workflows/4-implementation/story-pipeline/steps/step-02-create-story.md b/src/bmm/workflows/4-implementation/story-dev-only/steps/step-02-create-story.md similarity index 99% rename from src/bmm/workflows/4-implementation/story-pipeline/steps/step-02-create-story.md rename to src/bmm/workflows/4-implementation/story-dev-only/steps/step-02-create-story.md index 097b31ae..79d83ef8 100644 --- a/src/bmm/workflows/4-implementation/story-pipeline/steps/step-02-create-story.md +++ b/src/bmm/workflows/4-implementation/story-dev-only/steps/step-02-create-story.md @@ -3,7 +3,7 @@ name: 'step-02-create-story' description: 'Create detailed story file from epic definition with research' # 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 thisStepFile: '{workflow_path}/steps/step-02-create-story.md' diff --git a/src/bmm/workflows/4-implementation/story-pipeline/steps/step-03-validate-story.md b/src/bmm/workflows/4-implementation/story-dev-only/steps/step-03-validate-story.md similarity index 99% rename from src/bmm/workflows/4-implementation/story-pipeline/steps/step-03-validate-story.md rename to src/bmm/workflows/4-implementation/story-dev-only/steps/step-03-validate-story.md index 13806d0e..7fe063eb 100644 --- a/src/bmm/workflows/4-implementation/story-pipeline/steps/step-03-validate-story.md +++ b/src/bmm/workflows/4-implementation/story-dev-only/steps/step-03-validate-story.md @@ -3,7 +3,7 @@ name: 'step-03-validate-story' description: 'Adversarial validation of story completeness and quality' # 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 thisStepFile: '{workflow_path}/steps/step-03-validate-story.md' diff --git a/src/bmm/workflows/4-implementation/story-pipeline/steps/step-04-atdd.md b/src/bmm/workflows/4-implementation/story-dev-only/steps/step-04-atdd.md similarity index 99% rename from src/bmm/workflows/4-implementation/story-pipeline/steps/step-04-atdd.md rename to src/bmm/workflows/4-implementation/story-dev-only/steps/step-04-atdd.md index 8a2b6a4e..08c79302 100644 --- a/src/bmm/workflows/4-implementation/story-pipeline/steps/step-04-atdd.md +++ b/src/bmm/workflows/4-implementation/story-dev-only/steps/step-04-atdd.md @@ -3,7 +3,7 @@ name: 'step-04-atdd' description: 'Generate failing acceptance tests before implementation (RED phase)' # 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 thisStepFile: '{workflow_path}/steps/step-04-atdd.md' diff --git a/src/bmm/workflows/4-implementation/story-pipeline/steps/step-05-implement.md b/src/bmm/workflows/4-implementation/story-dev-only/steps/step-05-implement.md similarity index 99% rename from src/bmm/workflows/4-implementation/story-pipeline/steps/step-05-implement.md rename to src/bmm/workflows/4-implementation/story-dev-only/steps/step-05-implement.md index c98ef4fe..d1f35291 100644 --- a/src/bmm/workflows/4-implementation/story-pipeline/steps/step-05-implement.md +++ b/src/bmm/workflows/4-implementation/story-dev-only/steps/step-05-implement.md @@ -3,7 +3,7 @@ name: 'step-05-implement' description: 'Implement story to make tests pass (GREEN phase)' # 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 thisStepFile: '{workflow_path}/steps/step-05-implement.md' diff --git a/src/bmm/workflows/4-implementation/story-pipeline/steps/step-05b-post-validation.md b/src/bmm/workflows/4-implementation/story-dev-only/steps/step-05b-post-validation.md similarity index 99% rename from src/bmm/workflows/4-implementation/story-pipeline/steps/step-05b-post-validation.md rename to src/bmm/workflows/4-implementation/story-dev-only/steps/step-05b-post-validation.md index 070f95eb..2d81248f 100644 --- a/src/bmm/workflows/4-implementation/story-pipeline/steps/step-05b-post-validation.md +++ b/src/bmm/workflows/4-implementation/story-dev-only/steps/step-05b-post-validation.md @@ -3,7 +3,7 @@ name: 'step-05b-post-validation' description: 'Verify completed tasks against codebase reality (catch false positives)' # 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 thisStepFile: '{workflow_path}/steps/step-05b-post-validation.md' diff --git a/src/bmm/workflows/4-implementation/story-pipeline/steps/step-06-code-review.md b/src/bmm/workflows/4-implementation/story-dev-only/steps/step-06-code-review.md similarity index 99% rename from src/bmm/workflows/4-implementation/story-pipeline/steps/step-06-code-review.md rename to src/bmm/workflows/4-implementation/story-dev-only/steps/step-06-code-review.md index bcc45f77..ca6e8429 100644 --- a/src/bmm/workflows/4-implementation/story-pipeline/steps/step-06-code-review.md +++ b/src/bmm/workflows/4-implementation/story-dev-only/steps/step-06-code-review.md @@ -3,7 +3,7 @@ name: 'step-06-code-review' description: 'Adversarial code review finding 3-10 specific issues' # 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 thisStepFile: '{workflow_path}/steps/step-06-code-review.md' diff --git a/src/bmm/workflows/4-implementation/story-pipeline/steps/step-07-complete.md b/src/bmm/workflows/4-implementation/story-dev-only/steps/step-07-complete.md similarity index 97% rename from src/bmm/workflows/4-implementation/story-pipeline/steps/step-07-complete.md rename to src/bmm/workflows/4-implementation/story-dev-only/steps/step-07-complete.md index eabbcfc4..d2cbbef8 100644 --- a/src/bmm/workflows/4-implementation/story-pipeline/steps/step-07-complete.md +++ b/src/bmm/workflows/4-implementation/story-dev-only/steps/step-07-complete.md @@ -3,7 +3,7 @@ name: 'step-07-complete' description: 'Update sprint status and create git commit' # 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 thisStepFile: '{workflow_path}/steps/step-07-complete.md' @@ -89,7 +89,7 @@ stories: code_reviewed: true issues_found: {count} issues_fixed: {count} - pipeline_version: "story-pipeline-v2.0" + pipeline_version: "story-dev-only-v2.0" ``` ### 4. Stage Git Changes @@ -119,7 +119,7 @@ feat(epic-{epic_num}): complete story {story_id} - Code reviewed: {issues_found} issues found and fixed Story: {story_title} -Pipeline: story-pipeline-v2.0 +Pipeline: story-dev-only-v2.0 🤖 Generated with BMAD Story Pipeline diff --git a/src/bmm/workflows/4-implementation/story-pipeline/steps/step-08-summary.md b/src/bmm/workflows/4-implementation/story-dev-only/steps/step-08-summary.md similarity index 99% rename from src/bmm/workflows/4-implementation/story-pipeline/steps/step-08-summary.md rename to src/bmm/workflows/4-implementation/story-dev-only/steps/step-08-summary.md index 43566307..96f99f22 100644 --- a/src/bmm/workflows/4-implementation/story-pipeline/steps/step-08-summary.md +++ b/src/bmm/workflows/4-implementation/story-dev-only/steps/step-08-summary.md @@ -3,7 +3,7 @@ name: 'step-08-summary' description: 'Generate audit trail and pipeline summary report' # 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 thisStepFile: '{workflow_path}/steps/step-08-summary.md' @@ -48,7 +48,7 @@ Create: `{auditFile}` ```yaml --- audit_version: "1.0" -pipeline: "story-pipeline-v2.0" +pipeline: "story-dev-only-v2.0" story_id: "{story_id}" epic_num: {epic_num} --- diff --git a/src/bmm/workflows/4-implementation/story-pipeline/templates/audit-trail.yaml.template b/src/bmm/workflows/4-implementation/story-dev-only/templates/audit-trail.yaml.template similarity index 100% rename from src/bmm/workflows/4-implementation/story-pipeline/templates/audit-trail.yaml.template rename to src/bmm/workflows/4-implementation/story-dev-only/templates/audit-trail.yaml.template diff --git a/src/bmm/workflows/4-implementation/story-pipeline/templates/pipeline-state.yaml.template b/src/bmm/workflows/4-implementation/story-dev-only/templates/pipeline-state.yaml.template similarity index 100% rename from src/bmm/workflows/4-implementation/story-pipeline/templates/pipeline-state.yaml.template rename to src/bmm/workflows/4-implementation/story-dev-only/templates/pipeline-state.yaml.template diff --git a/src/bmm/workflows/4-implementation/story-pipeline/workflow.md b/src/bmm/workflows/4-implementation/story-dev-only/workflow.md similarity index 98% rename from src/bmm/workflows/4-implementation/story-pipeline/workflow.md rename to src/bmm/workflows/4-implementation/story-dev-only/workflow.md index 6ca4df47..29399ed3 100644 --- a/src/bmm/workflows/4-implementation/story-pipeline/workflow.md +++ b/src/bmm/workflows/4-implementation/story-dev-only/workflow.md @@ -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. web_bundle: true --- @@ -112,7 +112,7 @@ Load and cache these documents (read once, use across steps): ### 4. First Step Execution 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` --- diff --git a/src/bmm/workflows/4-implementation/story-pipeline/workflow.yaml b/src/bmm/workflows/4-implementation/story-dev-only/workflow.yaml similarity index 95% rename from src/bmm/workflows/4-implementation/story-pipeline/workflow.yaml rename to src/bmm/workflows/4-implementation/story-dev-only/workflow.yaml index be1e1a69..1f1ec77a 100644 --- a/src/bmm/workflows/4-implementation/story-pipeline/workflow.yaml +++ b/src/bmm/workflows/4-implementation/story-dev-only/workflow.yaml @@ -1,5 +1,5 @@ -name: story-pipeline -description: "Automated story development pipeline with token-efficient step-file architecture. Replaces separate Claude calls with single-session orchestration." +name: story-dev-only +description: "Basic TDD story development pipeline with token-efficient step-file architecture. Focuses on implementation without validation/review stages." author: "BMad + digital-bridge" version: "2.0.0" @@ -11,14 +11,14 @@ communication_language: "{config_source}:communication_language" date: system-generated # 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" templates_path: "{installed_path}/templates" checklists_path: "{installed_path}/checklists" # State management -state_file: "{sprint_artifacts}/pipeline-state-{{story_id}}.yaml" -audit_trail: "{sprint_artifacts}/audit-{{story_id}}-{{date}}.yaml" +state_file: "{sprint_artifacts}/story-dev-only-state-{{story_id}}.yaml" +audit_trail: "{sprint_artifacts}/audit-story-dev-only-{{story_id}}-{{date}}.yaml" # Workflow modes modes: diff --git a/src/bmm/workflows/4-implementation/super-dev-pipeline/README.md b/src/bmm/workflows/4-implementation/story-full-pipeline/README.md similarity index 98% rename from src/bmm/workflows/4-implementation/super-dev-pipeline/README.md rename to src/bmm/workflows/4-implementation/story-full-pipeline/README.md index 613fb5e9..a436933f 100644 --- a/src/bmm/workflows/4-implementation/super-dev-pipeline/README.md +++ b/src/bmm/workflows/4-implementation/story-full-pipeline/README.md @@ -8,7 +8,7 @@ ```bash # 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:** ``` -super-dev-pipeline/ +story-full-pipeline/ ├── README.md (this file) ├── workflow.yaml (configuration) ├── workflow.md (complete documentation) diff --git a/src/bmm/workflows/4-implementation/super-dev-pipeline/agents/builder.md b/src/bmm/workflows/4-implementation/story-full-pipeline/agents/builder.md similarity index 100% rename from src/bmm/workflows/4-implementation/super-dev-pipeline/agents/builder.md rename to src/bmm/workflows/4-implementation/story-full-pipeline/agents/builder.md diff --git a/src/bmm/workflows/4-implementation/super-dev-pipeline/agents/fixer.md b/src/bmm/workflows/4-implementation/story-full-pipeline/agents/fixer.md similarity index 100% rename from src/bmm/workflows/4-implementation/super-dev-pipeline/agents/fixer.md rename to src/bmm/workflows/4-implementation/story-full-pipeline/agents/fixer.md diff --git a/src/bmm/workflows/4-implementation/super-dev-pipeline/agents/inspector.md b/src/bmm/workflows/4-implementation/story-full-pipeline/agents/inspector.md similarity index 100% rename from src/bmm/workflows/4-implementation/super-dev-pipeline/agents/inspector.md rename to src/bmm/workflows/4-implementation/story-full-pipeline/agents/inspector.md diff --git a/src/bmm/workflows/4-implementation/super-dev-pipeline/agents/reviewer.md b/src/bmm/workflows/4-implementation/story-full-pipeline/agents/reviewer.md similarity index 100% rename from src/bmm/workflows/4-implementation/super-dev-pipeline/agents/reviewer.md rename to src/bmm/workflows/4-implementation/story-full-pipeline/agents/reviewer.md diff --git a/src/bmm/workflows/4-implementation/story-full-pipeline/workflow.md b/src/bmm/workflows/4-implementation/story-full-pipeline/workflow.md new file mode 100644 index 00000000..8baf2a0b --- /dev/null +++ b/src/bmm/workflows/4-implementation/story-full-pipeline/workflow.md @@ -0,0 +1,215 @@ +# Super-Dev-Pipeline v3.1 - Token-Efficient Multi-Agent Pipeline + + +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). + + + +**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. + + + +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) + + + +@patterns/hospital-grade.md +@patterns/agent-completion.md + + + + + +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. + + + +**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. + + + +**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. + + + +**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. + + + +**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. + + + +**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" + + + +**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. + + + + + +**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. + + + +| 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. + + + +- [ ] 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" + diff --git a/src/bmm/workflows/4-implementation/super-dev-pipeline/workflow.yaml b/src/bmm/workflows/4-implementation/story-full-pipeline/workflow.yaml similarity index 89% rename from src/bmm/workflows/4-implementation/super-dev-pipeline/workflow.yaml rename to src/bmm/workflows/4-implementation/story-full-pipeline/workflow.yaml index 6ab01b6d..2a7d17ff 100644 --- a/src/bmm/workflows/4-implementation/super-dev-pipeline/workflow.yaml +++ b/src/bmm/workflows/4-implementation/story-full-pipeline/workflow.yaml @@ -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)" author: "BMAD Method + GSD" version: "2.0.0" @@ -14,7 +14,7 @@ communication_language: "{config_source}:communication_language" date: system-generated # 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" 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" # State management -state_file: "{sprint_artifacts}/super-dev-state-{{story_id}}.yaml" -audit_trail: "{sprint_artifacts}/audit-super-dev-{{story_id}}-{{date}}.yaml" +state_file: "{sprint_artifacts}/story-full-pipeline-state-{{story_id}}.yaml" +audit_trail: "{sprint_artifacts}/audit-story-full-pipeline-{{story_id}}-{{date}}.yaml" # Multi-agent configuration agents: @@ -55,14 +55,15 @@ agents: trust_level: "high" # Wants to find problems timeout: 1800 # 30 minutes review_agent_count: - micro: 2 - standard: 4 - complex: 6 + micro: 1 # Minimal review (1 agent) + standard: 2 # Balanced review (2 agents) + complex: 3 # Full review (3 agents) fixer: description: "Issue resolution - fixes critical/high issues" steps: [8, 9] subagent_type: "general-purpose" + resume_builder: true # IMPORTANT: Resume Builder agent instead of spawning fresh prompt_file: "{agents_path}/fixer.md" trust_level: "medium" # Incentive to minimize work timeout: 2400 # 40 minutes @@ -118,6 +119,6 @@ final_verification: fallback_to_v1: enabled: true 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 diff --git a/src/bmm/workflows/4-implementation/super-dev-pipeline/workflow.md b/src/bmm/workflows/4-implementation/super-dev-pipeline/workflow.md deleted file mode 100644 index a43aacad..00000000 --- a/src/bmm/workflows/4-implementation/super-dev-pipeline/workflow.md +++ /dev/null @@ -1,396 +0,0 @@ -# Super-Dev-Pipeline v3.0 - Unified Workflow - - -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). - - - -**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. - - - -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"} - - - -@patterns/hospital-grade.md -@patterns/agent-completion.md - - - - - -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. - - - -**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}}. - - -@patterns/hospital-grade.md -@patterns/tdd.md -@patterns/agent-completion.md - - - -Story: [inline story file content] - - - -Implement the story requirements: -1. Load and understand requirements -2. Analyze what exists vs needed -3. Write tests first (TDD) -4. Implement production code - - - -- DO NOT validate your own work -- DO NOT review your code -- DO NOT update story checkboxes -- DO NOT commit changes - - - -- [ ] Tests written for all requirements -- [ ] Production code implements tests -- [ ] Return ## AGENT COMPLETE with file lists - -` -}) -``` - -**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. - - - -**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}}. - - -@patterns/verification.md -@patterns/hospital-grade.md -@patterns/agent-completion.md - - - -Story: [inline story file content] - - - -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 - - - -- You have NO KNOWLEDGE of what Builder did -- Run all checks yourself -- Don't trust any claims - - - -- [ ] All files verified to exist -- [ ] Type check passes (0 errors) -- [ ] Lint passes (0 warnings) -- [ ] Tests pass -- [ ] Return ## AGENT COMPLETE with evidence - -` -}) -``` - -**Wait for completion. Parse verdict.** - -If FAIL: halt pipeline, report specific failures. - - - -**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}}. - - -@patterns/security-checklist.md -@patterns/hospital-grade.md -@patterns/agent-completion.md - - - -Story: [inline story file content] - - - -Find problems. Be critical. Look for: -- Security vulnerabilities (CRITICAL) -- Logic bugs and edge cases (HIGH) -- Performance issues (MEDIUM) -- Code style issues (LOW) - - - -- Your goal is to FIND ISSUES -- Don't rubber-stamp -- Be thorough - - - -- [ ] All new files reviewed -- [ ] Security checks completed -- [ ] Issues categorized by severity -- [ ] Return ## AGENT COMPLETE with issue list - -` -}) -``` - -**Wait for completion. Parse issue counts.** - - - -**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}}. - - -@patterns/hospital-grade.md -@patterns/agent-completion.md - - - -Story: [inline story file content] -Review issues: [inline reviewer findings] - - - -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 - - - -- DO NOT skip CRITICAL issues -- DO NOT update story checkboxes (orchestrator does this) -- DO NOT update sprint-status (orchestrator does this) - - - -- [ ] All CRITICAL fixed -- [ ] All HIGH fixed -- [ ] Tests still pass -- [ ] Git commit created -- [ ] Return ## AGENT COMPLETE with fix summary - -` -}) -``` - -**Wait for completion. Parse commit hash and fix counts.** - - - -**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. - - - -**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`. - - - - - -**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. - - - -| 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 | - - - -- [ ] 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" - diff --git a/src/bmm/workflows/4-implementation/super-dev-story/workflow.yaml b/src/bmm/workflows/4-implementation/super-dev-story/workflow.yaml index 7185b853..99a0441c 100644 --- a/src/bmm/workflows/4-implementation/super-dev-story/workflow.yaml +++ b/src/bmm/workflows/4-implementation/super-dev-story/workflow.yaml @@ -29,7 +29,7 @@ super_dev_settings: fail_on_critical_issues: true 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 standalone: true diff --git a/src/core/agents/workflow-executor.md b/src/core/agents/workflow-executor.md index 1d4e2524..7f314e6a 100644 --- a/src/core/agents/workflow-executor.md +++ b/src/core/agents/workflow-executor.md @@ -71,11 +71,11 @@ Instead of main agent trying to execute workflow: ```typescript // OLD (doesn't work - I skip steps): -Execute super-dev-pipeline for story X +Execute story-full-pipeline for story X // NEW (enforcement active): 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 - Execute steps 1-11 in exact order - Spawn Task agents when step requires it diff --git a/src/modules/bmm/workflows/4-implementation/batch-super-dev/AGENT-LIMITATIONS.md b/src/modules/bmm/workflows/4-implementation/batch-super-dev/AGENT-LIMITATIONS.md index a0561db9..8e218632 100644 --- a/src/modules/bmm/workflows/4-implementation/batch-super-dev/AGENT-LIMITATIONS.md +++ b/src/modules/bmm/workflows/4-implementation/batch-super-dev/AGENT-LIMITATIONS.md @@ -1,6 +1,6 @@ # 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 -**Before running /batch-super-dev, verify ALL selected stories:** +**Before running /batch-stories, verify ALL selected stories:** ```bash # 1. Check story files exist @@ -121,7 +121,7 @@ done **If any checks fail:** 1. Regenerate those stories: `/create-story-with-gap-analysis` 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 **Is this a bug?** ❌ NO - Agents can't create stories **What to do:** -- Exit batch-super-dev +- Exit batch-stories - Manually run /create-story-with-gap-analysis - Re-run batch after story created @@ -165,7 +165,7 @@ done 1. Plan epic → Identify stories → Create list 2. Generate stories: /create-story-with-gap-analysis (1-2 days) 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 @@ -183,7 +183,7 @@ done **Why it fails:** ``` 1. Create 20 skeleton files with just widget lists -2. Run /batch-super-dev +2. Run /batch-stories 3. Expect agents to regenerate them → FAILS: Agents can't invoke /create-story workflow ``` @@ -193,7 +193,7 @@ done **Why it fails:** ``` 1. 10 proper BMAD stories + 10 skeletons -2. Run /batch-super-dev +2. Run /batch-stories 3. Expect batch to handle both → RESULT: 10 execute, 10 skipped (confusing) ``` diff --git a/src/modules/bmm/workflows/4-implementation/batch-super-dev/README.md b/src/modules/bmm/workflows/4-implementation/batch-super-dev/README.md index b0c6ebaf..375c381a 100644 --- a/src/modules/bmm/workflows/4-implementation/batch-super-dev/README.md +++ b/src/modules/bmm/workflows/4-implementation/batch-super-dev/README.md @@ -9,9 +9,9 @@ ## 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 @@ -48,13 +48,13 @@ Required sections: **What you might try:** ``` 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 ``` **What happens:** - 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) - You waste time @@ -67,7 +67,7 @@ Required sections: ./scripts/validate-all-stories.sh # 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. @@ -76,7 +76,7 @@ See: `AGENT-LIMITATIONS.md` for full documentation on what agents can and cannot ## 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.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) - 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) - Test-driven implementation - Post-validation (verify requirements met) @@ -150,7 +150,7 @@ Before v1.2.0: ``` User: "Process stories 3.1, 3.2, 3.3, 3.4" 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: @@ -232,7 +232,7 @@ validation: ### Example Session (v1.2.0) ``` -🤖 /batch-super-dev +🤖 /batch-stories 📊 Ready-for-Dev Stories (5) @@ -398,7 +398,7 @@ sprint-status.yaml: done ```bash # Process all ready-for-dev stories -/batch-super-dev +/batch-stories # Follow prompts: # 1. See list of ready stories @@ -413,7 +413,7 @@ sprint-status.yaml: done ```bash # Only process Epic 3 stories -/batch-super-dev filter_by_epic=3 +/batch-stories filter_by_epic=3 ``` ### Selection Syntax @@ -444,7 +444,7 @@ All: all (processes all ready-for-dev stories) ## 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 @@ -503,7 +503,7 @@ reconciliation: ### 4. Process Stories **Sequential Mode:** - For each selected story: - - Invoke super-dev-pipeline + - Invoke story-full-pipeline - Execute reconciliation (Step 4.5) - Report results - Pause between stories @@ -547,7 +547,7 @@ See: `step-4.5-reconcile-story-status.md` for detailed algorithm ### Batch Log -**Location:** `docs/sprint-artifacts/batch-super-dev-{date}.log` +**Location:** `docs/sprint-artifacts/batch-stories-{date}.log` **Contains:** - Start/end timestamps @@ -628,7 +628,7 @@ See: `step-4.5-reconcile-story-status.md` for detailed algorithm **Fix:** 1. Review listed stories manually 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 ### Parallel Mode Hangs @@ -713,24 +713,24 @@ See: `step-4.5-reconcile-story-status.md` for detailed algorithm - Initial release - Interactive story selector - Sequential and parallel execution modes -- Integration with super-dev-pipeline +- Integration with story-full-pipeline - Batch summary and logging --- ## 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 - **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 **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` - Check story file format: Ensure 12-section BMAD format - Verify Dev Agent Record populated: Required for reconciliation diff --git a/src/modules/bmm/workflows/4-implementation/batch-super-dev/RESILIENCE-FIX.md b/src/modules/bmm/workflows/4-implementation/batch-super-dev/RESILIENCE-FIX.md index 3fe3b5df..8cb4edf0 100644 --- a/src/modules/bmm/workflows/4-implementation/batch-super-dev/RESILIENCE-FIX.md +++ b/src/modules/bmm/workflows/4-implementation/batch-super-dev/RESILIENCE-FIX.md @@ -47,7 +47,7 @@ Story 18-5: ### Add state file tracking: ```yaml -# In batch-super-dev/workflow.yaml +# In batch-stories/workflow.yaml state_tracking: enabled: true state_file: "{sprint_artifacts}/batch-execution-state-{batch_id}.yaml" @@ -92,7 +92,7 @@ stories: ### Resume logic: ```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" if ls $state_file 2>/dev/null; then @@ -172,7 +172,7 @@ story_content=$(read_with_retry "$story_file") || { ## Implementation -Add to batch-super-dev Step 4-Sequential: +Add to batch-stories Step 4-Sequential: ```xml @@ -204,7 +204,7 @@ Add to batch-super-dev Step 4-Sequential: Read story file with retry - Execute super-dev-pipeline + Execute story-full-pipeline Save state: story completed @@ -236,7 +236,7 @@ Story 18-5: ❌ Crashed (state saved with error) 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)" User: "yes" diff --git a/src/modules/bmm/workflows/4-implementation/batch-super-dev/WORKFLOW-PATCH-STEP-2.5.md b/src/modules/bmm/workflows/4-implementation/batch-super-dev/WORKFLOW-PATCH-STEP-2.5.md index d11ac616..837ee7e4 100644 --- a/src/modules/bmm/workflows/4-implementation/batch-super-dev/WORKFLOW-PATCH-STEP-2.5.md +++ b/src/modules/bmm/workflows/4-implementation/batch-super-dev/WORKFLOW-PATCH-STEP-2.5.md @@ -81,7 +81,7 @@ This workflow requires: ``` Must show: "✅ All 12 sections present" -4. **Re-run batch-super-dev:** +4. **Re-run batch-stories:** - Story will now be properly formatted - Can be executed in next batch run @@ -132,7 +132,7 @@ This workflow requires: **After completing these actions:** 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 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ @@ -220,14 +220,14 @@ fi ## 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 # Batch Super-Dev Workflow ## Critical Prerequisites -**BEFORE running batch-super-dev:** +**BEFORE running batch-stories:** 1. ✅ **All stories must be properly generated** - Run: `/create-story-with-gap-analysis` for each story @@ -252,13 +252,13 @@ fi **What you might try:** ``` 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 ``` **What happens:** - 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) - You waste time @@ -270,7 +270,7 @@ fi **Solution:** - Generate ALL stories manually FIRST: /create-story-with-gap-analysis - Validate: ./scripts/validate-all-stories.sh -- THEN run batch: /batch-super-dev +- THEN run batch: /batch-stories ### ❌ Mixed Story Quality @@ -301,7 +301,7 @@ done ./scripts/validate-all-stories.sh # 3. Execute (4-8 hours, parallel autonomous) -/batch-super-dev +/batch-stories # Select all 5 stories # Choose 2-4 agents parallel @@ -325,13 +325,13 @@ done **To apply these improvements:** -- [ ] Update `batch-super-dev/instructions.md` Step 2.5 (lines 82-99) -- [ ] Add `batch-super-dev/AGENT-LIMITATIONS.md` (new file) -- [ ] Add `batch-super-dev/BATCH-BEST-PRACTICES.md` (new file) -- [ ] Update `batch-super-dev/README.md` with prerequisites +- [ ] Update `batch-stories/instructions.md` Step 2.5 (lines 82-99) +- [ ] Add `batch-stories/AGENT-LIMITATIONS.md` (new file) +- [ ] Add `batch-stories/BATCH-BEST-PRACTICES.md` (new file) +- [ ] Update `batch-stories/README.md` with prerequisites - [ ] Create `scripts/validate-all-stories.sh` (new script) - [ ] 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:** - Try batch with mixed story quality → Should skip skeletons gracefully diff --git a/src/modules/bmm/workflows/4-implementation/batch-super-dev/step-4.5-reconcile-story-status.md b/src/modules/bmm/workflows/4-implementation/batch-super-dev/step-4.5-reconcile-story-status.md index daf96e00..eddd36c1 100644 --- a/src/modules/bmm/workflows/4-implementation/batch-super-dev/step-4.5-reconcile-story-status.md +++ b/src/modules/bmm/workflows/4-implementation/batch-super-dev/step-4.5-reconcile-story-status.md @@ -1,7 +1,7 @@ # Step 4.5: Story Reconciliation (Orchestrator-Driven) **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 --- diff --git a/src/modules/bmm/workflows/4-implementation/batch-super-dev/workflow.md b/src/modules/bmm/workflows/4-implementation/batch-super-dev/workflow.md index c54616af..850e81f4 100644 --- a/src/modules/bmm/workflows/4-implementation/batch-super-dev/workflow.md +++ b/src/modules/bmm/workflows/4-implementation/batch-super-dev/workflow.md @@ -1,7 +1,7 @@ # Batch Super-Dev v3.0 - Unified Workflow -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. @@ -18,7 +18,7 @@ Orchestrator coordinates. Agents do implementation. Orchestrator does reconcilia -name: batch-super-dev +name: batch-stories version: 3.1.0 modes: @@ -37,7 +37,7 @@ defaults: @patterns/hospital-grade.md @patterns/agent-completion.md -@super-dev-pipeline/workflow.md +@story-full-pipeline/workflow.md @@ -203,16 +203,16 @@ If missing, auto-create using greenfield workflow: 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 - story_key: {{story_key}} - complexity_level: {{complexity}} **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:** ```bash @@ -294,10 +294,10 @@ Task({ subagent_type: "general-purpose", description: "Implement {{story_key}}", prompt: ` -Execute super-dev-pipeline for story {{story_key}}. +Execute story-full-pipeline for story {{story_key}}. -@super-dev-pipeline/workflow.md +@story-full-pipeline/workflow.md diff --git a/src/modules/bmm/workflows/4-implementation/create-story/workflow.md b/src/modules/bmm/workflows/4-implementation/create-story/workflow.md index dc7b74b9..f581efbe 100644 --- a/src/modules/bmm/workflows/4-implementation/create-story/workflow.md +++ b/src/modules/bmm/workflows/4-implementation/create-story/workflow.md @@ -228,7 +228,7 @@ Ready for implementation. Next Steps: 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 [N] Create next story diff --git a/src/modules/bmm/workflows/4-implementation/story-pipeline/README.md b/src/modules/bmm/workflows/4-implementation/story-pipeline/README.md index a7edf118..79d6ebd6 100644 --- a/src/modules/bmm/workflows/4-implementation/story-pipeline/README.md +++ b/src/modules/bmm/workflows/4-implementation/story-pipeline/README.md @@ -101,7 +101,7 @@ Human-in-the-loop with approval at each step: bmad build 1-4 # 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" ``` @@ -121,7 +121,7 @@ Unattended execution for trusted stories: bmad build 1-4 --batch # 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: @@ -148,7 +148,7 @@ Resume automatically: ## Directory Structure ``` -story-pipeline/ +story-dev-only/ ├── workflow.yaml # Configuration, agent mapping, quality gates ├── workflow.md # Interactive mode orchestration ├── batch-runner.sh # Batch mode runner script @@ -178,7 +178,7 @@ story-pipeline/ ### workflow.yaml ```yaml -name: story-pipeline +name: story-dev-only version: "2.0" description: "Single-session story implementation with step-file loading" diff --git a/src/modules/bmm/workflows/4-implementation/story-pipeline/steps/step-01-init.md b/src/modules/bmm/workflows/4-implementation/story-pipeline/steps/step-01-init.md index 12501cd6..4e25ce72 100644 --- a/src/modules/bmm/workflows/4-implementation/story-pipeline/steps/step-01-init.md +++ b/src/modules/bmm/workflows/4-implementation/story-pipeline/steps/step-01-init.md @@ -3,7 +3,7 @@ name: 'step-01-init' description: 'Initialize story pipeline: load context, detect mode, cache documents' # 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 thisStepFile: '{workflow_path}/steps/step-01-init.md' diff --git a/src/modules/bmm/workflows/4-implementation/story-pipeline/steps/step-01b-resume.md b/src/modules/bmm/workflows/4-implementation/story-pipeline/steps/step-01b-resume.md index 590bc652..d6fb3d3b 100644 --- a/src/modules/bmm/workflows/4-implementation/story-pipeline/steps/step-01b-resume.md +++ b/src/modules/bmm/workflows/4-implementation/story-pipeline/steps/step-01b-resume.md @@ -3,7 +3,7 @@ name: 'step-01b-resume' description: 'Resume pipeline from checkpoint after failure or interruption' # 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 thisStepFile: '{workflow_path}/steps/step-01b-resume.md' diff --git a/src/modules/bmm/workflows/4-implementation/story-pipeline/steps/step-02-create-story.md b/src/modules/bmm/workflows/4-implementation/story-pipeline/steps/step-02-create-story.md index 097b31ae..79d83ef8 100644 --- a/src/modules/bmm/workflows/4-implementation/story-pipeline/steps/step-02-create-story.md +++ b/src/modules/bmm/workflows/4-implementation/story-pipeline/steps/step-02-create-story.md @@ -3,7 +3,7 @@ name: 'step-02-create-story' description: 'Create detailed story file from epic definition with research' # 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 thisStepFile: '{workflow_path}/steps/step-02-create-story.md' diff --git a/src/modules/bmm/workflows/4-implementation/story-pipeline/steps/step-03-validate-story.md b/src/modules/bmm/workflows/4-implementation/story-pipeline/steps/step-03-validate-story.md index 13806d0e..7fe063eb 100644 --- a/src/modules/bmm/workflows/4-implementation/story-pipeline/steps/step-03-validate-story.md +++ b/src/modules/bmm/workflows/4-implementation/story-pipeline/steps/step-03-validate-story.md @@ -3,7 +3,7 @@ name: 'step-03-validate-story' description: 'Adversarial validation of story completeness and quality' # 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 thisStepFile: '{workflow_path}/steps/step-03-validate-story.md' diff --git a/src/modules/bmm/workflows/4-implementation/story-pipeline/steps/step-04-atdd.md b/src/modules/bmm/workflows/4-implementation/story-pipeline/steps/step-04-atdd.md index 8a2b6a4e..08c79302 100644 --- a/src/modules/bmm/workflows/4-implementation/story-pipeline/steps/step-04-atdd.md +++ b/src/modules/bmm/workflows/4-implementation/story-pipeline/steps/step-04-atdd.md @@ -3,7 +3,7 @@ name: 'step-04-atdd' description: 'Generate failing acceptance tests before implementation (RED phase)' # 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 thisStepFile: '{workflow_path}/steps/step-04-atdd.md' diff --git a/src/modules/bmm/workflows/4-implementation/story-pipeline/steps/step-05-implement.md b/src/modules/bmm/workflows/4-implementation/story-pipeline/steps/step-05-implement.md index c98ef4fe..d1f35291 100644 --- a/src/modules/bmm/workflows/4-implementation/story-pipeline/steps/step-05-implement.md +++ b/src/modules/bmm/workflows/4-implementation/story-pipeline/steps/step-05-implement.md @@ -3,7 +3,7 @@ name: 'step-05-implement' description: 'Implement story to make tests pass (GREEN phase)' # 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 thisStepFile: '{workflow_path}/steps/step-05-implement.md' diff --git a/src/modules/bmm/workflows/4-implementation/story-pipeline/steps/step-05b-post-validation.md b/src/modules/bmm/workflows/4-implementation/story-pipeline/steps/step-05b-post-validation.md index 070f95eb..2d81248f 100644 --- a/src/modules/bmm/workflows/4-implementation/story-pipeline/steps/step-05b-post-validation.md +++ b/src/modules/bmm/workflows/4-implementation/story-pipeline/steps/step-05b-post-validation.md @@ -3,7 +3,7 @@ name: 'step-05b-post-validation' description: 'Verify completed tasks against codebase reality (catch false positives)' # 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 thisStepFile: '{workflow_path}/steps/step-05b-post-validation.md' diff --git a/src/modules/bmm/workflows/4-implementation/story-pipeline/steps/step-06-code-review.md b/src/modules/bmm/workflows/4-implementation/story-pipeline/steps/step-06-code-review.md index bcc45f77..ca6e8429 100644 --- a/src/modules/bmm/workflows/4-implementation/story-pipeline/steps/step-06-code-review.md +++ b/src/modules/bmm/workflows/4-implementation/story-pipeline/steps/step-06-code-review.md @@ -3,7 +3,7 @@ name: 'step-06-code-review' description: 'Adversarial code review finding 3-10 specific issues' # 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 thisStepFile: '{workflow_path}/steps/step-06-code-review.md' diff --git a/src/modules/bmm/workflows/4-implementation/story-pipeline/steps/step-07-complete.md b/src/modules/bmm/workflows/4-implementation/story-pipeline/steps/step-07-complete.md index eabbcfc4..d2cbbef8 100644 --- a/src/modules/bmm/workflows/4-implementation/story-pipeline/steps/step-07-complete.md +++ b/src/modules/bmm/workflows/4-implementation/story-pipeline/steps/step-07-complete.md @@ -3,7 +3,7 @@ name: 'step-07-complete' description: 'Update sprint status and create git commit' # 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 thisStepFile: '{workflow_path}/steps/step-07-complete.md' @@ -89,7 +89,7 @@ stories: code_reviewed: true issues_found: {count} issues_fixed: {count} - pipeline_version: "story-pipeline-v2.0" + pipeline_version: "story-dev-only-v2.0" ``` ### 4. Stage Git Changes @@ -119,7 +119,7 @@ feat(epic-{epic_num}): complete story {story_id} - Code reviewed: {issues_found} issues found and fixed Story: {story_title} -Pipeline: story-pipeline-v2.0 +Pipeline: story-dev-only-v2.0 🤖 Generated with BMAD Story Pipeline diff --git a/src/modules/bmm/workflows/4-implementation/story-pipeline/steps/step-08-summary.md b/src/modules/bmm/workflows/4-implementation/story-pipeline/steps/step-08-summary.md index 43566307..96f99f22 100644 --- a/src/modules/bmm/workflows/4-implementation/story-pipeline/steps/step-08-summary.md +++ b/src/modules/bmm/workflows/4-implementation/story-pipeline/steps/step-08-summary.md @@ -3,7 +3,7 @@ name: 'step-08-summary' description: 'Generate audit trail and pipeline summary report' # 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 thisStepFile: '{workflow_path}/steps/step-08-summary.md' @@ -48,7 +48,7 @@ Create: `{auditFile}` ```yaml --- audit_version: "1.0" -pipeline: "story-pipeline-v2.0" +pipeline: "story-dev-only-v2.0" story_id: "{story_id}" epic_num: {epic_num} --- diff --git a/src/modules/bmm/workflows/4-implementation/story-pipeline/workflow.md b/src/modules/bmm/workflows/4-implementation/story-pipeline/workflow.md index 6ca4df47..29399ed3 100644 --- a/src/modules/bmm/workflows/4-implementation/story-pipeline/workflow.md +++ b/src/modules/bmm/workflows/4-implementation/story-pipeline/workflow.md @@ -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. web_bundle: true --- @@ -112,7 +112,7 @@ Load and cache these documents (read once, use across steps): ### 4. First Step Execution 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` --- diff --git a/src/modules/bmm/workflows/4-implementation/super-dev-pipeline/README.md b/src/modules/bmm/workflows/4-implementation/super-dev-pipeline/README.md index a2eba0f6..87046325 100644 --- a/src/modules/bmm/workflows/4-implementation/super-dev-pipeline/README.md +++ b/src/modules/bmm/workflows/4-implementation/super-dev-pipeline/README.md @@ -8,10 +8,10 @@ ```bash # 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) -/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 ``` -super-dev-pipeline/ +story-full-pipeline/ ├── README.md (this file) ├── workflow.yaml (configuration) ├── workflow.md (complete documentation) diff --git a/src/modules/bmm/workflows/4-implementation/super-dev-pipeline/workflow.md b/src/modules/bmm/workflows/4-implementation/super-dev-pipeline/workflow.md index e8d3c5ac..8baf2a0b 100644 --- a/src/modules/bmm/workflows/4-implementation/super-dev-pipeline/workflow.md +++ b/src/modules/bmm/workflows/4-implementation/super-dev-pipeline/workflow.md @@ -1,38 +1,47 @@ -# Super-Dev-Pipeline v3.0 - Unified Workflow +# Super-Dev-Pipeline v3.1 - Token-Efficient Multi-Agent Pipeline -Implement a story using 4 independent agents with orchestrator-driven reconciliation. -Each agent has single responsibility. No agent validates its own work. +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). -**Agents do creative work. Orchestrator does bookkeeping.** +**Token-Efficient Multi-Agent Pipeline** -- Builder implements (creative) -- Inspector validates (verification) -- Reviewer finds issues (adversarial) -- Fixer resolves issues (creative) +- 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) -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. -name: super-dev-pipeline -version: 3.0.0 +name: story-full-pipeline +version: 3.1.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} +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 -complexity_routing: - micro: {skip: [reviewer], description: "Low-risk stories"} - standard: {skip: [], description: "Normal stories"} - complex: {skip: [], enhanced_review: true, description: "High-risk stories"} +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) @@ -42,109 +51,13 @@ complexity_routing: - -## Implementation Execution Checklist + +Load and validate the story file. -**Story {{story_key}} requires these exact steps (cannot skip):** - -### 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 - - - -**AUTO-FIX MISSING PREREQUISITES** - -```bash +\`\`\`bash STORY_FILE="docs/sprint-artifacts/{{story_key}}.md" - -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:** +[ -f "$STORY_FILE" ] || { echo "ERROR: Story file not found"; exit 1; } +\`\`\` Use Read tool on the story file. Parse: - Complexity level (micro/standard/complex) @@ -157,420 +70,146 @@ Determine which agents to spawn based on complexity routing. **Phase 1: Builder Agent (Steps 1-4)** -``` +\`\`\` ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 🔨 PHASE 1: BUILDER ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ -``` +\`\`\` -Spawn Builder agent: +Spawn Builder agent and save 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}}. +**CRITICAL: Save Builder's agent_id for later resume** - -@patterns/hospital-grade.md -@patterns/tdd.md -@patterns/agent-completion.md - +\`\`\` +BUILDER_AGENT_ID={{agent_id_from_task_result}} +echo "Builder agent: $BUILDER_AGENT_ID" +\`\`\` - -Story: [inline story file content] - +Wait for completion. Parse structured output. Verify files exist. - -Implement the story requirements: -1. Load and understand requirements -2. Analyze what exists vs needed -3. Write tests first (TDD) -4. Implement production code - - - -- DO NOT validate your own work -- DO NOT review your code -- DO NOT update story checkboxes -- DO NOT commit changes - - - -- [ ] Tests written for all requirements -- [ ] Production code implements tests -- [ ] Return ## AGENT COMPLETE with file lists - -` -}) -``` - -**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. +If files missing or status FAILED: halt pipeline. - -**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)** -``` -Task({ - subagent_type: "general-purpose", - description: "Validate story {{story_key}} implementation", - prompt: ` -You are the INSPECTOR agent for story {{story_key}}. +Determine reviewer count based on complexity: +\`\`\` +if complexity == "micro": REVIEWER_COUNT = 1 +if complexity == "standard": REVIEWER_COUNT = 2 +if complexity == "complex": REVIEWER_COUNT = 3 +\`\`\` - -@patterns/verification.md -@patterns/hospital-grade.md -@patterns/agent-completion.md - +Spawn Inspector + N Reviewers in single message. Wait for ALL agents to complete. Collect findings. - -Story: [inline story file content] - - - -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 - - - -- You have NO KNOWLEDGE of what Builder did -- Run all checks yourself -- Don't trust any claims - - - -- [ ] All files verified to exist -- [ ] Type check passes (0 errors) -- [ ] Lint passes (0 warnings) -- [ ] Tests pass -- [ ] Return ## AGENT COMPLETE with evidence - -` -}) -``` - -**Wait for completion. Parse verdict.** - -If FAIL: halt pipeline, report specific failures. +Aggregate all findings from Inspector + Reviewers. - -**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!)** -``` -Task({ - subagent_type: "general-purpose", - description: "Review story {{story_key}} code", - prompt: ` -You are the ADVERSARIAL REVIEWER for story {{story_key}}. +Use Task tool with `resume: "{{BUILDER_AGENT_ID}}"` parameter. - -@patterns/security-checklist.md -@patterns/hospital-grade.md -@patterns/agent-completion.md - - - -Story: [inline story file content] - - - -Find problems. Be critical. Look for: -- Security vulnerabilities (CRITICAL) -- Logic bugs and edge cases (HIGH) -- Performance issues (MEDIUM) -- Code style issues (LOW) - - - -- Your goal is to FIND ISSUES -- Don't rubber-stamp -- Be thorough - - - -- [ ] All new files reviewed -- [ ] Security checks completed -- [ ] Issues categorized by severity -- [ ] Return ## AGENT COMPLETE with issue list - -` -}) -``` - -**Wait for completion. Parse issue counts.** - - - -**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}}. - - -@patterns/hospital-grade.md -@patterns/agent-completion.md - - - -Story: [inline story file content] -Review issues: [inline reviewer findings] - - - -Fix CRITICAL and HIGH issues: -1. Fix ALL CRITICAL issues (security) -2. Fix ALL HIGH issues (bugs) -3. Fix MEDIUM if time allows +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 - - -- DO NOT skip CRITICAL issues -- DO NOT update story checkboxes (orchestrator does this) -- DO NOT update sprint-status (orchestrator does this) - +Wait for completion. Parse commit hash and fix counts. + - -- [ ] All CRITICAL fixed -- [ ] All HIGH fixed -- [ ] Tests still pass -- [ ] Git commit created -- [ ] Return ## AGENT COMPLETE with fix summary - -` -}) -``` + +**Phase 4: Quick Inspector Re-Check** -**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. **Phase 5: Orchestrator Reconciliation** -``` +\`\`\` ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 🔧 PHASE 5: RECONCILIATION (Orchestrator) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ -``` +\`\`\` **YOU (orchestrator) do this directly. No agent spawn.** -**Step 5.1: Verify completion artifact exists** -```bash -FIXER_COMPLETION="docs/sprint-artifacts/completions/{{story_key}}-fixer.json" - -if [ ! -f "$FIXER_COMPLETION" ]; then - echo "❌ BLOCKER: Fixer completion artifact missing" - 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. +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" **Final Quality Gate** -```bash -echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" -echo "🔍 FINAL VERIFICATION" -echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" +Verify: +1. Git commit exists +2. Story tasks checked (count > 0) +3. Dev Agent Record filled +4. Sprint status updated -# 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`. +If verification fails: fix using Edit, then re-verify. -**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. +**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. -| 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 | 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. -- [ ] 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 - [ ] Story file has checked tasks (count > 0) -- [ ] Dev Agent Record filled +- [ ] Dev Agent Record filled with all phases - [ ] Sprint status updated to "done"