From cb1d3d5d02fb9a8fef1d652b6d4d5a8ae27e27ff Mon Sep 17 00:00:00 2001 From: Jonah Schulte Date: Thu, 29 Jan 2026 00:08:03 -0500 Subject: [PATCH] feat: make pipeline agent phases visible as top-level Tasks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - batch-stories sequential mode no longer wraps pipeline in a Task - Each phase (Bob, Vera, Tessa, Rex, Rita) spawns as a visible Task - Updated Task descriptions with persona names and emojis - Users can now see each agent working in Claude Code UI Before: Task(Implement story 18-5) with everything nested inside After: Task(๐Ÿ”จ Bob the Builder on 18-5) Task(๐Ÿ•ต๏ธ Vera the Inspector on 18-5) Task(๐Ÿงช Tessa the Test Scientist on 18-5) Task(๐Ÿ”ด Rex reviewing 18-5) x N Task(๐Ÿ”จ Bob fixing 18-5) Task(๐Ÿ•ต๏ธ Vera re-checking 18-5) Task(๐Ÿ“š Rita reflecting on 18-5) Bump version to 6.1.0-Beta.7 --- package.json | 2 +- .../batch-stories/workflow.md | 36 ++++++-- .../story-full-pipeline/workflow.md | 92 +++++++++++++++++-- 3 files changed, 111 insertions(+), 19 deletions(-) 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}}.