From 2c84b29cb67c10a2828e656d93352728fe7fcba2 Mon Sep 17 00:00:00 2001 From: Jonah Schulte Date: Wed, 7 Jan 2026 19:49:31 -0500 Subject: [PATCH] fix(batch-super-dev): Fix conditional questions + add 'Mend the Gap' context MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PROBLEM 1: Confusing Conditional Question Logic - Step 3.5 asked BOTH questions (Sequential/Parallel AND agent count) simultaneously - User selects Sequential but still had to answer 'how many agents?' - LLM misinterpreted agent count answer and launched parallel agents incorrectly FIX 1: Split into Proper Conditional Flow - First : Sequential or Parallel? (required) - Second : ONLY if Parallel selected, ask agent count (conditional) - Sequential mode now skips agent count question entirely - Matches proper workflow.xml semantics (one = one response) PROBLEM 2: Missing Use Case Context - Workflow didn't explain it's primarily for gap analysis/reconciliation - LLM didn't understand 'Sequential' means process in THIS session (not background) - Missing mental model: verify existing → build gaps → check boxes → done FIX 2: Add 'Mend the Gap' Header with Use Case Guide - Added description: gap analysis + reconciliation workflow - Explained 3 modes: Reconciliation (most common), Greenfield, Brownfield - Clarified Sequential = in-session processing (not background agents) - Added simple mental model for LLM understanding IMPROVEMENT 3: Safety Limit on Parallel Agents - Added 10-agent maximum (prevents resource exhaustion) - 'all' option caps at min(story_count, 10) - Added warning when count capped RESULT: - Sequential mode works as intended (no confusion) - Parallel mode asks for agent count (conditional) - LLMs understand primary use case (gap analysis) - Safety limits prevent runaway agent spawning - Proper workflow.xml conditional flow Resolves: Execution mode confusion that caused incorrect parallel agent launches --- .../batch-super-dev/instructions.md | 79 ++++++++++++++++--- src/modules/cis/module.yaml | 1 - 2 files changed, 68 insertions(+), 12 deletions(-) diff --git a/src/modules/bmm/workflows/4-implementation/batch-super-dev/instructions.md b/src/modules/bmm/workflows/4-implementation/batch-super-dev/instructions.md index 4ec0d1d9..560d2242 100644 --- a/src/modules/bmm/workflows/4-implementation/batch-super-dev/instructions.md +++ b/src/modules/bmm/workflows/4-implementation/batch-super-dev/instructions.md @@ -1,4 +1,45 @@ # Batch Super-Dev - Interactive Story Selector +## AKA: "Mend the Gap" 🚇 + +**Primary Use Case:** Gap analysis and reconciliation workflow + +This workflow helps you "mind the gap" between story requirements and codebase reality, then "mend the gap" by building only what's truly missing. + +### What This Workflow Does + +1. **Scans codebase** to verify what's actually implemented vs what stories claim +2. **Finds the gap** between story requirements and reality +3. **Mends the gap** by building ONLY what's truly missing (no duplicate work) +4. **Updates tracking** to reflect actual completion status (check boxes, sprint-status) + +### Common Use Cases + +**Reconciliation Mode (Most Common):** +- Work was done but not properly tracked +- Stories say "build X" but X is 60-80% already done +- Need second set of eyes to find real gaps +- Update story checkboxes to match reality + +**Greenfield Mode:** +- Story says "build X", nothing exists +- Build 100% from scratch with full quality gates + +**Brownfield Mode:** +- Story says "modify X", X exists +- Refactor carefully, add only new requirements + +### Execution Modes + +**Sequential (Recommended for Gap Analysis):** +- Process stories ONE-BY-ONE in THIS SESSION +- After each story: verify existing code → build only gaps → check boxes → move to next +- Easier to monitor, can intervene if issues found +- Best for reconciliation work + +**Parallel (For Greenfield Batch Implementation):** +- Spawn autonomous Task agents to process stories concurrently +- Faster completion but harder to monitor +- Best when stories are independent and greenfield The workflow execution engine is governed by: {project-root}/_bmad/core/tasks/workflow.xml You MUST have already loaded and processed: {project-root}/_bmad/bmm/workflows/4-implementation/batch-super-dev/workflow.yaml @@ -349,31 +390,47 @@ Only the first {{max_stories}} will be processed. - Use AskUserQuestion to determine execution mode and parallelization - **How should these stories be processed?** -**Execution Mode:** -- Sequential: Run stories one-by-one in this session (slower, easier to monitor) -- Parallel: Spawn Task agents to process stories concurrently (faster, autonomous) +Options: +- **sequential**: Run stories one-by-one in this session (slower, easier to monitor) +- **parallel**: Spawn Task agents to process stories concurrently (faster, autonomous) -**If Parallel, how many agents in parallel?** -- Conservative: 2 agents (low resource usage, easier debugging) -- Moderate: 4 agents (balanced performance) -- Aggressive: All stories at once (fastest, high resource usage) +Enter: sequential or parallel - Capture responses: execution_mode, parallel_count + Capture response as: execution_mode Set parallel_count = 1 Set use_task_agents = false + ✅ Sequential mode selected - stories will be processed one-by-one in this session Set use_task_agents = true - If parallel_count == 'all': set parallel_count = count of selected_stories + + +**How many agents should run in parallel?** + +Options: +- **2**: Conservative (low resource usage, easier debugging) +- **4**: Moderate (balanced performance, recommended) +- **8**: Aggressive (higher throughput) +- **10**: Maximum (10 agent limit for safety) +- **all**: Use all stories (max 10 agents) + +Enter number (2-10) or 'all': + + + Capture response as: parallel_count + If parallel_count == 'all': set parallel_count = min(count of selected_stories, 10) + If parallel_count > 10: set parallel_count = 10 (safety limit) + + + ⚠️ Requested {{original_count}} agents, capped at 10 (safety limit) + diff --git a/src/modules/cis/module.yaml b/src/modules/cis/module.yaml index 02ce7ca9..f03960d0 100644 --- a/src/modules/cis/module.yaml +++ b/src/modules/cis/module.yaml @@ -4,7 +4,6 @@ header: "Creative Innovation Suite (CIS) Module" subheader: "No custom configuration required - uses Core settings only" default_selected: false # This module will not be selected by default for new installations - # Variables from Core Config inserted: ## user_name ## communication_language