diff --git a/package.json b/package.json index e0e417d0..2e97d2d7 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "$schema": "https://json.schemastore.org/package.json", "name": "@jonahschulte/bmad-method", - "version": "6.1.0-Beta.6", + "version": "6.1.0-Beta.7", "description": "Breakthrough Method of Agile AI-driven Development (Enhanced with TDD, intelligent multi-agent review, and production-hardened enforcement)", "keywords": [ "agile", diff --git a/src/bmm/workflows/4-implementation/batch-stories/workflow.md b/src/bmm/workflows/4-implementation/batch-stories/workflow.md index 850e81f4..fefb037c 100644 --- a/src/bmm/workflows/4-implementation/batch-stories/workflow.md +++ b/src/bmm/workflows/4-implementation/batch-stories/workflow.md @@ -165,11 +165,13 @@ For parallel: proceed to `execute_parallel` -**Sequential Processing** +**Sequential Processing - Visible Agent Phases** ``` ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ -📦 SEQUENTIAL PROCESSING +📦 SEQUENTIAL PROCESSING - VISIBLE AGENTS +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +Each phase spawns as a TOP-LEVEL Task you can see! ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ``` @@ -203,12 +205,30 @@ If missing, auto-create using greenfield workflow: echo "✅ Prerequisites satisfied" ``` -**Step B: Invoke story-full-pipeline** +**Step B: Execute Pipeline Phases DIRECTLY (not wrapped in Task)** -Use story-full-pipeline workflow with: -- mode: batch -- story_key: {{story_key}} -- complexity_level: {{complexity}} +⚠️ **CRITICAL: DO NOT wrap this in a Task!** +Execute the pipeline phases directly so each agent is a visible top-level Task. + +**B.1: Load story-full-pipeline workflow:** +Read: `{project-root}/_bmad/bmm/workflows/4-implementation/story-full-pipeline/workflow.md` + +**B.2: Execute each phase as described in workflow.md:** +The workflow describes spawning these Tasks - spawn them DIRECTLY: + +``` +Phase 0: Playbook Query (orchestrator does this, no Task) +Phase 1: Task({ description: "🔨 Bob implementing {{story_key}}", ... }) ← VISIBLE +Phase 2: Task({ description: "🕵️ Vera validating {{story_key}}", ... }) ← VISIBLE + Task({ description: "🧪 Tessa testing {{story_key}}", ... }) ← VISIBLE + Task({ description: "🔴 Rex reviewing {{story_key}}", ... }) ← VISIBLE (x N) +Phase 3: Task({ description: "🔨 Bob fixing {{story_key}}", resume: ID }) ← VISIBLE +Phase 4: Task({ description: "🕵️ Vera re-checking {{story_key}}", ... }) ← VISIBLE +Phase 5: Reconciliation (orchestrator does this, no Task) +Phase 6: Task({ description: "📚 Rita reflecting on {{story_key}}", ... }) ← VISIBLE +``` + +**Why this matters:** By NOT wrapping the pipeline in a Task, each agent spawn becomes a top-level Task that the user can see in Claude Code's UI. **Step C: Reconcile Using Completion Artifacts (orchestrator does this directly)** @@ -292,7 +312,7 @@ Use Edit tool: `"{{story_key}}: ready-for-dev"` → `"{{story_key}}: done"` ``` Task({ subagent_type: "general-purpose", - description: "Implement {{story_key}}", + description: "🔨 Bob's Team on {{story_key}}", prompt: ` Execute story-full-pipeline for story {{story_key}}. diff --git a/src/bmm/workflows/4-implementation/story-full-pipeline/workflow.md b/src/bmm/workflows/4-implementation/story-full-pipeline/workflow.md index c755648d..3f01f26a 100644 --- a/src/bmm/workflows/4-implementation/story-full-pipeline/workflow.md +++ b/src/bmm/workflows/4-implementation/story-full-pipeline/workflow.md @@ -150,10 +150,12 @@ Extract the \`\` section - this defines WHO Bob is. **2. Spawn Builder agent and SAVE agent_id for resume later:** +⚠️ **This Task should be VISIBLE in Claude Code UI!** + \`\`\` BUILDER_TASK = Task({ subagent_type: "general-purpose", - description: "Bob 🔨 implementing story {{story_key}}", + description: "🔨 Bob the Builder on {{story_key}}", prompt: \` You are BOB 🔨 - The Builder. @@ -284,7 +286,7 @@ Send single message with multiple Task calls: \`\`\` Task({ subagent_type: "testing-suite:test-engineer", - description: "Vera 🔍 validating story {{story_key}}", + description: "🕵️ Vera the Inspector on {{story_key}}", prompt: \` You are VERA 🔍 - The Verification Inspector. @@ -397,7 +399,7 @@ Save to: docs/sprint-artifacts/completions/{{story_key}}-inspector.json \`\`\` Task({ subagent_type: "testing-suite:test-engineer", - description: "Tessa 🧪 reviewing test quality for {{story_key}}", + description: "🧪 Tessa the Test Scientist on {{story_key}}", prompt: \` You are TESSA 🧪 - The Test Quality Analyst. @@ -478,7 +480,56 @@ Save to: docs/sprint-artifacts/completions/{{story_key}}-test-quality.json --- -(Continue with Security, Logic, Architect, Quality reviewers as before...) +## Rex 🔴 Reviewers (Spawn based on complexity) + +Load Rex's persona from: `{project-root}/_bmad/bmm/agents/reviewer.md` + +**Security Reviewer (always spawn):** +\`\`\` +Task({ + subagent_type: "auditor-security", + description: "🔴 Rex (Security) on {{story_key}}", + prompt: \` +You are REX 🔴 - The Code Critic (Security Focus). + + +[INJECT persona section from _bmad/bmm/agents/reviewer.md] + + +Focus: Security vulnerabilities, injection attacks, auth issues. +[... security review prompt ...] +\` +}) +\`\`\` + +**Logic/Performance Reviewer (standard/complex):** +\`\`\` +Task({ + subagent_type: "optimizer-performance", + description: "🔴 Rex (Logic) on {{story_key}}", + prompt: "... logic and performance review ..." +}) +\`\`\` + +**Architecture Reviewer (always spawn):** +\`\`\` +Task({ + subagent_type: "architect-reviewer", + description: "🔴 Rex (Architecture) on {{story_key}}", + prompt: "... architecture patterns review ..." +}) +\`\`\` + +**Code Quality Reviewer (complex only):** +\`\`\` +Task({ + subagent_type: "general-purpose", + description: "🔴 Rex (Quality) on {{story_key}}", + prompt: "... code quality review ..." +}) +\`\`\` + +--- **Wait for ALL agents to complete.** @@ -537,10 +588,14 @@ If coverage fails: add to issues list for Builder to fix. **CRITICAL: Resume Bob (reuses context, 50-70% token savings!)** -Use Task tool with \`resume: "{{BUILDER_AGENT_ID}}"\` parameter. +⚠️ **This Task should be VISIBLE in Claude Code UI!** -**Bob's Fix Prompt:** \`\`\` +Task({ + subagent_type: "general-purpose", + description: "🔨 Bob fixing issues on {{story_key}}", + resume: "{{BUILDER_AGENT_ID}}", + prompt: \` Hey Bob! 🔨 The review team found some issues. Can we fix it? @@ -576,15 +631,32 @@ Wait for completion. Parse commit hash and fix counts. -**Phase 4: Quick Inspector Re-Check** +**Phase 4: Vera 🕵️ Quick Re-Check** \`\`\` ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ -✅ PHASE 4: RE-VERIFICATION +🕵️ PHASE 4: VERA RE-VERIFIES ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ \`\`\` -Spawn Inspector only (not full review). Quick functional verification. +⚠️ **This Task should be VISIBLE in Claude Code UI!** + +\`\`\` +Task({ + subagent_type: "testing-suite:test-engineer", + description: "🕵️ Vera re-checking {{story_key}}", + prompt: \` +You are VERA 🕵️ - Quick re-verification after Bob's fixes. + +Verify that: +1. All CRITICAL/HIGH issues from Phase 2 are resolved +2. Tests still pass +3. No new issues introduced + +Return: PASS or FAIL with evidence. +\` +}) +\`\`\` If FAIL: Resume Builder again with new issues. If PASS: Proceed to reconciliation. @@ -710,7 +782,7 @@ Spawn Reflection Agent: \`\`\` Task({ subagent_type: "general-purpose", - description: "Extract learnings from {{story_key}}", + description: "📚 Rita the Librarian reflecting on {{story_key}}", prompt: \` You are the REFLECTION agent for story {{story_key}}.