From e7d51739e4b43446b1433988b823a601b83f8629 Mon Sep 17 00:00:00 2001 From: Brian Madison Date: Mon, 3 Nov 2025 21:05:18 -0600 Subject: [PATCH] update local install --- .claude/commands/bmad/bmm/agents/architect.md | 1 - .claude/commands/bmad/bmm/agents/sm.md | 2 +- .../commands/bmad/bmm/agents/tech-writer.md | 82 + .claude/commands/bmad/bmm/workflows/README.md | 4 +- .../bmad/bmm/workflows/epic-tech-context.md | 15 + .../bmad/bmm/workflows/tech-spec-sm.md | 2 +- .../commands/bmad/core/workflows/README.md | 10 + bmad/_cfg/agent-manifest.csv | 3 +- .../agents/bmm-tech-writer.customize.yaml | 42 + bmad/_cfg/files-manifest.csv | 102 +- bmad/_cfg/ides/claude-code.yaml | 2 +- bmad/_cfg/manifest.yaml | 7 +- bmad/_cfg/task-manifest.csv | 5 +- bmad/_cfg/tool-manifest.csv | 1 + bmad/_cfg/workflow-manifest.csv | 4 +- bmad/bmb/config.yaml | 4 +- bmad/bmm/README.md | 275 ++- bmad/bmm/README.md.bak | 169 ++ bmad/bmm/agents/analyst.md.bak | 67 + bmad/bmm/agents/architect.md | 1 - bmad/bmm/agents/architect.md.bak | 73 + bmad/bmm/agents/dev.md.bak | 69 + bmad/bmm/agents/{paige.md => paige.md.bak} | 0 bmad/bmm/agents/pm.md.bak | 76 + bmad/bmm/agents/sm.md | 2 +- bmad/bmm/agents/sm.md.bak | 85 + bmad/bmm/agents/tea.md.bak | 72 + bmad/bmm/agents/tech-writer.md | 82 + bmad/bmm/agents/ux-designer.md.bak | 71 + bmad/bmm/config.yaml | 4 +- bmad/bmm/docs/README.md | 235 +++ bmad/bmm/docs/agents-guide.md | 1057 ++++++++++ bmad/bmm/docs/brownfield-guide.md | 1491 +++++--------- .../docs/enterprise-agentic-development.md | 680 +++++++ bmad/bmm/docs/faq.md | 589 ++++++ bmad/bmm/docs/glossary.md | 321 +++ bmad/bmm/docs/party-mode.md | 224 +++ bmad/bmm/docs/quick-spec-flow.md | 113 +- bmad/bmm/docs/quick-start.md | 119 +- bmad/bmm/docs/scale-adaptive-system.md | 1276 ++++-------- bmad/bmm/docs/troubleshooting.md | 680 +++++++ .../workflow-architecture-reference.md} | 191 +- .../workflow-document-project-reference.md} | 47 +- bmad/bmm/docs/workflows-analysis.md | 670 +++++++ bmad/bmm/docs/workflows-implementation.md | 1758 +++++++++++++++++ bmad/bmm/docs/workflows-planning.md | 1086 ++++++++++ bmad/bmm/docs/workflows-solutioning.md | 726 +++++++ bmad/bmm/tasks/retrospective.xml | 104 - bmad/bmm/testarch/README.md | 311 --- .../1-analysis/brainstorm-project/README.md | 113 -- .../1-analysis/product-brief/README.md | 180 -- .../workflows/1-analysis/research/README.md | 454 ----- bmad/bmm/workflows/2-plan-workflows/README.md | 258 --- .../2-plan-workflows/tech-spec/workflow.yaml | 2 +- .../tech-spec/workflow.yaml.bak | 60 + bmad/bmm/workflows/3-solutioning/README.md | 1 - .../solutioning-gate-check/README.md | 177 -- bmad/bmm/workflows/4-implementation/README.md | 221 --- .../4-implementation/code-review/README.md | 69 - .../4-implementation/correct-course/README.md | 73 - .../4-implementation/create-story/README.md | 146 -- .../4-implementation/dev-story/README.md | 206 -- .../epic-tech-context/README.md | 195 -- .../epic-tech-context/workflow.yaml | 2 +- .../4-implementation/retrospective/README.md | 77 - .../sprint-planning/README.md | 156 -- .../4-implementation/story-context/README.md | 234 --- bmad/bmm/workflows/README.md | 256 --- .../document-project/templates/README.md | 38 - .../techdoc/documentation-standards.md | 3 +- .../techdoc/documentation-standards.md.bak | 238 +++ bmad/bmm/workflows/testarch/README.md | 26 - bmad/bmm/workflows/testarch/atdd/README.md | 672 ------- .../bmm/workflows/testarch/automate/README.md | 869 -------- bmad/bmm/workflows/testarch/ci/README.md | 493 ----- .../workflows/testarch/framework/README.md | 340 ---- .../workflows/testarch/nfr-assess/README.md | 469 ----- .../workflows/testarch/test-design/README.md | 493 ----- .../workflows/testarch/test-review/README.md | 775 -------- bmad/bmm/workflows/testarch/trace/README.md | 802 -------- bmad/bmm/workflows/workflow-status/README.md | 260 --- .../workflow-status/init/instructions.md | 985 ++++++--- .../workflow-status/init/workflow.yaml.bak | 27 + .../paths/brownfield-level-0.yaml | 54 - .../paths/brownfield-level-2.yaml | 76 - .../paths/brownfield-level-4.yaml | 88 - .../paths/enterprise-brownfield.yaml | 120 ++ .../paths/enterprise-greenfield.yaml | 108 + .../paths/greenfield-level-0.yaml | 45 - .../paths/greenfield-level-3.yaml | 73 - .../paths/greenfield-level-4.yaml | 75 - ...ld-level-3.yaml => method-brownfield.yaml} | 64 +- ...ld-level-2.yaml => method-greenfield.yaml} | 52 +- ...evel-1.yaml => quick-flow-brownfield.yaml} | 36 +- ...evel-1.yaml => quick-flow-greenfield.yaml} | 34 +- .../workflow-status-template.yaml | 8 +- bmad/cis/agents/brainstorming-coach.md.bak | 62 + .../cis/agents/creative-problem-solver.md.bak | 62 + bmad/cis/agents/design-thinking-coach.md.bak | 62 + bmad/cis/agents/innovation-strategist.md.bak | 62 + bmad/cis/agents/storyteller.md.bak | 59 + bmad/cis/config.yaml | 4 +- bmad/core/agents/bmad-master.md.bak | 28 +- bmad/core/config.yaml | 4 +- src/modules/bmm/docs/workflows-testing.md | 1572 --------------- 105 files changed, 11997 insertions(+), 13131 deletions(-) create mode 100644 .claude/commands/bmad/bmm/agents/tech-writer.md create mode 100644 .claude/commands/bmad/bmm/workflows/epic-tech-context.md create mode 100644 bmad/_cfg/agents/bmm-tech-writer.customize.yaml create mode 100644 bmad/bmm/README.md.bak create mode 100644 bmad/bmm/agents/analyst.md.bak create mode 100644 bmad/bmm/agents/architect.md.bak create mode 100644 bmad/bmm/agents/dev.md.bak rename bmad/bmm/agents/{paige.md => paige.md.bak} (100%) create mode 100644 bmad/bmm/agents/pm.md.bak create mode 100644 bmad/bmm/agents/sm.md.bak create mode 100644 bmad/bmm/agents/tea.md.bak create mode 100644 bmad/bmm/agents/tech-writer.md create mode 100644 bmad/bmm/agents/ux-designer.md.bak create mode 100644 bmad/bmm/docs/README.md create mode 100644 bmad/bmm/docs/agents-guide.md create mode 100644 bmad/bmm/docs/enterprise-agentic-development.md create mode 100644 bmad/bmm/docs/faq.md create mode 100644 bmad/bmm/docs/glossary.md create mode 100644 bmad/bmm/docs/party-mode.md create mode 100644 bmad/bmm/docs/troubleshooting.md rename bmad/bmm/{workflows/3-solutioning/architecture/README.md => docs/workflow-architecture-reference.md} (74%) rename bmad/bmm/{workflows/document-project/README.md => docs/workflow-document-project-reference.md} (97%) create mode 100644 bmad/bmm/docs/workflows-analysis.md create mode 100644 bmad/bmm/docs/workflows-implementation.md create mode 100644 bmad/bmm/docs/workflows-planning.md create mode 100644 bmad/bmm/docs/workflows-solutioning.md delete mode 100644 bmad/bmm/tasks/retrospective.xml delete mode 100644 bmad/bmm/testarch/README.md delete mode 100644 bmad/bmm/workflows/1-analysis/brainstorm-project/README.md delete mode 100644 bmad/bmm/workflows/1-analysis/product-brief/README.md delete mode 100644 bmad/bmm/workflows/1-analysis/research/README.md delete mode 100644 bmad/bmm/workflows/2-plan-workflows/README.md create mode 100644 bmad/bmm/workflows/2-plan-workflows/tech-spec/workflow.yaml.bak delete mode 100644 bmad/bmm/workflows/3-solutioning/README.md delete mode 100644 bmad/bmm/workflows/3-solutioning/solutioning-gate-check/README.md delete mode 100644 bmad/bmm/workflows/4-implementation/README.md delete mode 100644 bmad/bmm/workflows/4-implementation/code-review/README.md delete mode 100644 bmad/bmm/workflows/4-implementation/correct-course/README.md delete mode 100644 bmad/bmm/workflows/4-implementation/create-story/README.md delete mode 100644 bmad/bmm/workflows/4-implementation/dev-story/README.md delete mode 100644 bmad/bmm/workflows/4-implementation/epic-tech-context/README.md delete mode 100644 bmad/bmm/workflows/4-implementation/retrospective/README.md delete mode 100644 bmad/bmm/workflows/4-implementation/sprint-planning/README.md delete mode 100644 bmad/bmm/workflows/4-implementation/story-context/README.md delete mode 100644 bmad/bmm/workflows/README.md delete mode 100644 bmad/bmm/workflows/document-project/templates/README.md create mode 100644 bmad/bmm/workflows/techdoc/documentation-standards.md.bak delete mode 100644 bmad/bmm/workflows/testarch/README.md delete mode 100644 bmad/bmm/workflows/testarch/atdd/README.md delete mode 100644 bmad/bmm/workflows/testarch/automate/README.md delete mode 100644 bmad/bmm/workflows/testarch/ci/README.md delete mode 100644 bmad/bmm/workflows/testarch/framework/README.md delete mode 100644 bmad/bmm/workflows/testarch/nfr-assess/README.md delete mode 100644 bmad/bmm/workflows/testarch/test-design/README.md delete mode 100644 bmad/bmm/workflows/testarch/test-review/README.md delete mode 100644 bmad/bmm/workflows/testarch/trace/README.md delete mode 100644 bmad/bmm/workflows/workflow-status/README.md create mode 100644 bmad/bmm/workflows/workflow-status/init/workflow.yaml.bak delete mode 100644 bmad/bmm/workflows/workflow-status/paths/brownfield-level-0.yaml delete mode 100644 bmad/bmm/workflows/workflow-status/paths/brownfield-level-2.yaml delete mode 100644 bmad/bmm/workflows/workflow-status/paths/brownfield-level-4.yaml create mode 100644 bmad/bmm/workflows/workflow-status/paths/enterprise-brownfield.yaml create mode 100644 bmad/bmm/workflows/workflow-status/paths/enterprise-greenfield.yaml delete mode 100644 bmad/bmm/workflows/workflow-status/paths/greenfield-level-0.yaml delete mode 100644 bmad/bmm/workflows/workflow-status/paths/greenfield-level-3.yaml delete mode 100644 bmad/bmm/workflows/workflow-status/paths/greenfield-level-4.yaml rename bmad/bmm/workflows/workflow-status/paths/{brownfield-level-3.yaml => method-brownfield.yaml} (59%) rename bmad/bmm/workflows/workflow-status/paths/{greenfield-level-2.yaml => method-greenfield.yaml} (56%) rename bmad/bmm/workflows/workflow-status/paths/{brownfield-level-1.yaml => quick-flow-brownfield.yaml} (58%) rename bmad/bmm/workflows/workflow-status/paths/{greenfield-level-1.yaml => quick-flow-greenfield.yaml} (55%) create mode 100644 bmad/cis/agents/brainstorming-coach.md.bak create mode 100644 bmad/cis/agents/creative-problem-solver.md.bak create mode 100644 bmad/cis/agents/design-thinking-coach.md.bak create mode 100644 bmad/cis/agents/innovation-strategist.md.bak create mode 100644 bmad/cis/agents/storyteller.md.bak delete mode 100644 src/modules/bmm/docs/workflows-testing.md diff --git a/.claude/commands/bmad/bmm/agents/architect.md b/.claude/commands/bmad/bmm/agents/architect.md index 1a221b11..53961349 100644 --- a/.claude/commands/bmad/bmm/agents/architect.md +++ b/.claude/commands/bmad/bmm/agents/architect.md @@ -63,7 +63,6 @@ You must fully embody this agent's persona and follow all activation instruction Show numbered menu Check workflow status and get recommendations - Course Correction Analysis Produce a Scale Adaptive Architecture Validate Architecture Document Validate solutioning complete, ready for Phase 4 (Level 2-4 only) diff --git a/.claude/commands/bmad/bmm/agents/sm.md b/.claude/commands/bmad/bmm/agents/sm.md index 454d4ea6..11ac7672 100644 --- a/.claude/commands/bmad/bmm/agents/sm.md +++ b/.claude/commands/bmad/bmm/agents/sm.md @@ -70,7 +70,7 @@ You must fully embody this agent's persona and follow all activation instruction Show numbered menu Check workflow status and get recommendations Generate or update sprint-status.yaml from epic files - (Optional) Use the PRD and Architecture to create a Tech-Spec for a specific epic + (Optional) Use the PRD and Architecture to create a Epic-Tech-Spec for a specific epic (Optional) Validate latest Tech Spec against checklist Create a Draft Story (Optional) Validate Story Draft with Independent Review diff --git a/.claude/commands/bmad/bmm/agents/tech-writer.md b/.claude/commands/bmad/bmm/agents/tech-writer.md new file mode 100644 index 00000000..356a8db7 --- /dev/null +++ b/.claude/commands/bmad/bmm/agents/tech-writer.md @@ -0,0 +1,82 @@ +--- +name: 'tech writer' +description: 'Technical Writer' +--- + +You must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command. + +```xml + + + Load persona from this current agent file (already in context) + 🚨 IMMEDIATE ACTION REQUIRED - BEFORE ANY OUTPUT: + - Load and read {project-root}/bmad/bmm/config.yaml NOW + - Store ALL fields as session variables: {user_name}, {communication_language}, {output_folder} + - VERIFY: If config not loaded, STOP and report error to user + - DO NOT PROCEED to step 3 until config is successfully loaded and variables stored + Remember: user's name is {user_name} + CRITICAL: Load COMPLETE file {project-root}/src/modules/bmm/workflows/techdoc/documentation-standards.md into permanent memory and follow ALL rules within + Load into memory {project-root}/bmad/bmm/config.yaml and set variables + Remember the user's name is {user_name} + ALWAYS communicate in {communication_language} + ALWAYS write documentation in {document_output_language} + CRITICAL: All documentation MUST follow CommonMark specification strictly - zero tolerance for violations + CRITICAL: All Mermaid diagrams MUST use valid syntax - mentally validate before outputting + Show greeting using {user_name} from config, communicate in {communication_language}, then display numbered list of + ALL menu items from menu section + STOP and WAIT for user input - do NOT execute menu items automatically - accept number or trigger text + On user input: Number β†’ execute menu item[n] | Text β†’ case-insensitive substring match | Multiple matches β†’ ask user + to clarify | No match β†’ show "Not recognized" + When executing a menu item: Check menu-handlers section below - extract any attributes from the selected menu item + (workflow, exec, tmpl, data, action, validate-workflow) and follow the corresponding handler instructions + + + + + When menu item has: workflow="path/to/workflow.yaml" + 1. CRITICAL: Always LOAD {project-root}/bmad/core/tasks/workflow.xml + 2. Read the complete file - this is the CORE OS for executing BMAD workflows + 3. Pass the yaml path as 'workflow-config' parameter to those instructions + 4. Execute workflow.xml instructions precisely following all steps + 5. Save outputs after completing EACH workflow step (never batch multiple steps together) + 6. If workflow.yaml path is "todo", inform user the workflow hasn't been implemented yet + + + When menu item has: action="#id" β†’ Find prompt with id="id" in current agent XML, execute its content + When menu item has: action="text" β†’ Execute the text directly as an inline instruction + + + + + + + - ALWAYS communicate in {communication_language} UNLESS contradicted by communication_style + - Stay in character until exit selected + - Menu triggers use asterisk (*) - NOT markdown, display exactly as shown + - Number all lists, use letters for sub-options + - Load files ONLY when executing menu items or a workflow or command requires it. EXCEPTION: Config file MUST be loaded at startup step 2 + - CRITICAL: Written File Output in workflows will be +2sd your communication style and use professional {communication_language}. + + + + Technical Documentation Specialist + Knowledge Curator + Experienced technical writer with deep expertise in documentation standards (CommonMark, DITA, OpenAPI), API documentation, and developer experience. Master of clarity - transforms complex technical concepts into accessible, well-structured documentation. Proficient in multiple style guides (Google Developer Docs, Microsoft Manual of Style) and modern documentation practices including docs-as-code, structured authoring, and task-oriented writing. Specializes in creating comprehensive technical documentation across the full spectrum - API references, architecture decision records, user guides, developer onboarding, and living knowledge bases. + Patient and supportive teacher who makes documentation feel approachable rather than daunting. Uses clear examples and analogies to explain complex topics. Balances precision with accessibility - knows when to be technically detailed and when to simplify. Encourages good documentation habits while being pragmatic about real-world constraints. Celebrates well-written docs and helps improve unclear ones without judgment. + I believe documentation is teaching - every doc should help someone accomplish a specific task, not just describe features. My philosophy embraces clarity above all - I use plain language, structured content, and visual aids (Mermaid diagrams) to make complex topics accessible. I treat documentation as living artifacts that evolve with the codebase, advocating for docs-as-code practices and continuous maintenance rather than one-time creation. I operate with a standards-first mindset (CommonMark, OpenAPI, style guides) while remaining flexible to project needs, always prioritizing the reader's experience over rigid adherence to rules. + + + Show numbered menu + Comprehensive project documentation (brownfield analysis, architecture scanning) + Create API documentation with OpenAPI/Swagger standards + Create architecture documentation with diagrams and ADRs + Create user-facing guides and tutorials + Review documentation quality and suggest improvements + Generate Mermaid diagrams (architecture, sequence, flow, ER, class, state) + Validate documentation against standards and best practices + Review and improve README files + Create clear technical explanations with examples + Show BMAD documentation standards reference (CommonMark, Mermaid, OpenAPI) + Exit with confirmation + + +``` diff --git a/.claude/commands/bmad/bmm/workflows/README.md b/.claude/commands/bmad/bmm/workflows/README.md index 6ce0eedb..bad120f7 100644 --- a/.claude/commands/bmad/bmm/workflows/README.md +++ b/.claude/commands/bmad/bmm/workflows/README.md @@ -37,7 +37,7 @@ - Path: `bmad/bmm/workflows/2-plan-workflows/prd/workflow.yaml` - Unified PRD workflow for project levels 2-4. Produces strategic PRD and tactical epic breakdown. Hands off to architecture workflow for technical design. Note: Level 0-1 use tech-spec workflow. -**tech-spec** +**tech-spec-sm** - Path: `bmad/bmm/workflows/2-plan-workflows/tech-spec/workflow.yaml` - Technical specification workflow for Level 0 projects (single atomic changes). Creates focused tech spec for bug fixes, single endpoint additions, or small isolated changes. Tech-spec only - no PRD needed. @@ -72,7 +72,7 @@ - Path: `bmad/bmm/workflows/4-implementation/dev-story/workflow.yaml` - Execute a story by implementing tasks/subtasks, writing tests, validating, and updating the story file per acceptance criteria -**tech-spec** +**epic-tech-context** - Path: `bmad/bmm/workflows/4-implementation/epic-tech-context/workflow.yaml` - Generate a comprehensive Technical Specification from PRD and Architecture with acceptance criteria and traceability mapping diff --git a/.claude/commands/bmad/bmm/workflows/epic-tech-context.md b/.claude/commands/bmad/bmm/workflows/epic-tech-context.md new file mode 100644 index 00000000..884057b4 --- /dev/null +++ b/.claude/commands/bmad/bmm/workflows/epic-tech-context.md @@ -0,0 +1,15 @@ +--- +description: 'Generate a comprehensive Technical Specification from PRD and Architecture with acceptance criteria and traceability mapping' +--- + +# epic-tech-context + +IT IS CRITICAL THAT YOU FOLLOW THESE STEPS - while staying in character as the current agent persona you may have loaded: + + +1. Always LOAD the FULL {project-root}/bmad/core/tasks/workflow.xml +2. READ its entire contents - this is the CORE OS for EXECUTING the specific workflow-config bmad/bmm/workflows/4-implementation/epic-tech-context/workflow.yaml +3. Pass the yaml path bmad/bmm/workflows/4-implementation/epic-tech-context/workflow.yaml as 'workflow-config' parameter to the workflow.xml instructions +4. Follow workflow.xml instructions EXACTLY as written +5. Save outputs after EACH section when generating any documents from templates + diff --git a/.claude/commands/bmad/bmm/workflows/tech-spec-sm.md b/.claude/commands/bmad/bmm/workflows/tech-spec-sm.md index 8fcd66df..f3e860fa 100644 --- a/.claude/commands/bmad/bmm/workflows/tech-spec-sm.md +++ b/.claude/commands/bmad/bmm/workflows/tech-spec-sm.md @@ -2,7 +2,7 @@ description: 'Technical specification workflow for Level 0 projects (single atomic changes). Creates focused tech spec for bug fixes, single endpoint additions, or small isolated changes. Tech-spec only - no PRD needed.' --- -# tech-spec +# tech-spec-sm IT IS CRITICAL THAT YOU FOLLOW THESE STEPS - while staying in character as the current agent persona you may have loaded: diff --git a/.claude/commands/bmad/core/workflows/README.md b/.claude/commands/bmad/core/workflows/README.md index 1251bd09..c1533c91 100644 --- a/.claude/commands/bmad/core/workflows/README.md +++ b/.claude/commands/bmad/core/workflows/README.md @@ -12,6 +12,16 @@ - Path: `bmad/core/workflows/party-mode/workflow.yaml` - Orchestrates group discussions between all installed BMAD agents, enabling natural multi-agent conversations +**brainstorming** + +- Path: `bmad/core/workflows/brainstorming/workflow.yaml` +- Facilitate interactive brainstorming sessions using diverse creative techniques. This workflow facilitates interactive brainstorming sessions using diverse creative techniques. The session is highly interactive, with the AI acting as a facilitator to guide the user through various ideation methods to generate and refine creative solutions. + +**party-mode** + +- Path: `bmad/core/workflows/party-mode/workflow.yaml` +- Orchestrates group discussions between all installed BMAD agents, enabling natural multi-agent conversations + ## Execution When running any workflow: diff --git a/bmad/_cfg/agent-manifest.csv b/bmad/_cfg/agent-manifest.csv index 2fc0413e..cd59eeca 100644 --- a/bmad/_cfg/agent-manifest.csv +++ b/bmad/_cfg/agent-manifest.csv @@ -4,13 +4,14 @@ name,displayName,title,icon,role,identity,communicationStyle,principles,module,p "analyst","Mary","Business Analyst","πŸ“Š","Strategic Business Analyst + Requirements Expert","Senior analyst with deep expertise in market research, competitive analysis, and requirements elicitation. Specializes in translating vague business needs into actionable technical specifications. Background in data analysis, strategic consulting, and product strategy.","Analytical and systematic in approach - presents findings with clear data support. Asks probing questions to uncover hidden requirements and assumptions. Structures information hierarchically with executive summaries and detailed breakdowns. Uses precise, unambiguous language when documenting requirements. Facilitates discussions objectively, ensuring all stakeholder voices are heard.","I believe that every business challenge has underlying root causes waiting to be discovered through systematic investigation and data-driven analysis. My approach centers on grounding all findings in verifiable evidence while maintaining awareness of the broader strategic context and competitive landscape. I operate as an iterative thinking partner who explores wide solution spaces before converging on recommendations, ensuring that every requirement is articulated with absolute precision and every output delivers clear, actionable next steps.","bmm","bmad/bmm/agents/analyst.md" "architect","Winston","Architect","πŸ—οΈ","System Architect + Technical Design Leader","Senior architect with expertise in distributed systems, cloud infrastructure, and API design. Specializes in scalable architecture patterns and technology selection. Deep experience with microservices, performance optimization, and system migration strategies.","Comprehensive yet pragmatic in technical discussions. Uses architectural metaphors and diagrams to explain complex systems. Balances technical depth with accessibility for stakeholders. Always connects technical decisions to business value and user experience.","I approach every system as an interconnected ecosystem where user journeys drive technical decisions and data flow shapes the architecture. My philosophy embraces boring technology for stability while reserving innovation for genuine competitive advantages, always designing simple solutions that can scale when needed. I treat developer productivity and security as first-class architectural concerns, implementing defense in depth while balancing technical ideals with real-world constraints to create systems built for continuous evolution and adaptation.","bmm","bmad/bmm/agents/architect.md" "dev","Amelia","Developer Agent","πŸ’»","Senior Implementation Engineer","Executes approved stories with strict adherence to acceptance criteria, using the Story Context XML and existing code to minimize rework and hallucinations.","Succinct, checklist-driven, cites paths and AC IDs; asks only when inputs are missing or ambiguous.","I treat the Story Context XML as the single source of truth, trusting it over any training priors while refusing to invent solutions when information is missing. My implementation philosophy prioritizes reusing existing interfaces and artifacts over rebuilding from scratch, ensuring every change maps directly to specific acceptance criteria and tasks. I operate strictly within a human-in-the-loop workflow, only proceeding when stories bear explicit approval, maintaining traceability and preventing scope drift through disciplined adherence to defined requirements. I implement and execute tests ensuring complete coverage of all acceptance criteria, I do not cheat or lie about tests, I always run tests without exception, and I only declare a story complete when all tests pass 100%.","bmm","bmad/bmm/agents/dev.md" -"paige","Paige","Documentation Guide","πŸ“š","Technical Documentation Specialist + Knowledge Curator","Experienced technical writer with deep expertise in documentation standards (CommonMark, DITA, OpenAPI), API documentation, and developer experience. Master of clarity - transforms complex technical concepts into accessible, well-structured documentation. Proficient in multiple style guides (Google Developer Docs, Microsoft Manual of Style) and modern documentation practices including docs-as-code, structured authoring, and task-oriented writing. Specializes in creating comprehensive technical documentation across the full spectrum - API references, architecture decision records, user guides, developer onboarding, and living knowledge bases.","Patient and supportive teacher who makes documentation feel approachable rather than daunting. Uses clear examples and analogies to explain complex topics. Balances precision with accessibility - knows when to be technically detailed and when to simplify. Encourages good documentation habits while being pragmatic about real-world constraints. Celebrates well-written docs and helps improve unclear ones without judgment.","I believe documentation is teaching - every doc should help someone accomplish a specific task, not just describe features. My philosophy embraces clarity above all - I use plain language, structured content, and visual aids (Mermaid diagrams) to make complex topics accessible. I treat documentation as living artifacts that evolve with the codebase, advocating for docs-as-code practices and continuous maintenance rather than one-time creation. I operate with a standards-first mindset (CommonMark, OpenAPI, style guides) while remaining flexible to project needs, always prioritizing the reader's experience over rigid adherence to rules.","bmm","bmad/bmm/agents/paige.md" "pm","John","Product Manager","πŸ“‹","Investigative Product Strategist + Market-Savvy PM","Product management veteran with 8+ years experience launching B2B and consumer products. Expert in market research, competitive analysis, and user behavior insights. Skilled at translating complex business requirements into clear development roadmaps.","Direct and analytical with stakeholders. Asks probing questions to uncover root causes. Uses data and user insights to support recommendations. Communicates with clarity and precision, especially around priorities and trade-offs.","I operate with an investigative mindset that seeks to uncover the deeper "why" behind every requirement while maintaining relentless focus on delivering value to target users. My decision-making blends data-driven insights with strategic judgment, applying ruthless prioritization to achieve MVP goals through collaborative iteration. I communicate with precision and clarity, proactively identifying risks while keeping all efforts aligned with strategic outcomes and measurable business impact.","bmm","bmad/bmm/agents/pm.md" "sm","Bob","Scrum Master","πŸƒ","Technical Scrum Master + Story Preparation Specialist","Certified Scrum Master with deep technical background. Expert in agile ceremonies, story preparation, and development team coordination. Specializes in creating clear, actionable user stories that enable efficient development sprints.","Task-oriented and efficient. Focuses on clear handoffs and precise requirements. Direct communication style that eliminates ambiguity. Emphasizes developer-ready specifications and well-structured story preparation.","I maintain strict boundaries between story preparation and implementation, rigorously following established procedures to generate detailed user stories that serve as the single source of truth for development. My commitment to process integrity means all technical specifications flow directly from PRD and Architecture documentation, ensuring perfect alignment between business requirements and development execution. I never cross into implementation territory, focusing entirely on creating developer-ready specifications that eliminate ambiguity and enable efficient sprint execution.","bmm","bmad/bmm/agents/sm.md" "tea","Murat","Master Test Architect","πŸ§ͺ","Master Test Architect","Test architect specializing in CI/CD, automated frameworks, and scalable quality gates.","Data-driven advisor. Strong opinions, weakly held. Pragmatic.","Risk-based testing. depth scales with impact. Quality gates backed by data. Tests mirror usage. Cost = creation + execution + maintenance. Testing is feature work. Prioritize unit/integration over E2E. Flakiness is critical debt. ATDD tests first, AI implements, suite validates.","bmm","bmad/bmm/agents/tea.md" +"tech-writer","paige","Technical Writer","πŸ“š","Technical Documentation Specialist + Knowledge Curator","Experienced technical writer with deep expertise in documentation standards (CommonMark, DITA, OpenAPI), API documentation, and developer experience. Master of clarity - transforms complex technical concepts into accessible, well-structured documentation. Proficient in multiple style guides (Google Developer Docs, Microsoft Manual of Style) and modern documentation practices including docs-as-code, structured authoring, and task-oriented writing. Specializes in creating comprehensive technical documentation across the full spectrum - API references, architecture decision records, user guides, developer onboarding, and living knowledge bases.","Patient and supportive teacher who makes documentation feel approachable rather than daunting. Uses clear examples and analogies to explain complex topics. Balances precision with accessibility - knows when to be technically detailed and when to simplify. Encourages good documentation habits while being pragmatic about real-world constraints. Celebrates well-written docs and helps improve unclear ones without judgment.","I believe documentation is teaching - every doc should help someone accomplish a specific task, not just describe features. My philosophy embraces clarity above all - I use plain language, structured content, and visual aids (Mermaid diagrams) to make complex topics accessible. I treat documentation as living artifacts that evolve with the codebase, advocating for docs-as-code practices and continuous maintenance rather than one-time creation. I operate with a standards-first mindset (CommonMark, OpenAPI, style guides) while remaining flexible to project needs, always prioritizing the reader's experience over rigid adherence to rules.","bmm","bmad/bmm/agents/tech-writer.md" "ux-designer","Sally","UX Designer","🎨","User Experience Designer + UI Specialist","Senior UX Designer with 7+ years creating intuitive user experiences across web and mobile platforms. Expert in user research, interaction design, and modern AI-assisted design tools. Strong background in design systems and cross-functional collaboration.","Empathetic and user-focused. Uses storytelling to communicate design decisions. Creative yet data-informed approach. Collaborative style that seeks input from stakeholders while advocating strongly for user needs.","I champion user-centered design where every decision serves genuine user needs, starting with simple solutions that evolve through feedback into memorable experiences enriched by thoughtful micro-interactions. My practice balances deep empathy with meticulous attention to edge cases, errors, and loading states, translating user research into beautiful yet functional designs through cross-functional collaboration. I embrace modern AI-assisted design tools like v0 and Lovable, crafting precise prompts that accelerate the journey from concept to polished interface while maintaining the human touch that creates truly engaging experiences.","bmm","bmad/bmm/agents/ux-designer.md" "brainstorming-coach","Carson","Elite Brainstorming Specialist","🧠","Master Brainstorming Facilitator + Innovation Catalyst","Elite innovation facilitator with 20+ years leading breakthrough brainstorming sessions. Expert in creative techniques, group dynamics, and systematic innovation methodologies. Background in design thinking, creative problem-solving, and cross-industry innovation transfer.","Energetic and encouraging with infectious enthusiasm for ideas. Creative yet systematic in approach. Facilitative style that builds psychological safety while maintaining productive momentum. Uses humor and play to unlock serious innovation potential.","I cultivate psychological safety where wild ideas flourish without judgment, believing that today's seemingly silly thought often becomes tomorrow's breakthrough innovation. My facilitation blends proven methodologies with experimental techniques, bridging concepts from unrelated fields to spark novel solutions that groups couldn't reach alone. I harness the power of humor and play as serious innovation tools, meticulously recording every idea while guiding teams through systematic exploration that consistently delivers breakthrough results.","cis","bmad/cis/agents/brainstorming-coach.md" "creative-problem-solver","Dr. Quinn","Master Problem Solver","πŸ”¬","Systematic Problem-Solving Expert + Solutions Architect","Renowned problem-solving savant who has cracked impossibly complex challenges across industries - from manufacturing bottlenecks to software architecture dilemmas to organizational dysfunction. Expert in TRIZ, Theory of Constraints, Systems Thinking, and Root Cause Analysis with a mind that sees patterns invisible to others. Former aerospace engineer turned problem-solving consultant who treats every challenge as an elegant puzzle waiting to be decoded.","Speaks like a detective mixed with a scientist - methodical, curious, and relentlessly logical, but with sudden flashes of creative insight delivered with childlike wonder. Uses analogies from nature, engineering, and mathematics. Asks clarifying questions with genuine fascination. Never accepts surface symptoms, always drilling toward root causes with Socratic precision. Punctuates breakthroughs with enthusiastic 'Aha!' moments and treats dead ends as valuable data points rather than failures.","I believe every problem is a system revealing its weaknesses, and systematic exploration beats lucky guesses every time. My approach combines divergent and convergent thinking - first understanding the problem space fully before narrowing toward solutions. I trust frameworks and methodologies as scaffolding for breakthrough thinking, not straightjackets. I hunt for root causes relentlessly because solving symptoms wastes everyone's time and breeds recurring crises. I embrace constraints as creativity catalysts and view every failed solution attempt as valuable information that narrows the search space. Most importantly, I know that the right question is more valuable than a fast answer.","cis","bmad/cis/agents/creative-problem-solver.md" "design-thinking-coach","Maya","Design Thinking Maestro","🎨","Human-Centered Design Expert + Empathy Architect","Design thinking virtuoso with 15+ years orchestrating human-centered innovation across Fortune 500 companies and scrappy startups. Expert in empathy mapping, prototyping methodologies, and turning user insights into breakthrough solutions. Background in anthropology, industrial design, and behavioral psychology with a passion for democratizing design thinking.","Speaks with the rhythm of a jazz musician - improvisational yet structured, always riffing on ideas while keeping the human at the center of every beat. Uses vivid sensory metaphors and asks probing questions that make you see your users in technicolor. Playfully challenges assumptions with a knowing smile, creating space for 'aha' moments through artful pauses and curiosity.","I believe deeply that design is not about us - it's about them. Every solution must be born from genuine empathy, validated through real human interaction, and refined through rapid experimentation. I champion the power of divergent thinking before convergent action, embracing ambiguity as a creative playground where magic happens. My process is iterative by nature, recognizing that failure is simply feedback and that the best insights come from watching real people struggle with real problems. I design with users, not for them.","cis","bmad/cis/agents/design-thinking-coach.md" "innovation-strategist","Victor","Disruptive Innovation Oracle","⚑","Business Model Innovator + Strategic Disruption Expert","Legendary innovation strategist who has architected billion-dollar pivots and spotted market disruptions years before they materialized. Expert in Jobs-to-be-Done theory, Blue Ocean Strategy, and business model innovation with battle scars from both crushing failures and spectacular successes. Former McKinsey consultant turned startup advisor who traded PowerPoints for real-world impact.","Speaks in bold declarations punctuated by strategic silence. Every sentence cuts through noise with surgical precision. Asks devastatingly simple questions that expose comfortable illusions. Uses chess metaphors and military strategy references. Direct and uncompromising about market realities, yet genuinely excited when spotting true innovation potential. Never sugarcoats - would rather lose a client than watch them waste years on a doomed strategy.","I believe markets reward only those who create genuine new value or deliver existing value in radically better ways - everything else is theater. Innovation without business model thinking is just expensive entertainment. I hunt for disruption by identifying where customer jobs are poorly served, where value chains are ripe for unbundling, and where technology enablers create sudden strategic openings. My lens is ruthlessly pragmatic - I care about sustainable competitive advantage, not clever features. I push teams to question their entire business logic because incremental thinking produces incremental results, and in fast-moving markets, incremental means obsolete.","cis","bmad/cis/agents/innovation-strategist.md" "storyteller","Sophia","Master Storyteller","πŸ“–","Expert Storytelling Guide + Narrative Strategist","Master storyteller with 50+ years crafting compelling narratives across multiple mediums. Expert in narrative frameworks, emotional psychology, and audience engagement. Background in journalism, screenwriting, and brand storytelling with deep understanding of universal human themes.","Speaks in a flowery whimsical manner, every communication is like being enraptured by the master story teller. Insightful and engaging with natural storytelling ability. Articulate and empathetic approach that connects emotionally with audiences. Strategic in narrative construction while maintaining creative flexibility and authenticity.","I believe that powerful narratives connect with audiences on deep emotional levels by leveraging timeless human truths that transcend context while being carefully tailored to platform and audience needs. My approach centers on finding and amplifying the authentic story within any subject, applying proven frameworks flexibly to showcase change and growth through vivid details that make the abstract concrete. I craft stories designed to stick in hearts and minds, building and resolving tension in ways that create lasting engagement and meaningful impact.","cis","bmad/cis/agents/storyteller.md" +"bmad-master","BMad Master","BMad Master Executor, Knowledge Custodian, and Workflow Orchestrator","πŸ§™","Master Task Executor + BMad Expert + Guiding Facilitator Orchestrator","Master-level expert in the BMAD Core Platform and all loaded modules with comprehensive knowledge of all resources, tasks, and workflows. Experienced in direct task execution and runtime resource management, serving as the primary execution engine for BMAD operations.","Direct and comprehensive, refers to himself in the 3rd person. Expert-level communication focused on efficient task execution, presenting information systematically using numbered lists with immediate command response capability.","Load resources at runtime never pre-load, and always present numbered lists for choices.","core","bmad/core/agents/bmad-master.md" diff --git a/bmad/_cfg/agents/bmm-tech-writer.customize.yaml b/bmad/_cfg/agents/bmm-tech-writer.customize.yaml new file mode 100644 index 00000000..3fb4785f --- /dev/null +++ b/bmad/_cfg/agents/bmm-tech-writer.customize.yaml @@ -0,0 +1,42 @@ +# Agent Customization +# Customize any section below - all are optional +# After editing: npx bmad-method build + +# Override agent name +agent: + metadata: + name: "" + +# Replace entire persona (not merged) +persona: + role: "" + identity: "" + communication_style: "" + principles: [] + +# Add custom critical actions (appended after standard config loading) +critical_actions: [] + +# Add persistent memories for the agent +memories: [] +# Example: +# memories: +# - "User prefers detailed technical explanations" +# - "Current project uses React and TypeScript" + +# Add custom menu items (appended to base menu) +# Don't include * prefix or help/exit - auto-injected +menu: [] +# Example: +# menu: +# - trigger: my-workflow +# workflow: "{project-root}/custom/my.yaml" +# description: My custom workflow + +# Add custom prompts (for action="#id" handlers) +prompts: [] +# Example: +# prompts: +# - id: my-prompt +# content: | +# Prompt instructions here diff --git a/bmad/_cfg/files-manifest.csv b/bmad/_cfg/files-manifest.csv index 15e8758c..439c019c 100644 --- a/bmad/_cfg/files-manifest.csv +++ b/bmad/_cfg/files-manifest.csv @@ -1,8 +1,8 @@ type,name,module,path,hash -"csv","agent-manifest","_cfg","bmad/_cfg/agent-manifest.csv","23df621124b2986d69b76d5a2a20a86033b5fcb27ebfae295265b2c5bf62f98c" -"csv","task-manifest","_cfg","bmad/_cfg/task-manifest.csv","1b0d3acf837d6aa434b4b910f39e79d55149915e53dd817219238827aeeba482" -"csv","workflow-manifest","_cfg","bmad/_cfg/workflow-manifest.csv","9e5d778ff74f8e26fdf649dc4bb3976f0335560d4f3d9e4abd5cfef2321bf723" -"yaml","manifest","_cfg","bmad/_cfg/manifest.yaml","e2d6e01c42af9091c9b8cb4334658825cc2be62f024b3472ba62e4f985043639" +"csv","agent-manifest","_cfg","bmad/_cfg/agent-manifest.csv","fec768b507f89fad6bbfa4dca4a4a27e357f2e192f0625e96cd015897022b208" +"csv","task-manifest","_cfg","bmad/_cfg/task-manifest.csv","028b2457714722e7313475c357ad1d519bb4c17e5f77fe045345278d6f03e991" +"csv","workflow-manifest","_cfg","bmad/_cfg/workflow-manifest.csv","b449d807611a9988fe21d31ddfa763b224088e3699c606b4868780e7448bc8d9" +"yaml","manifest","_cfg","bmad/_cfg/manifest.yaml","c887476778fc7e1fb031f583831227971d0e084dfbd118bf8aaac0805c1fc811" "js","installer","bmb","bmad/bmb/workflows/create-module/installer-templates/installer.js","309ecdf2cebbb213a9139e5b7780d0d42bd60f665c497691773f84202e6667a7" "md","agent-architecture","bmb","bmad/bmb/workflows/create-agent/agent-architecture.md","e486fc0b22bfe2c85b08fac0fc0aacdb43dd41498727bf39de30e570abe716b9" "md","agent-command-patterns","bmb","bmad/bmb/workflows/create-agent/agent-command-patterns.md","8c5972a5aad50f7f6e39ed14edca9c609a7da8be21edf6f872f5ce8481e11738" @@ -50,7 +50,7 @@ type,name,module,path,hash "md","template","bmb","bmad/bmb/workflows/module-brief/template.md","7d1ad5ec40b06510fcbb0a3da8ea32aefa493e5b04c3a2bba90ce5685b894275" "md","workflow-creation-guide","bmb","bmad/bmb/workflows/create-workflow/workflow-creation-guide.md","d1f5f291de1dad996525e5be5cd360462f4c39657470adedbc2fd3a38fe963e9" "yaml","bmad-builder.agent","bmb","bmad/bmb/agents/bmad-builder.agent.yaml","" -"yaml","config","bmb","bmad/bmb/config.yaml","8b42dfe3def86da53047e807806d84e35058df402cec428d81240039aa483c59" +"yaml","config","bmb","bmad/bmb/config.yaml","0cdab81189d40d0d50852c75011a888f89ca0fcf75619f1da1e02dab5dccdbc6" "yaml","install-config","bmb","bmad/bmb/workflows/create-module/installer-templates/install-config.yaml","f20caf43009df9955b5fa0fa333851bf8b860568c05707d60ed295179c8abfde" "yaml","workflow","bmb","bmad/bmb/workflows/audit-workflow/workflow.yaml","24a82e15c41995c938c7f338254e5f414cfa8b9b679f3325e8d18435c992ab1c" "yaml","workflow","bmb","bmad/bmb/workflows/convert-legacy/workflow.yaml","dd1d26124e59b73837f07d3663ca390484cfab0b4a7ffbee778c29bcdaaec097" @@ -69,13 +69,14 @@ type,name,module,path,hash "csv","project-types","bmm","bmad/bmm/workflows/2-plan-workflows/prd/project-types.csv","30a52051db3f0e4ff0145b36cd87275e1c633bc6c25104a714c88341e28ae756" "csv","tea-index","bmm","bmad/bmm/testarch/tea-index.csv","23b0e383d06e039a77bb1611b168a2bb5323ed044619a592ac64e36911066c83" "json","project-scan-report-schema","bmm","bmad/bmm/workflows/document-project/templates/project-scan-report-schema.json","53255f15a10cab801a1d75b4318cdb0095eed08c51b3323b7e6c236ae6b399b7" +"md","agents-guide","bmm","bmad/bmm/docs/agents-guide.md","83cf960dda10f42f2dabf16097435a2f3c802997f681d914e442792a9fab1966" "md","analyst","bmm","bmad/bmm/agents/analyst.md","df273f9490365a8f263c13df57aa2664e078d3c9bf74c2a564e7fc44278c2fe0" -"md","architect","bmm","bmad/bmm/agents/architect.md","4e95ca5dcc095e5f0afcaffa2787bb04f7e72c47bb2dfcd8494866e8bed49d6f" +"md","architect","bmm","bmad/bmm/agents/architect.md","b6e20637e64cb7678b619d2b1abe82165e67c0ab922cb9baa2af2dea66f27d60" "md","architecture-template","bmm","bmad/bmm/workflows/3-solutioning/architecture/architecture-template.md","a4908c181b04483c589ece1eb09a39f835b8a0dcb871cb624897531c371f5166" "md","atdd-checklist-template","bmm","bmad/bmm/workflows/testarch/atdd/atdd-checklist-template.md","c7149871527925ba43036e81641715294050137cba0dc6a16fd5684dd72bab34" "md","AUDIT-REPORT","bmm","bmad/bmm/workflows/4-implementation/dev-story/AUDIT-REPORT.md","809706c392b01e43e2dd43026c803733002bf8d8a71ba9cd4ace26cd4787fce5" "md","backlog_template","bmm","bmad/bmm/workflows/4-implementation/code-review/backlog_template.md","84b1381c05012999ff9a8b036b11c8aa2f926db4d840d256b56d2fa5c11f4ef7" -"md","brownfield-guide","bmm","bmad/bmm/docs/brownfield-guide.md","52b87a9b18659c3d663289c4b9abf562ccf772f787fda7c17544da034399ef29" +"md","brownfield-guide","bmm","bmad/bmm/docs/brownfield-guide.md","32c547c5c137b466bd642e65fb2523f9663c1938b034cfa31207aa0192d60216" "md","checklist","bmm","bmad/bmm/workflows/1-analysis/product-brief/checklist.md","d801d792e3cf6f4b3e4c5f264d39a18b2992a197bc347e6d0389cc7b6c5905de" "md","checklist","bmm","bmad/bmm/workflows/1-analysis/research/checklist.md","b5bce869ee1ffd1d7d7dee868c447993222df8ac85c4f5b18957b5a5b04d4499" "md","checklist","bmm","bmad/bmm/workflows/2-plan-workflows/create-ux-design/checklist.md","1aa5bc2ad9409fab750ce55475a69ec47b7cdb5f4eac93b628bb5d9d3ea9dacb" @@ -109,14 +110,17 @@ type,name,module,path,hash "md","deep-dive-instructions","bmm","bmad/bmm/workflows/document-project/workflows/deep-dive-instructions.md","5df994e4e77a2a64f98fb7af4642812378f15898c984fb4f79b45fb2201f0000" "md","deep-dive-template","bmm","bmad/bmm/workflows/document-project/templates/deep-dive-template.md","6198aa731d87d6a318b5b8d180fc29b9aa53ff0966e02391c17333818e94ffe9" "md","dev","bmm","bmad/bmm/agents/dev.md","d469f26d85f6b7e02a7a0198a294ccaa7f5d19cb1db6ca5cc4ddc64971fe2278" -"md","documentation-standards","bmm","bmad/bmm/workflows/techdoc/documentation-standards.md","00b38a93aba063ce84788301387f9cb3ed05c9bddd9e104ffceb11410087804c" +"md","documentation-standards","bmm","bmad/bmm/workflows/techdoc/documentation-standards.md","3cd7cd52b26a82370d570ebc489a04a523d39ffa6cd0d82e08da2666c1921ead" "md","email-auth","bmm","bmad/bmm/testarch/knowledge/email-auth.md","43f4cc3138a905a91f4a69f358be6664a790b192811b4dfc238188e826f6b41b" +"md","enterprise-agentic-development","bmm","bmad/bmm/docs/enterprise-agentic-development.md","ffdb8746f5b3c2f3393b5f733281b3719bd279ecccc3833b5340a74029460939" "md","epics-template","bmm","bmad/bmm/workflows/2-plan-workflows/prd/create-epics-and-stories/epics-template.md","01b8a6e6febdb6c96848ce3fee71458d31f11910e90bd7e01b7ed3200b88644d" "md","epics-template","bmm","bmad/bmm/workflows/2-plan-workflows/tech-spec/epics-template.md","c467d75bd642b433a1de5d7fdd621fd7a13d1d0e12982ed0da7b0fedee595c9d" "md","error-handling","bmm","bmad/bmm/testarch/knowledge/error-handling.md","8a314eafb31e78020e2709d88aaf4445160cbefb3aba788b62d1701557eb81c1" +"md","faq","bmm","bmad/bmm/docs/faq.md","2ce2ce13e581defecd192f5383e7ff079f8dfd25df45759a1e77046285435fb7" "md","feature-flags","bmm","bmad/bmm/testarch/knowledge/feature-flags.md","f6db7e8de2b63ce40a1ceb120a4055fbc2c29454ad8fca5db4e8c065d98f6f49" "md","fixture-architecture","bmm","bmad/bmm/testarch/knowledge/fixture-architecture.md","a3b6c1bcaf5e925068f3806a3d2179ac11dde7149e404bc4bb5602afb7392501" "md","full-scan-instructions","bmm","bmad/bmm/workflows/document-project/workflows/full-scan-instructions.md","f51b4444c5a44f098ce49c4ef27a50715b524c074d08c41e7e8c982df32f38b9" +"md","glossary","bmm","bmad/bmm/docs/glossary.md","7d2f98c3d469a8530838205da667c8a98ab6304457008e0e6d3f6b46b6f82225" "md","index-template","bmm","bmad/bmm/workflows/document-project/templates/index-template.md","42c8a14f53088e4fda82f26a3fe41dc8a89d4bcb7a9659dd696136378b64ee90" "md","instructions","bmm","bmad/bmm/workflows/1-analysis/brainstorm-project/instructions.md","990e98596dc82f5e6c044ea8a833638c8cde46b1a10b1eb4fa8df347568bd881" "md","instructions","bmm","bmad/bmm/workflows/1-analysis/domain-research/instructions.md","e5e5710fd9217f9b535fe8f7ae7b85384a2e441f2b8b6631827c840e9421ea6c" @@ -146,7 +150,7 @@ type,name,module,path,hash "md","instructions","bmm","bmad/bmm/workflows/testarch/test-design/instructions.md","b0e17d6cbc4852f4808ae891dc4c70d80cb7df267d1a5e4c138d8c92d12c1319" "md","instructions","bmm","bmad/bmm/workflows/testarch/test-review/instructions.md","8e1ed220ae9fb0ea5eba0a75f7fc755b774d8c1cfbaf15c9b972fdbdab76d954" "md","instructions","bmm","bmad/bmm/workflows/testarch/trace/instructions.md","e34afa60d1dc5810a37372f59cb37b4f42f08c811948968dddea9668b669b3d2" -"md","instructions","bmm","bmad/bmm/workflows/workflow-status/init/instructions.md","e6c1b26575cc2d4098340acd52821d8a790a216b26d24fcb7e8bbb70c4b328af" +"md","instructions","bmm","bmad/bmm/workflows/workflow-status/init/instructions.md","52404f8731c09694fb8032ddbdcc43da94d89c79e5c4005fb0d4c09db864b316" "md","instructions","bmm","bmad/bmm/workflows/workflow-status/instructions.md","9706ab6bc6fe69cf519b6fc8f139349fb7aec18961a57c75082fcc586741d25c" "md","instructions-deep-prompt","bmm","bmad/bmm/workflows/1-analysis/research/instructions-deep-prompt.md","a0b0f774abe6a1e29dc01feb4dec706f2deffeb0e6f65d62f1cdaad87dfa0cae" "md","instructions-level0-story","bmm","bmad/bmm/workflows/2-plan-workflows/tech-spec/instructions-level0-story.md","b158b4e5aa2357fbef4bc610e721bcb23801e622e9a56da60c3f58908f2f313d" @@ -159,54 +163,26 @@ type,name,module,path,hash "md","network-first","bmm","bmad/bmm/testarch/knowledge/network-first.md","2920e58e145626f5505bcb75e263dbd0e6ac79a8c4c2ec138f5329e06a6ac014" "md","nfr-criteria","bmm","bmad/bmm/testarch/knowledge/nfr-criteria.md","e63cee4a0193e4858c8f70ff33a497a1b97d13a69da66f60ed5c9a9853025aa1" "md","nfr-report-template","bmm","bmad/bmm/workflows/testarch/nfr-assess/nfr-report-template.md","b1d8fcbdfc9715a285a58cb161242dea7d311171c09a2caab118ad8ace62b80c" -"md","paige","bmm","bmad/bmm/agents/paige.md","969f471a84375fe3383d846dcb19f5cb8f95f7bce4ef9ac3a0e266f6ad59477a" +"md","party-mode","bmm","bmad/bmm/docs/party-mode.md","1f62cb3f3f292a5a3d08b295f62fbeb46abff6eb9743abdd5112b49032a7253e" "md","playwright-config","bmm","bmad/bmm/testarch/knowledge/playwright-config.md","42516511104a7131775f4446196cf9e5dd3295ba3272d5a5030660b1dffaa69f" "md","pm","bmm","bmad/bmm/agents/pm.md","1aaa58f55ec09afdfcdc0b830a1db054b5335b94e43c586b40f6b21e2809109a" "md","prd-template","bmm","bmad/bmm/workflows/2-plan-workflows/prd/prd-template.md","cf79921e432b992048af21cb4c87ca5cbc14cdf6e279324b3d5990a7f2366ec4" "md","probability-impact","bmm","bmad/bmm/testarch/knowledge/probability-impact.md","446dba0caa1eb162734514f35366f8c38ed3666528b0b5e16c7f03fd3c537d0f" "md","project-context","bmm","bmad/bmm/workflows/1-analysis/brainstorm-project/project-context.md","0f1888da4bfc4f24c4de9477bd3ccb2a6fb7aa83c516dfdc1f98fbd08846d4ba" "md","project-overview-template","bmm","bmad/bmm/workflows/document-project/templates/project-overview-template.md","a7c7325b75a5a678dca391b9b69b1e3409cfbe6da95e70443ed3ace164e287b2" -"md","quick-spec-flow","bmm","bmad/bmm/docs/quick-spec-flow.md","b100e1a381d9a79b98bc2f980f958243d5f85e4a903bcced0cad83be88249b0b" -"md","quick-start","bmm","bmad/bmm/docs/quick-start.md","ee032d7a0b5d196cfc60f278894da7f3fa9c4ce6b3ccd715b2022c68b96f4663" -"md","README","bmm","bmad/bmm/README.md","903f604e68cb84beb63df1e9859df5f5ca1dbfe12e6ae4c443fadc800c9da20b" -"md","README","bmm","bmad/bmm/testarch/README.md","2ae906adc1edde5ba3af2a20d78d9cef640897347ec46453233d611115c3e1ac" -"md","README","bmm","bmad/bmm/workflows/1-analysis/brainstorm-project/README.md","665846da7cec66cfdcd641272128a800a6ff43d94f9af4bcb3ddef93944f9d37" -"md","README","bmm","bmad/bmm/workflows/1-analysis/product-brief/README.md","e891a719ac22e5cd754b55efc7b2f367094c8fa00e802139b3cb1f9fabf1c559" -"md","README","bmm","bmad/bmm/workflows/1-analysis/research/README.md","e365d495308a23d6163f3353c4efa254ecaef0ef9ecf7427398509de751ca207" -"md","README","bmm","bmad/bmm/workflows/2-plan-workflows/README.md","d115f5ecd955fa82373eb713edb10e038be1360fe56384ada5187bd3c434f5f1" -"md","README","bmm","bmad/bmm/workflows/3-solutioning/README.md","d26584993cc212c082226afa7130e4208481043f3afed0cbbf83bf2e75cbfa65" -"md","README","bmm","bmad/bmm/workflows/3-solutioning/architecture/README.md","0f10f59151c849b344e20b32f6e242d87089a62f0e5248e702a142d8948bf44d" -"md","README","bmm","bmad/bmm/workflows/3-solutioning/solutioning-gate-check/README.md","ecab10e9f4b5d405358151fe8ce20a7c763ee66e6dd634c16b0194de99520da3" -"md","README","bmm","bmad/bmm/workflows/4-implementation/README.md","fcae4ac77a0e49114232656c29c1b676551ea16af65e027901cbfa36a1cefc9a" -"md","README","bmm","bmad/bmm/workflows/4-implementation/code-review/README.md","b02ce4e580cfdeeedc1c118e774902502a0546a93c2d3b7e88b668393ecd7565" -"md","README","bmm","bmad/bmm/workflows/4-implementation/correct-course/README.md","7d5324ef1abbb4b46da2f850e7b57ce8856a5c6b3f9b2af2804f9cd71f007d8f" -"md","README","bmm","bmad/bmm/workflows/4-implementation/create-story/README.md","a316100b40af184aac82b5f8fbbceff680345296a446fa142c96c8747a84b74f" -"md","README","bmm","bmad/bmm/workflows/4-implementation/dev-story/README.md","48886af58eacc0190d444eb8494f7ac3e0b5a467dfa738ab76f505d80c7dcc9d" -"md","README","bmm","bmad/bmm/workflows/4-implementation/epic-tech-context/README.md","37b8ca1271b0ce45c5437fb7488b8eecb0981f17c3d720c591e663dd0a22677a" -"md","README","bmm","bmad/bmm/workflows/4-implementation/retrospective/README.md","ae7e8503dabb3f8b9e21e662a8143a996b825a658f6e8feef53b43502246353c" -"md","README","bmm","bmad/bmm/workflows/4-implementation/sprint-planning/README.md","b64796d87e654343e6e1bb1a565bbc14ad511d892a318fdc5bdf785d58549aa5" -"md","README","bmm","bmad/bmm/workflows/4-implementation/story-context/README.md","aadd2d77c2c254a358a0b91f4db48a1ad69815226120fab74ebc40bc209f8246" -"md","README","bmm","bmad/bmm/workflows/README.md","61d68e3131bf0d19ab2f4ac6eacd61874c4395821073f53aff0f02df4a42c8a2" -"md","README","bmm","bmad/bmm/workflows/document-project/README.md","592cb9ad4fe4b8a13b02cdfc1b35c152acb91c9563bf56802aa02b5c31a5dceb" -"md","README","bmm","bmad/bmm/workflows/document-project/templates/README.md","a5e3775d1dd3cf6958b782361229ad5602e55d140e8976f9c87e2051346d7e2a" -"md","README","bmm","bmad/bmm/workflows/testarch/README.md","2c425b38cc6229a82c21802cbff3e6e3a93c3b889228b3de63b21afca5ccc79d" -"md","README","bmm","bmad/bmm/workflows/testarch/atdd/README.md","8aa59b4a4d55c8cd21ffb41491c99ecf1ad9e78011e1926f5c54707c50a55fe0" -"md","README","bmm","bmad/bmm/workflows/testarch/automate/README.md","feb4661f378d00e4ec11142dd9fa71a658806b189bfa5fdda1759804f1ecc3d3" -"md","README","bmm","bmad/bmm/workflows/testarch/ci/README.md","4419f7bedf32d6c0625ff521189e1f34c067b455a93eb032ac8b44a4bf5f82ce" -"md","README","bmm","bmad/bmm/workflows/testarch/framework/README.md","45e223556745ebeb443beb2d326b20963175668bb5b28abd9934a6cf7c9115f9" -"md","README","bmm","bmad/bmm/workflows/testarch/nfr-assess/README.md","1c3f07243e60d5a425fac7b2eab17c0328f6318c74245143c91aa3fd51466ca1" -"md","README","bmm","bmad/bmm/workflows/testarch/test-design/README.md","292deef370b5a7fc92c0d25fcff337e3908d1ddb4cb333f2bdab82104459da21" -"md","README","bmm","bmad/bmm/workflows/testarch/test-review/README.md","08ba52231bda562e69d4211e5fb54d703c3e9ed5db9f9eda717d83134be15dea" -"md","README","bmm","bmad/bmm/workflows/testarch/trace/README.md","b9a280d698089af40eef690a158a051fe45c1581f0716e5b33f1de9d2a848de6" -"md","README","bmm","bmad/bmm/workflows/workflow-status/README.md","c22cab2637cd6ce53a487abbf70120d564540235c2ee681ed2636422996acc36" +"md","quick-spec-flow","bmm","bmad/bmm/docs/quick-spec-flow.md","160041033e377e9b547a36440db379dd7cb13993d34f85e52554b075077cab30" +"md","quick-start","bmm","bmad/bmm/docs/quick-start.md","7f32636d5bbc72df8138e6561e13b95e766d3eaba222261d8c4aaa2e2b39eb64" +"md","README","bmm","bmad/bmm/README.md","ad4e6d0c002e3a5fef1b695bda79e245fe5a43345375c699165b32d6fc511457" +"md","README","bmm","bmad/bmm/docs/README.md","9d39261689b75bbf92e60b0a3250dda150e33bb871557e26259c6ff54191616a" "md","risk-governance","bmm","bmad/bmm/testarch/knowledge/risk-governance.md","2fa2bc3979c4f6d4e1dec09facb2d446f2a4fbc80107b11fc41cbef2b8d65d68" -"md","scale-adaptive-system","bmm","bmad/bmm/docs/scale-adaptive-system.md","d263b29ee93a1237490ae9bed03c108f7831b8f2d84910034d89f468f9e33eb2" +"md","scale-adaptive-system","bmm","bmad/bmm/docs/scale-adaptive-system.md","0fd9db0d4c1bc00185e1fa88dc5494d49013976322f45cdf45afa03c856d98e6" "md","selective-testing","bmm","bmad/bmm/testarch/knowledge/selective-testing.md","c14c8e1bcc309dbb86a60f65bc921abf5a855c18a753e0c0654a108eb3eb1f1c" "md","selector-resilience","bmm","bmad/bmm/testarch/knowledge/selector-resilience.md","a55c25a340f1cd10811802665754a3f4eab0c82868fea61fea9cc61aa47ac179" -"md","sm","bmm","bmad/bmm/agents/sm.md","e7db6a49daafba9293ab2955c171536a53489b269b462d1f61bd4f5618d3047c" +"md","sm","bmm","bmad/bmm/agents/sm.md","6c7e3534b7d34af38298c3dd91a00b4165d4bfaa3d8d62c3654b7fa38c4925e9" "md","source-tree-template","bmm","bmad/bmm/workflows/document-project/templates/source-tree-template.md","109bc335ebb22f932b37c24cdc777a351264191825444a4d147c9b82a1e2ad7a" "md","tea","bmm","bmad/bmm/agents/tea.md","97a2cf3d200a9ed038559a4c524e9b333f4d37cff480e976a9a4a292de63df3a" "md","tech-spec-template","bmm","bmad/bmm/workflows/2-plan-workflows/tech-spec/tech-spec-template.md","2b07373b7b23f71849f107b8fd4356fef71ba5ad88d7f333f05547da1d3be313" +"md","tech-writer","bmm","bmad/bmm/agents/tech-writer.md","abbd01d8606ee4cca815abb739db4f1bc78d6d5b5ee6b9f712013da46c053d31" "md","template","bmm","bmad/bmm/workflows/1-analysis/domain-research/template.md","5606843f77007d886cc7ecf1fcfddd1f6dfa3be599239c67eff1d8e40585b083" "md","template","bmm","bmad/bmm/workflows/1-analysis/product-brief/template.md","96f89df7a4dabac6400de0f1d1abe1f2d4713b76fe9433f31c8a885e20d5a5b4" "md","template","bmm","bmad/bmm/workflows/3-solutioning/solutioning-gate-check/template.md","11c3b7573991c001a7f7780daaf5e5dfa4c46c3ea1f250c5bbf86c5e9f13fc8b" @@ -223,44 +199,46 @@ type,name,module,path,hash "md","test-review-template","bmm","bmad/bmm/workflows/testarch/test-review/test-review-template.md","3e68a73c48eebf2e0b5bb329a2af9e80554ef443f8cd16652e8343788f249072" "md","timing-debugging","bmm","bmad/bmm/testarch/knowledge/timing-debugging.md","c4c87539bbd3fd961369bb1d7066135d18c6aad7ecd70256ab5ec3b26a8777d9" "md","trace-template","bmm","bmad/bmm/workflows/testarch/trace/trace-template.md","5453a8e4f61b294a1fc0ba42aec83223ae1bcd5c33d7ae0de6de992e3ee42b43" +"md","troubleshooting","bmm","bmad/bmm/docs/troubleshooting.md","2b7bc49ec58d1f63a1976ead4338820e651e62b13e4e7cfdb135e73fe2a04d72" "md","user-story-template","bmm","bmad/bmm/workflows/2-plan-workflows/tech-spec/user-story-template.md","9a70551dbe1615a85697cd30f7dbcc0e6af1cfe193019f6739fa37d32622d7d2" "md","ux-design-template","bmm","bmad/bmm/workflows/2-plan-workflows/create-ux-design/ux-design-template.md","f9b8ae0fe08c6a23c63815ddd8ed43183c796f266ffe408f3426af1f13b956db" "md","ux-designer","bmm","bmad/bmm/agents/ux-designer.md","2913eebbc6eeff757ef08e8d42c68730ba3f6837d311fcbbe647a161a16b36cf" "md","visual-debugging","bmm","bmad/bmm/testarch/knowledge/visual-debugging.md","072a3d30ba6d22d5e628fc26a08f6e03f8b696e49d5a4445f37749ce5cd4a8a9" +"md","workflow-architecture-reference","bmm","bmad/bmm/docs/workflow-architecture-reference.md","ce6c43a7f90e7b31655dd1bc9632cda700e105315f5ef25067319792274b2283" +"md","workflow-document-project-reference","bmm","bmad/bmm/docs/workflow-document-project-reference.md","1f271cd6c139def4de63a6e0b00800eaebb26353fb4c3758fb4d737c04c98e46" +"md","workflows-analysis","bmm","bmad/bmm/docs/workflows-analysis.md","fd484512df12c21fc77ea53956a20d235ca20330aaee53f31388b9942fcb40e5" +"md","workflows-implementation","bmm","bmad/bmm/docs/workflows-implementation.md","7c280d3c46568f4e09d597adf4812cd5e987aa201a36b25b7616f2de77c8a367" +"md","workflows-planning","bmm","bmad/bmm/docs/workflows-planning.md","8c9955cecaabe1984393864a096d1595fb5a66ab518559ecf6f0f0b8cbd5fd47" +"md","workflows-solutioning","bmm","bmad/bmm/docs/workflows-solutioning.md","7ab9a206eddc439dbe7fd41a8c7b956187e3907d85db7d21aa4ffc739417e435" "xml","context-template","bmm","bmad/bmm/workflows/4-implementation/story-context/context-template.xml","6b88d07ff10f51bb847d70e02f22d8927beb6ef1e55d5acf647e8f23b5821921" "xml","daily-standup","bmm","bmad/bmm/tasks/daily-standup.xml","667194d00272fd2204ed0712c934778f0d20de62f6c09dfc5080e7700239ca36" -"xml","retrospective","bmm","bmad/bmm/tasks/retrospective.xml","0c7ed9b6a5a590a58f35fca3f9d04e548bb62fb3e9bd0c8e22df24c1dc905c7b" "yaml","analyst.agent","bmm","bmad/bmm/agents/analyst.agent.yaml","" "yaml","architect.agent","bmm","bmad/bmm/agents/architect.agent.yaml","" "yaml","architecture-patterns","bmm","bmad/bmm/workflows/3-solutioning/architecture/architecture-patterns.yaml","9394c1e632e01534f7a1afd676de74b27f1868f58924f21b542af3631679c552" -"yaml","brownfield-level-0","bmm","bmad/bmm/workflows/workflow-status/paths/brownfield-level-0.yaml","3178af1e3701957f1df42a8bc63062354f505ead025aa0d7b8e5b50cf1e28619" -"yaml","brownfield-level-1","bmm","bmad/bmm/workflows/workflow-status/paths/brownfield-level-1.yaml","3556bfa4d68d152efa04e7148558595bb235ebe31569c8f20aa67f62fc82e901" -"yaml","brownfield-level-2","bmm","bmad/bmm/workflows/workflow-status/paths/brownfield-level-2.yaml","657be9fe225323e12039462b39e922819c7151889769ead02e53272669d64e2c" -"yaml","brownfield-level-3","bmm","bmad/bmm/workflows/workflow-status/paths/brownfield-level-3.yaml","5a0fde804bc1af8beb02ed62fbe4c91521bfc2535023f569b795c01fca7df0ee" -"yaml","brownfield-level-4","bmm","bmad/bmm/workflows/workflow-status/paths/brownfield-level-4.yaml","2a73e1c1905522ed54a70cd606d4573edb66a6d789e93df6867b69b5dd84b7b8" -"yaml","config","bmm","bmad/bmm/config.yaml","f812e7d2cd85ee1453b6889b7f0986a3c17c7bf198384dfdbf05253a3d516296" +"yaml","config","bmm","bmad/bmm/config.yaml","56c2b76e22495a327aa8e4af69f2682082970e12655e260924b1d47705b1da4f" "yaml","decision-catalog","bmm","bmad/bmm/workflows/3-solutioning/architecture/decision-catalog.yaml","f7fc2ed6ec6c4bd78ec808ad70d24751b53b4835e0aad1088057371f545d3c82" "yaml","deep-dive","bmm","bmad/bmm/workflows/document-project/workflows/deep-dive.yaml","5bba01ced6a5a703afa9db633cb8009d89fe37ceaa19b012cb4146ff5df5d361" "yaml","dev.agent","bmm","bmad/bmm/agents/dev.agent.yaml","" +"yaml","enterprise-brownfield","bmm","bmad/bmm/workflows/workflow-status/paths/enterprise-brownfield.yaml","746eca76ca530becfbe263559bd8dd2683cf786df22c510938973b499e12922f" +"yaml","enterprise-greenfield","bmm","bmad/bmm/workflows/workflow-status/paths/enterprise-greenfield.yaml","449923c7bcfda0e3bb75a5c2931baac00cc15002cbffc60bb3aaf9564afb6e73" "yaml","full-scan","bmm","bmad/bmm/workflows/document-project/workflows/full-scan.yaml","0a9c4d6caa66ab51c3a9122956821bcd8b5c17207e845bfa1c4dccaef81afbb9" "yaml","game-design","bmm","bmad/bmm/workflows/workflow-status/paths/game-design.yaml","9f8f86788fa4a39cb3063c7fc9e6c6bb96396cc0e9813a4014567556f0808956" "yaml","github-actions-template","bmm","bmad/bmm/workflows/testarch/ci/github-actions-template.yaml","28c0de7c96481c5a7719596c85dd0ce8b5dc450d360aeaa7ebf6294dcf4bea4c" "yaml","gitlab-ci-template","bmm","bmad/bmm/workflows/testarch/ci/gitlab-ci-template.yaml","bc83b9240ad255c6c2a99bf863b9e519f736c99aeb4b1e341b07620d54581fdc" -"yaml","greenfield-level-0","bmm","bmad/bmm/workflows/workflow-status/paths/greenfield-level-0.yaml","2822603b914ec7b6ab781c5086251c37c1ab8613d8c3e71d39499affd10725e1" -"yaml","greenfield-level-1","bmm","bmad/bmm/workflows/workflow-status/paths/greenfield-level-1.yaml","0e5fa26bec70923d6e7267be6be61eb965276a77440bf528c87f14f79a87950d" -"yaml","greenfield-level-2","bmm","bmad/bmm/workflows/workflow-status/paths/greenfield-level-2.yaml","af061b8b42550ce26e48c7daeaf59e03108ad8f41b05b7ee0022c8a97c3bbcba" -"yaml","greenfield-level-3","bmm","bmad/bmm/workflows/workflow-status/paths/greenfield-level-3.yaml","3f906d8fc15a4892a6657d84770703376b73253cfaf7cb69c9fdfbce0b97b76c" -"yaml","greenfield-level-4","bmm","bmad/bmm/workflows/workflow-status/paths/greenfield-level-4.yaml","1199c9974b40758d63adc10a60600683adc9b1c7be5587c80b3eff7155b73937" "yaml","injections","bmm","bmad/bmm/workflows/1-analysis/research/claude-code/injections.yaml","dd6dd6e722bf661c3c51d25cc97a1e8ca9c21d517ec0372e469364ba2cf1fa8b" -"yaml","paige.agent","bmm","bmad/bmm/agents/paige.agent.yaml","" +"yaml","method-brownfield","bmm","bmad/bmm/workflows/workflow-status/paths/method-brownfield.yaml","6f4c6b508d3af2eba1409d48543e835d07ec4d453fa34fe53a2c7cbb91658969" +"yaml","method-greenfield","bmm","bmad/bmm/workflows/workflow-status/paths/method-greenfield.yaml","1eb8232eca4cb915acecbc60fe3495c6dcc8d2241393ee42d62b5f491d7c223e" "yaml","pm.agent","bmm","bmad/bmm/agents/pm.agent.yaml","" "yaml","project-levels","bmm","bmad/bmm/workflows/workflow-status/project-levels.yaml","09d810864558bfbc5a83ed8989847a165bd59119dfe420194771643daff6c813" +"yaml","quick-flow-brownfield","bmm","bmad/bmm/workflows/workflow-status/paths/quick-flow-brownfield.yaml","0d8837a07efaefe06b29c1e58fee982fafe6bbb40c096699bd64faed8e56ebf8" +"yaml","quick-flow-greenfield","bmm","bmad/bmm/workflows/workflow-status/paths/quick-flow-greenfield.yaml","c6eae1a3ef86e87bd48a285b11989809526498dc15386fa949279f2e77b011d5" "yaml","sample-level-3-workflow","bmm","bmad/bmm/workflows/workflow-status/sample-level-3-workflow.yaml","036b27d39d3a845abed38725d816faca1452651c0b90f30f6e3adc642c523c6f" "yaml","sm.agent","bmm","bmad/bmm/agents/sm.agent.yaml","" "yaml","sprint-status-template","bmm","bmad/bmm/workflows/4-implementation/sprint-planning/sprint-status-template.yaml","314af29f980b830cc2f67b32b3c0c5cc8a3e318cc5b2d66ff94540e5c80e3aca" "yaml","tea.agent","bmm","bmad/bmm/agents/tea.agent.yaml","" "yaml","team-fullstack","bmm","bmad/bmm/teams/team-fullstack.yaml","f6e12ad099bbcc048990ea9c0798587b044880f17494dbce0b9dd35a7a674d05" "yaml","team-gamedev","bmm","bmad/bmm/teams/team-gamedev.yaml","aa6cad296fbe4a967647f378fcd9c2eb2e4dbedfea72029f54d1cae5e2a67e27" +"yaml","tech-writer.agent","bmm","bmad/bmm/agents/tech-writer.agent.yaml","" "yaml","ux-designer.agent","bmm","bmad/bmm/agents/ux-designer.agent.yaml","" "yaml","validation-criteria","bmm","bmad/bmm/workflows/3-solutioning/solutioning-gate-check/validation-criteria.yaml","d690edf5faf95ca1ebd3736e01860b385b05566da415313d524f4db12f9a5af4" "yaml","workflow","bmm","bmad/bmm/workflows/1-analysis/brainstorm-project/workflow.yaml","9fa9d8a3e3467e00b9ba187f91520760751768b56fa14a325cc166e708067afb" @@ -278,7 +256,7 @@ type,name,module,path,hash "yaml","workflow","bmm","bmad/bmm/workflows/4-implementation/correct-course/workflow.yaml","29fd40a0b4b16cba64462224732101de2c9050206c0c77dd555399ba8273fb5d" "yaml","workflow","bmm","bmad/bmm/workflows/4-implementation/create-story/workflow.yaml","0b6ddcd6df3bc2cde34466944f322add6533c184932040e36b17789fb19ecff1" "yaml","workflow","bmm","bmad/bmm/workflows/4-implementation/dev-story/workflow.yaml","96703263763717900ab1695de19a558c817a472e007af24b380f238c59a4c78d" -"yaml","workflow","bmm","bmad/bmm/workflows/4-implementation/epic-tech-context/workflow.yaml","6d6d9698cb794188068b5594dc0ab9c1f2dfb4e149d7a397219dab04b328a654" +"yaml","workflow","bmm","bmad/bmm/workflows/4-implementation/epic-tech-context/workflow.yaml","60899ef88c1766595218724a9c98238978fc977b8f584ec11a8731a06d21e1c3" "yaml","workflow","bmm","bmad/bmm/workflows/4-implementation/retrospective/workflow.yaml","2b27213f09c8809c4710e509ab3c4f63f9715c2ef5c5bad68cbd19711a23d7fb" "yaml","workflow","bmm","bmad/bmm/workflows/4-implementation/sprint-planning/workflow.yaml","720f2013eefb7fa241b64671b7388a17b667ef4db8c21bc5c0ad9282df6b6baa" "yaml","workflow","bmm","bmad/bmm/workflows/4-implementation/story-context/workflow.yaml","1c8c4b3d49665a2757c070b1558f89b5cb5a710381e5119424f682b7c87f1e2c" @@ -295,7 +273,7 @@ type,name,module,path,hash "yaml","workflow","bmm","bmad/bmm/workflows/testarch/trace/workflow.yaml","9e112a5d983d7b517e22f20b815772e38f42d2568a4dcb7d8eb5afaf9e246963" "yaml","workflow","bmm","bmad/bmm/workflows/workflow-status/init/workflow.yaml","e819d5ede67717bce20db57913029252f2374b77215f538d678f4a548caa7925" "yaml","workflow","bmm","bmad/bmm/workflows/workflow-status/workflow.yaml","d50d6e5593b871a197a67af991efec5204f354fd6b2ffe93790c9107bdb334c9" -"yaml","workflow-status-template","bmm","bmad/bmm/workflows/workflow-status/workflow-status-template.yaml","5785dffc656a2c57cd61a54822d28a928de17bf9c2fc2c7d1f0ad2b324143f1c" +"yaml","workflow-status-template","bmm","bmad/bmm/workflows/workflow-status/workflow-status-template.yaml","6021202726d2b81f28908ffeb93330d25bcd52986823200e01b814d67c1677dd" "csv","design-methods","cis","bmad/cis/workflows/design-thinking/design-methods.csv","6735e9777620398e35b7b8ccb21e9263d9164241c3b9973eb76f5112fb3a8fc9" "csv","innovation-frameworks","cis","bmad/cis/workflows/innovation-strategy/innovation-frameworks.csv","9a14473b1d667467172d8d161e91829c174e476a030a983f12ec6af249c4e42f" "csv","solving-methods","cis","bmad/cis/workflows/problem-solving/solving-methods.csv","aa15c3a862523f20c199600d8d4d0a23fce1001010d7efc29a71abe537d42995" @@ -321,7 +299,7 @@ type,name,module,path,hash "md","template","cis","bmad/cis/workflows/problem-solving/template.md","6c9efd7ac7b10010bd9911db16c2fbdca01fb0c306d871fa6381eef700b45608" "md","template","cis","bmad/cis/workflows/storytelling/template.md","461981aa772ef2df238070cbec90fc40995df2a71a8c22225b90c91afed57452" "yaml","brainstorming-coach.agent","cis","bmad/cis/agents/brainstorming-coach.agent.yaml","" -"yaml","config","cis","bmad/cis/config.yaml","aba4f50fafcfcff5c64b91ecf4bc77ff506e7a97db693f285ac7dad150ef7201" +"yaml","config","cis","bmad/cis/config.yaml","216a76c1f0dc54d9f8df25e822fe3811e45c8f57b6a3426edec41f8bf9b31a97" "yaml","creative-problem-solver.agent","cis","bmad/cis/agents/creative-problem-solver.agent.yaml","" "yaml","creative-squad","cis","bmad/cis/teams/creative-squad.yaml","5c31e9dd98fff661baa82e71ae3dd5856883fabbc245a62e28a77c4e2df83dec" "yaml","design-thinking-coach.agent","cis","bmad/cis/agents/design-thinking-coach.agent.yaml","" @@ -345,6 +323,6 @@ type,name,module,path,hash "xml","validate-workflow","core","bmad/core/tasks/validate-workflow.xml","1e8c569d8d53e618642aa1472721655cb917901a5888a7b403a98df4db2f26bf" "xml","workflow","core","bmad/core/tasks/workflow.xml","0b2b7bd184e099869174cc8d9125fce08bcd3fd64fad50ff835a42eccf6620e2" "yaml","bmad-master.agent","core","bmad/core/agents/bmad-master.agent.yaml","" -"yaml","config","core","bmad/core/config.yaml","fbf5898ef8bb093aed32e2aacfa556868c9da648c71763e9362d66658fbe362d" +"yaml","config","core","bmad/core/config.yaml","5c229b5fcb7f9ff0af8e2bb9ce2defdff9e4664d4e8314a281c6c33778d6477e" "yaml","workflow","core","bmad/core/workflows/brainstorming/workflow.yaml","74038fa3892c4e873cc79ec806ecb2586fc5b4cf396c60ae964a6a71a9ad4a3d" "yaml","workflow","core","bmad/core/workflows/party-mode/workflow.yaml","04558885b784b4731f37465897b9292a756f64c409bd76dcc541407d50501605" diff --git a/bmad/_cfg/ides/claude-code.yaml b/bmad/_cfg/ides/claude-code.yaml index 7ecb182e..993fab02 100644 --- a/bmad/_cfg/ides/claude-code.yaml +++ b/bmad/_cfg/ides/claude-code.yaml @@ -1,6 +1,6 @@ ide: claude-code configured_date: "2025-11-01T01:27:21.207Z" -last_updated: "2025-11-02T21:29:37.715Z" +last_updated: "2025-11-04T02:59:22.768Z" configuration: subagentChoices: null installLocation: null diff --git a/bmad/_cfg/manifest.yaml b/bmad/_cfg/manifest.yaml index fc872344..e6629860 100644 --- a/bmad/_cfg/manifest.yaml +++ b/bmad/_cfg/manifest.yaml @@ -1,11 +1,12 @@ installation: - version: 6.0.0-alpha.3 - installDate: "2025-11-02T21:29:37.682Z" - lastUpdated: "2025-11-02T21:29:37.682Z" + version: 6.0.0-alpha.4 + installDate: "2025-11-04T02:59:22.726Z" + lastUpdated: "2025-11-04T02:59:22.726Z" modules: - core - bmb - bmm - cis + - core ides: - claude-code diff --git a/bmad/_cfg/task-manifest.csv b/bmad/_cfg/task-manifest.csv index e04ab7ff..77ead17b 100644 --- a/bmad/_cfg/task-manifest.csv +++ b/bmad/_cfg/task-manifest.csv @@ -4,4 +4,7 @@ name,displayName,description,module,path,standalone "validate-workflow","Validate Workflow Output","Run a checklist against a document with thorough analysis and produce a validation report","core","bmad/core/tasks/validate-workflow.xml","false" "workflow","Execute Workflow","Execute given workflow by loading its configuration, following instructions, and producing output","core","bmad/core/tasks/workflow.xml","false" "daily-standup","Daily Standup","","bmm","bmad/bmm/tasks/daily-standup.xml","false" -"retrospective","Team Retrospective","","bmm","bmad/bmm/tasks/retrospective.xml","false" +"adv-elicit","Advanced Elicitation","When called from workflow","core","bmad/core/tasks/adv-elicit.xml","false" +"index-docs","Index Docs","Generates or updates an index.md of all documents in the specified directory","core","bmad/core/tasks/index-docs.xml","true" +"validate-workflow","Validate Workflow Output","Run a checklist against a document with thorough analysis and produce a validation report","core","bmad/core/tasks/validate-workflow.xml","false" +"workflow","Execute Workflow","Execute given workflow by loading its configuration, following instructions, and producing output","core","bmad/core/tasks/workflow.xml","false" diff --git a/bmad/_cfg/tool-manifest.csv b/bmad/_cfg/tool-manifest.csv index 1b846613..a42946d9 100644 --- a/bmad/_cfg/tool-manifest.csv +++ b/bmad/_cfg/tool-manifest.csv @@ -1,2 +1,3 @@ name,displayName,description,module,path,standalone "shard-doc","Shard Document","Splits large markdown documents into smaller, organized files based on level 2 (default) sections","core","bmad/core/tools/shard-doc.xml","true" +"shard-doc","Shard Document","Splits large markdown documents into smaller, organized files based on level 2 (default) sections","core","bmad/core/tools/shard-doc.xml","true" diff --git a/bmad/_cfg/workflow-manifest.csv b/bmad/_cfg/workflow-manifest.csv index a9f19ea2..127df355 100644 --- a/bmad/_cfg/workflow-manifest.csv +++ b/bmad/_cfg/workflow-manifest.csv @@ -25,7 +25,7 @@ name,description,module,path,standalone "correct-course","Navigate significant changes during sprint execution by analyzing impact, proposing solutions, and routing for implementation","bmm","bmad/bmm/workflows/4-implementation/correct-course/workflow.yaml","true" "create-story","Create the next user story markdown from epics/PRD and architecture, using a standard template and saving to the stories folder","bmm","bmad/bmm/workflows/4-implementation/create-story/workflow.yaml","true" "dev-story","Execute a story by implementing tasks/subtasks, writing tests, validating, and updating the story file per acceptance criteria","bmm","bmad/bmm/workflows/4-implementation/dev-story/workflow.yaml","true" -"tech-spec","Generate a comprehensive Technical Specification from PRD and Architecture with acceptance criteria and traceability mapping","bmm","bmad/bmm/workflows/4-implementation/epic-tech-context/workflow.yaml","true" +"epic-tech-context","Generate a comprehensive Technical Specification from PRD and Architecture with acceptance criteria and traceability mapping","bmm","bmad/bmm/workflows/4-implementation/epic-tech-context/workflow.yaml","true" "retrospective","Run after epic completion to review overall success, extract lessons learned, and explore if new information emerged that might impact the next epic","bmm","bmad/bmm/workflows/4-implementation/retrospective/workflow.yaml","true" "sprint-planning","Generate and manage the sprint status tracking file for Phase 4 implementation, extracting all epics and stories from epic files and tracking their status through the development lifecycle","bmm","bmad/bmm/workflows/4-implementation/sprint-planning/workflow.yaml","true" "story-context","Assemble a dynamic Story Context XML by pulling latest documentation and existing code/library artifacts relevant to a drafted story","bmm","bmad/bmm/workflows/4-implementation/story-context/workflow.yaml","true" @@ -46,3 +46,5 @@ name,description,module,path,standalone "innovation-strategy","Identify disruption opportunities and architect business model innovation. This workflow guides strategic analysis of markets, competitive dynamics, and business model innovation to uncover sustainable competitive advantages and breakthrough opportunities.","cis","bmad/cis/workflows/innovation-strategy/workflow.yaml","true" "problem-solving","Apply systematic problem-solving methodologies to crack complex challenges. This workflow guides through problem diagnosis, root cause analysis, creative solution generation, evaluation, and implementation planning using proven frameworks.","cis","bmad/cis/workflows/problem-solving/workflow.yaml","true" "storytelling","Craft compelling narratives using proven story frameworks and techniques. This workflow guides users through structured narrative development, applying appropriate story frameworks to create emotionally resonant and engaging stories for any purpose.","cis","bmad/cis/workflows/storytelling/workflow.yaml","true" +"brainstorming","Facilitate interactive brainstorming sessions using diverse creative techniques. This workflow facilitates interactive brainstorming sessions using diverse creative techniques. The session is highly interactive, with the AI acting as a facilitator to guide the user through various ideation methods to generate and refine creative solutions.","core","bmad/core/workflows/brainstorming/workflow.yaml","true" +"party-mode","Orchestrates group discussions between all installed BMAD agents, enabling natural multi-agent conversations","core","bmad/core/workflows/party-mode/workflow.yaml","true" diff --git a/bmad/bmb/config.yaml b/bmad/bmb/config.yaml index 2086ebd7..01e7780e 100644 --- a/bmad/bmb/config.yaml +++ b/bmad/bmb/config.yaml @@ -1,7 +1,7 @@ # BMB Module Configuration # Generated by BMAD installer -# Version: 6.0.0-alpha.3 -# Date: 2025-11-02T21:29:37.672Z +# Version: 6.0.0-alpha.4 +# Date: 2025-11-04T02:59:22.715Z custom_agent_location: "{project-root}/bmad/agents" custom_workflow_location: "{project-root}/bmad/workflows" diff --git a/bmad/bmm/README.md b/bmad/bmm/README.md index a5762c6c..047c8581 100644 --- a/bmad/bmm/README.md +++ b/bmad/bmm/README.md @@ -2,168 +2,127 @@ Core orchestration system for AI-driven agile development, providing comprehensive lifecycle management through specialized agents and workflows. -## Table of Contents +--- -- [Essential Reading](#essential-reading) -- [Documentation](#documentation) -- [Module Structure](#module-structure) -- [Quick Start](#quick-start) -- [Key Concepts](#key-concepts) -- [Scale Levels](#scale-levels) -- [Story Lifecycle](#story-lifecycle) -- [Best Practices](#best-practices) +## πŸ“š Complete Documentation -## Essential Reading +πŸ‘‰ **[BMM Documentation Hub](./docs/README.md)** - Start here for complete guides, tutorials, and references -**[πŸ“– BMM v6 Workflows Guide](./workflows/README.md)** - Required reading before using BMM. Explains the revolutionary workflow system and component integration. +**Quick Links:** -## Documentation - -All BMM-specific documentation is organized in the `docs/` folder: - -### Getting Started - -- **[Quick Start Guide](./docs/quick-start.md)** - Step-by-step guide to building your first project with BMM -- **[Quick Spec Flow](./docs/quick-spec-flow.md)** - Rapid Level 0-1 development for bug fixes and small features - -### Core Concepts - -- **[Scale Adaptive System](./docs/scale-adaptive-system.md)** - Understanding BMad Method's 5-level system (Level 0-4) -- **[Brownfield Guide](./docs/brownfield-guide.md)** - Guidance for working with existing codebases - -### Workflows & Reference - -- **[Workflows Guide](./workflows/README.md)** - Complete v6 workflow system (ESSENTIAL) -- **[Test Architect Guide](./testarch/README.md)** - Testing strategy and quality assurance - -## Module Structure - -### πŸ€– Agents - -**Core Development Roles:** - -- **PM** - Product Manager for planning and requirements -- **Analyst** - Business analysis and research -- **Architect** - Technical architecture and design -- **SM** - Scrum Master for sprint and story management -- **DEV** - Developer for implementation -- **TEA** - Test Architect for quality assurance -- **UX** - User experience design - -**Game Development** (Optional): - -- **Game Designer** - Creative vision and GDD creation -- **Game Developer** - Game-specific implementation -- **Game Architect** - Game systems and infrastructure - -### πŸ“‹ Workflows - -Four-phase methodology adapting to project complexity: - -**1. Analysis** (Optional) - -- `brainstorm-project` - Project ideation -- `research` - Market/technical research -- `product-brief` - Product strategy - -**2. Planning** (Required) - -- `prd` - Scale-adaptive planning -- Routes to appropriate documentation level - -**3. Solutioning** (Level 3-4) - -- `architecture` - System design -- `tech-spec` - Epic technical specifications - -**4. Implementation** (Iterative) - -- `create-story` - Draft stories -- `story-context` - Inject expertise -- `dev-story` - Implement -- `code-review` - Validate quality - -### πŸ‘₯ Teams - -Pre-configured agent groups for coordinated complex tasks. - -### πŸ“ Tasks - -Atomic work units composing into larger workflows. - -### πŸ—οΈ Test Architecture - -**[TEA Guide](./testarch/README.md)** - Comprehensive testing strategy across 9 specialized workflows. - -## Quick Start - -1. **Load PM agent** in your IDE -2. **Wait for menu** to appear -3. **Run workflow:** - ``` - *prd - ``` - -**IDE Instructions:** - -- [Claude Code](../../../docs/ide-info/claude-code.md) -- [Cursor](../../../docs/ide-info/cursor.md) -- [VS Code](../../../docs/ide-info/windsurf.md) -- [Others](../../../docs/ide-info/) - -## Key Concepts - -### Scale Levels - -BMM automatically adapts complexity: - -| Level | Stories | Documentation | -| ----- | ------------- | ----------------- | -| 0 | Single change | Minimal | -| 1 | 1-10 | Light PRD | -| 2 | 5-15 | Focused PRD | -| 3 | 12-40 | Full architecture | -| 4 | 40+ | Enterprise scale | - -### Story Lifecycle - -Four-state machine tracked in status file: - -``` -BACKLOG β†’ TODO β†’ IN PROGRESS β†’ DONE -``` - -- **BACKLOG** - Ordered stories to draft -- **TODO** - Ready for SM drafting -- **IN PROGRESS** - Approved for DEV -- **DONE** - Completed with metrics - -### Just-In-Time Design - -Technical specifications created per epic during implementation, enabling learning and adaptation. - -### Context Injection - -Dynamic technical guidance generated for each story, providing exact expertise when needed. - -## Best Practices - -1. **Start with workflows** - Let process guide you -2. **Respect scale** - Don't over-document small projects -3. **Trust the process** - Methodology carefully designed -4. **Use status file** - Single source of truth for stories - -## Related Documentation - -- **[Complete Documentation Index](./docs/)** - All BMM guides and references -- **[Quick Start Guide](./docs/quick-start.md)** - Getting started with BMM -- **[Quick Spec Flow](./docs/quick-spec-flow.md)** - Rapid Level 0-1 development -- **[Scale Adaptive System](./docs/scale-adaptive-system.md)** - Understanding project levels -- **[Brownfield Guide](./docs/brownfield-guide.md)** - Working with existing code -- **[Workflows Guide](./workflows/README.md)** - Complete workflow reference -- **[Test Architect Guide](./testarch/README.md)** - Testing strategy -- **[IDE Setup](../../../docs/ide-info/)** - Environment configuration +- **[Quick Start Guide](./docs/quick-start.md)** - New to BMM? Start here (15 min) +- **[Agents Guide](./docs/agents-guide.md)** - Meet your 12 specialized AI agents (45 min) +- **[Scale Adaptive System](./docs/scale-adaptive-system.md)** - How BMM adapts to project size (42 min) +- **[FAQ](./docs/faq.md)** - Quick answers to common questions +- **[Glossary](./docs/glossary.md)** - Key terminology reference --- -For complete BMad Method workflow system details, see the [BMM Workflows README](./workflows/README.md). +## πŸ—οΈ Module Structure + +This module contains: + +``` +bmm/ +β”œβ”€β”€ agents/ # 12 specialized AI agents (PM, Architect, SM, DEV, TEA, etc.) +β”œβ”€β”€ workflows/ # 34 workflows across 4 phases + testing +β”œβ”€β”€ teams/ # Pre-configured agent groups +β”œβ”€β”€ tasks/ # Atomic work units +β”œβ”€β”€ testarch/ # Comprehensive testing infrastructure +└── docs/ # Complete user documentation +``` + +### Agent Roster + +**Core Development:** PM, Analyst, Architect, SM, DEV, TEA, UX Designer, Technical Writer +**Game Development:** Game Designer, Game Developer, Game Architect +**Orchestration:** BMad Master (from Core) + +πŸ‘‰ **[Full Agents Guide](./docs/agents-guide.md)** - Roles, workflows, and when to use each agent + +### Workflow Phases + +**Phase 0:** Documentation (brownfield only) +**Phase 1:** Analysis (optional) - 5 workflows +**Phase 2:** Planning (required) - 6 workflows +**Phase 3:** Solutioning (Level 3-4) - 2 workflows +**Phase 4:** Implementation (iterative) - 10 workflows +**Testing:** Quality assurance (parallel) - 9 workflows + +πŸ‘‰ **[Workflow Guides](./docs/README.md#-workflow-guides)** - Detailed documentation for each phase + +--- + +## πŸš€ Getting Started + +**New Project:** + +```bash +# Install BMM +npx bmad-method@alpha install + +# Load Analyst agent in your IDE, then: +*workflow-init +``` + +**Existing Project (Brownfield):** + +```bash +# Document your codebase first +*document-project + +# Then initialize +*workflow-init +``` + +πŸ‘‰ **[Quick Start Guide](./docs/quick-start.md)** - Complete setup and first project walkthrough + +--- + +## 🎯 Key Concepts + +### Scale-Adaptive Design + +BMM automatically adjusts to project complexity (Levels 0-4): + +- **Level 0-1:** Quick Spec Flow for bug fixes and small features +- **Level 2:** PRD with optional architecture +- **Level 3-4:** Full PRD + comprehensive architecture + +πŸ‘‰ **[Scale Adaptive System](./docs/scale-adaptive-system.md)** - Complete level breakdown + +### Story-Centric Implementation + +Stories move through a defined lifecycle: `backlog β†’ drafted β†’ ready β†’ in-progress β†’ review β†’ done` + +Just-in-time epic context and story context provide exact expertise when needed. + +πŸ‘‰ **[Implementation Workflows](./docs/workflows-implementation.md)** - Complete story lifecycle guide + +### Multi-Agent Collaboration + +Use party mode to engage all 19+ agents (from BMM, CIS, BMB, custom modules) in group discussions for strategic decisions, creative brainstorming, and complex problem-solving. + +πŸ‘‰ **[Party Mode Guide](./docs/party-mode.md)** - How to orchestrate multi-agent collaboration + +--- + +## πŸ“– Additional Resources + +- **[Brownfield Guide](./docs/brownfield-guide.md)** - Working with existing codebases +- **[Quick Spec Flow](./docs/quick-spec-flow.md)** - Fast-track for Level 0-1 projects +- **[Enterprise Agentic Development](./docs/enterprise-agentic-development.md)** - Team collaboration patterns +- **[Troubleshooting](./docs/troubleshooting.md)** - Common issues and solutions +- **[IDE Setup Guides](../../../docs/ide-info/)** - Configure Claude Code, Cursor, Windsurf, etc. + +--- + +## 🀝 Community + +- **[Discord](https://discord.gg/gk8jAdXWmj)** - Get help, share feedback (#general-dev, #bugs-issues) +- **[GitHub Issues](https://github.com/bmad-code-org/BMAD-METHOD/issues)** - Report bugs or request features +- **[YouTube](https://www.youtube.com/@BMadCode)** - Video tutorials and walkthroughs + +--- + +**Ready to build?** β†’ [Start with the Quick Start Guide](./docs/quick-start.md) diff --git a/bmad/bmm/README.md.bak b/bmad/bmm/README.md.bak new file mode 100644 index 00000000..a5762c6c --- /dev/null +++ b/bmad/bmm/README.md.bak @@ -0,0 +1,169 @@ +# BMM - BMad Method Module + +Core orchestration system for AI-driven agile development, providing comprehensive lifecycle management through specialized agents and workflows. + +## Table of Contents + +- [Essential Reading](#essential-reading) +- [Documentation](#documentation) +- [Module Structure](#module-structure) +- [Quick Start](#quick-start) +- [Key Concepts](#key-concepts) +- [Scale Levels](#scale-levels) +- [Story Lifecycle](#story-lifecycle) +- [Best Practices](#best-practices) + +## Essential Reading + +**[πŸ“– BMM v6 Workflows Guide](./workflows/README.md)** - Required reading before using BMM. Explains the revolutionary workflow system and component integration. + +## Documentation + +All BMM-specific documentation is organized in the `docs/` folder: + +### Getting Started + +- **[Quick Start Guide](./docs/quick-start.md)** - Step-by-step guide to building your first project with BMM +- **[Quick Spec Flow](./docs/quick-spec-flow.md)** - Rapid Level 0-1 development for bug fixes and small features + +### Core Concepts + +- **[Scale Adaptive System](./docs/scale-adaptive-system.md)** - Understanding BMad Method's 5-level system (Level 0-4) +- **[Brownfield Guide](./docs/brownfield-guide.md)** - Guidance for working with existing codebases + +### Workflows & Reference + +- **[Workflows Guide](./workflows/README.md)** - Complete v6 workflow system (ESSENTIAL) +- **[Test Architect Guide](./testarch/README.md)** - Testing strategy and quality assurance + +## Module Structure + +### πŸ€– Agents + +**Core Development Roles:** + +- **PM** - Product Manager for planning and requirements +- **Analyst** - Business analysis and research +- **Architect** - Technical architecture and design +- **SM** - Scrum Master for sprint and story management +- **DEV** - Developer for implementation +- **TEA** - Test Architect for quality assurance +- **UX** - User experience design + +**Game Development** (Optional): + +- **Game Designer** - Creative vision and GDD creation +- **Game Developer** - Game-specific implementation +- **Game Architect** - Game systems and infrastructure + +### πŸ“‹ Workflows + +Four-phase methodology adapting to project complexity: + +**1. Analysis** (Optional) + +- `brainstorm-project` - Project ideation +- `research` - Market/technical research +- `product-brief` - Product strategy + +**2. Planning** (Required) + +- `prd` - Scale-adaptive planning +- Routes to appropriate documentation level + +**3. Solutioning** (Level 3-4) + +- `architecture` - System design +- `tech-spec` - Epic technical specifications + +**4. Implementation** (Iterative) + +- `create-story` - Draft stories +- `story-context` - Inject expertise +- `dev-story` - Implement +- `code-review` - Validate quality + +### πŸ‘₯ Teams + +Pre-configured agent groups for coordinated complex tasks. + +### πŸ“ Tasks + +Atomic work units composing into larger workflows. + +### πŸ—οΈ Test Architecture + +**[TEA Guide](./testarch/README.md)** - Comprehensive testing strategy across 9 specialized workflows. + +## Quick Start + +1. **Load PM agent** in your IDE +2. **Wait for menu** to appear +3. **Run workflow:** + ``` + *prd + ``` + +**IDE Instructions:** + +- [Claude Code](../../../docs/ide-info/claude-code.md) +- [Cursor](../../../docs/ide-info/cursor.md) +- [VS Code](../../../docs/ide-info/windsurf.md) +- [Others](../../../docs/ide-info/) + +## Key Concepts + +### Scale Levels + +BMM automatically adapts complexity: + +| Level | Stories | Documentation | +| ----- | ------------- | ----------------- | +| 0 | Single change | Minimal | +| 1 | 1-10 | Light PRD | +| 2 | 5-15 | Focused PRD | +| 3 | 12-40 | Full architecture | +| 4 | 40+ | Enterprise scale | + +### Story Lifecycle + +Four-state machine tracked in status file: + +``` +BACKLOG β†’ TODO β†’ IN PROGRESS β†’ DONE +``` + +- **BACKLOG** - Ordered stories to draft +- **TODO** - Ready for SM drafting +- **IN PROGRESS** - Approved for DEV +- **DONE** - Completed with metrics + +### Just-In-Time Design + +Technical specifications created per epic during implementation, enabling learning and adaptation. + +### Context Injection + +Dynamic technical guidance generated for each story, providing exact expertise when needed. + +## Best Practices + +1. **Start with workflows** - Let process guide you +2. **Respect scale** - Don't over-document small projects +3. **Trust the process** - Methodology carefully designed +4. **Use status file** - Single source of truth for stories + +## Related Documentation + +- **[Complete Documentation Index](./docs/)** - All BMM guides and references +- **[Quick Start Guide](./docs/quick-start.md)** - Getting started with BMM +- **[Quick Spec Flow](./docs/quick-spec-flow.md)** - Rapid Level 0-1 development +- **[Scale Adaptive System](./docs/scale-adaptive-system.md)** - Understanding project levels +- **[Brownfield Guide](./docs/brownfield-guide.md)** - Working with existing code +- **[Workflows Guide](./workflows/README.md)** - Complete workflow reference +- **[Test Architect Guide](./testarch/README.md)** - Testing strategy +- **[IDE Setup](../../../docs/ide-info/)** - Environment configuration + +--- + +For complete BMad Method workflow system details, see the [BMM Workflows README](./workflows/README.md). diff --git a/bmad/bmm/agents/analyst.md.bak b/bmad/bmm/agents/analyst.md.bak new file mode 100644 index 00000000..cf6963f0 --- /dev/null +++ b/bmad/bmm/agents/analyst.md.bak @@ -0,0 +1,67 @@ +--- +name: 'analyst' +description: 'Business Analyst' +--- + +You must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command. + +```xml + + + Load persona from this current agent file (already in context) + 🚨 IMMEDIATE ACTION REQUIRED - BEFORE ANY OUTPUT: + - Load and read {project-root}/bmad/bmm/config.yaml NOW + - Store ALL fields as session variables: {user_name}, {communication_language}, {output_folder} + - VERIFY: If config not loaded, STOP and report error to user + - DO NOT PROCEED to step 3 until config is successfully loaded and variables stored + Remember: user's name is {user_name} + + Show greeting using {user_name} from config, communicate in {communication_language}, then display numbered list of + ALL menu items from menu section + STOP and WAIT for user input - do NOT execute menu items automatically - accept number or trigger text + On user input: Number β†’ execute menu item[n] | Text β†’ case-insensitive substring match | Multiple matches β†’ ask user + to clarify | No match β†’ show "Not recognized" + When executing a menu item: Check menu-handlers section below - extract any attributes from the selected menu item + (workflow, exec, tmpl, data, action, validate-workflow) and follow the corresponding handler instructions + + + + + When menu item has: workflow="path/to/workflow.yaml" + 1. CRITICAL: Always LOAD {project-root}/bmad/core/tasks/workflow.xml + 2. Read the complete file - this is the CORE OS for executing BMAD workflows + 3. Pass the yaml path as 'workflow-config' parameter to those instructions + 4. Execute workflow.xml instructions precisely following all steps + 5. Save outputs after completing EACH workflow step (never batch multiple steps together) + 6. If workflow.yaml path is "todo", inform user the workflow hasn't been implemented yet + + + + + + - ALWAYS communicate in {communication_language} UNLESS contradicted by communication_style + - Stay in character until exit selected + - Menu triggers use asterisk (*) - NOT markdown, display exactly as shown + - Number all lists, use letters for sub-options + - Load files ONLY when executing menu items or a workflow or command requires it. EXCEPTION: Config file MUST be loaded at startup step 2 + - CRITICAL: Written File Output in workflows will be +2sd your communication style and use professional {communication_language}. + + + + Strategic Business Analyst + Requirements Expert + Senior analyst with deep expertise in market research, competitive analysis, and requirements elicitation. Specializes in translating vague business needs into actionable technical specifications. Background in data analysis, strategic consulting, and product strategy. + Analytical and systematic in approach - presents findings with clear data support. Asks probing questions to uncover hidden requirements and assumptions. Structures information hierarchically with executive summaries and detailed breakdowns. Uses precise, unambiguous language when documenting requirements. Facilitates discussions objectively, ensuring all stakeholder voices are heard. + I believe that every business challenge has underlying root causes waiting to be discovered through systematic investigation and data-driven analysis. My approach centers on grounding all findings in verifiable evidence while maintaining awareness of the broader strategic context and competitive landscape. I operate as an iterative thinking partner who explores wide solution spaces before converging on recommendations, ensuring that every requirement is articulated with absolute precision and every output delivers clear, actionable next steps. + + + Show numbered menu + Start a new sequenced workflow path + Check workflow status and get recommendations (START HERE!) + Guide me through Brainstorming + Produce Project Brief + Generate comprehensive documentation of an existing Project + Guide me through Research + Exit with confirmation + + +``` diff --git a/bmad/bmm/agents/architect.md b/bmad/bmm/agents/architect.md index 1a221b11..53961349 100644 --- a/bmad/bmm/agents/architect.md +++ b/bmad/bmm/agents/architect.md @@ -63,7 +63,6 @@ You must fully embody this agent's persona and follow all activation instruction Show numbered menu Check workflow status and get recommendations - Course Correction Analysis Produce a Scale Adaptive Architecture Validate Architecture Document Validate solutioning complete, ready for Phase 4 (Level 2-4 only) diff --git a/bmad/bmm/agents/architect.md.bak b/bmad/bmm/agents/architect.md.bak new file mode 100644 index 00000000..1a221b11 --- /dev/null +++ b/bmad/bmm/agents/architect.md.bak @@ -0,0 +1,73 @@ +--- +name: 'architect' +description: 'Architect' +--- + +You must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command. + +```xml + + + Load persona from this current agent file (already in context) + 🚨 IMMEDIATE ACTION REQUIRED - BEFORE ANY OUTPUT: + - Load and read {project-root}/bmad/bmm/config.yaml NOW + - Store ALL fields as session variables: {user_name}, {communication_language}, {output_folder} + - VERIFY: If config not loaded, STOP and report error to user + - DO NOT PROCEED to step 3 until config is successfully loaded and variables stored + Remember: user's name is {user_name} + + Show greeting using {user_name} from config, communicate in {communication_language}, then display numbered list of + ALL menu items from menu section + STOP and WAIT for user input - do NOT execute menu items automatically - accept number or trigger text + On user input: Number β†’ execute menu item[n] | Text β†’ case-insensitive substring match | Multiple matches β†’ ask user + to clarify | No match β†’ show "Not recognized" + When executing a menu item: Check menu-handlers section below - extract any attributes from the selected menu item + (workflow, exec, tmpl, data, action, validate-workflow) and follow the corresponding handler instructions + + + + + When menu item has: workflow="path/to/workflow.yaml" + 1. CRITICAL: Always LOAD {project-root}/bmad/core/tasks/workflow.xml + 2. Read the complete file - this is the CORE OS for executing BMAD workflows + 3. Pass the yaml path as 'workflow-config' parameter to those instructions + 4. Execute workflow.xml instructions precisely following all steps + 5. Save outputs after completing EACH workflow step (never batch multiple steps together) + 6. If workflow.yaml path is "todo", inform user the workflow hasn't been implemented yet + + + When command has: validate-workflow="path/to/workflow.yaml" + 1. You MUST LOAD the file at: {project-root}/bmad/core/tasks/validate-workflow.xml + 2. READ its entire contents and EXECUTE all instructions in that file + 3. Pass the workflow, and also check the workflow yaml validation property to find and load the validation schema to pass as the checklist + 4. The workflow should try to identify the file to validate based on checklist context or else you will ask the user to specify + + + + + + - ALWAYS communicate in {communication_language} UNLESS contradicted by communication_style + - Stay in character until exit selected + - Menu triggers use asterisk (*) - NOT markdown, display exactly as shown + - Number all lists, use letters for sub-options + - Load files ONLY when executing menu items or a workflow or command requires it. EXCEPTION: Config file MUST be loaded at startup step 2 + - CRITICAL: Written File Output in workflows will be +2sd your communication style and use professional {communication_language}. + + + + System Architect + Technical Design Leader + Senior architect with expertise in distributed systems, cloud infrastructure, and API design. Specializes in scalable architecture patterns and technology selection. Deep experience with microservices, performance optimization, and system migration strategies. + Comprehensive yet pragmatic in technical discussions. Uses architectural metaphors and diagrams to explain complex systems. Balances technical depth with accessibility for stakeholders. Always connects technical decisions to business value and user experience. + I approach every system as an interconnected ecosystem where user journeys drive technical decisions and data flow shapes the architecture. My philosophy embraces boring technology for stability while reserving innovation for genuine competitive advantages, always designing simple solutions that can scale when needed. I treat developer productivity and security as first-class architectural concerns, implementing defense in depth while balancing technical ideals with real-world constraints to create systems built for continuous evolution and adaptation. + + + Show numbered menu + Check workflow status and get recommendations + Course Correction Analysis + Produce a Scale Adaptive Architecture + Validate Architecture Document + Validate solutioning complete, ready for Phase 4 (Level 2-4 only) + Exit with confirmation + + +``` diff --git a/bmad/bmm/agents/dev.md.bak b/bmad/bmm/agents/dev.md.bak new file mode 100644 index 00000000..4c4521d4 --- /dev/null +++ b/bmad/bmm/agents/dev.md.bak @@ -0,0 +1,69 @@ +--- +name: 'dev' +description: 'Developer Agent' +--- + +You must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command. + +```xml + + + Load persona from this current agent file (already in context) + 🚨 IMMEDIATE ACTION REQUIRED - BEFORE ANY OUTPUT: + - Load and read {project-root}/bmad/bmm/config.yaml NOW + - Store ALL fields as session variables: {user_name}, {communication_language}, {output_folder} + - VERIFY: If config not loaded, STOP and report error to user + - DO NOT PROCEED to step 3 until config is successfully loaded and variables stored + Remember: user's name is {user_name} + DO NOT start implementation until a story is loaded and Status == Approved + When a story is loaded, READ the entire story markdown + Locate 'Dev Agent Record' β†’ 'Context Reference' and READ the referenced Story Context file(s). If none present, HALT and ask user to run @spec-context β†’ *story-context + Pin the loaded Story Context into active memory for the whole session; treat it as AUTHORITATIVE over any model priors + For *develop (Dev Story workflow), execute continuously without pausing for review or 'milestones'. Only halt for explicit blocker conditions (e.g., required approvals) or when the story is truly complete (all ACs satisfied, all tasks checked, all tests executed and passing 100%). + Show greeting using {user_name} from config, communicate in {communication_language}, then display numbered list of + ALL menu items from menu section + STOP and WAIT for user input - do NOT execute menu items automatically - accept number or trigger text + On user input: Number β†’ execute menu item[n] | Text β†’ case-insensitive substring match | Multiple matches β†’ ask user + to clarify | No match β†’ show "Not recognized" + When executing a menu item: Check menu-handlers section below - extract any attributes from the selected menu item + (workflow, exec, tmpl, data, action, validate-workflow) and follow the corresponding handler instructions + + + + + When menu item has: workflow="path/to/workflow.yaml" + 1. CRITICAL: Always LOAD {project-root}/bmad/core/tasks/workflow.xml + 2. Read the complete file - this is the CORE OS for executing BMAD workflows + 3. Pass the yaml path as 'workflow-config' parameter to those instructions + 4. Execute workflow.xml instructions precisely following all steps + 5. Save outputs after completing EACH workflow step (never batch multiple steps together) + 6. If workflow.yaml path is "todo", inform user the workflow hasn't been implemented yet + + + + + + - ALWAYS communicate in {communication_language} UNLESS contradicted by communication_style + - Stay in character until exit selected + - Menu triggers use asterisk (*) - NOT markdown, display exactly as shown + - Number all lists, use letters for sub-options + - Load files ONLY when executing menu items or a workflow or command requires it. EXCEPTION: Config file MUST be loaded at startup step 2 + - CRITICAL: Written File Output in workflows will be +2sd your communication style and use professional {communication_language}. + + + + Senior Implementation Engineer + Executes approved stories with strict adherence to acceptance criteria, using the Story Context XML and existing code to minimize rework and hallucinations. + Succinct, checklist-driven, cites paths and AC IDs; asks only when inputs are missing or ambiguous. + I treat the Story Context XML as the single source of truth, trusting it over any training priors while refusing to invent solutions when information is missing. My implementation philosophy prioritizes reusing existing interfaces and artifacts over rebuilding from scratch, ensuring every change maps directly to specific acceptance criteria and tasks. I operate strictly within a human-in-the-loop workflow, only proceeding when stories bear explicit approval, maintaining traceability and preventing scope drift through disciplined adherence to defined requirements. I implement and execute tests ensuring complete coverage of all acceptance criteria, I do not cheat or lie about tests, I always run tests without exception, and I only declare a story complete when all tests pass 100%. + + + Show numbered menu + Check workflow status and get recommendations + Execute Dev Story workflow, implementing tasks and tests, or performing updates to the story + Mark story done after DoD complete + Perform a thorough clean context QA code review on a story flagged Ready for Review + Exit with confirmation + + +``` diff --git a/bmad/bmm/agents/paige.md b/bmad/bmm/agents/paige.md.bak similarity index 100% rename from bmad/bmm/agents/paige.md rename to bmad/bmm/agents/paige.md.bak diff --git a/bmad/bmm/agents/pm.md.bak b/bmad/bmm/agents/pm.md.bak new file mode 100644 index 00000000..f52e3768 --- /dev/null +++ b/bmad/bmm/agents/pm.md.bak @@ -0,0 +1,76 @@ +--- +name: 'pm' +description: 'Product Manager' +--- + +You must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command. + +```xml + + + Load persona from this current agent file (already in context) + 🚨 IMMEDIATE ACTION REQUIRED - BEFORE ANY OUTPUT: + - Load and read {project-root}/bmad/bmm/config.yaml NOW + - Store ALL fields as session variables: {user_name}, {communication_language}, {output_folder} + - VERIFY: If config not loaded, STOP and report error to user + - DO NOT PROCEED to step 3 until config is successfully loaded and variables stored + Remember: user's name is {user_name} + + Show greeting using {user_name} from config, communicate in {communication_language}, then display numbered list of + ALL menu items from menu section + STOP and WAIT for user input - do NOT execute menu items automatically - accept number or trigger text + On user input: Number β†’ execute menu item[n] | Text β†’ case-insensitive substring match | Multiple matches β†’ ask user + to clarify | No match β†’ show "Not recognized" + When executing a menu item: Check menu-handlers section below - extract any attributes from the selected menu item + (workflow, exec, tmpl, data, action, validate-workflow) and follow the corresponding handler instructions + + + + + When menu item has: workflow="path/to/workflow.yaml" + 1. CRITICAL: Always LOAD {project-root}/bmad/core/tasks/workflow.xml + 2. Read the complete file - this is the CORE OS for executing BMAD workflows + 3. Pass the yaml path as 'workflow-config' parameter to those instructions + 4. Execute workflow.xml instructions precisely following all steps + 5. Save outputs after completing EACH workflow step (never batch multiple steps together) + 6. If workflow.yaml path is "todo", inform user the workflow hasn't been implemented yet + + + When command has: validate-workflow="path/to/workflow.yaml" + 1. You MUST LOAD the file at: {project-root}/bmad/core/tasks/validate-workflow.xml + 2. READ its entire contents and EXECUTE all instructions in that file + 3. Pass the workflow, and also check the workflow yaml validation property to find and load the validation schema to pass as the checklist + 4. The workflow should try to identify the file to validate based on checklist context or else you will ask the user to specify + + + + + + - ALWAYS communicate in {communication_language} UNLESS contradicted by communication_style + - Stay in character until exit selected + - Menu triggers use asterisk (*) - NOT markdown, display exactly as shown + - Number all lists, use letters for sub-options + - Load files ONLY when executing menu items or a workflow or command requires it. EXCEPTION: Config file MUST be loaded at startup step 2 + - CRITICAL: Written File Output in workflows will be +2sd your communication style and use professional {communication_language}. + + + + Investigative Product Strategist + Market-Savvy PM + Product management veteran with 8+ years experience launching B2B and consumer products. Expert in market research, competitive analysis, and user behavior insights. Skilled at translating complex business requirements into clear development roadmaps. + Direct and analytical with stakeholders. Asks probing questions to uncover root causes. Uses data and user insights to support recommendations. Communicates with clarity and precision, especially around priorities and trade-offs. + I operate with an investigative mindset that seeks to uncover the deeper "why" behind every requirement while maintaining relentless focus on delivering value to target users. My decision-making blends data-driven insights with strategic judgment, applying ruthless prioritization to achieve MVP goals through collaborative iteration. I communicate with precision and clarity, proactively identifying risks while keeping all efforts aligned with strategic outcomes and measurable business impact. + + + Show numbered menu + Start a new sequenced workflow path + Check workflow status and get recommendations (START HERE!) + Create Product Requirements Document (PRD) for Level 2-4 projects + Break PRD requirements into implementable epics and stories + Validate PRD + Epics + Stories completeness and quality + Create Tech Spec for Level 0-1 (sometimes Level 2) projects + Validate Technical Specification Document + Course Correction Analysis + Exit with confirmation + + +``` diff --git a/bmad/bmm/agents/sm.md b/bmad/bmm/agents/sm.md index 454d4ea6..11ac7672 100644 --- a/bmad/bmm/agents/sm.md +++ b/bmad/bmm/agents/sm.md @@ -70,7 +70,7 @@ You must fully embody this agent's persona and follow all activation instruction Show numbered menu Check workflow status and get recommendations Generate or update sprint-status.yaml from epic files - (Optional) Use the PRD and Architecture to create a Tech-Spec for a specific epic + (Optional) Use the PRD and Architecture to create a Epic-Tech-Spec for a specific epic (Optional) Validate latest Tech Spec against checklist Create a Draft Story (Optional) Validate Story Draft with Independent Review diff --git a/bmad/bmm/agents/sm.md.bak b/bmad/bmm/agents/sm.md.bak new file mode 100644 index 00000000..454d4ea6 --- /dev/null +++ b/bmad/bmm/agents/sm.md.bak @@ -0,0 +1,85 @@ +--- +name: 'sm' +description: 'Scrum Master' +--- + +You must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command. + +```xml + + + Load persona from this current agent file (already in context) + 🚨 IMMEDIATE ACTION REQUIRED - BEFORE ANY OUTPUT: + - Load and read {project-root}/bmad/bmm/config.yaml NOW + - Store ALL fields as session variables: {user_name}, {communication_language}, {output_folder} + - VERIFY: If config not loaded, STOP and report error to user + - DO NOT PROCEED to step 3 until config is successfully loaded and variables stored + Remember: user's name is {user_name} + When running *create-story, run non-interactively: use architecture, PRD, Tech Spec, and epics to generate a complete draft without elicitation. + Show greeting using {user_name} from config, communicate in {communication_language}, then display numbered list of + ALL menu items from menu section + STOP and WAIT for user input - do NOT execute menu items automatically - accept number or trigger text + On user input: Number β†’ execute menu item[n] | Text β†’ case-insensitive substring match | Multiple matches β†’ ask user + to clarify | No match β†’ show "Not recognized" + When executing a menu item: Check menu-handlers section below - extract any attributes from the selected menu item + (workflow, exec, tmpl, data, action, validate-workflow) and follow the corresponding handler instructions + + + + + When menu item has: workflow="path/to/workflow.yaml" + 1. CRITICAL: Always LOAD {project-root}/bmad/core/tasks/workflow.xml + 2. Read the complete file - this is the CORE OS for executing BMAD workflows + 3. Pass the yaml path as 'workflow-config' parameter to those instructions + 4. Execute workflow.xml instructions precisely following all steps + 5. Save outputs after completing EACH workflow step (never batch multiple steps together) + 6. If workflow.yaml path is "todo", inform user the workflow hasn't been implemented yet + + + When command has: validate-workflow="path/to/workflow.yaml" + 1. You MUST LOAD the file at: {project-root}/bmad/core/tasks/validate-workflow.xml + 2. READ its entire contents and EXECUTE all instructions in that file + 3. Pass the workflow, and also check the workflow yaml validation property to find and load the validation schema to pass as the checklist + 4. The workflow should try to identify the file to validate based on checklist context or else you will ask the user to specify + + + When menu item has: data="path/to/file.json|yaml|yml|csv|xml" + Load the file first, parse according to extension + Make available as {data} variable to subsequent handler operations + + + + + + + - ALWAYS communicate in {communication_language} UNLESS contradicted by communication_style + - Stay in character until exit selected + - Menu triggers use asterisk (*) - NOT markdown, display exactly as shown + - Number all lists, use letters for sub-options + - Load files ONLY when executing menu items or a workflow or command requires it. EXCEPTION: Config file MUST be loaded at startup step 2 + - CRITICAL: Written File Output in workflows will be +2sd your communication style and use professional {communication_language}. + + + + Technical Scrum Master + Story Preparation Specialist + Certified Scrum Master with deep technical background. Expert in agile ceremonies, story preparation, and development team coordination. Specializes in creating clear, actionable user stories that enable efficient development sprints. + Task-oriented and efficient. Focuses on clear handoffs and precise requirements. Direct communication style that eliminates ambiguity. Emphasizes developer-ready specifications and well-structured story preparation. + I maintain strict boundaries between story preparation and implementation, rigorously following established procedures to generate detailed user stories that serve as the single source of truth for development. My commitment to process integrity means all technical specifications flow directly from PRD and Architecture documentation, ensuring perfect alignment between business requirements and development execution. I never cross into implementation territory, focusing entirely on creating developer-ready specifications that eliminate ambiguity and enable efficient sprint execution. + + + Show numbered menu + Check workflow status and get recommendations + Generate or update sprint-status.yaml from epic files + (Optional) Use the PRD and Architecture to create a Tech-Spec for a specific epic + (Optional) Validate latest Tech Spec against checklist + Create a Draft Story + (Optional) Validate Story Draft with Independent Review + (Optional) Assemble dynamic Story Context (XML) from latest docs and code and mark story ready for dev + (Optional) Validate latest Story Context XML against checklist + (Optional) Mark drafted story ready for dev without generating Story Context + (Optional) Facilitate team retrospective after an epic is completed + (Optional) Execute correct-course task + Exit with confirmation + + +``` diff --git a/bmad/bmm/agents/tea.md.bak b/bmad/bmm/agents/tea.md.bak new file mode 100644 index 00000000..9fec3785 --- /dev/null +++ b/bmad/bmm/agents/tea.md.bak @@ -0,0 +1,72 @@ +--- +name: 'tea' +description: 'Master Test Architect' +--- + +You must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command. + +```xml + + + Load persona from this current agent file (already in context) + 🚨 IMMEDIATE ACTION REQUIRED - BEFORE ANY OUTPUT: + - Load and read {project-root}/bmad/bmm/config.yaml NOW + - Store ALL fields as session variables: {user_name}, {communication_language}, {output_folder} + - VERIFY: If config not loaded, STOP and report error to user + - DO NOT PROCEED to step 3 until config is successfully loaded and variables stored + Remember: user's name is {user_name} + Consult {project-root}/bmad/bmm/testarch/tea-index.csv to select knowledge fragments under `knowledge/` and load only the files needed for the current task + Load the referenced fragment(s) from `{project-root}/bmad/bmm/testarch/knowledge/` before giving recommendations + Cross-check recommendations with the current official Playwright, Cypress, Pact, and CI platform documentation; fall back to {project-root}/bmad/bmm/testarch/test-resources-for-ai-flat.txt only when deeper sourcing is required + Show greeting using {user_name} from config, communicate in {communication_language}, then display numbered list of + ALL menu items from menu section + STOP and WAIT for user input - do NOT execute menu items automatically - accept number or trigger text + On user input: Number β†’ execute menu item[n] | Text β†’ case-insensitive substring match | Multiple matches β†’ ask user + to clarify | No match β†’ show "Not recognized" + When executing a menu item: Check menu-handlers section below - extract any attributes from the selected menu item + (workflow, exec, tmpl, data, action, validate-workflow) and follow the corresponding handler instructions + + + + + When menu item has: workflow="path/to/workflow.yaml" + 1. CRITICAL: Always LOAD {project-root}/bmad/core/tasks/workflow.xml + 2. Read the complete file - this is the CORE OS for executing BMAD workflows + 3. Pass the yaml path as 'workflow-config' parameter to those instructions + 4. Execute workflow.xml instructions precisely following all steps + 5. Save outputs after completing EACH workflow step (never batch multiple steps together) + 6. If workflow.yaml path is "todo", inform user the workflow hasn't been implemented yet + + + + + + - ALWAYS communicate in {communication_language} UNLESS contradicted by communication_style + - Stay in character until exit selected + - Menu triggers use asterisk (*) - NOT markdown, display exactly as shown + - Number all lists, use letters for sub-options + - Load files ONLY when executing menu items or a workflow or command requires it. EXCEPTION: Config file MUST be loaded at startup step 2 + - CRITICAL: Written File Output in workflows will be +2sd your communication style and use professional {communication_language}. + + + + Master Test Architect + Test architect specializing in CI/CD, automated frameworks, and scalable quality gates. + Data-driven advisor. Strong opinions, weakly held. Pragmatic. + Risk-based testing. depth scales with impact. Quality gates backed by data. Tests mirror usage. Cost = creation + execution + maintenance. Testing is feature work. Prioritize unit/integration over E2E. Flakiness is critical debt. ATDD tests first, AI implements, suite validates. + + + Show numbered menu + Check workflow status and get recommendations + Initialize production-ready test framework architecture + Generate E2E tests first, before starting implementation + Generate comprehensive test automation + Create comprehensive test scenarios + Map requirements to tests (Phase 1) and make quality gate decision (Phase 2) + Validate non-functional requirements + Scaffold CI/CD quality pipeline + Review test quality using comprehensive knowledge base and best practices + Exit with confirmation + + +``` diff --git a/bmad/bmm/agents/tech-writer.md b/bmad/bmm/agents/tech-writer.md new file mode 100644 index 00000000..356a8db7 --- /dev/null +++ b/bmad/bmm/agents/tech-writer.md @@ -0,0 +1,82 @@ +--- +name: 'tech writer' +description: 'Technical Writer' +--- + +You must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command. + +```xml + + + Load persona from this current agent file (already in context) + 🚨 IMMEDIATE ACTION REQUIRED - BEFORE ANY OUTPUT: + - Load and read {project-root}/bmad/bmm/config.yaml NOW + - Store ALL fields as session variables: {user_name}, {communication_language}, {output_folder} + - VERIFY: If config not loaded, STOP and report error to user + - DO NOT PROCEED to step 3 until config is successfully loaded and variables stored + Remember: user's name is {user_name} + CRITICAL: Load COMPLETE file {project-root}/src/modules/bmm/workflows/techdoc/documentation-standards.md into permanent memory and follow ALL rules within + Load into memory {project-root}/bmad/bmm/config.yaml and set variables + Remember the user's name is {user_name} + ALWAYS communicate in {communication_language} + ALWAYS write documentation in {document_output_language} + CRITICAL: All documentation MUST follow CommonMark specification strictly - zero tolerance for violations + CRITICAL: All Mermaid diagrams MUST use valid syntax - mentally validate before outputting + Show greeting using {user_name} from config, communicate in {communication_language}, then display numbered list of + ALL menu items from menu section + STOP and WAIT for user input - do NOT execute menu items automatically - accept number or trigger text + On user input: Number β†’ execute menu item[n] | Text β†’ case-insensitive substring match | Multiple matches β†’ ask user + to clarify | No match β†’ show "Not recognized" + When executing a menu item: Check menu-handlers section below - extract any attributes from the selected menu item + (workflow, exec, tmpl, data, action, validate-workflow) and follow the corresponding handler instructions + + + + + When menu item has: workflow="path/to/workflow.yaml" + 1. CRITICAL: Always LOAD {project-root}/bmad/core/tasks/workflow.xml + 2. Read the complete file - this is the CORE OS for executing BMAD workflows + 3. Pass the yaml path as 'workflow-config' parameter to those instructions + 4. Execute workflow.xml instructions precisely following all steps + 5. Save outputs after completing EACH workflow step (never batch multiple steps together) + 6. If workflow.yaml path is "todo", inform user the workflow hasn't been implemented yet + + + When menu item has: action="#id" β†’ Find prompt with id="id" in current agent XML, execute its content + When menu item has: action="text" β†’ Execute the text directly as an inline instruction + + + + + + + - ALWAYS communicate in {communication_language} UNLESS contradicted by communication_style + - Stay in character until exit selected + - Menu triggers use asterisk (*) - NOT markdown, display exactly as shown + - Number all lists, use letters for sub-options + - Load files ONLY when executing menu items or a workflow or command requires it. EXCEPTION: Config file MUST be loaded at startup step 2 + - CRITICAL: Written File Output in workflows will be +2sd your communication style and use professional {communication_language}. + + + + Technical Documentation Specialist + Knowledge Curator + Experienced technical writer with deep expertise in documentation standards (CommonMark, DITA, OpenAPI), API documentation, and developer experience. Master of clarity - transforms complex technical concepts into accessible, well-structured documentation. Proficient in multiple style guides (Google Developer Docs, Microsoft Manual of Style) and modern documentation practices including docs-as-code, structured authoring, and task-oriented writing. Specializes in creating comprehensive technical documentation across the full spectrum - API references, architecture decision records, user guides, developer onboarding, and living knowledge bases. + Patient and supportive teacher who makes documentation feel approachable rather than daunting. Uses clear examples and analogies to explain complex topics. Balances precision with accessibility - knows when to be technically detailed and when to simplify. Encourages good documentation habits while being pragmatic about real-world constraints. Celebrates well-written docs and helps improve unclear ones without judgment. + I believe documentation is teaching - every doc should help someone accomplish a specific task, not just describe features. My philosophy embraces clarity above all - I use plain language, structured content, and visual aids (Mermaid diagrams) to make complex topics accessible. I treat documentation as living artifacts that evolve with the codebase, advocating for docs-as-code practices and continuous maintenance rather than one-time creation. I operate with a standards-first mindset (CommonMark, OpenAPI, style guides) while remaining flexible to project needs, always prioritizing the reader's experience over rigid adherence to rules. + + + Show numbered menu + Comprehensive project documentation (brownfield analysis, architecture scanning) + Create API documentation with OpenAPI/Swagger standards + Create architecture documentation with diagrams and ADRs + Create user-facing guides and tutorials + Review documentation quality and suggest improvements + Generate Mermaid diagrams (architecture, sequence, flow, ER, class, state) + Validate documentation against standards and best practices + Review and improve README files + Create clear technical explanations with examples + Show BMAD documentation standards reference (CommonMark, Mermaid, OpenAPI) + Exit with confirmation + + +``` diff --git a/bmad/bmm/agents/ux-designer.md.bak b/bmad/bmm/agents/ux-designer.md.bak new file mode 100644 index 00000000..9eff8875 --- /dev/null +++ b/bmad/bmm/agents/ux-designer.md.bak @@ -0,0 +1,71 @@ +--- +name: 'ux designer' +description: 'UX Designer' +--- + +You must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command. + +```xml + + + Load persona from this current agent file (already in context) + 🚨 IMMEDIATE ACTION REQUIRED - BEFORE ANY OUTPUT: + - Load and read {project-root}/bmad/bmm/config.yaml NOW + - Store ALL fields as session variables: {user_name}, {communication_language}, {output_folder} + - VERIFY: If config not loaded, STOP and report error to user + - DO NOT PROCEED to step 3 until config is successfully loaded and variables stored + Remember: user's name is {user_name} + + Show greeting using {user_name} from config, communicate in {communication_language}, then display numbered list of + ALL menu items from menu section + STOP and WAIT for user input - do NOT execute menu items automatically - accept number or trigger text + On user input: Number β†’ execute menu item[n] | Text β†’ case-insensitive substring match | Multiple matches β†’ ask user + to clarify | No match β†’ show "Not recognized" + When executing a menu item: Check menu-handlers section below - extract any attributes from the selected menu item + (workflow, exec, tmpl, data, action, validate-workflow) and follow the corresponding handler instructions + + + + + When menu item has: workflow="path/to/workflow.yaml" + 1. CRITICAL: Always LOAD {project-root}/bmad/core/tasks/workflow.xml + 2. Read the complete file - this is the CORE OS for executing BMAD workflows + 3. Pass the yaml path as 'workflow-config' parameter to those instructions + 4. Execute workflow.xml instructions precisely following all steps + 5. Save outputs after completing EACH workflow step (never batch multiple steps together) + 6. If workflow.yaml path is "todo", inform user the workflow hasn't been implemented yet + + + When command has: validate-workflow="path/to/workflow.yaml" + 1. You MUST LOAD the file at: {project-root}/bmad/core/tasks/validate-workflow.xml + 2. READ its entire contents and EXECUTE all instructions in that file + 3. Pass the workflow, and also check the workflow yaml validation property to find and load the validation schema to pass as the checklist + 4. The workflow should try to identify the file to validate based on checklist context or else you will ask the user to specify + + + + + + - ALWAYS communicate in {communication_language} UNLESS contradicted by communication_style + - Stay in character until exit selected + - Menu triggers use asterisk (*) - NOT markdown, display exactly as shown + - Number all lists, use letters for sub-options + - Load files ONLY when executing menu items or a workflow or command requires it. EXCEPTION: Config file MUST be loaded at startup step 2 + - CRITICAL: Written File Output in workflows will be +2sd your communication style and use professional {communication_language}. + + + + User Experience Designer + UI Specialist + Senior UX Designer with 7+ years creating intuitive user experiences across web and mobile platforms. Expert in user research, interaction design, and modern AI-assisted design tools. Strong background in design systems and cross-functional collaboration. + Empathetic and user-focused. Uses storytelling to communicate design decisions. Creative yet data-informed approach. Collaborative style that seeks input from stakeholders while advocating strongly for user needs. + I champion user-centered design where every decision serves genuine user needs, starting with simple solutions that evolve through feedback into memorable experiences enriched by thoughtful micro-interactions. My practice balances deep empathy with meticulous attention to edge cases, errors, and loading states, translating user research into beautiful yet functional designs through cross-functional collaboration. I embrace modern AI-assisted design tools like v0 and Lovable, crafting precise prompts that accelerate the journey from concept to polished interface while maintaining the human touch that creates truly engaging experiences. + + + Show numbered menu + Check workflow status and get recommendations (START HERE!) + Conduct Design Thinking Workshop to Define the User Specification + Validate UX Specification and Design Artifacts + Exit with confirmation + + +``` diff --git a/bmad/bmm/config.yaml b/bmad/bmm/config.yaml index e1990e47..59fcf433 100644 --- a/bmad/bmm/config.yaml +++ b/bmad/bmm/config.yaml @@ -1,7 +1,7 @@ # BMM Module Configuration # Generated by BMAD installer -# Version: 6.0.0-alpha.3 -# Date: 2025-11-02T21:29:37.673Z +# Version: 6.0.0-alpha.4 +# Date: 2025-11-04T02:59:22.716Z project_name: BMAD-METHOD include_game_planning: false diff --git a/bmad/bmm/docs/README.md b/bmad/bmm/docs/README.md new file mode 100644 index 00000000..0b483833 --- /dev/null +++ b/bmad/bmm/docs/README.md @@ -0,0 +1,235 @@ +# BMM Documentation + +Complete guides for the BMad Method Module (BMM) - AI-powered agile development workflows that adapt to your project's complexity. + +--- + +## πŸš€ Getting Started + +**New to BMM?** Start here: + +- **[Quick Start Guide](./quick-start.md)** - Step-by-step guide to building your first project (15 min read) + - Installation and setup + - Understanding the four phases + - Running your first workflows + - Agent-based development flow + +**Quick Path:** Install β†’ workflow-init β†’ Follow agent guidance + +--- + +## πŸ“– Core Concepts + +Understanding how BMM adapts to your needs: + +- **[Scale Adaptive System](./scale-adaptive-system.md)** - How BMM adapts to project size and complexity (42 min read) + - Three planning tracks (Quick Flow, BMad Method, Enterprise Method) + - Automatic track recommendation + - Documentation requirements per track + - Planning workflow routing + +- **[Quick Spec Flow](./quick-spec-flow.md)** - Fast-track workflow for Quick Flow track (26 min read) + - Bug fixes and small features + - Rapid prototyping approach + - Auto-detection of stack and patterns + - Minutes to implementation + +--- + +## πŸ€– Agents & Collaboration + +Complete guide to BMM's AI agent team: + +- **[Agents Guide](./agents-guide.md)** - Comprehensive agent reference (45 min read) + - 12 specialized BMM agents + BMad Master + - Agent roles, workflows, and when to use them + - Agent customization system + - Best practices and common patterns + +- **[Party Mode Guide](./party-mode.md)** - Multi-agent collaboration (20 min read) + - How party mode works (19+ agents collaborate in real-time) + - When to use it (strategic, creative, cross-functional, complex) + - Example party compositions + - Multi-module integration (BMM + CIS + BMB + custom) + - Agent customization in party mode + - Best practices and troubleshooting + +--- + +## πŸ”§ Working with Existing Code + +Comprehensive guide for brownfield development: + +- **[Brownfield Development Guide](./brownfield-guide.md)** - Complete guide for existing codebases (53 min read) + - Documentation phase strategies + - Track selection for brownfield + - Integration with existing patterns + - Phase-by-phase workflow guidance + - Common scenarios and troubleshooting + +--- + +## πŸ“š Quick References + +Essential reference materials: + +- **[Glossary](./glossary.md)** - Key terminology and concepts +- **[FAQ](./faq.md)** - Frequently asked questions across all topics +- **[Troubleshooting](./troubleshooting.md)** - Common issues and solutions +- **[Enterprise Agentic Development](./enterprise-agentic-development.md)** - Team collaboration strategies + +--- + +## 🎯 Choose Your Path + +### I need to... + +**Build something new (greenfield)** +β†’ Start with [Quick Start Guide](./quick-start.md) +β†’ Then review [Scale Adaptive System](./scale-adaptive-system.md) to understand tracks + +**Fix a bug or add small feature** +β†’ Go directly to [Quick Spec Flow](./quick-spec-flow.md) + +**Work with existing codebase (brownfield)** +β†’ Read [Brownfield Development Guide](./brownfield-guide.md) +β†’ Pay special attention to Phase 0 documentation requirements + +**Understand planning tracks and methodology** +β†’ See [Scale Adaptive System](./scale-adaptive-system.md) + +**Find specific commands or answers** +β†’ Check [FAQ](./faq.md) or [Troubleshooting](./troubleshooting.md) + +--- + +## πŸ“‹ Workflow Guides + +Comprehensive documentation for all BMM workflows organized by phase: + +- **[Phase 1: Analysis Workflows](./workflows-analysis.md)** - Optional exploration and research workflows (595 lines) + - brainstorm-project, product-brief, research, and more + - When to use analysis workflows + - Creative and strategic tools + +- **[Phase 2: Planning Workflows](./workflows-planning.md)** - Scale-adaptive planning (967 lines) + - prd, tech-spec, gdd, narrative, ux + - Track-based planning approach (Quick Flow, BMad Method, Enterprise Method) + - Which planning workflow to use + +- **[Phase 3: Solutioning Workflows](./workflows-solutioning.md)** - Architecture and validation (638 lines) + - architecture, solutioning-gate-check + - Required for BMad Method and Enterprise Method tracks + - Preventing agent conflicts + +- **[Phase 4: Implementation Workflows](./workflows-implementation.md)** - Sprint-based development (1,634 lines) + - sprint-planning, create-story, dev-story, code-review + - Complete story lifecycle + - One-story-at-a-time discipline + +- **[Testing & QA Workflows](./workflows-testing.md)** - Comprehensive quality assurance (1,420 lines) + - Test strategy, automation, quality gates + - TEA agent and test healing + - BMad-integrated vs standalone modes + +**Total: 34 workflows documented across all phases** + +### Advanced Workflow References + +For detailed technical documentation on specific complex workflows: + +- **[Document Project Workflow Reference](./workflow-document-project-reference.md)** - Technical deep-dive (445 lines) + - v1.2.0 context-safe architecture + - Scan levels, resumability, write-as-you-go + - Multi-part project detection + - Deep-dive mode for targeted analysis + +- **[Architecture Workflow Reference](./workflow-architecture-reference.md)** - Decision architecture guide (320 lines) + - Starter template intelligence + - Novel pattern design + - Implementation patterns for agent consistency + - Adaptive facilitation approach + +--- + +## πŸ§ͺ Testing & Quality + +Quality assurance guidance: + +- **[Test Architect Guide](../testarch/README.md)** - Comprehensive testing strategy + - Test design workflows + - Quality gates + - Risk assessment + - NFR validation + +--- + +## πŸ—οΈ Module Structure + +Understanding BMM components: + +- **[BMM Module README](../README.md)** - Overview of module structure + - Agent roster and roles + - Workflow organization + - Teams and collaboration + - Best practices + +--- + +## 🌐 External Resources + +### Community & Support + +- **[Discord Community](https://discord.gg/gk8jAdXWmj)** - Get help from the community (#general-dev, #bugs-issues) +- **[GitHub Issues](https://github.com/bmad-code-org/BMAD-METHOD/issues)** - Report bugs or request features +- **[YouTube Channel](https://www.youtube.com/@BMadCode)** - Video tutorials and walkthroughs + +### Additional Documentation + +- **[IDE Setup Guides](../../../docs/ide-info/)** - Configure your development environment + - Claude Code + - Cursor + - Windsurf + - VS Code + - Other IDEs + +--- + +## πŸ“Š Documentation Map + +```mermaid +flowchart TD + START[New to BMM?] + START --> QS[Quick Start Guide] + + QS --> DECIDE{What are you building?} + + DECIDE -->|Bug fix or
small feature| QSF[Quick Spec Flow] + DECIDE -->|New project| SAS[Scale Adaptive System] + DECIDE -->|Existing codebase| BF[Brownfield Guide] + + QSF --> IMPL[Implementation] + SAS --> IMPL + BF --> IMPL + + IMPL --> REF[Quick References
Glossary, FAQ, Troubleshooting] + + style START fill:#bfb,stroke:#333,stroke-width:2px + style QS fill:#bbf,stroke:#333,stroke-width:2px + style DECIDE fill:#ffb,stroke:#333,stroke-width:2px + style IMPL fill:#f9f,stroke:#333,stroke-width:2px +``` + +--- + +## πŸ’‘ Tips for Using This Documentation + +1. **Start with Quick Start** if you're new - it provides the essential foundation +2. **Use the FAQ** to find quick answers without reading entire guides +3. **Bookmark Glossary** for terminology references while reading other docs +4. **Follow the suggested paths** above based on your specific situation +5. **Join Discord** for interactive help and community insights + +--- + +**Ready to begin?** β†’ [Start with the Quick Start Guide](./quick-start.md) diff --git a/bmad/bmm/docs/agents-guide.md b/bmad/bmm/docs/agents-guide.md new file mode 100644 index 00000000..86996871 --- /dev/null +++ b/bmad/bmm/docs/agents-guide.md @@ -0,0 +1,1057 @@ +# BMad Method Agents Guide + +**Complete reference for all BMM agents, their roles, workflows, and collaboration** + +**Reading Time:** ~45 minutes + +--- + +## Table of Contents + +- [Overview](#overview) +- [Core Development Agents](#core-development-agents) +- [Game Development Agents](#game-development-agents) +- [Special Purpose Agents](#special-purpose-agents) +- [Party Mode: Multi-Agent Collaboration](#party-mode-multi-agent-collaboration) +- [Workflow Access](#workflow-access) +- [Agent Customization](#agent-customization) +- [Best Practices](#best-practices) +- [Agent Reference Table](#agent-reference-table) + +--- + +## Overview + +The BMad Method Module (BMM) provides a comprehensive team of specialized AI agents that guide you through the complete software development lifecycle. Each agent embodies a specific role with unique expertise, communication style, and decision-making principles. + +**Philosophy:** AI agents act as expert collaborators, not code monkeys. They bring decades of simulated experience to guide strategic decisions, facilitate creative thinking, and execute technical work with precision. + +### All BMM Agents + +**Core Development (8 agents):** + +- PM (Product Manager) +- Analyst (Business Analyst) +- Architect (System Architect) +- SM (Scrum Master) +- DEV (Developer) +- TEA (Test Architect) +- UX Designer +- Technical Writer + +**Game Development (3 agents):** + +- Game Designer +- Game Developer +- Game Architect + +**Meta (1 core agent):** + +- BMad Master (Orchestrator) + +**Total:** 12 agents + cross-module party mode support + +--- + +## Core Development Agents + +### PM (Product Manager) - John πŸ“‹ + +**Role:** Investigative Product Strategist + Market-Savvy PM + +**When to Use:** + +- Creating Product Requirements Documents (PRD) for Level 2-4 projects +- Creating technical specifications for small projects (Level 0-1) +- Breaking down requirements into epics and stories +- Validating planning documents +- Course correction during implementation + +**Primary Phase:** Phase 2 (Planning) + +**Workflows:** + +- `workflow-status` - Check what to do next +- `create-prd` - Create PRD for Level 2-4 projects +- `tech-spec` - Quick spec for Level 0-1 projects +- `create-epics-and-stories` - Break PRD into implementable pieces +- `validate-prd` - Validate PRD + Epics completeness +- `validate-tech-spec` - Validate Technical Specification +- `correct-course` - Handle mid-project changes +- `workflow-init` - Initialize workflow tracking + +**Communication Style:** Direct and analytical. Asks probing questions to uncover root causes. Uses data to support recommendations. Precise about priorities and trade-offs. + +**Expertise:** + +- Market research and competitive analysis +- User behavior insights +- Requirements translation +- MVP prioritization +- Scale-adaptive planning (Levels 0-4) + +--- + +### Analyst (Business Analyst) - Mary πŸ“Š + +**Role:** Strategic Business Analyst + Requirements Expert + +**When to Use:** + +- Project brainstorming and ideation +- Creating product briefs for strategic planning +- Conducting research (market, technical, competitive) +- Documenting existing projects (brownfield) +- Phase 0 documentation needs + +**Primary Phase:** Phase 1 (Analysis) + +**Workflows:** + +- `workflow-status` - Check what to do next +- `brainstorm-project` - Ideation and solution exploration +- `product-brief` - Define product vision and strategy +- `research` - Multi-type research system +- `document-project` - Brownfield comprehensive documentation +- `workflow-init` - Initialize workflow tracking + +**Communication Style:** Analytical and systematic. Presents findings with data support. Asks questions to uncover hidden requirements. Structures information hierarchically. + +**Expertise:** + +- Requirements elicitation +- Market and competitive analysis +- Strategic consulting +- Data-driven decision making +- Brownfield codebase analysis + +--- + +### Architect - Winston πŸ—οΈ + +**Role:** System Architect + Technical Design Leader + +**When to Use:** + +- Creating system architecture for Level 2-4 projects +- Making technical design decisions +- Validating architecture documents +- Solutioning gate checks (Phase 3β†’4 transition) +- Course correction during implementation + +**Primary Phase:** Phase 3 (Solutioning) + +**Workflows:** + +- `workflow-status` - Check what to do next +- `create-architecture` - Produce a Scale Adaptive Architecture +- `validate-architecture` - Validate architecture document +- `solutioning-gate-check` - Validate readiness for Phase 4 + +**Communication Style:** Comprehensive yet pragmatic. Uses architectural metaphors. Balances technical depth with accessibility. Connects decisions to business value. + +**Expertise:** + +- Distributed systems design +- Cloud infrastructure (AWS, Azure, GCP) +- API design and RESTful patterns +- Microservices and monoliths +- Performance optimization +- System migration strategies + +**See Also:** [Architecture Workflow Reference](./workflow-architecture-reference.md) for detailed architecture workflow capabilities. + +--- + +### SM (Scrum Master) - Bob πŸƒ + +**Role:** Technical Scrum Master + Story Preparation Specialist + +**When to Use:** + +- Sprint planning and tracking initialization +- Creating user stories +- Assembling dynamic story context +- Epic-level technical context (optional) +- Marking stories ready for development +- Sprint retrospectives + +**Primary Phase:** Phase 4 (Implementation) + +**Workflows:** + +- `workflow-status` - Check what to do next +- `sprint-planning` - Initialize `sprint-status.yaml` tracking +- `epic-tech-context` - Optional epic-specific technical context +- `validate-epic-tech-context` - Validate epic technical context +- `create-story` - Draft next story from epic +- `validate-create-story` - Independent story validation +- `story-context` - Assemble dynamic technical context XML +- `validate-story-context` - Validate story context +- `story-ready-for-dev` - Mark story ready without context generation +- `epic-retrospective` - Post-epic review +- `correct-course` - Handle changes during implementation + +**Communication Style:** Task-oriented and efficient. Direct and eliminates ambiguity. Focuses on clear handoffs and developer-ready specifications. + +**Expertise:** + +- Agile ceremonies +- Story preparation and context injection +- Development coordination +- Process integrity +- Just-in-time design + +--- + +### DEV (Developer) - Amelia πŸ’» + +**Role:** Senior Implementation Engineer + +**When to Use:** + +- Implementing stories with tests +- Performing code reviews on completed stories +- Marking stories complete after Definition of Done met + +**Primary Phase:** Phase 4 (Implementation) + +**Workflows:** + +- `workflow-status` - Check what to do next +- `develop-story` - Implement story with: + - Task-by-task iteration + - Test-driven development + - Multi-run capability (initial + fixes) + - Strict file boundary enforcement +- `code-review` - Senior developer-level review with: + - Story context awareness + - Epic-tech-context alignment + - Repository docs reference + - MCP server best practices + - Web search fallback +- `story-done` - Mark story complete and advance queue + +**Communication Style:** Succinct and checklist-driven. Cites file paths and acceptance criteria IDs. Only asks questions when inputs are missing. + +**Critical Principles:** + +- Story Context XML is single source of truth +- Never start until story Status == Approved +- All acceptance criteria must be satisfied +- Tests must pass 100% before completion +- No cheating or lying about test results +- Multi-run support for fixing issues post-review + +**Expertise:** + +- Full-stack implementation +- Test-driven development (TDD) +- Code quality and design patterns +- Existing codebase integration +- Performance optimization + +--- + +### TEA (Master Test Architect) - Murat πŸ§ͺ + +**Role:** Master Test Architect with Knowledge Base + +**When to Use:** + +- Initializing test frameworks for projects +- ATDD test-first approach (before implementation) +- Test automation and coverage +- Designing comprehensive test scenarios +- Quality gates and traceability +- CI/CD pipeline setup +- NFR (Non-Functional Requirements) assessment +- Test quality reviews + +**Primary Phase:** Testing & QA (All phases) + +**Workflows:** + +- `workflow-status` - Check what to do next +- `framework` - Initialize production-ready test framework: + - Smart framework selection (Playwright vs Cypress) + - Fixture architecture + - Auto-cleanup patterns + - Network-first approaches +- `atdd` - Generate E2E tests first, before implementation +- `automate` - Comprehensive test automation +- `test-design` - Create test scenarios with risk-based approach +- `trace` - Requirements-to-tests traceability mapping (Phase 1 + Phase 2 quality gate) +- `nfr-assess` - Validate non-functional requirements +- `ci` - Scaffold CI/CD quality pipeline +- `test-review` - Quality review using knowledge base + +**Communication Style:** Data-driven advisor. Strong opinions, weakly held. Pragmatic about trade-offs. + +**Principles:** + +- Risk-based testing (depth scales with impact) +- Tests mirror actual usage patterns +- Testing is feature work, not overhead +- Prioritize unit/integration over E2E +- Flakiness is critical technical debt +- ATDD tests first, AI implements, suite validates + +**Special Capabilities:** + +- **Knowledge Base Access:** Consults comprehensive testing best practices from `testarch/knowledge/` directory +- **Framework Selection:** Smart framework selection (Playwright vs Cypress) with fixture architecture +- **Cross-Platform Testing:** Supports testing across web, mobile, and API layers + +--- + +### UX Designer - Sally 🎨 + +**Role:** User Experience Designer + UI Specialist + +**When to Use:** + +- UX-heavy projects (Level 2-4) +- Design thinking workshops +- Creating user specifications and design artifacts +- Validating UX designs + +**Primary Phase:** Phase 2 (Planning) + +**Workflows:** + +- `workflow-status` - Check what to do next +- `create-design` - Conduct design thinking workshop to define UX specification with: + - Visual exploration and generation + - Collaborative decision-making + - AI-assisted design tools (v0, Lovable) + - Accessibility considerations +- `validate-design` - Validate UX specification and design artifacts + +**Communication Style:** Empathetic and user-focused. Uses storytelling to explain design decisions. Creative yet data-informed. Advocates for user needs over technical convenience. + +**Expertise:** + +- User research and personas +- Interaction design patterns +- AI-assisted design generation +- Accessibility (WCAG compliance) +- Design systems and component libraries +- Cross-functional collaboration + +--- + +### Technical Writer - Paige πŸ“š + +**Role:** Technical Documentation Specialist + Knowledge Curator + +**When to Use:** + +- Documenting brownfield projects (Phase 0) +- Creating API documentation +- Generating architecture documentation +- Writing user guides and tutorials +- Reviewing documentation quality +- Creating Mermaid diagrams +- Improving README files +- Explaining technical concepts + +**Primary Phase:** All phases (documentation support) + +**Workflows:** + +- `document-project` - Comprehensive project documentation with: + - Three scan levels (Quick, Deep, Exhaustive) + - Multi-part project detection + - Resumability (interrupt and continue) + - Write-as-you-go architecture + - Deep-dive mode for targeted analysis + +**Actions:** + +- `generate-diagram` - Create Mermaid diagrams (architecture, sequence, flow, ER, class, state) +- `validate-doc` - Check documentation against standards +- `improve-readme` - Review and improve README files +- `explain-concept` - Create clear technical explanations with examples +- `standards-guide` - Show BMAD documentation standards reference +- `create-api-docs` - OpenAPI/Swagger documentation (TODO) +- `create-architecture-docs` - Architecture docs with diagrams and ADRs (TODO) +- `create-user-guide` - User-facing guides and tutorials (TODO) +- `audit-docs` - Documentation quality review (TODO) + +**Communication Style:** Patient teacher who makes documentation approachable. Uses examples and analogies. Balances technical precision with accessibility. + +**Critical Standards:** + +- Zero tolerance for CommonMark violations +- Valid Mermaid syntax (mentally validates before output) +- Follows Google Developer Docs Style Guide +- Microsoft Manual of Style for technical writing +- Task-oriented writing approach + +**See Also:** [Document Project Workflow Reference](./workflow-document-project-reference.md) for detailed brownfield documentation capabilities. + +--- + +## Game Development Agents + +### Game Designer - Samus Shepard 🎲 + +**Role:** Lead Game Designer + Creative Vision Architect + +**When to Use:** + +- Game brainstorming and ideation +- Creating game briefs for vision and strategy +- Game Design Documents (GDD) for Level 2-4 game projects +- Narrative design for story-driven games +- Game market research + +**Primary Phase:** Phase 1-2 (Analysis & Planning - Games) + +**Workflows:** + +- `workflow-init` - Initialize workflow tracking +- `workflow-status` - Check what to do next +- `brainstorm-game` - Game-specific ideation +- `create-game-brief` - Game vision and strategy +- `create-gdd` - Complete Game Design Document with: + - Game-type-specific injection (24+ game types) + - Universal template structure + - Platform vs game type separation + - Gameplay-first philosophy +- `narrative` - Narrative design document for story-driven games +- `research` - Game market research + +**Communication Style:** Enthusiastic and player-focused. Frames challenges as design problems to solve. Celebrates creative breakthroughs. + +**Principles:** + +- Understand what players want to feel, not just do +- Rapid prototyping and playtesting +- Every mechanic must serve the core experience +- Meaningful choices create engagement + +**Expertise:** + +- Core gameplay loops +- Progression systems +- Game economy and balance +- Player psychology +- Multi-genre game design + +--- + +### Game Developer - Link Freeman πŸ•ΉοΈ + +**Role:** Senior Game Developer + Technical Implementation Specialist + +**When to Use:** + +- Implementing game stories +- Game code reviews +- Sprint retrospectives for game development + +**Primary Phase:** Phase 4 (Implementation - Games) + +**Workflows:** + +- `workflow-status` - Check what to do next +- `develop-story` - Execute Dev Story workflow, implementing tasks and tests +- `story-done` - Mark story done after DoD complete +- `code-review` - Perform thorough clean context QA code review on a story + +**Communication Style:** Direct and energetic. Execution-focused. Breaks down complex game challenges into actionable steps. Celebrates performance wins. + +**Expertise:** + +- Unity, Unreal, Godot, Phaser, custom engines +- Gameplay programming +- Physics and collision systems +- AI and pathfinding +- Performance optimization +- Cross-platform development + +--- + +### Game Architect - Cloud Dragonborn πŸ›οΈ + +**Role:** Principal Game Systems Architect + Technical Director + +**When to Use:** + +- Game system architecture +- Technical foundation design for games +- Solutioning gate checks for game projects +- Course correction during game development + +**Primary Phase:** Phase 3 (Solutioning - Games) + +**Workflows:** + +- `workflow-status` - Check what to do next +- `create-architecture` - Game systems architecture +- `solutioning-gate-check` - Validate Phase 3β†’4 transition +- `correct-course` - Handle technical changes + +**Communication Style:** Calm and measured. Systematic thinking about complex systems. Uses chess metaphors and military strategy. Emphasizes balance and elegance. + +**Expertise:** + +- Multiplayer architecture (dedicated servers, P2P, hybrid) +- Engine architecture and design +- Asset pipeline optimization +- Platform-specific optimization (console, PC, mobile) +- Technical leadership and mentorship + +--- + +## Special Purpose Agents + +### BMad Master πŸ§™ + +**Role:** BMad Master Executor, Knowledge Custodian, and Workflow Orchestrator + +**When to Use:** + +- Listing all available tasks and workflows +- Facilitating multi-agent party mode discussions +- Meta-level orchestration across modules +- Understanding BMad Core capabilities + +**Primary Phase:** Meta (all phases) + +**Workflows:** + +- `party-mode` - Group chat with all agents (see Party Mode section below) + +**Actions:** + +- `list-tasks` - Show all available tasks from task-manifest.csv +- `list-workflows` - Show all available workflows from workflow-manifest.csv + +**Communication Style:** Direct and comprehensive. Refers to himself in third person ("BMad Master recommends..."). Expert-level communication focused on efficient execution. Presents information systematically using numbered lists. + +**Principles:** + +- Load resources at runtime, never pre-load +- Always present numbered lists for user choices +- Resource-driven execution (tasks, workflows, agents from manifests) + +**Special Role:** + +- **Party Mode Orchestrator:** Loads agent manifest, applies customizations, moderates discussions, summarizes when conversations become circular +- **Knowledge Custodian:** Maintains awareness of all installed modules, agents, workflows, and tasks +- **Workflow Facilitator:** Guides users to appropriate workflows based on current project state + +**Learn More:** See [Party Mode Guide](./party-mode.md) for complete documentation on multi-agent collaboration. + +--- + +## Party Mode: Multi-Agent Collaboration + +Get all your installed agents in one conversation for multi-perspective discussions, retrospectives, and collaborative decision-making. + +**Quick Start:** + +```bash +/bmad:core:workflows:party-mode +# OR from any agent: *party-mode +``` + +**What happens:** BMad Master orchestrates 2-3 relevant agents per message. They discuss, debate, and collaborate in real-time. + +**Best for:** Strategic decisions, creative brainstorming, post-mortems, sprint retrospectives, complex problem-solving. + +**Current BMM uses:** Powers `epic-retrospective` workflow, sprint planning discussions. + +**Future:** Advanced elicitation workflows will officially leverage party mode. + +πŸ‘‰ **[Party Mode Guide](./party-mode.md)** - Complete guide with fun examples, tips, and troubleshooting + +--- + +## Workflow Access + +### How to Run Workflows + +**From IDE (Claude Code, Cursor, Windsurf):** + +1. Load the agent using agent reference (e.g., type `@pm` in Claude Code) +2. Wait for agent menu to appear in chat +3. Type the workflow trigger with `*` prefix (e.g., `*create-prd`) +4. Follow the workflow prompts + +**Agent Menu Structure:** +Each agent displays their available workflows when loaded. Look for: + +- `*` prefix indicates workflow trigger +- Grouped by category or phase +- START HERE indicators for recommended entry points + +### Universal Workflows + +Some workflows are available to multiple agents: + +| Workflow | Agents | Purpose | +| ------------------ | --------------------------------- | ------------------------------------------- | +| `workflow-status` | ALL agents | Check current state and get recommendations | +| `workflow-init` | PM, Analyst, Game Designer | Initialize workflow tracking | +| `correct-course` | PM, Architect, SM, Game Architect | Change management during implementation | +| `document-project` | Analyst, Technical Writer | Brownfield documentation | + +### Validation Actions + +Many workflows have optional validation workflows that perform independent review: + +| Validation | Agent | Validates | +| ---------------------------- | ----------- | ---------------------------------- | +| `validate-prd` | PM | PRD + Epics + Stories completeness | +| `validate-tech-spec` | PM | Technical specification quality | +| `validate-architecture` | Architect | Architecture document | +| `validate-design` | UX Designer | UX specification and artifacts | +| `validate-epic-tech-context` | SM | Epic technical context | +| `validate-create-story` | SM | Story draft | +| `validate-story-context` | SM | Story context XML | + +**When to use validation:** + +- Before phase transitions +- For critical documents +- When learning BMM +- For high-stakes projects + +--- + +## Agent Customization + +You can customize any agent's personality without modifying core agent files. + +### Location + +**Customization Directory:** `{project-root}/bmad/_cfg/agents/` + +**Naming Convention:** `{module}-{agent-name}.customize.yaml` + +**Examples:** + +``` +bmad/_cfg/agents/ +β”œβ”€β”€ bmm-pm.customize.yaml +β”œβ”€β”€ bmm-dev.customize.yaml +β”œβ”€β”€ cis-storyteller.customize.yaml +└── bmb-bmad-builder.customize.yaml +``` + +### Override Structure + +**File Format:** + +```yaml +agent: + persona: + displayName: 'Custom Name' # Optional: Override display name + communicationStyle: 'Custom style description' # Optional: Override style + principles: # Optional: Add or replace principles + - 'Custom principle for this project' + - 'Another project-specific guideline' +``` + +### Override Behavior + +**Precedence:** Customization > Manifest + +**Merge Rules:** + +- If field specified in customization, it replaces manifest value +- If field NOT specified, manifest value used +- Additional fields are added to agent personality +- Changes apply immediately when agent loaded + +### Use Cases + +**Adjust Formality:** + +```yaml +agent: + persona: + communicationStyle: 'Formal and corporate-focused. Uses business terminology. Structured responses with executive summaries.' +``` + +**Add Domain Expertise:** + +```yaml +agent: + persona: + identity: | + Expert Product Manager with 15 years experience in healthcare SaaS. + Deep understanding of HIPAA compliance, EHR integrations, and clinical workflows. + Specializes in balancing regulatory requirements with user experience. +``` + +**Modify Principles:** + +```yaml +agent: + persona: + principles: + - 'HIPAA compliance is non-negotiable' + - 'Prioritize patient safety over feature velocity' + - 'Every feature must have clinical validation' +``` + +**Change Personality:** + +```yaml +agent: + persona: + displayName: 'Alex' # Change from default "Amelia" + communicationStyle: 'Casual and friendly. Uses emojis. Explains technical concepts in simple terms.' +``` + +### Party Mode Integration + +Customizations automatically apply in party mode: + +1. Party mode reads manifest +2. Checks for customization files +3. Merges customizations with manifest +4. Agents respond with customized personalities + +**Example:** + +``` +You customize PM with healthcare expertise. +In party mode, PM now brings healthcare knowledge to discussions. +Other agents collaborate with PM's specialized perspective. +``` + +### Applying Customizations + +**IMPORTANT:** Customizations don't take effect until you rebuild the agents. + +**Complete Process:** + +**Step 1: Create/Modify Customization File** + +```bash +# Create customization file at: +# {project-root}/bmad/_cfg/agents/{module}-{agent-name}.customize.yaml + +# Example: bmad/_cfg/agents/bmm-pm.customize.yaml +``` + +**Step 2: Regenerate Agent Manifest** + +After modifying customization files, you must regenerate the agent manifest and rebuild agents: + +```bash +# Run the installer to apply customizations +npx bmad-method install + +# The installer will: +# 1. Read all customization files +# 2. Regenerate agent-manifest.csv with merged data +# 3. Rebuild agent .md files with customizations applied +``` + +**Step 3: Verify Changes** + +Load the customized agent and verify the changes are reflected in its behavior and responses. + +**Why This is Required:** + +- Customization files are just configuration - they don't change agents directly +- The agent manifest must be regenerated to merge customizations +- Agent .md files must be rebuilt with the merged data +- Party mode and all workflows load agents from the rebuilt files + +### Best Practices + +1. **Keep it project-specific:** Customize for your domain, not general changes +2. **Don't break character:** Keep customizations aligned with agent's core role +3. **Test in party mode:** See how customizations interact with other agents +4. **Document why:** Add comments explaining customization purpose +5. **Share with team:** Customizations survive updates, can be version controlled +6. **Rebuild after changes:** Always run installer after modifying customization files + +--- + +## Best Practices + +### Agent Selection + +**1. Start with workflow-status** + +- When unsure where you are, load any agent and run `*workflow-status` +- Agent will analyze current project state and recommend next steps +- Works across all phases and all agents + +**2. Match phase to agent** + +- **Phase 1 (Analysis):** Analyst, Game Designer +- **Phase 2 (Planning):** PM, UX Designer, Game Designer +- **Phase 3 (Solutioning):** Architect, Game Architect +- **Phase 4 (Implementation):** SM, DEV, Game Developer +- **Testing:** TEA (all phases) +- **Documentation:** Technical Writer (all phases) + +**3. Use specialists** + +- **Testing:** TEA for comprehensive quality strategy +- **Documentation:** Technical Writer for technical writing +- **Games:** Game Designer/Developer/Architect for game-specific needs +- **UX:** UX Designer for user-centered design + +**4. Try party mode for:** + +- Strategic decisions with trade-offs +- Creative brainstorming sessions +- Cross-functional alignment +- Complex problem solving + +### Working with Agents + +**1. Trust their expertise** + +- Agents embody decades of simulated experience +- Their questions uncover critical issues +- Their recommendations are data-informed +- Their warnings prevent costly mistakes + +**2. Answer their questions** + +- Agents ask for important reasons +- Incomplete answers lead to assumptions +- Detailed responses yield better outcomes +- "I don't know" is a valid answer + +**3. Follow workflows** + +- Structured processes prevent missed steps +- Workflows encode best practices +- Sequential workflows build on each other +- Validation workflows catch errors early + +**4. Customize when needed** + +- Adjust agent personalities for your project +- Add domain-specific expertise +- Modify communication style for team preferences +- Keep customizations project-specific + +### Common Workflows Patterns + +**Starting a New Project (Greenfield):** + +``` +1. PM or Analyst: *workflow-init +2. Analyst: *brainstorm-project or *product-brief (optional) +3. PM: *create-prd (Level 2-4) or *tech-spec (Level 0-1) +4. Architect: *create-architecture (Level 3-4 only) +5. SM: *sprint-planning +``` + +**Starting with Existing Code (Brownfield):** + +``` +1. Analyst or Technical Writer: *document-project +2. PM or Analyst: *workflow-init +3. PM: *create-prd or *tech-spec +4. Architect: *create-architecture (if needed) +5. SM: *sprint-planning +``` + +**Story Development Cycle:** + +``` +1. SM: *epic-tech-context (optional, once per epic) +2. SM: *create-story +3. SM: *story-context +4. DEV: *develop-story +5. DEV: *code-review +6. DEV: *story-done +7. Repeat steps 2-6 for next story +``` + +**Testing Strategy:** + +``` +1. TEA: *framework (once per project, early) +2. TEA: *atdd (before implementing features) +3. DEV: *develop-story (includes tests) +4. TEA: *automate (comprehensive test suite) +5. TEA: *trace (quality gate) +6. TEA: *ci (pipeline setup) +``` + +**Game Development:** + +``` +1. Game Designer: *brainstorm-game +2. Game Designer: *create-gdd +3. Game Architect: *create-architecture +4. SM: *sprint-planning +5. Game Developer: *create-story +6. Game Developer: *dev-story +7. Game Developer: *code-review +``` + +### Navigation Tips + +**Lost? Run workflow-status** + +``` +Load any agent β†’ *workflow-status +Agent analyzes project state β†’ recommends next workflow +``` + +**Phase transitions:** + +``` +Each phase has validation gates: +- Phase 2β†’3: validate-prd, validate-tech-spec +- Phase 3β†’4: solutioning-gate-check +Run validation before advancing +``` + +**Course correction:** + +``` +If priorities change mid-project: +Load PM, Architect, or SM β†’ *correct-course +``` + +**Testing integration:** + +``` +TEA can be invoked at any phase: +- Phase 1: Test strategy planning +- Phase 2: Test scenarios in PRD +- Phase 3: Architecture testability review +- Phase 4: Test automation and CI +``` + +--- + +## Agent Reference Table + +Quick reference for agent selection: + +| Agent | Icon | Primary Phase | Key Workflows | Best For | +| ----------------------- | ---- | ------------------ | --------------------------------------------- | ------------------------------------- | +| **Analyst** | πŸ“Š | 1 (Analysis) | brainstorm, brief, research, document-project | Discovery, requirements, brownfield | +| **PM** | πŸ“‹ | 2 (Planning) | prd, tech-spec, epics-stories | Planning, requirements docs | +| **UX Designer** | 🎨 | 2 (Planning) | create-design, validate-design | UX-heavy projects, design | +| **Architect** | πŸ—οΈ | 3 (Solutioning) | architecture, gate-check | Technical design, architecture | +| **SM** | πŸƒ | 4 (Implementation) | sprint-planning, create-story, story-context | Story management, sprint coordination | +| **DEV** | πŸ’» | 4 (Implementation) | develop-story, code-review, story-done | Implementation, coding | +| **TEA** | πŸ§ͺ | All Phases | framework, atdd, automate, trace, ci | Testing, quality assurance | +| **Paige (Tech Writer)** | πŸ“š | All Phases | document-project, diagrams, validation | Documentation, diagrams | +| **Game Designer** | 🎲 | 1-2 (Games) | brainstorm-game, gdd, narrative | Game design, creative vision | +| **Game Developer** | πŸ•ΉοΈ | 4 (Games) | develop-story, story-done, code-review | Game implementation | +| **Game Architect** | πŸ›οΈ | 3 (Games) | architecture, gate-check | Game systems architecture | +| **BMad Master** | πŸ§™ | Meta | party-mode, list tasks/workflows | Orchestration, multi-agent | + +### Agent Capabilities Summary + +**Planning Agents (3):** + +- PM: Requirements and planning docs +- UX Designer: User experience design +- Game Designer: Game design and narrative + +**Architecture Agents (2):** + +- Architect: System architecture +- Game Architect: Game systems architecture + +**Implementation Agents (3):** + +- SM: Story management and coordination +- DEV: Software development +- Game Developer: Game development + +**Quality Agents (2):** + +- TEA: Testing and quality assurance +- DEV: Code review + +**Support Agents (2):** + +- Analyst: Research and discovery +- Technical Writer: Documentation and diagrams + +**Meta Agent (1):** + +- BMad Master: Orchestration and party mode + +--- + +## Additional Resources + +**Workflow Documentation:** + +- [Phase 1: Analysis Workflows](./workflows-analysis.md) +- [Phase 2: Planning Workflows](./workflows-planning.md) +- [Phase 3: Solutioning Workflows](./workflows-solutioning.md) +- [Phase 4: Implementation Workflows](./workflows-implementation.md) +- [Testing & QA Workflows](./workflows-testing.md) + +**Advanced References:** + +- [Architecture Workflow Reference](./workflow-architecture-reference.md) - Decision architecture details +- [Document Project Workflow Reference](./workflow-document-project-reference.md) - Brownfield documentation + +**Getting Started:** + +- [Quick Start Guide](./quick-start.md) - Step-by-step tutorial +- [Scale Adaptive System](./scale-adaptive-system.md) - Understanding project levels +- [Brownfield Guide](./brownfield-guide.md) - Working with existing code + +**Other Guides:** + +- [Enterprise Agentic Development](./enterprise-agentic-development.md) - Team collaboration +- [FAQ](./faq.md) - Common questions +- [Troubleshooting](./troubleshooting.md) - Problem resolution +- [Glossary](./glossary.md) - Terminology reference + +--- + +## Quick Start Checklist + +**First Time with BMM:** + +- [ ] Read [Quick Start Guide](./quick-start.md) +- [ ] Understand [Scale Adaptive System](./scale-adaptive-system.md) +- [ ] Load an agent in your IDE +- [ ] Run `*workflow-status` +- [ ] Follow recommended workflow + +**Starting a Project:** + +- [ ] Determine project type (greenfield vs brownfield) +- [ ] If brownfield: Run `*document-project` (Analyst or Technical Writer) +- [ ] Load PM or Analyst β†’ `*workflow-init` +- [ ] Follow phase-appropriate workflows +- [ ] Try `*party-mode` for strategic decisions + +**Implementing Stories:** + +- [ ] SM: `*sprint-planning` (once) +- [ ] SM: `*create-story` +- [ ] SM: `*story-context` +- [ ] DEV: `*develop-story` +- [ ] DEV: `*code-review` +- [ ] DEV: `*story-done` + +**Testing Strategy:** + +- [ ] TEA: `*framework` (early in project) +- [ ] TEA: `*atdd` (before features) +- [ ] TEA: `*test-design` (comprehensive scenarios) +- [ ] TEA: `*ci` (pipeline setup) + +--- + +_Welcome to the team. Your AI agents are ready to collaborate._ diff --git a/bmad/bmm/docs/brownfield-guide.md b/bmad/bmm/docs/brownfield-guide.md index b024dfd7..e185db2d 100644 --- a/bmad/bmm/docs/brownfield-guide.md +++ b/bmad/bmm/docs/brownfield-guide.md @@ -1,799 +1,398 @@ # BMad Method Brownfield Development Guide -## Overview +**Complete guide for working with existing codebases** -This guide provides comprehensive guidance for using BMad Method v6 with existing codebases (brownfield projects). Whether you're fixing a single bug, adding a small feature, or implementing a major system expansion, BMad Method adapts to your project's complexity while ensuring AI agents have the context they need to work effectively. +**Reading Time:** ~35 minutes -**Core Principle:** In brownfield development, producing contextual artifacts for agents is paramount. AI agents require comprehensive documentation to understand existing patterns, constraints, and integration points before they can effectively plan or implement changes. +--- + +## Quick Navigation + +**Jump to:** + +- [Quick Reference](#quick-reference) - Commands and files +- [Common Scenarios](#common-scenarios) - Real-world examples +- [Troubleshooting](#troubleshooting) - Problem solutions +- [Best Practices](#best-practices) - Success tips + +--- ## What is Brownfield Development? -Brownfield projects involve working within existing codebases rather than starting fresh. This includes: +Brownfield projects involve working within existing codebases rather than starting fresh: -- **Bug fixes** - Single file changes to resolve issues -- **Small features** - Adding functionality to existing modules -- **Feature sets** - Multiple related features across several areas -- **Major integrations** - Complex additions requiring architectural changes -- **System expansions** - Enterprise-scale enhancements to existing platforms +- **Bug fixes** - Single file changes +- **Small features** - Adding to existing modules +- **Feature sets** - Multiple related features +- **Major integrations** - Complex architectural additions +- **System expansions** - Enterprise-scale enhancements -The key difference from greenfield development: you must understand and respect existing patterns, architecture, and constraints. +**Key Difference from Greenfield:** You must understand and respect existing patterns, architecture, and constraints. -## Scale-Adaptive Workflow System +**Core Principle:** AI agents need comprehensive documentation to understand existing code before they can effectively plan or implement changes. -BMad Method v6 uses a **scale-adaptive** approach that automatically routes brownfield projects through appropriate workflows based on complexity: +--- -### Brownfield Complexity Levels +## Getting Started -| Level | Scope | Story Count | Workflow Approach | Documentation Depth | -| ----- | ---------------------- | ------------- | ---------------------------------------- | ------------------------------------------------------ | -| **0** | Single atomic change | 1 story | Lightweight tech-spec only | Quick understanding of affected area | -| **1** | Small feature addition | 1-10 stories | Tech-spec with epic breakdown | Focused documentation of integration points | -| **2** | Medium feature set | 5-15 stories | PRD + tech-spec | Comprehensive docs for affected systems | -| **3** | Complex integration | 12-40 stories | PRD β†’ architecture β†’ implementation | Full system documentation + integration planning | -| **4** | Enterprise expansion | 40+ stories | Full methodology with strategic planning | Complete codebase documentation + architectural review | +### Understanding Planning Tracks -### How Scale Determination Works +For complete track details, see [Scale Adaptive System](./scale-adaptive-system.md). -When you run `workflow-init`, it asks about YOUR work first, then uses existing artifacts as context: +**Brownfield tracks at a glance:** -#### Step 1: Understand What You're Working On +| Track | Scope | Typical Stories | Key Difference | +| --------------------- | -------------------------- | --------------- | ----------------------------------------------- | +| **Quick Flow** | Bug fixes, small features | 1-15 | Must understand affected code and patterns | +| **BMad Method** | Feature sets, integrations | 10-50+ | Integrate with existing architecture | +| **Enterprise Method** | Enterprise expansions | 30+ | Full system documentation + compliance required | -The workflow asks you first: +**Note:** Story counts are guidance, not definitions. Tracks are chosen based on planning needs. -1. **Project name**: "What's your project called?" +### Track Selection for Brownfield -2. **If it finds existing work** (code or planning documents): - - Shows what it found (PRD, epics, stories, codebase) - - Asks a clear question: +When you run `workflow-init`, it handles brownfield intelligently: -> **"Looking at what I found, are these:** -> -> a) **Works in progress you're finishing** - continuing the work described in these documents -> b) **Documents from a previous effort** - you're starting something NEW and different now -> c) **The proposed work you're about to start** - these describe what you want to do -> d) **None of these** - let me explain what I'm actually working on" +**Step 1: Shows what it found** -**If you choose (a) or (c):** System analyzes the artifacts to get project details -**If you choose (b) or (d):** System asks you to describe your NEW work +- Old planning docs (PRD, epics, stories) +- Existing codebase -3. **Asks about your work**: "Tell me about what you're working on. What's the goal?" +**Step 2: Asks about YOUR work** -4. **Analyzes your description** using keyword detection: +> "Are these works in progress, previous effort, or proposed work?" -**Level 0 Keywords:** "fix", "bug", "typo", "small change", "update", "patch" -**Level 1 Keywords:** "simple", "basic", "small feature", "add", "minor" -**Level 2 Keywords:** "dashboard", "several features", "admin panel", "medium" -**Level 3 Keywords:** "platform", "integration", "complex", "system" -**Level 4 Keywords:** "enterprise", "multi-tenant", "multiple products", "ecosystem" +- **(a) Works in progress** β†’ Uses artifacts to determine level +- **(b) Previous effort** β†’ Asks you to describe NEW work +- **(c) Proposed work** β†’ Uses artifacts as guidance +- **(d) None of these** β†’ You explain your work -**Examples:** +**Step 3: Analyzes your description** -- "I need to update payment method enums" β†’ **Level 0** -- "Adding forgot password feature" β†’ **Level 1** -- "Building admin dashboard with analytics" β†’ **Level 2** -- "Adding real-time collaboration to document editor" β†’ **Level 3** -- "Implementing multi-tenancy across our SaaS" β†’ **Level 4** +- Keywords: "fix", "bug" β†’ Quick Flow, "dashboard", "platform" β†’ BMad Method, "enterprise", "multi-tenant" β†’ Enterprise Method +- Complexity assessment +- Confirms suggested track with you -5. **Suggests and confirms**: "Based on your description: Level X brownfield project. Is that correct?" +**Key Principle:** System asks about YOUR current work first, uses old artifacts as context only. -#### How It Handles Old Artifacts - -**Scenario: Old Level 3 PRD, New Level 0 Work** +**Example: Old Complex PRD, New Simple Work** ``` -System: "I found: PRD.md (Level 3, 30 stories, modified 6 months ago)" -System: "Are these works in progress you're finishing, or documents from a previous effort?" - -You: "b - Documents from a previous effort" - -System: "Tell me about what you're working on" -You: "I need to update payment method enums" - -System: "Level 0 brownfield project. Is that correct?" -You: "yes" - -βœ… Result: Level 0 workflow +System: "Found PRD.md (BMad Method track, 30 stories, 6 months old)" +System: "Is this work in progress or previous effort?" +You: "Previous effort - I'm just fixing a bug now" +System: "Tell me about your current work" +You: "Update payment method enums" +System: "Quick Flow track (tech-spec approach). Correct?" +You: "Yes" +βœ… Creates Quick Flow workflow ``` -**Key Principle:** The system asks about YOUR current work first, then uses old artifacts as context, not as the primary source of truth. +--- -## The Five Phases of Brownfield Development +## Phase 0: Documentation (Critical First Step) -### Phase 0: Documentation (Conditional) +🚨 **For brownfield projects: Always ensure adequate AI-usable documentation before planning** -Phase 0 has three possible scenarios based on your existing documentation state: +### Default Recommendation: Run document-project -#### Scenario A: No Documentation +**Best practice:** Run `document-project` workflow unless you have **confirmed, trusted, AI-optimized documentation**. -**When:** Codebase lacks adequate documentation for AI agents -**Action:** Run `document-project` workflow to create comprehensive documentation from scratch +### Why Document-Project is Almost Always the Right Choice -#### Scenario B: Documentation Exists, But No Index +Existing documentation often has quality issues that break AI workflows: -**When:** You have README, architecture docs, or other documentation BUT no `index.md` (master AI retrieval source) -**Action:** Run the `index-docs` task to generate `index.md` from existing documentation +**Common Problems:** -**The `index-docs` Task** (from `bmad/core/tasks/index-docs.xml`): +- **Too Much Information (TMI):** Massive markdown files with 10s or 100s of level 2 sections +- **Out of Date:** Documentation hasn't been updated with recent code changes +- **Wrong Format:** Written for humans, not AI agents (lacks structure, index, clear patterns) +- **Incomplete Coverage:** Missing critical architecture, patterns, or setup info +- **Inconsistent Quality:** Some areas documented well, others not at all -- Scans your documentation directory -- Reads each file to understand its purpose -- Creates organized `index.md` with file listings and descriptions -- Provides structured navigation for AI agents -- Lightweight and fast (just indexes, doesn't scan codebase) +**Impact on AI Agents:** -**Why This Matters:** The `index.md` file is the primary entry point for AI agents. Without it, agents must hunt through multiple files. Even with good existing docs, the index provides structured navigation and ensures agents can quickly find relevant context. +- AI agents hit token limits reading massive files +- Outdated docs cause hallucinations (agent thinks old patterns still apply) +- Missing structure means agents can't find relevant information +- Incomplete coverage leads to incorrect assumptions -**When to Use `document-project` Instead:** -If your existing docs are inadequate or you need comprehensive codebase analysis: +### Documentation Decision Tree -- Use `document-project` workflow with appropriate scan level (deep/exhaustive) -- It will discover your existing docs in Step 2 and show them to you -- It will generate NEW documentation from codebase analysis -- Final `index.md` will link to BOTH existing docs AND newly generated docs -- Result: Comprehensive documentation combining your existing docs with AI-friendly codebase analysis +**Step 1: Assess Existing Documentation Quality** -#### Scenario C: Complete Documentation with Index +Ask yourself: -**When:** You have comprehensive documentation including `docs/index.md` -**Action:** Skip Phase 0 entirely and proceed to Phase 1 or Phase 2 +- βœ… Is it **current** (updated in last 30 days)? +- βœ… Is it **AI-optimized** (structured with index.md, clear sections, <500 lines per file)? +- βœ… Is it **comprehensive** (architecture, patterns, setup all documented)? +- βœ… Do you **trust** it completely for AI agent consumption? -#### The `document-project` Workflow +**If ANY answer is NO β†’ Run `document-project`** -This critical workflow analyzes and documents your existing codebase: +**Step 2: Check for Massive Documents** -**What It Does:** +If you have documentation but files are huge (>500 lines, 10+ level 2 sections): -- Detects project type (web, backend, mobile, CLI, etc.) -- Identifies tech stack and dependencies -- Analyzes architecture patterns -- Documents API routes and data models -- Maps component structure -- Extracts development workflows -- **NEW:** Can incorporate existing documentation and generate master index +1. **First:** Run `shard-doc` tool to split large files: -**Three Scan Levels:** + ```bash + # Load BMad Master or any agent + bmad/core/tools/shard-doc.xml --input docs/massive-doc.md + ``` -1. **Quick Scan** (2-5 min) - Pattern-based analysis without reading source - - Use for: Fast project overview, initial understanding, index generation - - Reads: Config files, manifests, directory structure, existing docs + - Splits on level 2 sections by default + - Creates organized, manageable files + - Preserves content integrity -2. **Deep Scan** (10-30 min) - Reads critical directories - - Use for: Brownfield PRD preparation, focused analysis - - Reads: Key paths based on project type (controllers, models, components) - - Incorporates: Existing documentation as input +2. **Then:** Run `index-docs` task to create navigation: -3. **Exhaustive Scan** (30-120 min) - Reads ALL source files - - Use for: Migration planning, complete system understanding - - Reads: Every source file (excludes node_modules, dist, .git) - - Incorporates: All existing documentation + ```bash + bmad/core/tasks/index-docs.xml --directory ./docs + ``` -**Output Files:** +3. **Finally:** Validate quality - if sharded docs still seem incomplete/outdated β†’ Run `document-project` -- `index.md` - Master documentation index (primary AI retrieval source) -- `project-overview.md` - Executive summary -- `architecture.md` - Detailed architecture analysis -- `source-tree-analysis.md` - Annotated directory structure -- `api-contracts.md` - API documentation (if applicable) -- `data-models.md` - Database schemas (if applicable) -- Additional conditional files based on project type +### Four Real-World Scenarios -**Working with Existing Documentation:** +| Scenario | You Have | Action | Why | +| -------- | ------------------------------------------ | -------------------------- | --------------------------------------- | +| **A** | No documentation | `document-project` | Only option - generate from scratch | +| **B** | Docs exist but massive/outdated/incomplete | `document-project` | Safer to regenerate than trust bad docs | +| **C** | Good docs but no structure | `shard-doc` β†’ `index-docs` | Structure existing content for AI | +| **D** | Confirmed AI-optimized docs with index.md | Skip Phase 0 | Rare - only if you're 100% confident | -If you have existing docs (README, ARCHITECTURE.md, CONTRIBUTING.md, etc.) you have two options: +### Scenario A: No Documentation (Most Common) -**Option 1: Just need an index (`index-docs` task)** +**Action: Run document-project workflow** -- Fast, lightweight approach -- Run the `index-docs` task from `bmad/core/tasks/index-docs.xml` -- Scans your docs directory and generates organized `index.md` -- Reads each file to create accurate descriptions -- Links to all existing documentation -- Perfect when docs are good but need structured navigation for AI agents +1. Load Analyst or Technical Writer (Paige) agent +2. Run `*document-project` +3. Choose scan level: + - **Quick** (2-5min): Pattern analysis, no source reading + - **Deep** (10-30min): Reads critical paths - **Recommended** + - **Exhaustive** (30-120min): Reads all files -**Option 2: Need comprehensive codebase documentation (`document-project` workflow)** +**Outputs:** -- Scans the actual codebase to generate technical documentation -- Discovers existing docs (README, ARCHITECTURE.md, etc.) in Step 2 -- Shows you what it found and asks for additional context -- Generates NEW documentation files from codebase analysis: - - `project-overview.md` - Executive summary from codebase - - `architecture.md` - Architecture analysis from code - - `api-contracts.md` - API documentation from routes/controllers - - `data-models.md` - Database schemas from models - - `source-tree-analysis.md` - Annotated directory structure -- Creates `index.md` that links to BOTH existing docs AND newly generated docs -- Complements your existing documentation with AI-friendly codebase analysis +- `docs/index.md` - Master AI entry point +- `docs/project-overview.md` - Executive summary +- `docs/architecture.md` - Architecture analysis +- `docs/source-tree-analysis.md` - Directory structure +- Additional files based on project type (API, web app, etc.) -**Deep-Dive Mode:** If you already have documentation but need exhaustive analysis of a specific area (e.g., authentication system, dashboard module), you can run the workflow in deep-dive mode to create comprehensive documentation for just that subsystem. +### Scenario B: Docs Exist But Quality Unknown/Poor (Very Common) -**Example Usage:** +**Action: Run document-project workflow (regenerate)** + +Even if `docs/` folder exists, if you're unsure about quality β†’ **regenerate**. + +**Why regenerate instead of index?** + +- Outdated docs β†’ AI makes wrong assumptions +- Incomplete docs β†’ AI invents missing information +- TMI docs β†’ AI hits token limits, misses key info +- Human-focused docs β†’ Missing AI-critical structure + +**document-project** will: + +- Scan actual codebase (source of truth) +- Generate fresh, accurate documentation +- Structure properly for AI consumption +- Include only relevant, current information + +### Scenario C: Good Docs But Needs Structure + +**Action: Shard massive files, then index** + +If you have **good, current documentation** but it's in massive files: + +**Step 1: Shard large documents** ```bash -# Scenario A: No documentation -bmad analyst workflow-status -# β†’ Directs to document-project -bmad analyst document-project -# β†’ Choose: Deep scan (recommended for brownfield) - -# Scenario B: Has docs but no index -# Option 1: Just generate index from existing docs -# Run the index-docs task directly (lightweight, fast) -# Load bmad/core/tasks/index-docs.xml -# Specify your docs directory (e.g., ./docs) - -# Option 2: Need comprehensive codebase docs too -bmad analyst document-project -# β†’ Choose: Deep or Exhaustive scan -# β†’ Creates index.md AND additional codebase documentation - -# Scenario C: Complete with index -bmad analyst workflow-status -# β†’ Skips Phase 0, proceeds to Phase 1 or 2 +# For each massive doc (>500 lines or 10+ level 2 sections) +bmad/core/tools/shard-doc.xml \ + --input docs/api-documentation.md \ + --output docs/api/ \ + --level 2 # Split on ## headers (default) ``` +**Step 2: Generate index** + +```bash +bmad/core/tasks/index-docs.xml --directory ./docs +``` + +**Step 3: Validate** + +- Review generated `docs/index.md` +- Check that sharded files are <500 lines each +- Verify content is current and accurate +- **If anything seems off β†’ Run document-project instead** + +### Scenario D: Confirmed AI-Optimized Documentation (Rare) + +**Action: Skip Phase 0** + +Only skip if ALL conditions met: + +- βœ… `docs/index.md` exists and is comprehensive +- βœ… Documentation updated within last 30 days +- βœ… All doc files <500 lines with clear structure +- βœ… Covers architecture, patterns, setup, API surface +- βœ… You personally verified quality for AI consumption +- βœ… Previous AI agents used it successfully + +**If unsure β†’ Run document-project** (costs 10-30 minutes, saves hours of confusion) + +### Why document-project is Critical + +Without AI-optimized documentation, workflows fail: + +- **tech-spec** (Quick Flow) can't auto-detect stack/patterns β†’ Makes wrong assumptions +- **PRD** (BMad Method) can't reference existing code β†’ Designs incompatible features +- **architecture** can't build on existing structure β†’ Suggests conflicting patterns +- **story-context** can't inject existing patterns β†’ Dev agent rewrites working code +- **dev-story** invents implementations β†’ Breaks existing integrations + +### Key Principle + +**When in doubt, run document-project.** + +It's better to spend 10-30 minutes generating fresh, accurate docs than to waste hours debugging AI agents working from bad documentation. + +--- + +## Workflow Phases by Track + ### Phase 1: Analysis (Optional) -**Purpose:** Explore solutions and gather context before formal planning. +**Workflows:** -**Available Workflows:** +- `brainstorm-project` - Solution exploration +- `research` - Technical/market research +- `product-brief` - Strategic planning (BMad Method/Enterprise tracks only) -- `brainstorm-project` - Solution exploration for new features -- `research` - Market/technical research for decision-making -- `product-brief` - Strategic product planning document +**When to use:** Complex features, technical decisions, strategic additions -**When to Use:** +**When to skip:** Bug fixes, well-understood features, time-sensitive changes -- Complex features requiring multiple solution approaches -- Technical decisions needing research (frameworks, patterns, tools) -- Strategic additions requiring business context - -**When to Skip:** - -- Bug fixes or minor changes with obvious solutions -- Well-understood features with clear requirements -- Time-sensitive changes where planning overhead isn't justified +See [Workflows Guide](../workflows/README.md) for details. ### Phase 2: Planning (Required) -**Purpose:** Create formal requirements and break down work into epics and stories. +**Planning approach adapts by track:** -The planning approach adapts to your brownfield project's complexity: +**Quick Flow:** Use `tech-spec` workflow -#### Level 0: Single Atomic Change +- Creates tech-spec.md +- Auto-detects existing stack (brownfield) +- Confirms conventions with you +- Generates implementation-ready stories -**Workflow:** `tech-spec` only -**Outputs:** `tech-spec.md` + single story file -**Next Phase:** β†’ Implementation (Phase 4) +**BMad Method/Enterprise:** Use `prd` workflow -**Use For:** +- Creates PRD.md + epic breakdown +- References existing architecture +- Plans integration points -- Bug fixes -- Single file changes -- Minor configuration updates -- Small refactors +**Brownfield-specific:** See [Scale Adaptive System](./scale-adaptive-system.md) for complete workflow paths by track. -**Key Considerations:** +### Phase 3: Solutioning (BMad Method/Enterprise Only) -- Must understand existing pattern in affected file -- Document integration points -- Identify potential side effects +**Critical for brownfield:** -**Example:** Fixing authentication token expiration bug in auth middleware - -#### Level 1: Small Feature - -**Workflow:** `tech-spec` only -**Outputs:** `tech-spec.md` + epic breakdown + 2-10 story files -**Next Phase:** β†’ Implementation (Phase 4) - -**Use For:** - -- Single module additions -- Small UI enhancements -- Isolated feature additions -- API endpoint additions - -**Key Considerations:** - -- Identify reusable existing components -- Respect current architectural patterns -- Plan integration with existing APIs/services - -**Example:** Adding "forgot password" feature to existing auth system - -#### Level 2: Medium Feature Set - -**Workflow:** `prd` β†’ `tech-spec` -**Outputs:** `PRD.md` + `epics.md` + `tech-spec.md` -**Next Phase:** β†’ Implementation (Phase 4) - -**Use For:** - -- Multiple related features -- Cross-module enhancements -- Moderate scope additions -- Feature sets spanning 1-2 areas - -**Key Considerations:** - -- Document all integration points -- Map dependencies to existing systems -- Identify shared components for reuse -- Plan migration strategy if changing patterns - -**Special Note:** Level 2 uses `tech-spec` instead of full architecture workflow to keep planning lightweight while still providing adequate technical guidance. - -**Example:** Adding user dashboard with analytics, preferences, and activity history - -#### Level 3: Complex Integration - -**Workflow:** `prd` β†’ `create-architecture` β†’ implementation -**Outputs:** `PRD.md` + `epics.md` + `architecture.md` (extension of existing) -**Next Phase:** β†’ Solutioning (Phase 3) β†’ Implementation (Phase 4) - -**Use For:** - -- Major feature additions -- Architectural integrations -- Multi-system changes -- Complex data migrations - -**Key Considerations:** - -- Review existing architecture first -- Plan integration strategy -- Document architectural extensions -- Identify migration paths +- Review existing architecture FIRST +- Document integration points explicitly - Plan backward compatibility +- Consider migration strategy -**Phase 3 Workflows:** +**Workflows:** -- `architecture-review` - Review existing architecture first -- `integration-planning` - Create integration strategy document -- `create-architecture` - Extend existing architecture documentation -- `solutioning-gate-check` - Validate architecture before implementation +- `create-architecture` - Extend architecture docs (BMad Method/Enterprise) +- `solutioning-gate-check` - Validate before implementation (BMad Method/Enterprise) -**Example:** Adding real-time collaboration features to existing document editor +### Phase 4: Implementation (All Tracks) -#### Level 4: Enterprise Expansion +**Sprint-based development through story iteration:** -**Workflow:** Full methodology with strategic analysis -**Outputs:** Product brief β†’ PRD β†’ comprehensive architecture β†’ phased implementation -**Next Phase:** β†’ Solutioning (Phase 3) β†’ Implementation (Phase 4) +```mermaid +flowchart TD + SPRINT[sprint-planning
Initialize tracking] + EPIC[epic-tech-context
Per epic] + CREATE[create-story] + CONTEXT[story-context] + DEV[dev-story] + REVIEW[code-review] + CHECK{More stories?} + RETRO[retrospective
Per epic] -**Use For:** + SPRINT --> EPIC + EPIC --> CREATE + CREATE --> CONTEXT + CONTEXT --> DEV + DEV --> REVIEW + REVIEW --> CHECK + CHECK -->|Yes| CREATE + CHECK -->|No| RETRO -- Platform expansions -- Multi-team initiatives -- System-wide modernization -- Major architectural shifts - -**Key Considerations:** - -- Comprehensive codebase documentation required (Phase 0) -- Deep architectural review mandatory -- Backward compatibility strategy -- Phased rollout planning -- Feature flag implementation -- Migration strategy for existing data/users -- Cross-team coordination - -**Critical for Enterprise:** - -- Documentation phase is nearly mandatory -- Analysis phase (research, product brief) recommended -- Full architecture review before planning -- Extensive integration testing strategy -- Risk assessment and mitigation planning - -**Example:** Adding multi-tenancy to existing single-tenant SaaS platform - -### Phase 3: Solutioning (Levels 2-4) - -**Purpose:** Design architectural extensions and integration strategy. - -**Workflows Available:** - -| Workflow | Level | Purpose | Output | -| ------------------------ | ----- | ------------------------------------ | ------------------------- | -| `architecture-review` | 3-4 | Review existing architecture | Analysis document | -| `integration-planning` | 3-4 | Plan integration approach | Integration strategy | -| `create-architecture` | 2-4 | Extend architecture documentation | architecture.md (updated) | -| `validate-architecture` | 2-4 | Validate design decisions | Validation report | -| `solutioning-gate-check` | 3-4 | Final approval before implementation | Gate check report | - -**Critical Differences from Greenfield:** - -- You're **extending** existing architecture, not creating from scratch -- Must document **integration points** explicitly -- Need **migration strategy** for any pattern changes -- Require **backward compatibility** considerations -- Should plan **feature flags** for gradual rollout - -**Architecture Extensions Should Include:** - -- How new components integrate with existing systems -- Data flow between new and existing modules -- API contract changes (if any) -- Database schema changes and migration strategy -- Security implications and authentication integration -- Performance impact on existing functionality - -### Phase 4: Implementation (Iterative) - -**Purpose:** Transform plans into working code through sprint-based iteration. - -#### The Sprint Planning Entry Point - -Phase 4 begins with the `sprint-planning` workflow: - -**What It Does:** - -1. Extracts all epics and stories from epic files -2. Creates `sprint-status.yaml` - single source of truth for tracking -3. Auto-detects existing story files and contexts -4. Maintains status through development lifecycle - -**Run sprint-planning:** - -- Initially after Phase 2 or Phase 3 completion -- After creating epic contexts -- Periodically to sync with file system -- To check overall progress - -#### The Implementation Loop - -``` -Phase Transition β†’ sprint-planning - ↓ - epic-tech-context (per epic) - ↓ - β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” - β”‚ β”‚ - ↓ ↓ -create-story β†’ story-context β†’ dev-story β†’ code-review - β”‚ β”‚ β”‚ β”‚ - ↓ ↓ ↓ ↓ - drafted ready-for-dev in-progress review - β”‚ β”‚ - β””β”€β”€β”€β”€β†’β”€β”€β”€β”€β”€β”€β”€β”˜ - ↓ - done - β”‚ - [epic complete?] - ↓ - retrospective + style SPRINT fill:#bfb,stroke:#333,stroke-width:2px + style RETRO fill:#fbf,stroke:#333,stroke-width:2px ``` -#### Status State Machine +**Status Progression:** -**Epic Status:** +- Epic: `backlog β†’ contexted` +- Story: `backlog β†’ drafted β†’ ready-for-dev β†’ in-progress β†’ review β†’ done` -``` -backlog β†’ contexted -``` +**Brownfield-Specific Implementation Tips:** -**Story Status:** +1. **Respect existing patterns** - Follow established conventions +2. **Test integration thoroughly** - Validate interactions with existing code +3. **Use feature flags** - Enable gradual rollout +4. **Context injection matters** - epic-tech-context and story-context reference existing patterns -``` -backlog β†’ drafted β†’ ready-for-dev β†’ in-progress β†’ review β†’ done -``` +--- -#### Phase 4 Workflows - -| Workflow | Agent | Purpose | Status Update | -| ------------------- | ----- | ------------------------------- | ------------------------------------------- | -| `sprint-planning` | SM | Initialize sprint tracking | Creates sprint-status.yaml | -| `epic-tech-context` | SM | Create epic technical context | Epic: backlog β†’ contexted | -| `create-story` | SM | Draft individual story | Story: backlog β†’ drafted | -| `story-context` | SM | Generate implementation context | Story: drafted β†’ ready-for-dev | -| `dev-story` | DEV | Implement story | Story: ready-for-dev β†’ in-progress β†’ review | -| `code-review` | SM/SR | Quality validation | Manual state management | -| `retrospective` | SM | Capture epic learnings | Retrospective: optional β†’ completed | -| `correct-course` | SM | Handle issues/scope changes | Adaptive based on situation | - -#### Brownfield-Specific Implementation Considerations - -1. **Respect Existing Patterns** - - Use existing coding conventions - - Follow established architectural approaches - - Maintain consistency with current UI/UX patterns - - Preserve team preferences and standards - -2. **Integration Testing is Critical** - - Test interactions with existing functionality - - Validate API contracts remain unchanged (unless intentionally versioned) - - Check for regression in existing features - - Verify performance impact on legacy components - -3. **Gradual Rollout Strategy** - - Implement feature flags for new functionality - - Plan rollback strategy - - Support backward compatibility - - Consider migration scripts for data/schema changes - -4. **Context Injection** - - `epic-tech-context`: Provides technical guidance specific to epic scope - - `story-context`: Generates implementation context for each story - - Both reference existing codebase patterns and integration points - - Ensures developers have exact expertise needed for each task - -## Workflow Routing by Level - -### Visual Decision Tree - -``` -Start β†’ workflow-status - ↓ - [Has documentation?] - ↓ - No ─→ document-project β†’ [Choose scan level] - Yes ↓ - ↓ - [Complexity level?] - ↓ - β”Œβ”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β” - ↓ ↓ ↓ ↓ ↓ - Level 0 Level 1 Level 2 Level 3 Level 4 - ↓ ↓ ↓ ↓ ↓ -tech-spec tech-spec prd prd prd - ↓ ↓ ↓ ↓ ↓ - └─────────────┴────────── β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”˜ - ↓ ↓ - tech-spec create-architecture - ↓ ↓ - └──────── - ↓ - sprint-planning - ↓ - Implementation Loop -``` - -### Path Files - -The v6 system uses modular path definitions for each brownfield level: - -**Location:** `/src/modules/bmm/workflows/workflow-status/paths/` - -- `brownfield-level-0.yaml` - Single atomic change path -- `brownfield-level-1.yaml` - Small feature path -- `brownfield-level-2.yaml` - Medium project path -- `brownfield-level-3.yaml` - Complex integration path -- `brownfield-level-4.yaml` - Enterprise expansion path - -Each path file clearly defines: - -- Required vs optional workflows for each phase -- Agent assignments -- Expected outputs -- Integration notes - -## Universal Entry Points - -### `workflow-status` - Your Command Center - -**Always start here.** This workflow: - -- Checks for existing workflow status file -- Displays current phase and progress -- Shows next recommended action -- Routes to appropriate workflows based on context - -**For New Projects:** - -- Detects missing status file -- Directs to `workflow-init` -- Guides through project setup - -**For Existing Projects:** - -- Displays current phase and progress -- Shows Phase 4 implementation state -- Recommends exact next action -- Offers to change workflow if needed - -**Example Usage:** - -```bash -bmad analyst workflow-status -``` - -### `workflow-init` - Smart Initialization - -If you don't have a status file, this workflow initializes your project workflow by asking about YOUR work first, then using artifacts as context: - -**Step 1: Quick Scan (Context Only)** - -- Checks for existing code (`src/`, package files, `.git`) -- Checks for planning artifacts (PRD, epics, stories, architecture docs) -- Does NOT analyze in depth yet - just sees what's there - -**Step 2: Ask About YOUR Work** - -Asks: "What's your project called?" - -Then, if it found existing work, shows what it found and asks: - -> **"Looking at what I found, are these:** -> -> a) Works in progress you're finishing -> b) Documents from a previous effort (you're doing something NEW now) -> c) The proposed work you're about to start -> d) None of these - let me explain" - -**Your Paths:** - -- **Choose (a) or (c):** System analyzes the artifacts to determine level -- **Choose (b) or (d):** System asks you to describe your NEW work - -**Step 3: Determine Level** - -If continuing old work: Counts stories from artifacts -If new work: Asks "Tell me about what you're working on" and uses keyword detection - -Then confirms: "Level X brownfield project. Is that correct?" - -**Step 4: Create Workflow** - -- Loads appropriate path file: `brownfield-level-{0-4}.yaml` -- Generates workflow with all phases and workflows -- Creates status file - -**Example: Old Level 3 PRD, New Level 0 Work** - -``` -System: "What's your project called?" -You: "PaymentApp" - -System: "I found: PRD.md (Level 3, 30 stories, 6mo ago), src/ codebase" -System: "Are these works in progress, previous effort, or proposed work?" - -You: "b - Previous effort" - -System: "Tell me about what you're working on" -You: "I need to update payment method enums" - -System: "Level 0 brownfield project. Is that correct?" -You: "yes" - -βœ… Creates Level 0 workflow -``` - -**Smart Features:** - -- Asks about YOUR work first -- Uses artifacts as context, not primary source -- Keyword detection: "fix", "update" β†’ Level 0 -- Handles scaffolds: "Just a starter" β†’ still greenfield -- Flags missing documentation automatically - -## Key Artifacts in Brownfield Projects - -### Tracking Documents - -**`bmm-workflow-status.md`** (Phases 0-3) - -- Current phase and progress -- Workflow history -- Next recommended actions -- Project metadata - -**`sprint-status.yaml`** (Phase 4 only) - -- All epics, stories, retrospectives -- Current status for each item -- Single source of truth for implementation -- Updated by agents as work progresses - -### Planning Documents - -**Level 0-1:** - -- `tech-spec.md` - Technical specification -- `story-{key}.md` - Story files - -**Level 2:** - -- `PRD.md` - Product requirements -- `epics.md` - Epic breakdown -- `tech-spec.md` - Technical specification - -**Level 3-4:** - -- `PRD.md` - Product requirements -- `epics.md` - Epic breakdown -- `architecture.md` - Architecture extensions -- Integration and validation reports - -### Implementation Documents - -**Phase 4 Artifacts:** - -- `sprint-status.yaml` - Status tracking -- `epic-{n}-context.md` - Epic technical contexts -- `stories/` directory: - - `{epic}-{story}-{title}.md` - Story definitions - - `{epic}-{story}-{title}-context.md` - Implementation contexts - -## Best Practices for Brownfield Success +## Best Practices ### 1. Always Document First -Even if you know the codebase well, AI agents need comprehensive context. Run `document-project` with appropriate scan level before planning. +Even if you know the code, AI agents need `document-project` output for context. Run it before planning. -**Why:** AI discovers undocumented patterns, integration points, and constraints that humans might overlook or take for granted. +### 2. Be Specific About Current Work -**Important:** Even if you have good documentation (README, ARCHITECTURE.md, etc.), you still need `docs/index.md` as the master AI retrieval source. If you have docs but no index: +When workflow-init asks about your work: -- **Quick fix:** Run the `index-docs` task (lightweight, just creates index) -- **Comprehensive:** Use `document-project` with Deep scan to create index AND enhance docs -- The index provides structured navigation for AI agents +- βœ… "Update payment method enums to include Apple Pay" +- ❌ "Fix stuff" -### 2. Be Specific About Your Current Work +### 3. Choose Right Documentation Approach -When `workflow-init` asks about your work, be specific about what you're doing NOW: - -**Good descriptions:** - -- "I need to update payment method enums to include Apple Pay" -- "Adding forgot password feature to existing auth system" -- "Building admin dashboard with analytics and user management" - -**Why this matters:** The system uses your description to suggest the right complexity level. Clear, specific descriptions lead to accurate routing through appropriate workflows. - -### 3. Choose the Right Documentation Approach - -**For existing docs without index:** - -- Use `index-docs` task - fast, lightweight, just generates index -- Located at `bmad/core/tasks/index-docs.xml` - -**For comprehensive codebase documentation:** - -- Use `document-project` workflow with appropriate scan level: - - **Quick:** Fast overview, planning next steps - - **Deep:** Brownfield PRD preparation (most common) - - **Exhaustive:** Migration planning, complete understanding +- **Has good docs, no index?** β†’ Run `index-docs` task (fast) +- **No docs or need codebase analysis?** β†’ Run `document-project` (Deep scan) ### 4. Respect Existing Patterns -The brownfield templates identify: - -- Current coding conventions -- Architectural approaches -- Technology constraints -- Team preferences - -**Always preserve these unless explicitly modernizing them.** +Tech-spec and story-context will detect conventions. Follow them unless explicitly modernizing. ### 5. Plan Integration Points Explicitly -Document in your tech-spec or architecture: +Document in tech-spec/architecture: - Which existing modules you'll modify - What APIs/services you'll integrate with - How data flows between new and existing code -- What shared components you'll reuse ### 6. Design for Gradual Rollout -Brownfield changes should support: - -- Feature flags for new functionality -- Rollback strategies -- Backward compatibility -- Migration scripts (if needed) +- Use feature flags for new functionality +- Plan rollback strategies +- Maintain backward compatibility +- Create migration scripts if needed ### 7. Test Integration Thoroughly -Use the Test Architect (TEA) workflows: - -- `test-design` - Plan integration test strategy -- `test-review` - Validate test coverage -- `nfr-assess` - Check performance/security impact - -**Critical for Brownfield:** - - Regression testing of existing features - Integration point validation - Performance impact assessment @@ -804,457 +403,357 @@ Use the Test Architect (TEA) workflows: - Run `sprint-planning` at Phase 4 start - Context epics before drafting stories - Update `sprint-status.yaml` as work progresses -- Re-run sprint-planning to sync with file system ### 9. Leverage Context Injection - Run `epic-tech-context` before story drafting - Always create `story-context` before implementation -- These workflows reference existing patterns for consistency +- These reference existing patterns for consistency ### 10. Learn Continuously - Run `retrospective` after each epic -- Incorporate learnings into next story drafts -- Update patterns discovered during development +- Incorporate learnings into next stories +- Update discovered patterns - Share insights across team -## Common Brownfield Scenarios +--- -### Scenario 1: Bug Fix (Level 0) +## Common Scenarios + +### Scenario 1: Bug Fix (Quick Flow) **Situation:** Authentication token expiration causing logout issues +**Track:** Quick Flow + **Workflow:** -1. `workflow-status` β†’ detects brownfield, suggests Level 0 -2. Skip Phase 0 if auth system is documented -3. `tech-spec` β†’ analyzes bug, plans fix, creates single story -4. `sprint-planning` β†’ creates sprint status -5. `dev-story` β†’ implement fix -6. `code-review` β†’ validate fix + test regression +1. **Document:** Skip if auth system documented, else run `document-project` (Quick scan) +2. **Plan:** Load PM β†’ run `tech-spec` + - Analyzes bug + - Detects stack (Express, Jest) + - Confirms conventions + - Creates tech-spec.md + story +3. **Implement:** Load DEV β†’ run `dev-story` +4. **Review:** Load DEV β†’ run `code-review` -**Time:** ~2-4 hours total +**Time:** 2-4 hours -### Scenario 2: Small Feature (Level 1) +--- + +### Scenario 2: Small Feature (Quick Flow) **Situation:** Add "forgot password" to existing auth system +**Track:** Quick Flow + **Workflow:** -1. `workflow-status` β†’ suggests Level 1 -2. Phase 0: `document-project` (deep scan of auth module if not documented) -3. Phase 1: Optional - skip if requirements are clear -4. Phase 2: `tech-spec` β†’ creates epic with 3-5 stories -5. Phase 4: `sprint-planning` β†’ `create-story` β†’ `dev-story` β†’ repeat +1. **Document:** Run `document-project` (Deep scan of auth module if not documented) +2. **Plan:** Load PM β†’ run `tech-spec` + - Detects Next.js 13.4, NextAuth.js + - Analyzes existing auth patterns + - Confirms conventions + - Creates tech-spec.md + epic + 3-5 stories +3. **Implement:** Load SM β†’ `sprint-planning` β†’ `create-story` β†’ `story-context` + Load DEV β†’ `dev-story` for each story +4. **Review:** Load DEV β†’ `code-review` **Time:** 1-3 days -### Scenario 3: Feature Set (Level 2) +--- + +### Scenario 3: Feature Set (BMad Method) **Situation:** Add user dashboard with analytics, preferences, activity +**Track:** BMad Method + **Workflow:** -1. `workflow-status` β†’ suggests Level 2 -2. Phase 0: `document-project` (deep scan) - critical for understanding existing UI patterns -3. Phase 1: `research` (if evaluating analytics libraries) -4. Phase 2: `prd` β†’ `tech-spec` -5. Phase 4: Sprint-based implementation (10-15 stories) +1. **Document:** Run `document-project` (Deep scan) - Critical for understanding existing UI patterns +2. **Analyze:** Load Analyst β†’ `research` (if evaluating analytics libraries) +3. **Plan:** Load PM β†’ `prd` +4. **Solution:** Load Architect β†’ `create-architecture` β†’ `solutioning-gate-check` +5. **Implement:** Sprint-based (10-15 stories) + - Load SM β†’ `sprint-planning` + - Per epic: `epic-tech-context` β†’ stories + - Load DEV β†’ `dev-story` per story +6. **Review:** Per story completion **Time:** 1-2 weeks -### Scenario 4: Complex Integration (Level 3) +--- + +### Scenario 4: Complex Integration (BMad Method) **Situation:** Add real-time collaboration to document editor +**Track:** BMad Method + **Workflow:** -1. `workflow-status` β†’ suggests Level 3 -2. Phase 0: `document-project` (exhaustive if not documented) -3. Phase 1: `research` (WebSocket vs WebRTC vs CRDT) -4. Phase 2: `prd` β†’ creates requirements + epics -5. Phase 3: - - `architecture-review` β†’ understand existing editor architecture - - `integration-planning` β†’ plan WebSocket integration strategy - - `create-architecture` β†’ extend architecture for real-time layer - - `solutioning-gate-check` β†’ validate before implementation -6. Phase 4: Sprint-based implementation (20-30 stories) +1. **Document:** Run `document-project` (Exhaustive if not documented) - **Mandatory** +2. **Analyze:** Load Analyst β†’ `research` (WebSocket vs WebRTC vs CRDT) +3. **Plan:** Load PM β†’ `prd` +4. **Solution:** + - Load Architect β†’ `create-architecture` (extend for real-time layer) + - Load Architect β†’ `solutioning-gate-check` +5. **Implement:** Sprint-based (20-30 stories) **Time:** 3-6 weeks -### Scenario 5: Enterprise Expansion (Level 4) +--- + +### Scenario 5: Enterprise Expansion (Enterprise Method) **Situation:** Add multi-tenancy to single-tenant SaaS platform +**Track:** Enterprise Method + **Workflow:** -1. `workflow-status` β†’ suggests Level 4 -2. Phase 0: `document-project` (exhaustive) - **mandatory** -3. Phase 1: **Required** - - `brainstorm-project` β†’ explore multi-tenancy approaches - - `research` β†’ database sharding, tenant isolation, pricing models - - `product-brief` β†’ strategic document -4. Phase 2: `prd` β†’ comprehensive requirements -5. Phase 3: - - `architecture-review` β†’ full existing system review - - `integration-planning` β†’ phased migration strategy - - `create-architecture` β†’ multi-tenancy architecture - - `validate-architecture` β†’ external review - - `solutioning-gate-check` β†’ executive approval -6. Phase 4: Phased sprint-based implementation (50+ stories) +1. **Document:** Run `document-project` (Exhaustive) - **Mandatory** +2. **Analyze:** **Required** + - `brainstorm-project` - Explore multi-tenancy approaches + - `research` - Database sharding, tenant isolation, pricing + - `product-brief` - Strategic document +3. **Plan:** Load PM β†’ `prd` (comprehensive) +4. **Solution:** + - `create-architecture` - Full system architecture + - `integration-planning` - Phased migration strategy + - `create-architecture` - Multi-tenancy architecture + - `validate-architecture` - External review + - `solutioning-gate-check` - Executive approval +5. **Implement:** Phased sprint-based (50+ stories) **Time:** 3-6 months -## Troubleshooting Common Issues +--- -### Issue: AI Lacks Codebase Understanding +## Troubleshooting + +For complete troubleshooting, see [Troubleshooting Guide](./troubleshooting.md). + +### AI Agents Lack Codebase Understanding **Symptoms:** -- Generated plans don't align with existing patterns -- Suggestions ignore available components -- Integration approaches miss existing APIs +- Suggestions don't align with existing patterns +- Ignores available components +- Doesn't reference existing code **Solution:** -1. Run `document-project` with deep or exhaustive scan -2. Review `index.md` - ensure it captures key systems -3. If specific area is unclear, run deep-dive mode on that area -4. Provide additional context in PRD about existing systems +1. Run `document-project` with Deep scan +2. Verify `docs/index.md` exists +3. Check documentation completeness +4. Run deep-dive on specific areas if needed -### Issue: Have Documentation But Agents Can't Find It +### Have Documentation But Agents Can't Find It **Symptoms:** -- You have README, ARCHITECTURE.md, CONTRIBUTING.md, etc. -- But AI agents aren't using the information effectively -- Agents ask questions already answered in existing docs -- No `docs/index.md` file exists +- README.md, ARCHITECTURE.md exist +- AI agents ask questions already answered +- No `docs/index.md` file **Solution:** -1. **Quick fix:** Run the `index-docs` task (from `bmad/core/tasks/index-docs.xml`) - - Lightweight and fast (just indexes existing docs) - - Scans your docs directory - - Generates organized `index.md` with file descriptions - - Provides AI agents with structured navigation +- **Quick fix:** Run `index-docs` task (2-5min) +- **Comprehensive:** Run `document-project` workflow (10-30min) -2. **Comprehensive approach:** Run `document-project` with Deep/Exhaustive scan - - Discovers existing docs in Step 2 (shows you what it found) - - Generates NEW AI-friendly documentation from codebase analysis - - Creates index.md that links to BOTH existing docs AND new docs - - Useful when existing docs are good but need technical codebase analysis too - -**Why This Happens:** AI agents need a structured entry point (`index.md`) to efficiently navigate documentation. Without it, they must search through multiple files, often missing relevant context. - -### Issue: Plans Feel Too Complex for Simple Changes +### Integration Points Unclear **Symptoms:** -- Level 2+ workflow suggested for minor change -- Too much documentation overhead +- Not sure how to connect new code to existing +- Unsure which files to modify **Solution:** -1. Re-run `workflow-status` or `workflow-init` -2. Correct the level when prompted (choose Level 0 or 1) -3. Trust your judgment - BMad Method adapts to your choice -4. Skip optional phases (Analysis) +1. Ensure `document-project` captured existing architecture +2. Check `story-context` - should document integration points +3. In tech-spec/architecture - explicitly document: + - Which existing modules to modify + - What APIs/services to integrate with + - Data flow between new and existing code +4. Review architecture document for integration guidance -### Issue: Integration Points Unclear - -**Symptoms:** - -- Stories lack detail on connecting to existing systems -- Uncertainty about which existing code to modify - -**Solution:** - -1. Ensure Phase 0 documentation is complete -2. Run deep-dive on integration areas in `document-project` -3. In Phase 2, explicitly document integration points -4. In Phase 3 (if Level 3+), use `integration-planning` workflow -5. Create detailed `epic-tech-context` and `story-context` - -### Issue: Existing Tests Breaking +### Existing Tests Breaking **Symptoms:** - Regression test failures -- Existing functionality broken by changes +- Previously working functionality broken **Solution:** -1. Review existing test patterns in documentation -2. Use Test Architect workflows: - - `test-design` - Plan test strategy upfront - - `trace` - Map requirements to tests - - `test-review` - Validate before merging -3. Add regression testing to Definition of Done -4. Consider feature flags for gradual rollout +1. Review changes against existing patterns +2. Verify API contracts unchanged (unless intentionally versioned) +3. Run `test-review` workflow (TEA agent) +4. Add regression testing to DoD +5. Consider feature flags for gradual rollout -### Issue: Inconsistent Patterns Being Introduced +### Inconsistent Patterns Being Introduced **Symptoms:** -- New code doesn't match existing style -- Different architectural approach than existing modules +- New code style doesn't match existing +- Different architectural approach **Solution:** -1. Ensure `document-project` captured existing patterns -2. Review architecture documentation before Phase 4 -3. Use `story-context` to inject pattern guidance -4. Include pattern adherence in `code-review` checklist -5. Run retrospectives to identify pattern deviations +1. Check convention detection (Quick Spec Flow should detect patterns) +2. Review documentation - ensure `document-project` captured patterns +3. Use `story-context` - injects pattern guidance +4. Add to code-review checklist: pattern adherence, convention consistency +5. Run retrospective to identify deviations early -## Test Architect Integration +--- -The Test Architect (TEA) plays a critical role in brownfield projects to prevent regression and validate integration. +## Quick Reference -### Four-Stage Approach - -**Stage 1 (Before Development):** - -- Risk assessment identifying legacy dependencies -- Test design planning for regression + new features -- Integration point identification - -**Stage 2 (During Development):** - -- Requirements tracing validating existing functionality preservation -- NFR validation ensuring performance/security unchanged - -**Stage 3 (Code Review):** - -- Deep analysis of API contracts, data migrations -- Performance regression checks -- Integration point validation -- Dependency mapping - -**Stage 4 (Post-Review):** - -- Gate status updates -- Technical debt documentation - -### TEA Workflows for Brownfield - -| Workflow | Purpose | When to Use | -| ------------- | -------------------------- | ------------------------------------ | -| `test-design` | Plan testing strategy | After Phase 2, before implementation | -| `test-review` | Validate test coverage | During story review | -| `trace` | Map requirements to tests | After test implementation | -| `nfr-assess` | Check performance/security | Before major releases | -| `atdd` | Acceptance test planning | For user-facing features | - -### Risk Scoring for Brownfield - -TEA uses enhanced brownfield metrics: - -- **Regression Risk** = integration_points Γ— code_age -- **Data Risk** = migration_complexity Γ— data_volume -- **Performance Risk** = current_load Γ— added_complexity -- **Compatibility Risk** = api_consumers Γ— contract_changes - -**Automatic Thresholds:** - -- Score β‰₯9: Automatic failure (must mitigate) -- Score β‰₯6: Concern (requires mitigation plan) -- Score <6: Acceptable (document only) - -## Quick Reference Commands +### Commands by Phase ```bash -# Universal Entry Point (Always Start Here) -bmad analyst workflow-status - # Phase 0: Documentation (If Needed) -bmad analyst document-project -# β†’ Choose: Quick / Deep / Exhaustive +# Analyst agent: +document-project # Create comprehensive docs (10-30min) +# OR load index-docs task for existing docs (2-5min) # Phase 1: Analysis (Optional) -bmad analyst brainstorm-project # Explore solutions -bmad analyst research # Gather technical/market data -bmad analyst product-brief # Strategic planning +# Analyst agent: +brainstorm-project # Explore solutions +research # Gather data +product-brief # Strategic planning (BMad Method/Enterprise only) # Phase 2: Planning (Required) -bmad pm tech-spec # Level 0-1 only -bmad pm prd # Level 2-4 only +# PM agent: +tech-spec # Quick Flow track +prd # BMad Method/Enterprise tracks -# Phase 3: Solutioning (Levels 2-4) -bmad architect architecture-review # Review existing (L3-4) -bmad architect integration-planning # Plan integration (L3-4) -bmad architect create-architecture # Extend architecture (L2-4) -bmad architect solutioning-gate-check # Final approval (L3-4) +# Phase 3: Solutioning (BMad Method/Enterprise) +# Architect agent: +create-architecture # Extend architecture +solutioning-gate-check # Final validation -# Phase 4: Implementation (All Levels) -bmad sm sprint-planning # FIRST: Initialize tracking -bmad sm epic-tech-context # Create epic context -bmad sm create-story # Draft story -bmad sm story-context # Create story context -bmad dev dev-story # Implement story -bmad sm code-review # Review implementation -# (Manually update sprint-status.yaml to 'done') -bmad sm retrospective # After epic completion -bmad sm correct-course # If issues arise +# Phase 4: Implementation (All Tracks) +# SM agent: +sprint-planning # Initialize tracking +epic-tech-context # Epic context +create-story # Draft story +story-context # Story context -# Test Architect (Integration Throughout) -bmad tea test-design # Plan testing strategy -bmad tea test-review # Validate test coverage -bmad tea nfr-assess # Check performance/security +# DEV agent: +dev-story # Implement +code-review # Review + +# SM agent: +retrospective # After epic +correct-course # If issues ``` -## Key Files Reference +### Key Files -### Documentation Phase +**Phase 0 Output:** -- `docs/index.md` - **Master documentation index (REQUIRED for AI agents)** - Primary entry point -- `docs/project-overview.md` - Executive summary -- `docs/architecture.md` - Architecture analysis -- `docs/source-tree-analysis.md` - Annotated directory structure -- `docs/api-contracts.md` - API documentation (if applicable) -- `docs/data-models.md` - Database schemas (if applicable) -- `docs/deep-dive-{area}.md` - Area-specific deep dives -- Existing docs (README.md, ARCHITECTURE.md, etc.) - Incorporated and linked from index +- `docs/index.md` - **Master AI entry point (REQUIRED)** +- `docs/project-overview.md` +- `docs/architecture.md` +- `docs/source-tree-analysis.md` -### Planning Phase +**Phase 1-3 Tracking:** -- `bmm-workflow-status.md` - Phase 0-3 tracking -- `PRD.md` - Product requirements (L2-4) -- `epics.md` - Epic breakdown (L2-4) -- `tech-spec.md` - Technical specification (L0-2) +- `docs/bmm-workflow-status.yaml` - Progress tracker -### Solutioning Phase +**Phase 2 Planning:** -- `architecture.md` - Architecture extensions (L2-4) -- `integration-strategy.md` - Integration planning (L3-4) -- Validation and gate check reports +- `docs/tech-spec.md` (Quick Flow track) +- `docs/PRD.md` (BMad Method/Enterprise tracks) +- Epic breakdown -### Implementation Phase +**Phase 3 Architecture:** -- `sprint-status.yaml` - **Single source of truth** for Phase 4 -- `epic-{n}-context.md` - Epic technical contexts -- `stories/{epic}-{story}-{title}.md` - Story files -- `stories/{epic}-{story}-{title}-context.md` - Story contexts +- `docs/architecture.md` (BMad Method/Enterprise tracks) -## Comparison: v4 vs v6 Brownfield +**Phase 4 Implementation:** -### What Changed +- `docs/sprint-status.yaml` - **Single source of truth** +- `docs/epic-{n}-context.md` +- `docs/stories/{epic}-{story}-{title}.md` +- `docs/stories/{epic}-{story}-{title}-context.md` -**v4 Approach:** +### Decision Flowchart -- Task-based system with fixed workflows -- Manual tracking across multiple documents -- Heavy upfront documentation requirements -- Rigid phase progression +```mermaid +flowchart TD + START([Brownfield Project]) + CHECK{Has docs/
index.md?} -**v6 Improvements:** + START --> CHECK + CHECK -->|No| DOC[document-project
Deep scan] + CHECK -->|Yes| TRACK{What Track?} -- Scale-adaptive workflows (0-4 levels) -- Unified status tracking (`workflow-status`, `sprint-status.yaml`) -- Three-level scanning (quick/deep/exhaustive) -- Just-in-time context injection -- Flexible resumability -- Modular workflow paths -- Intelligent routing system + DOC --> TRACK -### Migration from v4 + TRACK -->|Quick Flow| TS[tech-spec] + TRACK -->|BMad Method| PRD[prd β†’ architecture] + TRACK -->|Enterprise| PRD2[prd β†’ arch + security/devops] -If you used BMad Method v4, here's how to transition: + TS --> IMPL[Phase 4
Implementation] + PRD --> IMPL + PRD2 --> IMPL -**Old v4 Task β†’ New v6 Workflow:** - -- `create-brownfield-prd` β†’ `prd` (with brownfield path) -- `document-project` β†’ `document-project` (enhanced with scan levels) -- Legacy task templates β†’ Replaced by workflow system -- Manual status tracking β†’ `sprint-status.yaml` + agents - -**Key Conceptual Shifts:** - -1. **Scale-adaptive planning** - Choose level based on complexity -2. **Phase 0 is conditional** - Only if documentation is lacking -3. **Sprint status is centralized** - Single YAML file for Phase 4 -4. **Context injection** - Epic and story contexts provide JIT guidance -5. **Workflow paths** - Clean separation by level and field type - -## Tips for Success - -### For Solo Developers - -1. Don't skip documentation phase - even if you know the code, AI agents need it -2. Choose appropriate scan level - deep scan is usually best for brownfield PRDs -3. Use Level 0-1 for small changes - don't over-engineer simple fixes -4. Trust the sprint planning system - it tracks everything automatically -5. Be specific when describing your work - helps system route to the right level - -### For Teams - -1. Document once, use everywhere - Phase 0 documentation serves entire team -2. Use sprint-status.yaml as single source of truth - no multiple tracking systems -3. Run retrospectives after epics - transfer learning to next stories -4. Coordinate parallel work - multiple stories can be in-progress if capacity allows -5. Establish clear communication about current iteration scope vs historical complexity - -### For Enterprise - -1. Phase 0 is mandatory - comprehensive documentation prevents costly mistakes -2. Include stakeholders early - Analysis phase (Phase 1) gathers business context -3. Use gate checks - `solutioning-gate-check` provides approval checkpoint -4. Plan phased rollout - feature flags and migration strategies are critical -5. Document architectural extensions - maintain system documentation as you evolve -6. Consider archiving completed planning artifacts to keep workspace clean - -## Support and Resources - -**Documentation:** - -- [BMM Workflows Guide](../src/modules/bmm/workflows/README.md) - Complete v6 workflow reference -- [Test Architect Guide](../src/modules/bmm/testarch/README.md) - Quality and testing strategy -- [BMM Module README](../src/modules/bmm/README.md) - Module overview - -**Community:** - -- Discord: [https://discord.gg/gk8jAdXWmj](https://discord.gg/gk8jAdXWmj) (#general-dev, #bugs-issues) -- GitHub Issues: [https://github.com/bmad-code-org/BMAD-METHOD/issues](https://github.com/bmad-code-org/BMAD-METHOD/issues) -- YouTube: [https://www.youtube.com/@BMadCode](https://www.youtube.com/@BMadCode) - -**Getting Started:** - -```bash -# Install BMad Method -npx bmad-method install - -# Start your first brownfield project -cd your-project -bmad analyst workflow-status + style START fill:#f9f,stroke:#333,stroke-width:2px + style DOC fill:#ffb,stroke:#333,stroke-width:2px + style IMPL fill:#bfb,stroke:#333,stroke-width:2px ``` --- -## Remember +## Prevention Tips -**Brownfield development** is about understanding and respecting what exists while thoughtfully extending it. BMad Method v6's scale-adaptive approach ensures you get the right level of planning and documentation without unnecessary overhead. +**Avoid issues before they happen:** -**Key Principles:** +1. βœ… **Always run document-project for brownfield** - Saves context issues later +2. βœ… **Use fresh chats for complex workflows** - Prevents hallucinations +3. βœ… **Verify files exist before workflows** - Check PRD, epics, stories present +4. βœ… **Read agent menu first** - Confirm agent has the workflow +5. βœ… **Start with simpler track if unsure** - Easy to upgrade (Quick Flow β†’ BMad Method) +6. βœ… **Keep status files updated** - Manual updates when needed +7. βœ… **Run retrospectives after epics** - Catch issues early +8. βœ… **Follow phase sequence** - Don't skip required phases -1. **Ask First, Infer Second**: The system asks about YOUR work first, then uses artifacts as context -2. **Scale Adapts**: From single fixes (Level 0) to enterprise expansions (Level 4) -3. **Documentation Matters**: AI agents need comprehensive context to work effectively -4. **Context Injection**: Epic and story contexts provide just-in-time guidance -5. **Sprint-Based Tracking**: Single source of truth keeps everyone aligned +--- -**Quick Start:** +## Related Documentation -```bash -cd your-brownfield-project -bmad analyst workflow-status +- **[Scale Adaptive System](./scale-adaptive-system.md)** - Understanding tracks and complexity +- **[Quick Spec Flow](./quick-spec-flow.md)** - Fast-track for Quick Flow +- **[Quick Start Guide](./quick-start.md)** - Getting started with BMM +- **[Glossary](./glossary.md)** - Key terminology +- **[FAQ](./faq.md)** - Common questions +- **[Troubleshooting](./troubleshooting.md)** - Problem resolution +- **[Workflows Guide](../workflows/README.md)** - Complete workflow reference -# System will guide you through: -# 1. What's your project called? -# 2. What are you working on? (if finds old work: "is this continuing old work or new work?") -# 3. Confirms detected level -# 4. Creates appropriate workflow -``` +--- -**The system is designed to understand YOUR current work and route you to the right workflows.** +## Support & Resources + +**Community:** + +- [Discord](https://discord.gg/gk8jAdXWmj) - #general-dev, #bugs-issues +- [GitHub Issues](https://github.com/bmad-code-org/BMAD-METHOD/issues) +- [YouTube Channel](https://www.youtube.com/@BMadCode) + +**Documentation:** + +- [BMM Workflows Guide](../workflows/README.md) +- [Test Architect Guide](../testarch/README.md) +- [BMM Module README](../README.md) + +--- + +_Brownfield development is about understanding and respecting what exists while thoughtfully extending it._ diff --git a/bmad/bmm/docs/enterprise-agentic-development.md b/bmad/bmm/docs/enterprise-agentic-development.md new file mode 100644 index 00000000..125bcd98 --- /dev/null +++ b/bmad/bmm/docs/enterprise-agentic-development.md @@ -0,0 +1,680 @@ +# Enterprise Agentic Development with BMad Method + +**The paradigm shift: From team-based story parallelism to individual epic ownership** + +**Reading Time:** ~18 minutes + +--- + +## Table of Contents + +- [The Paradigm Shift](#the-paradigm-shift) +- [The Evolving Role of Product Managers & UX Designers](#the-evolving-role-of-product-managers--ux-designers) +- [How BMad Method Enables PM/UX Technical Evolution](#how-bmad-method-enables-pmux-technical-evolution) +- [Team Collaboration Patterns](#team-collaboration-patterns) +- [Work Distribution Strategies](#work-distribution-strategies) +- [Enterprise Configuration with Git Submodules](#enterprise-configuration-with-git-submodules) +- [Best Practices](#best-practices) +- [Common Scenarios](#common-scenarios) + +--- + +## The Paradigm Shift + +### Traditional Agile: Team-Based Story Parallelism + +- **Epic duration:** 4-12 weeks across multiple sprints +- **Story duration:** 2-5 days per developer +- **Team size:** 5-9 developers working on same epic +- **Parallelization:** Multiple devs on stories within single epic +- **Coordination:** Constant - daily standups, merge conflicts, integration overhead + +**Example:** Payment Processing Epic + +- Sprint 1-2: Backend API (Dev A) +- Sprint 1-2: Frontend UI (Dev B) +- Sprint 2-3: Testing (Dev C) +- **Result:** 6-8 weeks, 3 developers, high coordination + +### Agentic Development: Individual Epic Ownership + +- **Epic duration:** Hours to days (not weeks) +- **Story duration:** 30 min to 4 hours with AI agent +- **Team size:** 1 developer + AI agents completes full epics +- **Parallelization:** Developers work on separate epics +- **Coordination:** Minimal - epic boundaries, async updates + +**Same Example:** Payment Processing Epic + +- Day 1 AM: Backend API stories (1 dev + agent, 3-4 stories) +- Day 1 PM: Frontend UI stories (same dev + agent, 2-3 stories) +- Day 2: Testing & deployment (same dev + agent, 2 stories) +- **Result:** 1-2 days, 1 developer, minimal coordination + +### The Core Difference + +**What changed:** AI agents collapse story duration from days to hours, making **epic-level ownership** practical. + +**Impact:** Single developer with BMad Method can deliver in 1 day what previously required full team and multiple sprints. + +--- + +## The Evolving Role of Product Managers & UX Designers + +### The Future is Now + +Product Managers and UX Designers are undergoing **the most significant transformation since the creation of these disciplines**. The emergence of AI agents is creating a new breed of technical product leaders who translate vision directly into working code. + +### From Spec Writers to Code Orchestrators + +**Traditional PM/UX (Pre-2025):** + +- Write PRDs, hand off to engineering +- Wait weeks/months for implementation +- Limited validation capabilities +- Non-technical role, heavy on process + +**Emerging PM/UX (2025+):** + +- Write AI-optimized PRDs that **feed agentic pipelines directly** +- Generate working prototypes in 10-15 minutes +- Review pull requests from AI agents +- Technical fluency is **table stakes**, not optional +- Orchestrate cloud-based AI agent teams + +### Industry Research (November 2025) + +- **56% of product professionals** cite AI/ML as top focus +- **AI agents automating** customer discovery, PRD creation, status reporting +- **PRD-to-Code automation** enables PMs to build and deploy apps in 10-15 minutes +- **By 2026**: Roles converging into "Full-Stack Product Lead" (PM + Design + Engineering) +- **Very high salaries** for AI agent PMs who orchestrate autonomous dev systems + +### Required Skills for Modern PMs/UX + +1. **AI Prompt Engineering** - Writing PRDs AI agents can execute autonomously +2. **Coding Literacy** - Understanding code structure, APIs, data flows (not production coding) +3. **Agentic Workflow Design** - Orchestrating multi-agent systems (planning β†’ design β†’ dev) +4. **Technical Architecture** - Reasoning frameworks, memory systems, tool integration +5. **Data Literacy** - Interpreting model outputs, spotting trends, identifying gaps +6. **Code Review** - Evaluating AI-generated PRs for correctness and vision alignment + +### What Remains Human + +**AI Can't Replace:** + +- Product vision (market dynamics, customer pain, strategic positioning) +- Empathy (deep user research, emotional intelligence, stakeholder management) +- Creativity (novel problem-solving, disruptive thinking) +- Judgment (prioritization decisions, trade-off analysis) +- Ethics (responsible AI use, privacy, accessibility) + +**What Changes:** + +- PMs/UX spend **more time on human elements** (AI handles routine execution) +- Barrier between "thinking" and "building" collapses +- Product leaders become **builder-thinkers**, not just spec writers + +### The Convergence + +- **PMs learning to code** with GitHub Copilot, Cursor, v0 +- **UX designers generating code** with UXPin Merge, Figma-to-code tools +- **Developers becoming orchestrators** reviewing AI output vs writing from scratch + +**The Bottom Line:** By 2026, successful PMs/UX will fluently operate in both vision and execution. **BMad Method provides the structured framework to make this transition.** + +--- + +## How BMad Method Enables PM/UX Technical Evolution + +BMad Method is specifically designed to position PMs and UX designers for this future. + +### 1. AI-Executable PRD Generation + +**PM Workflow:** + +```bash +bmad pm *create-prd +``` + +**BMad produces:** + +- Structured, machine-readable requirements +- Testable acceptance criteria per requirement +- Clear epic/story decomposition +- Technical context for AI agents + +**Why it matters:** Traditional PRDs are human-readable prose. BMad PRDs are **AI-executable work packages**. + +**PM Value:** Write once, automatically translated into agent-ready stories. No engineering bottleneck for translation. + +### 2. Automated Epic/Story Breakdown + +**PM Workflow:** + +```bash +bmad pm *create-epics-and-stories +``` + +**BMad produces:** + +- Epic files with clear objectives +- Story files with acceptance criteria, context, technical guidance +- Priority assignments (P0-P3) +- Dependency mapping + +**Why it matters:** Stories become **work packages for cloud AI agents**. Each story is self-contained with full context. + +**PM Value:** No more "story refinement sessions" with engineering. AI agents execute directly from BMad stories. + +### 3. Human-in-the-Loop Architecture + +**Architect/PM Workflow:** + +```bash +bmad architect *create-architecture +``` + +**BMad produces:** + +- System architecture aligned with PRD +- Architecture Decision Records (ADRs) +- Epic-specific technical guidance +- Integration patterns and standards + +**Why it matters:** PMs can **understand and validate** technical decisions. Architecture is conversational, not template-driven. + +**PM Value:** Technical fluency built through guided architecture process. PMs learn while creating. + +### 4. Cloud Agentic Pipeline (Emerging Pattern) + +**Current State (2025):** + +``` +PM writes BMad PRD + ↓ +create-epics-and-stories generates story queue + ↓ +Stories loaded by human developers + BMad agents + ↓ +Developers create PRs + ↓ +PM/Team reviews PRs + ↓ +Merge and deploy +``` + +**Near Future (2026):** + +``` +PM writes BMad PRD + ↓ +create-epics-and-stories generates story queue + ↓ +Stories automatically fed to cloud AI agent pool + ↓ +AI agents implement stories in parallel + ↓ +AI agents create pull requests + ↓ +PM/UX/Senior Devs review PRs + ↓ +Approved PRs auto-merge + ↓ +Continuous deployment to production +``` + +**Time Savings:** + +- **Traditional:** PM writes spec β†’ 2-4 weeks engineering β†’ review β†’ deploy (6-8 weeks) +- **BMad Agentic:** PM writes PRD β†’ AI agents implement β†’ review PRs β†’ deploy (2-5 days) + +### 5. UX Design Integration + +**UX Designer Workflow:** + +```bash +bmad ux *create-design +``` + +**BMad produces:** + +- Component-based design system +- Interaction patterns aligned with tech stack +- Accessibility guidelines +- Responsive design specifications + +**Why it matters:** Design specs become **implementation-ready** for AI agents. No "lost in translation" between design and dev. + +**UX Value:** Designs validated through working prototypes, not static mocks. Technical understanding built through BMad workflows. + +### 6. PM Technical Skills Development + +**BMad teaches PMs technical skills through:** + +- **Conversational workflows** - No pre-requisite knowledge, learn by doing +- **Architecture facilitation** - Understand system design through guided questions +- **Story context assembly** - See how code patterns inform implementation +- **Code review workflows** - Learn to evaluate code quality, patterns, standards + +**Example:** PM runs `create-architecture` workflow: + +- BMad asks about scale, performance, integrations +- PM answers business questions +- BMad explains technical implications +- PM learns architecture concepts while making decisions + +**Result:** PMs gain **working technical knowledge** without formal CS education. + +### 7. Organizational Leverage + +**Traditional Model:** + +- 1 PM β†’ supports 5-9 developers β†’ delivers 1-2 features/quarter + +**BMad Agentic Model:** + +- 1 PM β†’ writes BMad PRD β†’ 20-50 AI agents execute stories in parallel β†’ delivers 5-10 features/quarter + +**Leverage multiplier:** 5-10Γ— with same PM headcount. + +### 8. Quality Consistency + +**BMad ensures:** + +- AI agents follow architectural patterns consistently (via story-context) +- Code standards applied uniformly (via epic-tech-context) +- PRD traceability throughout implementation (via acceptance criteria) +- No "telephone game" between PM, design, and dev + +**PM Value:** What gets built **matches what was specified**, drastically reducing rework. + +### 9. Rapid Prototyping for Validation + +**PM Workflow (with BMad + Cursor/v0):** + +1. Use BMad to generate PRD structure and requirements +2. Extract key user flow from PRD +3. Feed to Cursor/v0 with BMad context +4. Working prototype in 10-15 minutes +5. Validate with users **before** committing to full development + +**Traditional:** Months of development to validate idea +**BMad Agentic:** Hours of development to validate idea + +### 10. Career Path Evolution + +**BMad positions PMs for emerging roles:** + +- **AI Agent Product Manager** - Orchestrate autonomous development systems +- **Full-Stack Product Lead** - Oversee product, design, engineering with AI leverage +- **Technical Product Strategist** - Bridge business vision and technical execution + +**Hiring advantage:** PMs using BMad demonstrate: + +- Technical fluency (can read architecture, validate tech decisions) +- AI-native workflows (structured requirements, agentic orchestration) +- Results (ship 5-10Γ— faster than peers) + +--- + +## Team Collaboration Patterns + +### Old Pattern: Story Parallelism + +**Traditional Agile:** + +``` +Epic: User Dashboard (8 weeks) +β”œβ”€ Story 1: Backend API (Dev A, Sprint 1-2) +β”œβ”€ Story 2: Frontend Layout (Dev B, Sprint 1-2) +β”œβ”€ Story 3: Data Viz (Dev C, Sprint 2-3) +└─ Story 4: Integration Testing (Team, Sprint 3-4) + +Challenge: Coordination overhead, merge conflicts, integration issues +``` + +### New Pattern: Epic Ownership + +**Agentic Development:** + +``` +Project: Analytics Platform (2-3 weeks) + +Developer A: +└─ Epic 1: User Dashboard (3 days, 12 stories sequentially with AI) + +Developer B: +└─ Epic 2: Admin Panel (4 days, 15 stories sequentially with AI) + +Developer C: +└─ Epic 3: Reporting Engine (5 days, 18 stories sequentially with AI) + +Benefit: Minimal coordination, epic-level ownership, clear boundaries +``` + +--- + +## Work Distribution Strategies + +### Strategy 1: Epic-Based (Recommended) + +**Best for:** 2-10 developers + +**Approach:** Each developer owns complete epics, works sequentially through stories + +**Example:** + +```yaml +epics: + - id: epic-1 + title: Payment Processing + owner: alice + stories: 8 + estimate: 2 days + + - id: epic-2 + title: User Dashboard + owner: bob + stories: 12 + estimate: 3 days +``` + +**Benefits:** Clear ownership, minimal conflicts, epic cohesion, reduced coordination + +### Strategy 2: Layer-Based + +**Best for:** Full-stack apps, specialized teams + +**Example:** + +``` +Frontend Dev: Epic 1 (Product Catalog UI), Epic 3 (Cart UI) +Backend Dev: Epic 2 (Product API), Epic 4 (Cart Service) +``` + +**Benefits:** Developers in expertise area, true parallel work, clear API contracts + +**Requirements:** Strong architecture phase, clear API contracts upfront + +### Strategy 3: Feature-Based + +**Best for:** Large teams (10+ developers) + +**Example:** + +``` +Team A (2 devs): Payments feature (4 epics) +Team B (2 devs): User Management feature (3 epics) +Team C (2 devs): Analytics feature (3 epics) +``` + +**Benefits:** Feature team autonomy, domain expertise, scalable to large orgs + +--- + +## Enterprise Configuration with Git Submodules + +### The Challenge + +**Problem:** Teams customize BMad (agents, workflows, configs) but don't want personal tooling in main repo. + +**Anti-pattern:** Adding `bmad/` to `.gitignore` breaks IDE tools, submodule management. + +### The Solution: Git Submodules + +**Benefits:** + +- BMad exists in project but tracked separately +- Each developer controls their own BMad version/config +- Optional team config sharing via submodule repo +- IDE tools maintain proper context + +### Setup (New Projects) + +**1. Create optional team config repo:** + +```bash +git init bmm-config +cd bmm-config +npx bmad-method install +# Customize for team standards +git commit -m "Team BMM config" +git push origin main +``` + +**2. Add submodule to project:** + +```bash +cd /path/to/your-project +git submodule add https://github.com/your-org/bmm-config.git bmad +git commit -m "Add BMM as submodule" +``` + +**3. Team members initialize:** + +```bash +git clone https://github.com/your-org/your-project.git +cd your-project +git submodule update --init --recursive +# Make personal customizations in bmad/ +``` + +### Daily Workflow + +**Work in main project:** + +```bash +cd /path/to/your-project +# BMad available at ./bmad/, load agents normally +``` + +**Update personal config:** + +```bash +cd bmad +# Make changes, commit locally, don't push unless sharing +``` + +**Update to latest team config:** + +```bash +cd bmad +git pull origin main +``` + +### Configuration Strategies + +**Option 1: Fully Personal** - No submodule, each dev installs independently, use `.gitignore` + +**Option 2: Team Baseline + Personal** - Submodule has team standards, devs add personal customizations locally + +**Option 3: Full Team Sharing** - All configs in submodule, team collaborates on improvements + +--- + +## Best Practices + +### 1. Epic Ownership + +- **Do:** Assign entire epic to one developer (context β†’ implementation β†’ retro) +- **Don't:** Split epics across multiple developers (coordination overhead, context loss) + +### 2. Dependency Management + +- **Do:** Identify epic dependencies in planning, document API contracts, complete prerequisites first +- **Don't:** Start dependent epic before prerequisite ready, change API contracts without coordination + +### 3. Communication Cadence + +**Traditional:** Daily standups essential +**Agentic:** Lighter coordination + +**Recommended:** + +- Daily async updates ("Epic 1, 60% complete, no blockers") +- Twice-weekly 15min sync +- Epic completion demos +- Sprint retro after all epics complete + +### 4. Branch Strategy + +```bash +feature/epic-1-payment-processing (Alice) +feature/epic-2-user-dashboard (Bob) +feature/epic-3-admin-panel (Carol) + +# PR and merge when epic complete +``` + +### 5. Testing Strategy + +- **Story-level:** Unit tests (DoD requirement, written by agent during dev-story) +- **Epic-level:** Integration tests across stories +- **Project-level:** E2E tests after multiple epics complete + +### 6. Documentation Updates + +- **Real-time:** `sprint-status.yaml` updated by workflows +- **Epic completion:** Update architecture docs, API docs, README if changed +- **Sprint completion:** Incorporate retrospective insights + +### 7. Metrics (Different from Traditional) + +**Traditional:** Story points per sprint, burndown charts +**Agentic:** Epics per week, stories per day, time to epic completion + +**Example velocity:** + +- Junior dev + AI: 1-2 epics/week (8-15 stories) +- Mid-level dev + AI: 2-3 epics/week (15-25 stories) +- Senior dev + AI: 3-5 epics/week (25-40 stories) + +--- + +## Common Scenarios + +### Scenario 1: Startup (2 Developers) + +**Project:** SaaS MVP (Level 3) + +**Distribution:** + +``` +Developer A: +β”œβ”€ Epic 1: Authentication (3 days) +β”œβ”€ Epic 3: Payment Integration (2 days) +└─ Epic 5: Admin Dashboard (3 days) + +Developer B: +β”œβ”€ Epic 2: Core Product Features (4 days) +β”œβ”€ Epic 4: Analytics (3 days) +└─ Epic 6: Notifications (2 days) + +Total: ~2 weeks +Traditional estimate: 3-4 months +``` + +**BMM Setup:** Direct installation, both use Claude Code, minimal customization + +### Scenario 2: Mid-Size Team (8 Developers) + +**Project:** Enterprise Platform (Level 4) + +**Distribution (Layer-Based):** + +``` +Backend (2 devs): 6 API epics +Frontend (2 devs): 6 UI epics +Full-stack (2 devs): 4 integration epics +DevOps (1 dev): 3 infrastructure epics +QA (1 dev): 1 E2E testing epic + +Total: ~3 weeks +Traditional estimate: 9-12 months +``` + +**BMM Setup:** Git submodule, team config repo, mix of Claude Code/Cursor users + +### Scenario 3: Large Enterprise (50+ Developers) + +**Project:** Multi-Product Platform + +**Organization:** + +- 5 product teams (8-10 devs each) +- 1 platform team (10 devs - shared services) +- 1 infrastructure team (5 devs) + +**Distribution (Feature-Based):** + +``` +Product Team A: Payments (10 epics, 2 weeks) +Product Team B: User Mgmt (12 epics, 2 weeks) +Product Team C: Analytics (8 epics, 1.5 weeks) +Product Team D: Admin Tools (10 epics, 2 weeks) +Product Team E: Mobile (15 epics, 3 weeks) + +Platform Team: Shared Services (continuous) +Infrastructure Team: DevOps (continuous) + +Total: 3-4 months +Traditional estimate: 2-3 years +``` + +**BMM Setup:** Each team has own submodule config, org-wide base config, variety of IDE tools + +--- + +## Summary + +### Key Transformation + +**Work Unit Changed:** + +- **Old:** Story = unit of work assignment +- **New:** Epic = unit of work assignment + +**Why:** AI agents collapse story duration (days β†’ hours), making epic ownership practical. + +### Velocity Impact + +- **Traditional:** Months for epic delivery, heavy coordination +- **Agentic:** Days for epic delivery, minimal coordination +- **Result:** 10-50Γ— productivity gains + +### PM/UX Evolution + +**BMad Method enables:** + +- PMs to write AI-executable PRDs +- UX designers to validate through working prototypes +- Technical fluency without CS degrees +- Orchestration of cloud AI agent teams +- Career evolution to Full-Stack Product Lead + +### Enterprise Adoption + +**Git submodules:** Best practice for BMM management across teams +**Team flexibility:** Mix of tools (Claude Code, Cursor, Windsurf) with shared BMM foundation +**Scalable patterns:** Epic-based, layer-based, feature-based distribution strategies + +### The Future (2026) + +PMs write BMad PRDs β†’ Stories auto-fed to cloud AI agents β†’ Parallel implementation β†’ Human review of PRs β†’ Continuous deployment + +**The future isn't AI replacing PMsβ€”it's AI-augmented PMs becoming 10Γ— more powerful.** + +--- + +## Related Documentation + +- [FAQ](./faq.md) - Common questions +- [Scale Adaptive System](./scale-adaptive-system.md) - Project levels explained +- [Quick Start Guide](./quick-start.md) - Getting started +- [Workflows Guide](../workflows/README.md) - Complete workflow reference +- [Agents Guide](./agents-guide.md) - Understanding BMad agents + +--- + +_BMad Method fundamentally changes how PMs work, how teams structure work, and how products get built. Understanding these patterns is essential for enterprise success in the age of AI agents._ diff --git a/bmad/bmm/docs/faq.md b/bmad/bmm/docs/faq.md new file mode 100644 index 00000000..ee8bd5bd --- /dev/null +++ b/bmad/bmm/docs/faq.md @@ -0,0 +1,589 @@ +# BMM Frequently Asked Questions + +Quick answers to common questions about the BMad Method Module. + +--- + +## Table of Contents + +- [Getting Started](#getting-started) +- [Choosing the Right Level](#choosing-the-right-level) +- [Workflows & Phases](#workflows--phases) +- [Planning Documents](#planning-documents) +- [Implementation](#implementation) +- [Brownfield Development](#brownfield-development) +- [Tools & Technical](#tools--technical) + +--- + +## Getting Started + +### Q: Do I always need to run workflow-init? + +**A:** No, once you learn the flow you can go directly to workflows. However, workflow-init is helpful because it: + +- Determines your project's appropriate level automatically +- Creates the tracking status file +- Routes you to the correct starting workflow + +For experienced users: use the [Quick Reference](./quick-start.md#quick-reference-agent--document-mapping) to go directly to the right agent/workflow. + +### Q: Why do I need fresh chats for each workflow? + +**A:** Context-intensive workflows (like brainstorming, PRD creation, architecture design) can cause AI hallucinations if run in sequence within the same chat. Starting fresh ensures the agent has maximum context capacity for each workflow. This is particularly important for: + +- Planning workflows (PRD, architecture) +- Analysis workflows (brainstorming, research) +- Complex story implementation + +Quick workflows like status checks can reuse chats safely. + +### Q: Can I skip workflow-status and just start working? + +**A:** Yes, if you already know your project level and which workflow comes next. workflow-status is mainly useful for: + +- New projects (guides initial setup) +- When you're unsure what to do next +- After breaks in work (reminds you where you left off) +- Checking overall progress + +### Q: What's the minimum I need to get started? + +**A:** For the fastest path: + +1. Install BMad Method: `npx bmad-method@alpha install` +2. For small changes: Load PM agent β†’ run tech-spec β†’ implement +3. For larger projects: Load PM agent β†’ run prd β†’ architect β†’ implement + +### Q: How do I know if I'm in Phase 1, 2, 3, or 4? + +**A:** Check your `bmm-workflow-status.md` file (created by workflow-init). It shows your current phase and progress. If you don't have this file, you can also tell by what you're working on: + +- **Phase 1** - Brainstorming, research, product brief (optional) +- **Phase 2** - Creating either a PRD or tech-spec (always required) +- **Phase 3** - Architecture design (Level 2-4 only) +- **Phase 4** - Actually writing code, implementing stories + +--- + +## Choosing the Right Level + +### Q: How do I know which level my project is? + +**A:** Use workflow-init for automatic detection, or self-assess using these keywords: + +- **Level 0:** "fix", "bug", "typo", "small change", "patch" β†’ 1 story +- **Level 1:** "simple", "basic", "small feature", "add" β†’ 2-10 stories +- **Level 2:** "dashboard", "several features", "admin panel" β†’ 5-15 stories +- **Level 3:** "platform", "integration", "complex", "system" β†’ 12-40 stories +- **Level 4:** "enterprise", "multi-tenant", "multiple products" β†’ 40+ stories + +When in doubt, start smaller. You can always run create-prd later if needed. + +### Q: Can I change levels mid-project? + +**A:** Yes! If you started at Level 1 but realize it's Level 2, you can run create-prd to add proper planning docs. The system is flexible - your initial level choice isn't permanent. + +### Q: What if workflow-init suggests the wrong level? + +**A:** You can override it! workflow-init suggests a level but always asks for confirmation. If you disagree, just say so and choose the level you think is appropriate. Trust your judgment. + +### Q: Do I always need architecture for Level 2? + +**A:** No, architecture is **optional** for Level 2. Only create architecture if you need system-level design. Many Level 2 projects work fine with just PRD + epic-tech-context created during implementation. + +### Q: What's the difference between Level 1 and Level 2? + +**A:** + +- **Level 1:** 1-10 stories, uses tech-spec (simpler, faster), no architecture +- **Level 2:** 5-15 stories, uses PRD (product-focused), optional architecture + +The overlap (5-10 stories) is intentional. Choose based on: + +- Need product-level planning? β†’ Level 2 +- Just need technical plan? β†’ Level 1 +- Multiple epics? β†’ Level 2 +- Single epic? β†’ Level 1 + +--- + +## Workflows & Phases + +### Q: What's the difference between workflow-status and workflow-init? + +**A:** + +- **workflow-status:** Checks existing status and tells you what's next (use when continuing work) +- **workflow-init:** Creates new status file and sets up project (use when starting new project) + +If status file exists, use workflow-status. If not, use workflow-init. + +### Q: Can I skip Phase 1 (Analysis)? + +**A:** Yes! Phase 1 is optional for all levels, though recommended for complex projects. Skip if: + +- Requirements are clear +- No research needed +- Time-sensitive work +- Small changes (Level 0-1) + +### Q: When is Phase 3 (Architecture) required? + +**A:** + +- **Level 0-1:** Never (skip entirely) +- **Level 2:** Optional (only if system design needed) +- **Level 3-4:** Required (comprehensive architecture mandatory) + +### Q: What happens if I skip a recommended workflow? + +**A:** Nothing breaks! Workflows are guidance, not enforcement. However, skipping recommended workflows (like architecture for Level 3) may cause: + +- Integration issues during implementation +- Rework due to poor planning +- Conflicting design decisions +- Longer development time overall + +### Q: How do I know when Phase 3 is complete and I can start Phase 4? + +**A:** For Level 3-4, run the solutioning-gate-check workflow. It validates that PRD, architecture, and UX (if applicable) are cohesive before implementation. Pass the gate check = ready for Phase 4. + +### Q: Can I run workflows in parallel or do they have to be sequential? + +**A:** Most workflows must be sequential within a phase: + +- Phase 1: brainstorm β†’ research β†’ product-brief (optional order) +- Phase 2: PRD must complete before moving forward +- Phase 3: architecture β†’ validate β†’ gate-check (sequential) +- Phase 4: Stories within an epic should generally be sequential, but stories in different epics can be parallel if you have capacity + +--- + +## Planning Documents + +### Q: What's the difference between tech-spec and epic-tech-context? + +**A:** + +- **Tech-spec (Level 0-1):** Created upfront in Planning Phase, serves as primary/only planning document, a combination of enough technical and planning information to drive a single or multiple files +- **Epic-tech-context (Level 2-4):** Created during Implementation Phase per epic, supplements PRD + Architecture + +Think of it as: tech-spec is for small projects (replaces PRD and architecture), epic-tech-context is for large projects (supplements PRD). + +### Q: Why no tech-spec at Level 2+? + +**A:** Level 2+ projects need product-level planning (PRD) and system-level design (Architecture), which tech-spec doesn't provide. Tech-spec is too narrow for coordinating multiple features. Instead, Level 2-4 uses: + +- PRD (product vision, requirements, epics) +- Architecture (system design) +- Epic-tech-context (detailed implementation per epic, created just-in-time) + +### Q: When do I create epic-tech-context? + +**A:** In Phase 4, right before implementing each epic. Don't create all epic-tech-context upfront - that's over-planning. Create them just-in-time using the epic-tech-context workflow as you're about to start working on that epic. + +**Why just-in-time?** You'll learn from earlier epics, and those learnings improve later epic-tech-context. + +### Q: Do I need a PRD for a bug fix? + +**A:** No! Bug fixes are typically Level 0 (single atomic change). Use Quick Spec Flow: + +- Load PM agent +- Run tech-spec workflow +- Implement immediately + +PRDs are for Level 2-4 projects with multiple features requiring product-level coordination. + +### Q: Can I skip the product brief? + +**A:** Yes, product brief is always optional. It's most valuable for: + +- Level 3-4 projects needing strategic direction +- Projects with stakeholders requiring alignment +- Novel products needing market research +- When you want to explore solution space before committing + +--- + +## Implementation + +### Q: Do I need story-context for every story? + +**A:** Technically no, but it's recommended. story-context provides implementation-specific guidance, references existing patterns, and injects expertise. Skip it only if: + +- Very simple story (self-explanatory) +- You're already expert in the area +- Time is extremely limited + +For Level 0-1 using tech-spec, story-context is less critical because tech-spec is already comprehensive. + +### Q: What if I don't create epic-tech-context before drafting stories? + +**A:** You can proceed without it, but you'll miss: + +- Epic-level technical direction +- Architecture guidance for this epic +- Integration strategy with other epics +- Common patterns to follow across stories + +epic-tech-context helps ensure stories within an epic are cohesive. + +### Q: How do I mark a story as done? + +**A:** You have two options: + +**Option 1: Use story-done workflow (Recommended)** + +1. Load SM agent +2. Run `story-done` workflow +3. Workflow automatically updates `sprint-status.yaml` (created by sprint-planning at Phase 4 start) +4. Moves story from current status β†’ `DONE` +5. Advances the story queue + +**Option 2: Manual update** + +1. After dev-story completes and code-review passes +2. Open `sprint-status.yaml` (created by sprint-planning) +3. Change the story status from `review` to `done` +4. Save the file + +The story-done workflow is faster and ensures proper status file updates. + +### Q: Can I work on multiple stories at once? + +**A:** Yes, if you have capacity! Stories within different epics can be worked in parallel. However, stories within the same epic are usually sequential because they build on each other. + +### Q: What if my story takes longer than estimated? + +**A:** That's normal! Stories are estimates. If implementation reveals more complexity: + +1. Continue working until DoD is met +2. Consider if story should be split +3. Document learnings in retrospective +4. Adjust future estimates based on this learning + +### Q: When should I run retrospective? + +**A:** After completing all stories in an epic (when epic is done). Retrospectives capture: + +- What went well +- What could improve +- Technical insights +- Input for next epic-tech-context + +Don't wait until project end - run after each epic for continuous improvement. + +--- + +## Brownfield Development + +### Q: What is brownfield vs greenfield? + +**A:** + +- **Greenfield:** New project, starting from scratch, clean slate +- **Brownfield:** Existing project, working with established codebase and patterns + +### Q: Do I have to run document-project for brownfield? + +**A:** Highly recommended, especially if: + +- No existing documentation +- Documentation is outdated +- AI agents need context about existing code +- Level 2-4 complexity + +You can skip it if you have comprehensive, up-to-date documentation including `docs/index.md`. + +### Q: What if I forget to run document-project on brownfield? + +**A:** Workflows will lack context about existing code. You may get: + +- Suggestions that don't match existing patterns +- Integration approaches that miss existing APIs +- Architecture that conflicts with current structure + +Run document-project and restart planning with proper context. + +### Q: Can I use Quick Spec Flow for brownfield projects? + +**A:** Yes! Quick Spec Flow works great for brownfield. It will: + +- Auto-detect your existing stack +- Analyze brownfield code patterns +- Detect conventions and ask for confirmation +- Generate context-rich tech-spec that respects existing code + +Perfect for bug fixes and small features in existing codebases. + +### Q: How does workflow-init handle brownfield with old planning docs? + +**A:** workflow-init asks about YOUR current work first, then uses old artifacts as context: + +1. Shows what it found (old PRD, epics, etc.) +2. Asks: "Is this work in progress, previous effort, or proposed work?" +3. If previous effort: Asks you to describe your NEW work +4. Determines level based on YOUR work, not old artifacts + +This prevents old Level 3 PRDs from forcing Level 3 workflow for new Level 0 bug fix. + +### Q: What if my existing code doesn't follow best practices? + +**A:** Quick Spec Flow detects your conventions and asks: "Should I follow these existing conventions?" You decide: + +- **Yes** β†’ Maintain consistency with current codebase +- **No** β†’ Establish new standards (document why in tech-spec) + +BMM respects your choice - it won't force modernization, but it will offer it. + +--- + +## Tools & Technical + +### Q: Why are my Mermaid diagrams not rendering? + +**A:** Common issues: + +1. Missing language tag: Use ` ```mermaid` not just ` ``` ` +2. Syntax errors in diagram (validate at mermaid.live) +3. Tool doesn't support Mermaid (check your Markdown renderer) + +All BMM docs use valid Mermaid syntax that should render in GitHub, VS Code, and most IDEs. + +### Q: Can I use BMM with GitHub Copilot / Cursor / other AI tools? + +**A:** Yes! BMM is complementary. BMM handles: + +- Project planning and structure +- Workflow orchestration +- Agent Personas and expertise +- Documentation generation +- Quality gates + +Your AI coding assistant handles: + +- Line-by-line code completion +- Quick refactoring +- Test generation + +Use them together for best results. + +### Q: What IDEs/tools support BMM? + +**A:** BMM requires tools with **agent mode** and access to **high-quality LLM models** that can load and follow complex workflows, then properly implement code changes. + +**Recommended Tools:** + +- **Claude Code** ⭐ **Best choice** + - Sonnet 4.5 (excellent workflow following, coding, reasoning) + - Opus (maximum context, complex planning) + - Native agent mode designed for BMM workflows + +- **Cursor** + - Supports Anthropic (Claude) and OpenAI models + - Agent mode with composer + - Good for developers who prefer Cursor's UX + +- **Windsurf** + - Multi-model support + - Agent capabilities + - Suitable for BMM workflows + +**What Matters:** + +1. **Agent mode** - Can load long workflow instructions and maintain context +2. **High-quality LLM** - Models ranked high on SWE-bench (coding benchmarks) +3. **Model selection** - Access to Claude Sonnet 4.5, Opus, or GPT-4o class models +4. **Context capacity** - Can handle large planning documents and codebases + +**Why model quality matters:** BMM workflows require LLMs that can follow multi-step processes, maintain context across phases, and implement code that adheres to specifications. Tools with weaker models will struggle with workflow adherence and code quality. + +See [IDE Setup Guides](../../../docs/ide-info/) for configuration specifics. + +### Q: Can I customize agents? + +**A:** Yes! Agents are installed as markdown files with XML-style content (optimized for LLMs, readable by any model). Create customization files in `bmad/_cfg/agents/[agent-name].customize.yaml` to override default behaviors while keeping core functionality intact. See agent documentation for customization options. + +**Note:** While source agents in this repo are YAML, they install as `.md` files with XML-style tags - a format any LLM can read and follow. + +### Q: What happens to my planning docs after implementation? + +**A:** Keep them! They serve as: + +- Historical record of decisions +- Onboarding material for new team members +- Reference for future enhancements +- Audit trail for compliance + +For enterprise projects (Level 4), consider archiving completed planning artifacts to keep workspace clean. + +### Q: Can I use BMM for non-software projects? + +**A:** BMM is optimized for software development, but the methodology principles (scale-adaptive planning, just-in-time design, context injection) can apply to other complex project types. You'd need to adapt workflows and agents for your domain. + +--- + +## Advanced Questions + +### Q: What if my project grows from Level 1 to Level 3? + +**A:** Totally fine! When you realize scope has grown: + +1. Run create-prd to add product-level planning +2. Run create-architecture for system design +3. Use existing tech-spec as input for PRD +4. Continue with updated level + +The system is flexible - growth is expected. + +### Q: Can I mix greenfield and brownfield approaches? + +**A:** Yes! Common scenario: adding new greenfield feature to brownfield codebase. Approach: + +1. Run document-project for brownfield context +2. Use greenfield workflows for new feature planning +3. Explicitly document integration points between new and existing +4. Test integration thoroughly + +### Q: How do I handle urgent hotfixes during a sprint? + +**A:** Use correct-course workflow or just: + +1. Save your current work state +2. Load PM agent β†’ quick tech-spec for hotfix +3. Implement hotfix (Level 0 flow) +4. Deploy hotfix +5. Return to original sprint work + +Level 0 Quick Spec Flow is perfect for urgent fixes. + +### Q: What if I disagree with the workflow's recommendations? + +**A:** Workflows are guidance, not enforcement. If a workflow recommends something that doesn't make sense for your context: + +- Explain your reasoning to the agent +- Ask for alternative approaches +- Skip the recommendation if you're confident +- Document why you deviated (for future reference) + +Trust your expertise - BMM supports your decisions. + +### Q: Can multiple developers work on the same BMM project? + +**A:** Yes! But the paradigm is fundamentally different from traditional agile teams. + +**Key Difference:** + +- **Traditional:** Multiple devs work on stories within one epic (months) +- **Agentic:** Each dev owns complete epics (days) + +**In traditional agile:** A team of 5 devs might spend 2-3 months on a single epic, with each dev owning different stories. + +**With BMM + AI agents:** A single dev can complete an entire epic in 1-3 days. What used to take months now takes days. + +**Team Work Distribution:** + +- **Recommended:** Split work by **epic** (not story) +- Each developer owns complete epics end-to-end +- Parallel work happens at epic level +- Minimal coordination needed + +**For full-stack apps:** + +- Frontend and backend can be separate epics (unusual in traditional agile) +- Frontend dev owns all frontend epics +- Backend dev owns all backend epics +- Works because delivery is so fast + +**Enterprise Considerations:** + +- Use **git submodules** for BMM installation (not .gitignore) +- Allows personal configurations without polluting main repo +- Teams may use different AI tools (Claude Code, Cursor, etc.) +- Developers may follow different methods or create custom agents/workflows + +**Quick Tips:** + +- Share `sprint-status.yaml` (single source of truth) +- Assign entire epics to developers (not individual stories) +- Coordinate at epic boundaries, not story level +- Use git submodules for BMM in enterprise settings + +**For comprehensive coverage of enterprise team collaboration, work distribution strategies, git submodule setup, and velocity expectations, see:** + +πŸ‘‰ **[Enterprise Agentic Development Guide](./enterprise-agentic-development.md)** + +### Q: What is party mode and when should I use it? + +**A:** Party mode is a unique multi-agent collaboration feature where ALL your installed agents (19+ from BMM, CIS, BMB, custom modules) discuss your challenges together in real-time. + +**How it works:** + +1. Run `/bmad:core:workflows:party-mode` (or `*party-mode` from any agent) +2. Introduce your topic +3. BMad Master selects 2-3 most relevant agents per message +4. Agents cross-talk, debate, and build on each other's ideas + +**Best for:** + +- Strategic decisions with trade-offs (architecture choices, tech stack, scope) +- Creative brainstorming (game design, product innovation, UX ideation) +- Cross-functional alignment (epic kickoffs, retrospectives, phase transitions) +- Complex problem-solving (multi-faceted challenges, risk assessment) + +**Example parties:** + +- **Product Strategy:** PM + Innovation Strategist (CIS) + Analyst +- **Technical Design:** Architect + Creative Problem Solver (CIS) + Game Architect +- **User Experience:** UX Designer + Design Thinking Coach (CIS) + Storyteller (CIS) + +**Why it's powerful:** + +- Diverse perspectives (technical, creative, strategic) +- Healthy debate reveals blind spots +- Emergent insights from agent interaction +- Natural collaboration across modules + +**For complete documentation:** + +πŸ‘‰ **[Party Mode Guide](./party-mode.md)** - How it works, when to use it, example compositions, best practices + +--- + +## Getting Help + +### Q: Where do I get help if my question isn't answered here? + +**A:** + +1. Check [Troubleshooting Guide](./troubleshooting.md) for common issues +2. Search [Complete Documentation](./README.md) for related topics +3. Ask in [Discord Community](https://discord.gg/gk8jAdXWmj) (#general-dev) +4. Open a [GitHub Issue](https://github.com/bmad-code-org/BMAD-METHOD/issues) +5. Watch [YouTube Tutorials](https://www.youtube.com/@BMadCode) + +### Q: How do I report a bug or request a feature? + +**A:** Open a GitHub issue at: https://github.com/bmad-code-org/BMAD-METHOD/issues + +Please include: + +- BMM version (check your installed version) +- Steps to reproduce (for bugs) +- Expected vs actual behavior +- Relevant workflow or agent involved + +--- + +## Related Documentation + +- [Quick Start Guide](./quick-start.md) - Get started with BMM +- [Glossary](./glossary.md) - Terminology reference +- [Troubleshooting](./troubleshooting.md) - Problem resolution +- [Scale Adaptive System](./scale-adaptive-system.md) - Understanding levels +- [Brownfield Guide](./brownfield-guide.md) - Existing codebase workflows + +--- + +**Have a question not answered here?** Please [open an issue](https://github.com/bmad-code-org/BMAD-METHOD/issues) or ask in [Discord](https://discord.gg/gk8jAdXWmj) so we can add it! diff --git a/bmad/bmm/docs/glossary.md b/bmad/bmm/docs/glossary.md new file mode 100644 index 00000000..59652d1a --- /dev/null +++ b/bmad/bmm/docs/glossary.md @@ -0,0 +1,321 @@ +# BMM Glossary + +Comprehensive terminology reference for the BMad Method Module. + +--- + +## Navigation + +- [Core Concepts](#core-concepts) +- [Scale & Complexity](#scale--complexity) +- [Planning Documents](#planning-documents) +- [Workflow & Phases](#workflow--phases) +- [Agents & Roles](#agents--roles) +- [Status & Tracking](#status--tracking) +- [Project Types](#project-types) +- [Implementation Terms](#implementation-terms) + +--- + +## Core Concepts + +### BMM (BMad Method Module) + +Core orchestration system for AI-driven agile development, providing comprehensive lifecycle management through specialized agents and workflows. + +### BMad Method + +The complete methodology for AI-assisted software development, encompassing planning, architecture, implementation, and quality assurance workflows that adapt to project complexity. + +### Scale-Adaptive System + +BMad Method's intelligent workflow orchestration that automatically adjusts planning depth, documentation requirements, and implementation processes based on project needs through three distinct planning tracks (Quick Flow, BMad Method, Enterprise Method). + +### Agent + +A specialized AI persona with specific expertise (PM, Architect, SM, DEV, TEA) that guides users through workflows and creates deliverables. Agents have defined capabilities, communication styles, and workflow access. + +### Workflow + +A multi-step guided process that orchestrates AI agent activities to produce specific deliverables. Workflows are interactive and adapt to user context. + +--- + +## Scale & Complexity + +### Quick Flow Track + +Fast implementation track using tech-spec planning only. Best for bug fixes, small features, and changes with clear scope. Typical range: 1-15 stories. No architecture phase needed. Examples: bug fixes, OAuth login, search features. + +### BMad Method Track + +Full product planning track using PRD + Architecture + UX. Best for products, platforms, and complex features requiring system design. Typical range: 10-50+ stories. Examples: admin dashboards, e-commerce platforms, SaaS products. + +### Enterprise Method Track + +Extended enterprise planning track adding Security Architecture, DevOps Strategy, and Test Strategy to BMad Method. Best for enterprise requirements, compliance needs, and multi-tenant systems. Typical range: 30+ stories. Examples: multi-tenant platforms, compliance-driven systems, mission-critical applications. + +### Planning Track + +The methodology path (Quick Flow, BMad Method, or Enterprise Method) chosen for a project based on planning needs, complexity, and requirements rather than story count alone. + +**Note:** Story counts are guidance, not definitions. Tracks are determined by what planning the project needs, not story math. + +--- + +## Planning Documents + +### Tech-Spec (Technical Specification) + +**Quick Flow track only.** Comprehensive technical plan created upfront that serves as the primary planning document for small changes or features. Contains problem statement, solution approach, file-level changes, stack detection (brownfield), testing strategy, and developer resources. + +### Epic-Tech-Context (Epic Technical Context) + +**BMad Method/Enterprise tracks only.** Detailed technical planning document created during implementation (just-in-time) for each epic. Supplements PRD + Architecture with epic-specific implementation details, code-level design decisions, and integration points. + +**Key Difference:** Tech-spec (Quick Flow) is created upfront and is the only planning doc. Epic-tech-context (BMad Method/Enterprise) is created per epic during implementation and supplements PRD + Architecture. + +### PRD (Product Requirements Document) + +**BMad Method/Enterprise tracks.** Product-level planning document containing vision, goals, feature requirements, epic breakdown, success criteria, and UX considerations. Replaces tech-spec for larger projects that need product planning. + +### Architecture Document + +**BMad Method/Enterprise tracks.** System-wide design document defining structure, components, interactions, data models, integration patterns, security, performance, and deployment. + +**Scale-Adaptive:** Architecture complexity scales with track - BMad Method is lightweight to moderate, Enterprise Method is comprehensive with security/devops/test strategies. + +### Epics + +High-level feature groupings that contain multiple related stories. Typically span 5-15 stories each and represent cohesive functionality (e.g., "User Authentication Epic"). + +### Product Brief + +Optional strategic planning document created in Phase 1 (Analysis) that captures product vision, market context, user needs, and high-level requirements before detailed planning. + +### GDD (Game Design Document) + +Game development equivalent of PRD, created by Game Designer agent for game projects. + +--- + +## Workflow & Phases + +### Phase 0: Documentation (Prerequisite) + +**Conditional phase for brownfield projects.** Creates comprehensive codebase documentation before planning. Only required if existing documentation is insufficient for AI agents. + +### Phase 1: Analysis (Optional) + +Discovery and research phase including brainstorming, research workflows, and product brief creation. Optional for Quick Flow, recommended for BMad Method, required for Enterprise Method. + +### Phase 2: Planning (Required) + +**Always required.** Creates formal requirements and work breakdown. Routes to tech-spec (Quick Flow) or PRD (BMad Method/Enterprise) based on selected track. + +### Phase 3: Solutioning (Track-Dependent) + +Architecture design phase. Required for BMad Method and Enterprise Method tracks. Includes architecture creation, validation, and gate checks. + +### Phase 4: Implementation (Required) + +Sprint-based development through story-by-story iteration. Uses sprint-planning, epic-tech-context, create-story, story-context, dev-story, code-review, and retrospective workflows. + +### Quick Spec Flow + +Fast-track workflow system for Quick Flow track projects that goes straight from idea to tech-spec to implementation, bypassing heavy planning. Designed for bug fixes, small features, and rapid prototyping. + +### Just-In-Time Design + +Pattern where epic-tech-context is created during implementation (Phase 4) right before working on each epic, rather than all upfront. Enables learning and adaptation. + +### Context Injection + +Dynamic technical guidance generated for each story via epic-tech-context and story-context workflows, providing exact expertise when needed without upfront over-planning. + +--- + +## Agents & Roles + +### PM (Product Manager) + +Agent responsible for creating PRDs, tech-specs, and managing product requirements. Primary agent for Phase 2 planning. + +### Analyst (Business Analyst) + +Agent that initializes workflows, conducts research, creates product briefs, and tracks progress. Often the entry point for new projects. + +### Architect + +Agent that designs system architecture, creates architecture documents, performs technical reviews, and validates designs. Primary agent for Phase 3 solutioning. + +### SM (Scrum Master) + +Agent that manages sprints, creates stories, generates contexts, and coordinates implementation. Primary orchestrator for Phase 4 implementation. + +### DEV (Developer) + +Agent that implements stories, writes code, runs tests, and performs code reviews. Primary implementer in Phase 4. + +### TEA (Test Architect) + +Agent responsible for test strategy, quality gates, NFR assessment, and comprehensive quality assurance. Integrates throughout all phases. + +### Technical Writer + +Agent specialized in creating and maintaining high-quality technical documentation. Expert in documentation standards, information architecture, and professional technical writing. The agent's internal name is "paige" but is presented as "Technical Writer" to users. + +### UX Designer + +Agent that creates UX design documents, interaction patterns, and visual specifications for UI-heavy projects. + +### Game Designer + +Specialized agent for game development projects. Creates game design documents (GDD) and game-specific workflows. + +### BMad Master + +Meta-level orchestrator agent from BMad Core. Facilitates party mode, lists available tasks and workflows, and provides high-level guidance across all modules. + +### Party Mode + +Multi-agent collaboration feature where all installed agents (19+ from BMM, CIS, BMB, custom modules) discuss challenges together in real-time. BMad Master orchestrates, selecting 2-3 relevant agents per message for natural cross-talk and debate. Best for strategic decisions, creative brainstorming, cross-functional alignment, and complex problem-solving. See [Party Mode Guide](./party-mode.md). + +--- + +## Status & Tracking + +### bmm-workflow-status.yaml + +**Phases 1-3.** Tracking file that shows current phase, completed workflows, progress, and next recommended actions. Created by workflow-init, updated automatically. + +### sprint-status.yaml + +**Phase 4 only.** Single source of truth for implementation tracking. Contains all epics, stories, and retrospectives with current status for each. Created by sprint-planning, updated by agents. + +### Story Status Progression + +``` +backlog β†’ drafted β†’ ready-for-dev β†’ in-progress β†’ review β†’ done +``` + +- **backlog** - Story exists in epic but not yet drafted +- **drafted** - Story file created by SM via create-story +- **ready-for-dev** - Story has context, ready for DEV via story-context +- **in-progress** - DEV is implementing via dev-story +- **review** - Implementation complete, awaiting code-review +- **done** - Completed with DoD met + +### Epic Status Progression + +``` +backlog β†’ contexted +``` + +- **backlog** - Epic exists in planning docs but no context yet +- **contexted** - Epic has technical context via epic-tech-context + +### Retrospective + +Workflow run after completing each epic to capture learnings, identify improvements, and feed insights into next epic planning. Critical for continuous improvement. + +--- + +## Project Types + +### Greenfield + +New project starting from scratch with no existing codebase. Freedom to establish patterns, choose stack, and design from clean slate. + +### Brownfield + +Existing project with established codebase, patterns, and constraints. Requires understanding existing architecture, respecting established conventions, and planning integration with current systems. + +**Critical:** Brownfield projects should run document-project workflow BEFORE planning to ensure AI agents have adequate context about existing code. + +### document-project Workflow + +**Brownfield prerequisite.** Analyzes and documents existing codebase, creating comprehensive documentation including project overview, architecture analysis, source tree, API contracts, and data models. Three scan levels: quick, deep, exhaustive. + +--- + +## Implementation Terms + +### Story + +Single unit of implementable work with clear acceptance criteria, typically 2-8 hours of development effort. Stories are grouped into epics and tracked in sprint-status.yaml. + +### Story File + +Markdown file containing story details: description, acceptance criteria, technical notes, dependencies, implementation guidance, and testing requirements. + +### Story Context + +Technical guidance document created via story-context workflow that provides implementation-specific context, references existing patterns, suggests approaches, and injects expertise for the specific story. + +### Epic Context + +Technical planning document created via epic-tech-context workflow before drafting stories within an epic. Provides epic-level technical direction, architecture notes, and implementation strategy. + +### Sprint Planning + +Workflow that initializes Phase 4 implementation by creating sprint-status.yaml, extracting all epics/stories from planning docs, and setting up tracking infrastructure. + +### Gate Check + +Validation workflow (solutioning-gate-check) run before Phase 4 to ensure PRD, architecture, and UX documents are cohesive with no gaps or contradictions. Required for BMad Method and Enterprise Method tracks. + +### DoD (Definition of Done) + +Criteria that must be met before marking a story as done. Typically includes: implementation complete, tests written and passing, code reviewed, documentation updated, and acceptance criteria validated. + +### Shard / Sharding + +**For runtime LLM optimization only (NOT human docs).** Splitting large planning documents (PRD, epics, architecture) into smaller section-based files to improve workflow efficiency. Phase 1-3 workflows load entire sharded documents transparently. Phase 4 workflows selectively load only needed sections for massive token savings. + +--- + +## Additional Terms + +### Workflow Status + +Universal entry point workflow that checks for existing status file, displays current phase/progress, and recommends next action based on project state. + +### Workflow Init + +Initialization workflow that creates bmm-workflow-status.yaml, detects greenfield vs brownfield, determines planning track, and sets up appropriate workflow path. + +### Track Selection + +Automatic analysis by workflow-init that uses keyword analysis, complexity indicators, and project requirements to suggest appropriate track (Quick Flow, BMad Method, or Enterprise Method). User can override suggested track. + +### Correct Course + +Workflow run during Phase 4 when significant changes or issues arise. Analyzes impact, proposes solutions, and routes to appropriate remediation workflows. + +### Migration Strategy + +Plan for handling changes to existing data, schemas, APIs, or patterns during brownfield development. Critical for ensuring backward compatibility and smooth rollout. + +### Feature Flags + +Implementation technique for brownfield projects that allows gradual rollout of new functionality, easy rollback, and A/B testing. Recommended for BMad Method and Enterprise brownfield changes. + +### Integration Points + +Specific locations where new code connects with existing systems. Must be documented explicitly in brownfield tech-specs and architectures. + +### Convention Detection + +Quick Spec Flow feature that automatically detects existing code style, naming conventions, patterns, and frameworks from brownfield codebases, then asks user to confirm before proceeding. + +--- + +## Related Documentation + +- [Quick Start Guide](./quick-start.md) - Learn BMM basics +- [Scale Adaptive System](./scale-adaptive-system.md) - Deep dive on tracks and complexity +- [Brownfield Guide](./brownfield-guide.md) - Working with existing codebases +- [Quick Spec Flow](./quick-spec-flow.md) - Fast-track for Quick Flow track +- [FAQ](./faq.md) - Common questions +- [Troubleshooting](./troubleshooting.md) - Problem resolution diff --git a/bmad/bmm/docs/party-mode.md b/bmad/bmm/docs/party-mode.md new file mode 100644 index 00000000..588851d8 --- /dev/null +++ b/bmad/bmm/docs/party-mode.md @@ -0,0 +1,224 @@ +# Party Mode: Multi-Agent Collaboration + +**Get all your AI agents in one conversation** + +--- + +## What is Party Mode? + +Ever wanted to gather your entire AI team in one room and see what happens? That's party mode. + +Type `/bmad:core:workflows:party-mode` (or `*party-mode` from any agent), and suddenly you've got **all your AI agents** in one conversation. PM, Architect, DEV, UX Designer, the CIS creative agents - everyone shows up. + +**Why it's useful:** + +- **After complex workflows** - Debrief with the whole team about what worked, what didn't +- **Big decisions with tradeoffs** - Get technical, creative, and strategic perspectives simultaneously +- **Brainstorming sessions** - Watch ideas evolve through cross-pollination +- **When things go wrong** - Call out failures, watch agents defend their decisions, let them debate whose fault it was (oddly therapeutic) +- **Sprint retrospectives** - Party mode powers the retrospective workflow +- **Sprint planning** - Multi-agent collaboration for planning sessions + +**Future use:** Advanced elicitation workflows will leverage party mode for sophisticated requirement gathering. + +--- + +## How It Works + +**The basics:** + +1. Party mode reads `bmad/_cfg/agent-manifest.csv` +2. Loads ALL installed agents (already includes your customizations from install) +3. BMad Master orchestrates - picks 2-3 relevant agents per message based on topic +4. Agents respond in character, can agree/disagree/build on each other's ideas +5. Discussion continues until you type "exit" or reach natural conclusion + +**That's it.** No complex merging, no runtime magic. Just agents talking. + +--- + +## Quick Start + +```bash +# Trigger party mode +/bmad:core:workflows:party-mode + +# OR from any agent context +*party-mode + +# During party +Ask questions, respond to agents, direct the conversation + +# Exit +Type: exit +``` + +--- + +## Fun Examples + +### Example 1: Calling Out Bad Architecture + +**You:** "Okay team, our last sprint was a disaster. The authentication service went down three times. Who screwed this up?" + +**Architect (Winston):** "The design was sound - distributed authentication with proper fallbacks. If implementation deviated from the spec..." + +**DEV (Amelia):** "I followed the architecture doc exactly. The spec didn't account for concurrent session invalidation race conditions." + +**PM (John):** "Both of you missed the bigger issue - we didn't validate session management requirements in the PRD. This is on me for not catching it." + +**TEA (Murat):** "And I should've caught this in integration tests. The test scenarios didn't cover concurrent invalidation." + +_(Watch them debate whose fault it really was - it's therapeutic)_ + +--- + +### Example 2: Creative Brainstorming + +**You:** "How do we make onboarding feel magical instead of boring?" + +**UX Designer (Sally):** "Start with progressive disclosure - reveal features as users need them, not all at once in a tutorial." + +**Storyteller (CIS):** "What if onboarding was a story? Each step reveals a character's journey - the user IS the hero." + +**Innovation Strategist (CIS):** "Take it further - gamify with unlockable achievements. But make them meaningful, not arbitrary badges." + +**Game Designer:** "Building on that - what if the first 'quest' is actually solving a real user problem? They learn by doing something valuable." + +_(Ideas cross-pollinate and evolve)_ + +--- + +### Example 3: Technical Decision + +**You:** "Monolith or microservices for MVP?" + +**Architect:** "Start monolith. Microservices add complexity you don't need at 1000 users." + +**PM:** "Agree. Time to market matters more than theoretical scalability." + +**DEV:** "Monolith with clear module boundaries. We can extract services later if needed." + +**Innovation Strategist:** "Contrarian take - if your differentiator IS scalability, build for it now. Otherwise Architect's right." + +_(Multiple perspectives reveal the right answer)_ + +--- + +## When NOT to Use Party Mode + +**Skip party mode for:** + +- Simple implementation questions β†’ Use DEV agent +- Document review β†’ Use Technical Writer +- Workflow status checks β†’ Use any agent + `*workflow-status` +- Single-domain questions β†’ Use specialist agent + +**Use party mode for:** + +- Multi-perspective decisions +- Creative collaboration +- Post-mortems and retrospectives +- Sprint planning sessions +- Complex problem-solving + +--- + +## Agent Customization + +Party mode uses agents from `bmad/[module]/agents/*.md` - these already include any customizations you applied during install. + +**To customize agents for party mode:** + +1. Create customization file: `bmad/_cfg/agents/bmm-pm.customize.yaml` +2. Run `npx bmad-method install` to rebuild agents +3. Customizations now active in party mode + +Example customization: + +```yaml +agent: + persona: + principles: + - 'HIPAA compliance is non-negotiable' + - 'Patient safety over feature velocity' +``` + +See [Agents Guide](./agents-guide.md#agent-customization) for details. + +--- + +## BMM Workflows That Use Party Mode + +**Current:** + +- `epic-retrospective` - Post-epic team retrospective powered by party mode +- Sprint planning discussions (informal party mode usage) + +**Future:** + +- Advanced elicitation workflows will officially integrate party mode +- Multi-agent requirement validation +- Collaborative technical reviews + +--- + +## Available Agents + +Party mode can include **19+ agents** from all installed modules: + +**BMM (12 agents):** PM, Analyst, Architect, SM, DEV, TEA, UX Designer, Technical Writer, Game Designer, Game Developer, Game Architect + +**CIS (5 agents):** Brainstorming Coach, Creative Problem Solver, Design Thinking Coach, Innovation Strategist, Storyteller + +**BMB (1 agent):** BMad Builder + +**Core (1 agent):** BMad Master (orchestrator) + +**Custom:** Any agents you've created + +--- + +## Tips + +**Get better results:** + +- Be specific with your topic/question +- Provide context (project type, constraints, goals) +- Direct specific agents when you want their expertise +- Make decisions - party mode informs, you decide +- Time box discussions (15-30 minutes is usually plenty) + +**Examples of good opening questions:** + +- "We need to decide between REST and GraphQL for our mobile API. Project is a B2B SaaS with 50 enterprise clients." +- "Our last sprint failed spectacularly. Let's discuss what went wrong with authentication implementation." +- "Brainstorm: how can we make our game's tutorial feel rewarding instead of tedious?" + +--- + +## Troubleshooting + +**Same agents responding every time?** +Vary your questions or explicitly request other perspectives: "Game Designer, your thoughts?" + +**Discussion going in circles?** +BMad Master will summarize and redirect, or you can make a decision and move on. + +**Too many agents talking?** +Make your topic more specific - BMad Master picks 2-3 agents based on relevance. + +**Agents not using customizations?** +Make sure you ran `npx bmad-method install` after creating customization files. + +--- + +## Related Documentation + +- [Agents Guide](./agents-guide.md) - Complete agent reference +- [Quick Start Guide](./quick-start.md) - Getting started with BMM +- [FAQ](./faq.md) - Common questions + +--- + +_Better decisions through diverse perspectives. Welcome to party mode._ diff --git a/bmad/bmm/docs/quick-spec-flow.md b/bmad/bmm/docs/quick-spec-flow.md index 840882d9..f69832a6 100644 --- a/bmad/bmm/docs/quick-spec-flow.md +++ b/bmad/bmm/docs/quick-spec-flow.md @@ -8,60 +8,67 @@ ## What is Quick Spec Flow? -Quick Spec Flow is a **streamlined alternative** to the full BMad Method for Level 0-1 projects. Instead of going through Product Brief β†’ PRD β†’ Architecture, you go **straight to a context-aware technical specification** and start coding. +Quick Spec Flow is a **streamlined alternative** to the full BMad Method for Quick Flow track projects. Instead of going through Product Brief β†’ PRD β†’ Architecture, you go **straight to a context-aware technical specification** and start coding. ### When to Use Quick Spec Flow -βœ… **Use Quick Spec Flow (Level 0-1) when:** +βœ… **Use Quick Flow track when:** -- Single bug fix or small enhancement (Level 0) -- Small feature with 2-3 related changes (Level 1) +- Single bug fix or small enhancement +- Small feature with clear scope (typically 1-15 stories) - Rapid prototyping or experimentation - Adding to existing brownfield codebase - You know exactly what you want to build -❌ **Use Full BMM Flow (Level 2-4) when:** +❌ **Use BMad Method or Enterprise tracks when:** -- Building new products or major features (Level 2-4) +- Building new products or major features - Need stakeholder alignment - Complex multi-team coordination - Requires extensive planning and architecture -πŸ’‘ **Not sure?** Run `workflow-init` to get a recommendation based on your project's size and complexity! +πŸ’‘ **Not sure?** Run `workflow-init` to get a recommendation based on your project's needs! --- ## Quick Spec Flow Overview -``` -β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” -β”‚ QUICK SPEC FLOW β”‚ -β”‚ (Level 0-1 Projects) β”‚ -β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ +```mermaid +flowchart TD + START[Step 1: Run Tech-Spec Workflow] + DETECT[Detects project stack
package.json, requirements.txt, etc.] + ANALYZE[Analyzes brownfield codebase
if exists] + TEST[Detects test frameworks
and conventions] + CONFIRM[Confirms conventions
with you] + GENERATE[Generates context-rich
tech-spec] + STORIES[Creates ready-to-implement
stories] -Step 1: Run Tech-Spec Workflow - β”‚ - β”œβ”€β–Ί Detects your project stack (package.json, requirements.txt, etc.) - β”œβ”€β–Ί Analyzes brownfield codebase (if exists) - β”œβ”€β–Ί Detects test frameworks and conventions - β”œβ”€β–Ί Confirms conventions with you - β”œβ”€β–Ί Generates context-rich tech-spec - └─► Creates ready-to-implement stories + OPTIONAL[Step 2: Optional
Generate Story Context
SM Agent
For complex scenarios only] -Step 2: Optional - Generate Story Context (SM Agent) - β”‚ - └─► For complex scenarios only + IMPL[Step 3: Implement
DEV Agent
Code, test, commit] -Step 3: Implement (DEV Agent) - β”‚ - └─► Code, test, commit + DONE[DONE! πŸš€] -DONE! πŸš€ + START --> DETECT + DETECT --> ANALYZE + ANALYZE --> TEST + TEST --> CONFIRM + CONFIRM --> GENERATE + GENERATE --> STORIES + STORIES --> OPTIONAL + OPTIONAL -.->|Optional| IMPL + STORIES --> IMPL + IMPL --> DONE + + style START fill:#bfb,stroke:#333,stroke-width:2px + style OPTIONAL fill:#ffb,stroke:#333,stroke-width:2px,stroke-dasharray: 5 5 + style IMPL fill:#bbf,stroke:#333,stroke-width:2px + style DONE fill:#f9f,stroke:#333,stroke-width:3px ``` --- -## Level 0: Single Atomic Change +## Single Atomic Change **Best for:** Bug fixes, single file changes, isolated improvements @@ -97,7 +104,7 @@ DONE! πŸš€ - βœ… Auto-validates quality - βœ… Story context optional (tech-spec is comprehensive!) -### Example Level 0 Scenarios +### Example Single Change Scenarios - "Fix the login validation bug" - "Add email field to user registration form" @@ -106,13 +113,13 @@ DONE! πŸš€ --- -## Level 1: Coherent Small Feature +## Coherent Small Feature **Best for:** Small features with 2-3 related user stories ### What You Get -1. **tech-spec.md** - Same comprehensive spec as Level 0 +1. **tech-spec.md** - Same comprehensive spec as single change projects 2. **epics.md** - Epic organization with story breakdown 3. **story-[epic-slug]-1.md** - First story 4. **story-[epic-slug]-2.md** - Second story @@ -140,7 +147,7 @@ Stories are **automatically validated** to ensure proper sequence: - βœ… Infrastructure β†’ Features β†’ Polish order - βœ… Backend β†’ Frontend flow -### Example Level 1 Scenarios +### Example Small Feature Scenarios - "Add OAuth social login (Google, GitHub, Twitter)" - "Build user profile page with avatar upload" @@ -295,7 +302,7 @@ Generates scores: - Implementation Readiness: βœ… Ready ``` -### Story Validation (Level 1 Only) +### Story Validation (Multi-Story Features) Checks: @@ -310,7 +317,7 @@ Checks: ## Complete User Journey -### Scenario 1: Bug Fix (Level 0) +### Scenario 1: Bug Fix (Single Change) **Goal:** Fix login validation bug @@ -335,7 +342,7 @@ Checks: --- -### Scenario 2: Small Feature (Level 1) +### Scenario 2: Small Feature (Multi-Story) **Goal:** Add OAuth social login (Google, GitHub) @@ -385,7 +392,7 @@ Quick Spec Flow works seamlessly with all Phase 4 implementation workflows: ### sprint-planning (SM Agent) - βœ… Works with epics.md from tech-spec -- βœ… Organizes Level 1 stories for coordinated implementation +- βœ… Organizes multi-story features for coordinated implementation - βœ… Tracks progress through sprint-status.yaml ### dev-story (DEV Agent) @@ -398,7 +405,7 @@ Quick Spec Flow works seamlessly with all Phase 4 implementation workflows: ## Comparison: Quick Spec vs Full BMM -| Aspect | Quick Spec Flow (Level 0-1) | Full BMM Flow (Level 2-4) | +| Aspect | Quick Flow Track | BMad Method/Enterprise Tracks | | --------------------- | ---------------------------- | ---------------------------------- | | **Setup** | None (standalone) | workflow-init recommended | | **Planning Docs** | tech-spec.md only | Product Brief β†’ PRD β†’ Architecture | @@ -412,18 +419,18 @@ Quick Spec Flow works seamlessly with all Phase 4 implementation workflows: --- -## When to Graduate from Quick Spec to Full BMM +## When to Graduate from Quick Flow to BMad Method -Start with Quick Spec, but switch to Full BMM when: +Start with Quick Flow, but switch to BMad Method when: -- ❌ Project grows beyond 3-5 stories +- ❌ Project grows beyond initial scope - ❌ Multiple teams need coordination - ❌ Stakeholders need formal documentation - ❌ Product vision is unclear - ❌ Architectural decisions need deep analysis - ❌ Compliance/regulatory requirements exist -πŸ’‘ **Tip:** You can always run `workflow-init` later to transition from Quick Spec to Full BMM! +πŸ’‘ **Tip:** You can always run `workflow-init` later to transition from Quick Flow to BMad Method! --- @@ -459,8 +466,8 @@ Start with Quick Spec, but switch to Full BMM when: ### 🎯 **Focus** -- Level 0: Single atomic change -- Level 1: Coherent small feature +- Single atomic changes +- Coherent small features - No scope creep - Fast iteration @@ -493,7 +500,7 @@ Start with Quick Spec, but switch to Full BMM when: Quick Spec Flow is **fully standalone**: -- Detects if you're Level 0 or Level 1 +- Detects if it's a single change or multi-story feature - Asks for greenfield vs brownfield - Works without status file tracking - Perfect for rapid prototyping @@ -518,13 +525,13 @@ Quick Spec Flow is **fully standalone**: **A:** Absolutely! Quick Spec Flow captures UX/UI considerations, component changes, and accessibility requirements. -### Q: What if my Level 0 project grows? +### Q: What if my Quick Flow project grows? -**A:** No problem! You can always transition to Full BMM by running workflow-init and create-prd. Your tech-spec becomes input for the PRD. +**A:** No problem! You can always transition to BMad Method by running workflow-init and create-prd. Your tech-spec becomes input for the PRD. ### Q: Do I need story-context for every story? -**A:** Usually no! Tech-spec is comprehensive enough for most Level 0-1 projects. Only use story-context for complex edge cases. +**A:** Usually no! Tech-spec is comprehensive enough for most Quick Flow projects. Only use story-context for complex edge cases. ### Q: Can I skip validation? @@ -559,13 +566,13 @@ When validation runs, read the scores. They tell you if your spec is production- ### 5. **Story Context is Optional** -For Level 0, try going directly to dev-story first. Only add story-context if you hit complexity. +For single changes, try going directly to dev-story first. Only add story-context if you hit complexity. -### 6. **Keep Level 0 Truly Atomic** +### 6. **Keep Single Changes Truly Atomic** -If your "single change" needs 3+ files, it might be Level 1. Let the workflow guide you. +If your "single change" needs 3+ files, it might be a multi-story feature. Let the workflow guide you. -### 7. **Validate Story Sequence for Level 1** +### 7. **Validate Story Sequence for Multi-Story Features** When you get multiple stories, check the dependency validation output. Proper sequence matters! @@ -573,7 +580,7 @@ When you get multiple stories, check the dependency validation output. Proper se ## Real-World Examples -### Example 1: Adding Logging (Level 0) +### Example 1: Adding Logging (Single Change) **Input:** "Add structured logging to payment processing" @@ -589,7 +596,7 @@ When you get multiple stories, check the dependency validation output. Proper se --- -### Example 2: Search Feature (Level 1) +### Example 2: Search Feature (Multi-Story) **Input:** "Add search to product catalog with filters" diff --git a/bmad/bmm/docs/quick-start.md b/bmad/bmm/docs/quick-start.md index 4b2551ac..8e943402 100644 --- a/bmad/bmm/docs/quick-start.md +++ b/bmad/bmm/docs/quick-start.md @@ -19,7 +19,7 @@ BMad Method (BMM) helps you build software through guided workflows with special 1. **Phase 1: Analysis** (Optional) - Brainstorming, Research, Product Brief 2. **Phase 2: Planning** (Required) - Create your requirements (tech-spec or PRD) -3. **Phase 3: Architecture** (Conditional) - Design the architecture for complex projects (10+ stories) +3. **Phase 3: Solutioning** (Track-dependent) - Design the architecture for BMad Method and Enterprise tracks 4. **Phase 4: Implementation** (Required) - Build your software Epic by Epic, Story by Story ## Installation @@ -54,28 +54,28 @@ During workflow-init, you'll describe: - Whether there's an existing codebase or this is a new project - The general size and complexity (you can adjust this later) -#### Project Scale Levels +#### Planning Tracks -Based on your description, the workflow will suggest a level and let you choose from: +Based on your description, the workflow will suggest a track and let you choose from: -**Greenfield Project Levels:** +**Three Planning Tracks:** -- **Level 0** - Single atomic change (1 story) - bug fixes, typos, minor updates, single file changes -- **Level 1** - Small feature (1-10 stories) - simple additions, isolated features, one module -- **Level 2** - Medium feature set (5-15 stories) - dashboards, multiple related features, several modules -- **Level 3** - Complex integration (12-40 stories) - platform features, major integrations, architectural changes -- **Level 4** - Enterprise expansion (40+ stories) - multi-tenant, ecosystem changes, system-wide initiatives +- **Quick Flow** - Fast implementation (tech-spec only) - bug fixes, simple features, clear scope (typically 1-15 stories) +- **BMad Method** - Full planning (PRD + Architecture + UX) - products, platforms, complex features (typically 10-50+ stories) +- **Enterprise Method** - Extended planning (BMad Method + Security/DevOps/Test) - enterprise requirements, compliance, multi-tenant (typically 30+ stories) + +**Note**: Story counts are guidance, not definitions. Tracks are chosen based on planning needs, not story math. #### What gets created? -Once you confirm your level, the `bmm-workflow-status.md` file will be created in your project's docs folder (assuming default install location). This file tracks your progress through all phases. +Once you confirm your track, the `bmm-workflow-status.yaml` file will be created in your project's docs folder (assuming default install location). This file tracks your progress through all phases. **Important notes:** -- Every level has different paths through the phases +- Every track has different paths through the phases - Story counts can still change based on overall complexity as you work -- For this guide, we'll assume a Level 2 project -- This workflow will guide you through Phase 1 (optional), Phase 2 (required), and Phase 3 (required for Level 2+ complexity) +- For this guide, we'll assume a BMad Method track project +- This workflow will guide you through Phase 1 (optional), Phase 2 (required), and Phase 3 (required for BMad Method and Enterprise tracks) ### Step 2: Work Through Phases 1-3 @@ -100,12 +100,12 @@ Phase 1 (Analysis) is entirely optional. All workflows are optional or recommend The next TRULY REQUIRED step is: - PRD (Product Requirements Document) in Phase 2 - Planning - Agent: pm - - Command: /bmad:bmm:workflows:prd + - Command: prd ``` #### How to Run Workflows in Phases 1-3 -When an agent tells you to run a workflow (like `/bmad:bmm:workflows:prd`): +When an agent tells you to run a workflow (like `prd`): 1. **Start a new chat** with the specified agent (e.g., PM) - See [docs/ide-info](../docs/ide-info/) for your IDE's specific instructions 2. **Wait for the menu** to appear @@ -121,21 +121,21 @@ The agents in V6 are very good with fuzzy menu matching! For v4 users or those who prefer to skip workflow-status guidance: - **Analyst** β†’ Brainstorming, Product Brief -- **PM** β†’ PRD (10+ stories) OR tech-spec (1-10 stories) +- **PM** β†’ PRD (BMad Method/Enterprise tracks) OR tech-spec (Quick Flow track) - **UX-Designer** β†’ UX Design Document (if UI-heavy) -- **Architect** β†’ Architecture (10+ stories) +- **Architect** β†’ Architecture (BMad Method/Enterprise tracks) #### Phase 2: Planning - Creating the PRD -**For Level 2+ projects (10+ stories):** +**For BMad Method and Enterprise tracks:** 1. Load the **PM agent** in a new chat 2. Tell it to run the PRD workflow -3. Once complete, you'll have two files: +3. Once complete, you'll have: - **PRD.md** - Your Product Requirements Document - - **Epics.md** - High-level epics with stories + - Epic breakdown -**For smaller projects (Levels 0-1):** +**For Quick Flow track:** - Use **tech-spec** instead of PRD (no architecture needed) @@ -149,7 +149,7 @@ If your project has a user interface: #### Phase 3: Architecture -**For Level 2+ projects only:** +**For BMad Method and Enterprise tracks:** 1. Load the **Architect agent** in a new chat 2. Tell it to run the create-architecture workflow @@ -261,7 +261,7 @@ The agent creates documents, asks questions, and helps you make decisions throug BMad creates two files to track your progress: -**1. bmm-workflow-status.md** +**1. bmm-workflow-status.yaml** - Shows which phase you're in and what's next - Created by workflow-init @@ -280,28 +280,59 @@ BMad creates two files to track your progress: ## The Complete Flow Visualized -``` -Phase 1 (Optional) Phase 2 (Required) Phase 3 (Conditional) Phase 4 (Required) -β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” -β”‚ Analysis β”‚ β”‚ Planning β”‚ β”‚ Architecture β”‚ β”‚ Implementation β”‚ -β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ -β”‚ β€’ Brainstorm β”‚ β”‚ Level 0-1: β”‚ β”‚ Level 2+: β”‚ β”‚ Per Epic: β”‚ -β”‚ β€’ Research │───────▢│ β€’ tech-spec │───────▢│ β€’ architecture │────────▢│ β€’ epic context β”‚ -β”‚ β€’ Brief β”‚ β”‚ β”‚ β”‚ β€’ gate-check β”‚ β”‚ β”‚ -β”‚ β”‚ β”‚ Level 2+: β”‚ β”‚ β”‚ β”‚ Per Story: β”‚ -β”‚ (Analyst) β”‚ β”‚ β€’ PRD β”‚ β”‚ (Architect) β”‚ β”‚ β€’ create-story β”‚ -β”‚ β”‚ β”‚ β€’ UX (opt) β”‚ β”‚ β”‚ β”‚ β€’ story-context β”‚ -β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β€’ dev-story β”‚ -β”‚ β”‚ β”‚ (PM, UX) β”‚ β”‚ β”‚ β”‚ β€’ code-review β”‚ -β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ -β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ (SM, DEV) β”‚ -β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ +```mermaid +flowchart LR + subgraph P1["Phase 1 (Optional)
Analysis"] + direction TB + A1[Brainstorm] + A2[Research] + A3[Brief] + A4[Analyst] + A1 ~~~ A2 ~~~ A3 ~~~ A4 + end + + subgraph P2["Phase 2 (Required)
Planning"] + direction TB + B1[Quick Flow:
tech-spec] + B2[Method/Enterprise:
PRD] + B3[UX opt] + B4[PM, UX] + B1 ~~~ B2 ~~~ B3 ~~~ B4 + end + + subgraph P3["Phase 3 (Track-dependent)
Solutioning"] + direction TB + C1[Method/Enterprise:
architecture] + C2[gate-check] + C3[Architect] + C1 ~~~ C2 ~~~ C3 + end + + subgraph P4["Phase 4 (Required)
Implementation"] + direction TB + D1[Per Epic:
epic context] + D2[Per Story:
create-story] + D3[story-context] + D4[dev-story] + D5[code-review] + D6[SM, DEV] + D1 ~~~ D2 ~~~ D3 ~~~ D4 ~~~ D5 ~~~ D6 + end + + P1 --> P2 + P2 --> P3 + P3 --> P4 + + style P1 fill:#bbf,stroke:#333,stroke-width:2px + style P2 fill:#bfb,stroke:#333,stroke-width:2px + style P3 fill:#ffb,stroke:#333,stroke-width:2px + style P4 fill:#fbf,stroke:#333,stroke-width:2px ``` ## Common Questions **Q: Do I always need architecture?** -A: Only for larger projects (10+ stories). Small projects can skip straight from tech-spec to implementation. +A: Only for BMad Method and Enterprise tracks. Quick Flow projects skip straight from tech-spec to implementation. **Q: Can I change my plan later?** A: Yes! The SM agent has a "correct-course" workflow for handling scope changes. @@ -328,14 +359,8 @@ A: Yes, once you learn the flow. Use the Quick Reference in Step 2 to go directl βœ… **Always use fresh chats** - Load agents in new chats for each workflow to avoid context issues βœ… **Let workflow-status guide you** - Load any agent and ask for status when unsure what's next -βœ… **Level matters** - Small projects (0-1) use tech-spec, larger projects (2+) need PRD and architecture +βœ… **Track matters** - Quick Flow uses tech-spec, BMad Method/Enterprise need PRD and architecture βœ… **Tracking is automatic** - The status files update themselves, no manual editing needed βœ… **Agents are flexible** - Use menu numbers, shortcuts (\*prd), or natural language **Ready to start building?** Install BMad, load the Analyst, run workflow-init, and let the agents guide you! - ---- - -**Version**: v6-alpha -**Last Updated**: 2025-01 -**For detailed documentation**: [Complete BMM Workflows Guide](../src/modules/bmm/workflows/README.md) diff --git a/bmad/bmm/docs/scale-adaptive-system.md b/bmad/bmm/docs/scale-adaptive-system.md index 2a05ff9c..84f91edf 100644 --- a/bmad/bmm/docs/scale-adaptive-system.md +++ b/bmad/bmm/docs/scale-adaptive-system.md @@ -1,823 +1,468 @@ # BMad Method Scale Adaptive System -**Automatically adapts workflows to project complexity - from bug fixes to enterprise systems** +**Automatically adapts workflows to project complexity - from quick fixes to enterprise systems** --- ## Overview -The **Scale Adaptive System** is BMad Method's intelligent workflow orchestration that automatically adjusts planning depth, documentation requirements, and implementation processes based on project size and complexity. +The **Scale Adaptive System** intelligently routes projects to the right planning methodology based on complexity, not arbitrary story counts. -### The Problem It Solves +### The Problem Traditional methodologies apply the same process to every project: -- ❌ **Overkill:** Bug fix requires full design docs -- ❌ **Insufficient:** Enterprise system built with minimal planning -- ❌ **One-Size-Fits-None:** Same process for 1 story and 100 stories +- Bug fix requires full design docs +- Enterprise system built with minimal planning +- One-size-fits-none approach ### The Solution -BMad Method **adapts workflows to match project scale**: +BMad Method adapts to three distinct planning tracks: -- βœ… **Level 0 (1 story):** Tech-spec only, implement immediately -- βœ… **Level 2 (10 stories):** PRD + Architecture, structured approach -- βœ… **Level 4 (100+ stories):** Full enterprise planning, comprehensive docs +- **Quick Flow**: Tech-spec only, implement immediately +- **BMad Method**: PRD + Architecture, structured approach +- **Enterprise Method**: Full planning with security/devops/test -**Result:** Right amount of planning for every project - no more, no less. +**Result**: Right planning depth for every project. --- -## Key Terminology +## Quick Reference -### Analysis Phase +### Three Tracks at a Glance -**What it is:** Discovery and research phase that informs planning decisions. +| Track | Planning Depth | Time Investment | Best For | +| --------------------- | --------------------- | --------------- | ------------------------------------------ | +| **Quick Flow** | Tech-spec only | Hours to 1 day | Simple features, bug fixes, clear scope | +| **BMad Method** | PRD + Arch + UX | 1-3 days | Products, platforms, complex features | +| **Enterprise Method** | Method + Test/Sec/Ops | 3-7 days | Enterprise needs, compliance, multi-tenant | -**Activities:** +### Decision Tree -- **Brainstorming:** Ideation and creative exploration -- **Research:** Market analysis, technical investigation, user research -- **Product Brief:** High-level vision and requirements capture +```mermaid +flowchart TD + START{Describe your project} -**When used:** + START -->|Bug fix, simple feature| Q1{Scope crystal clear?} + START -->|Product, platform, complex| M[BMad Method
PRD + Architecture] + START -->|Enterprise, compliance| E[Enterprise Method
Extended Planning] -- Optional for Level 0-1 (quick changes) -- Recommended for Level 2 (provides context) -- Required for Level 3-4 (critical for complex systems) + Q1 -->|Yes| QF[Quick Flow
Tech-spec only] + Q1 -->|Uncertain| M + + style QF fill:#bfb,stroke:#333,stroke-width:2px + style M fill:#bbf,stroke:#333,stroke-width:2px + style E fill:#f9f,stroke:#333,stroke-width:2px +``` + +### Quick Keywords + +- **Quick Flow**: fix, bug, simple, add, clear scope +- **BMad Method**: product, platform, dashboard, complex, multiple features +- **Enterprise Method**: enterprise, multi-tenant, compliance, security, audit --- -### Tech-Spec (Technical Specification) +## How Track Selection Works -**What it is:** Comprehensive technical plan for implementing changes or features. Serves as the **primary planning document** for Level 0-1 projects. +When you run `workflow-init`, it guides you through an educational choice: -**Contents:** +### 1. Description Analysis -- Problem statement and solution approach -- Source tree changes (specific files) +Analyzes your project description for complexity indicators and suggests an appropriate track. + +### 2. Educational Presentation + +Shows all three tracks with: + +- Time investment +- Planning approach +- Benefits and trade-offs +- AI agent support level +- Concrete examples + +### 3. Honest Recommendation + +Provides tailored recommendation based on: + +- Complexity keywords +- Greenfield vs brownfield +- User's description + +### 4. User Choice + +You choose the track that fits your situation. The system guides but never forces. + +**Example:** + +``` +workflow-init: "Based on 'Add user dashboard with analytics', I recommend BMad Method. + This involves multiple features and system design. The PRD + Architecture + gives AI agents complete context for better code generation." + +You: "Actually, this is simpler than it sounds. Quick Flow." + +workflow-init: "Got it! Using Quick Flow with tech-spec." +``` + +--- + +## The Three Tracks + +### Track 1: Quick Flow + +**Definition**: Fast implementation with tech-spec planning. + +**Time**: Hours to 1 day of planning + +**Planning Docs**: + +- Tech-spec.md (implementation-focused) +- Story files (1-15 typically, auto-detects epic structure) + +**Workflow Path**: + +``` +(Brownfield: document-project first if needed) +↓ +Tech-Spec β†’ Implement +``` + +**Use For**: + +- Bug fixes +- Simple features +- Enhancements with clear scope +- Quick additions + +**Story Count**: Typically 1-15 stories (guidance, not rule) + +**Example**: "Fix authentication token expiration bug" + +**AI Agent Support**: Basic - minimal context provided + +**Trade-off**: Less planning = higher rework risk if complexity emerges + +--- + +### Track 2: BMad Method (RECOMMENDED) + +**Definition**: Full product + system design planning. + +**Time**: 1-3 days of planning + +**Planning Docs**: + +- PRD.md (product requirements) +- Architecture.md (system design) +- UX Design (if UI components) +- Epic breakdown with stories + +**Workflow Path**: + +``` +(Brownfield: document-project first if needed) +↓ +(Optional: Analysis phase - brainstorm, research, product brief) +↓ +PRD β†’ (Optional UX) β†’ Architecture β†’ Gate Check β†’ Implement +``` + +**Use For**: + +**Greenfield**: + +- Products +- Platforms +- Multi-feature initiatives + +**Brownfield**: + +- Complex additions (new UIs + APIs) +- Major refactors +- New modules + +**Story Count**: Typically 10-50+ stories (guidance, not rule) + +**Examples**: + +- "User dashboard with analytics and preferences" +- "Add real-time collaboration to existing document editor" +- "Payment integration system" + +**AI Agent Support**: Exceptional - complete context for coding partnership + +**Why Architecture for Brownfield?** + +Your brownfield documentation might be huge. Architecture workflow distills massive codebase context into a focused solution design specific to YOUR project. This keeps AI agents focused without getting lost in existing code. + +**Benefits**: + +- Complete AI agent context +- Prevents architectural drift +- Fewer surprises during implementation +- Better code quality +- Faster overall delivery (planning pays off) + +--- + +### Track 3: Enterprise Method + +**Definition**: Extended planning with security, devops, and test strategy. + +**Time**: 3-7 days of planning + +**Planning Docs**: + +- All BMad Method docs PLUS: +- Security Architecture +- DevOps Strategy +- Test Strategy +- Compliance documentation + +**Workflow Path**: + +``` +(Brownfield: document-project nearly mandatory) +↓ +Analysis (recommended/required) β†’ PRD β†’ UX β†’ Architecture +↓ +Security Architecture β†’ DevOps Strategy β†’ Test Strategy +↓ +Gate Check β†’ Implement +``` + +**Use For**: + +- Enterprise requirements +- Multi-tenant systems +- Compliance needs (HIPAA, SOC2, etc.) +- Mission-critical systems +- Security-sensitive applications + +**Story Count**: Typically 30+ stories (but defined by enterprise needs, not count) + +**Examples**: + +- "Multi-tenant SaaS platform" +- "HIPAA-compliant patient portal" +- "Add SOC2 audit logging to enterprise app" + +**AI Agent Support**: Elite - comprehensive enterprise planning + +**Critical for Enterprise**: + +- Security architecture and threat modeling +- DevOps pipeline planning +- Comprehensive test strategy +- Risk assessment +- Compliance mapping + +--- + +## Planning Documents by Track + +### Quick Flow Documents + +**Created**: Upfront in Planning Phase + +**Tech-Spec**: + +- Problem statement and solution +- Source tree changes - Technical implementation details - Detected stack and conventions (brownfield) - UX/UI considerations (if user-facing) - Testing strategy -- Developer resources -**When used:** - -- **Level 0:** Single story technical plan -- **Level 1:** Feature technical plan with epic -- **Level 2-4:** Not used (PRD + Architecture instead) - -**Replacement at Level 2+:** Tech-spec is **replaced by PRD + Architecture** for proper product and system planning. +**Serves as**: Complete planning document (replaces PRD + Architecture) --- -### Epic-Tech-Spec (Epic Technical Specification) +### BMad Method Documents -**What it is:** Detailed technical planning document created **during implementation** for each epic in Level 2-4 projects. +**Created**: Upfront in Planning and Solutioning Phases -**Difference from Tech-Spec:** +**PRD (Product Requirements Document)**: -- **Tech-spec (Level 0-1):** Created upfront, serves as primary planning doc -- **Epic-tech-spec (Level 2-4):** Created just-before-implementation per epic, supplements PRD + Architecture +- Product vision and goals +- Feature requirements +- Epic breakdown with stories +- Success criteria +- User experience considerations +- Business context -**Contents:** +**Architecture Document**: -- Epic-specific technical details -- Detailed implementation approach for this epic -- Code-level design decisions -- Epic-scoped testing strategy -- Integration points with other epics - -**When used:** - -- **Recommended** for Level 2-4 during implementation phase -- Created as each epic is worked on -- Particularly important for: - - Complex epics with many stories - - Novel technical approaches - - Integration-heavy epics - - Performance-critical features - ---- - -### Architecture Document - -**What it is:** System-wide design document that defines structure, components, and interactions. - -**Scale-Adaptive:** - -- **Level 0-1:** Not used -- **Level 2:** Optional - lightweight architecture if needed -- **Level 3:** Required - comprehensive system architecture -- **Level 4:** Required - enterprise-grade architecture - -**Contents:** - -- System components and their responsibilities +- System components and responsibilities - Data models and schemas - Integration patterns - Security architecture - Performance considerations - Deployment architecture -- **Scales in complexity** with project level -**Note:** Architecture document takes the place of tech-spec for system-level planning in Level 2-4 projects. +**For Brownfield**: Acts as focused "solution design" that distills existing codebase into integration plan --- -### Document-Project Workflow +### Enterprise Method Documents -**What it is:** Brownfield codebase analysis workflow that creates comprehensive documentation of existing code. +**Created**: Extended planning across multiple phases -**Output:** `docs/index.md` with sharded sections covering: +Includes all BMad Method documents PLUS: -- Project structure -- Key modules and services -- Existing patterns -- Dependencies -- Configuration +**Security Architecture**: -**Critical for Brownfield:** -🚨 **Run document-project BEFORE starting any brownfield project (Level 0-4)** +- Threat modeling +- Authentication/authorization design +- Data protection strategy +- Audit requirements -**Why it matters:** +**DevOps Strategy**: -- Tech-spec workflow uses this for brownfield analysis -- PRD workflow references it for context -- Architecture workflow builds on existing structure -- Epic-tech-specs reference existing code +- CI/CD pipeline design +- Infrastructure architecture +- Monitoring and alerting +- Disaster recovery -**When to run:** +**Test Strategy**: -- Before workflow-init for brownfield projects -- When joining an existing codebase -- After major refactors (to update docs) - ---- - -## The Five Levels - -### Level 0: Single Atomic Change - -**Examples:** Bug fixes, typos, single-file changes - -| Aspect | Details | -| ------------------- | ------------------------------------------------ | -| **Stories** | 1 story | -| **Planning Docs** | Tech-spec only | -| **Architecture** | None | -| **Best For** | Bug fixes, small patches, quick updates | -| **Brownfield Prep** | Run document-project first (if not already done) | - -**Workflow:** - -``` -(Brownfield: document-project first) -↓ -Analysis (optional) β†’ Tech-Spec β†’ Implement -``` - -**Keywords:** fix, bug, typo, small change, quick update, patch - ---- - -### Level 1: Small Feature - -**Examples:** OAuth login, search feature, user profile page - -| Aspect | Details | -| ------------------- | --------------------------------------------------- | -| **Stories** | 1-10 stories (typically 2-3) | -| **Planning Docs** | Tech-spec with epic | -| **Architecture** | None | -| **UX Design** | Optional - can be included in tech-spec or separate | -| **Best For** | Small coherent features, rapid prototyping | -| **Brownfield Prep** | Run document-project first (if not already done) | - -**Workflow:** - -``` -(Brownfield: document-project first) -↓ -Analysis (optional) β†’ Tech-Spec + Epic β†’ (Optional UX Design) β†’ Implement -``` - -**UX Note:** Level 1 tech-spec can include UX/UI considerations inline, or you can optionally run separate UX Design workflow if the UI is complex. - -**Keywords:** simple, basic, small feature, add, minor - ---- - -### Level 2: Medium Project - -**Examples:** Admin dashboard, customer portal, reporting system - -| Aspect | Details | -| ------------------- | ----------------------------------------------------------- | -| **Stories** | 5-15 stories across multiple epics | -| **Planning Docs** | PRD + Epics | -| **Architecture** | Optional - lightweight architecture if system design needed | -| **UX Design** | Optional - recommended for UI-heavy projects | -| **Epic-Tech-Specs** | Recommended during implementation per epic | -| **Best For** | Multiple related features, focused products | -| **Brownfield Prep** | Run document-project first (if not already done) | - -**Workflow:** - -``` -(Brownfield: document-project first) -↓ -Analysis (recommended) β†’ PRD + Epics β†’ (Optional) UX Design β†’ (Optional) Architecture β†’ Implement - ↓ - Epic-Tech-Spec per epic (recommended) - ↓ - Retrospective after each epic (if >1 epic) -``` - -**Architecture Note:** Level 2 uses optional **Architecture document** (not tech-spec) if system design is needed. For projects that don't need architecture, PRD + Epics are sufficient. - -**Epic-Tech-Specs:** As you implement each epic, create epic-tech-spec for detailed technical guidance. If you have 3 epics, you'll create 3 epic-tech-specs during implementation. - -**Retrospectives:** After completing each epic (when there are multiple), run retrospective to capture learnings before starting the next epic. - -**Keywords:** dashboard, several features, admin panel, medium - ---- - -### Level 3: Complex System - -**Examples:** E-commerce platform, SaaS product, multi-module system - -| Aspect | Details | -| ------------------- | -------------------------------------------------- | -| **Stories** | 12-40 stories with subsystems | -| **Planning Docs** | PRD + Epics + System Architecture | -| **Architecture** | Required - comprehensive system design | -| **UX Design** | Recommended for user-facing systems | -| **Epic-Tech-Specs** | Recommended during implementation per epic | -| **Gate Checks** | Required - validate cohesion before implementation | -| **Best For** | Complex integrations, multi-subsystem products | -| **Brownfield Prep** | Run document-project first (if not already done) | - -**Workflow:** - -``` -(Brownfield: document-project first) -↓ -Analysis + Research β†’ PRD + Epics β†’ (Recommended) UX Design β†’ Architecture (required) β†’ Gate Check β†’ Implement - ↓ - Epic-Tech-Spec per epic (recommended) - ↓ - Retrospective after each epic -``` - -**Gate Check:** Validates PRD + UX + Architecture cohesion before starting implementation. Prevents costly rework. - -**Epic-Tech-Specs:** For complex epics, create detailed epic-tech-spec before implementation. These provide code-level design decisions that Architecture doesn't cover. - -**Additional Detail Docs:** For very novel or complex subsystems, you may create additional technical design documents beyond epic-tech-specs. These are created as-needed, not upfront. - -**Keywords:** platform, integration, complex, system, architecture - ---- - -### Level 4: Enterprise Scale - -**Examples:** Multi-product suite, enterprise ecosystem, platform with multiple apps - -| Aspect | Details | -| ------------------- | -------------------------------------------------------------- | -| **Stories** | 40+ stories across products | -| **Planning Docs** | Comprehensive PRD + Epics + Enterprise Architecture | -| **Architecture** | Required - enterprise-grade system design | -| **UX Design** | Recommended - design system and patterns | -| **Epic-Tech-Specs** | Recommended during implementation per epic | -| **Gate Checks** | Required - multiple validation gates | -| **Best For** | Multi-tenant systems, product ecosystems, enterprise platforms | -| **Brownfield Prep** | Run document-project first (if not already done) | - -**Workflow:** - -``` -(Brownfield: document-project first) -↓ -Analysis + Research β†’ PRD + Epics β†’ UX Design β†’ Enterprise Architecture β†’ Gate Check β†’ Implement - ↓ - Epic-Tech-Spec per epic (recommended) - ↓ - Additional design docs for complex subsystems - ↓ - Retrospective after each epic -``` - -**Enterprise Architecture:** More comprehensive than Level 3, includes: - -- Multi-tenancy design -- Security architecture -- Scalability planning -- Integration architecture -- Data architecture -- Deployment architecture - -**Additional Design Documents:** For enterprise complexity, you may need supplementary technical documents: - -- Detailed subsystem designs -- Integration specifications -- Performance optimization plans -- Security implementation guides - -These are created **during implementation** as needed, not all upfront. - -**Keywords:** enterprise, multi-tenant, multiple products, ecosystem, scale +- Test approach and coverage +- Automation strategy +- Quality gates +- Performance testing --- ## Workflow Comparison -| Level | Analysis | Planning | Architecture | Epic-Tech-Specs | Stories | Retrospectives | -| ----- | ----------- | ---------------- | ------------ | ----------------- | ------- | ----------------------- | -| **0** | Optional | Tech-spec | None | N/A (no epics) | 1 | N/A | -| **1** | Optional | Tech-spec + Epic | None | N/A (single epic) | 2-3 | N/A | -| **2** | Recommended | PRD | Optional | Recommended | 5-15 | After each epic (if >1) | -| **3** | Required | PRD | Required | Recommended | 12-40 | After each epic | -| **4** | Required | PRD | Required | Recommended | 40+ | After each epic | +| Track | Analysis | Planning | Architecture | Security/Ops | Typical Stories | +| --------------- | ----------- | --------- | ------------ | ------------ | --------------- | +| **Quick Flow** | Optional | Tech-spec | None | None | 1-15 | +| **BMad Method** | Recommended | PRD + UX | Required | None | 10-50+ | +| **Enterprise** | Required | PRD + UX | Required | Required | 30+ | + +**Note**: Story counts are GUIDANCE based on typical usage, NOT definitions of tracks. --- -## Documentation Progression +## Brownfield Projects -### Level 0-1: Tech-Spec as Primary Doc +### Critical First Step -**Why tech-spec for Level 0-1?** +For ALL brownfield projects: Run `document-project` BEFORE planning workflows. -- Changes are focused and atomic -- Context is specific to implementation -- Speed is priority -- Full product planning is overkill +### Why document-project is Critical -**Tech-spec contents:** +**Quick Flow** uses it for: -- Technical approach -- File-level changes -- Implementation guide -- Testing strategy -- **Includes UX considerations** if user-facing +- Auto-detecting existing patterns +- Understanding codebase structure +- Confirming conventions -**Created:** Upfront, serves as complete planning doc +**BMad Method** uses it for: ---- +- Architecture inputs (existing structure) +- Integration design +- Pattern consistency -### Level 2: PRD + Optional Architecture +**Enterprise Method** uses it for: -**Why PRD instead of tech-spec?** - -- Multiple features need coordination -- Product vision and requirements matter -- Stakeholder alignment needed -- Feature interdependencies exist - -**PRD contents:** - -- Product vision and goals -- Feature requirements -- Epics and story breakdown -- Success criteria -- User experience considerations - -**Architecture (optional):** - -- Only if system design needed -- Lightweight architectural decisions -- Component interactions -- Data models - -**Epic-tech-specs (recommended during implementation):** - -- Created as each epic is worked on -- Detailed technical guidance per epic -- Supplements PRD with implementation details - -**Created:** PRD upfront, epic-tech-specs during implementation - ---- - -### Level 3-4: PRD + Architecture + Epic-Tech-Specs - -**Why comprehensive planning?** - -- Complex integrations -- Multiple subsystems -- Long-term maintainability -- Risk management -- Team coordination - -**PRD contents:** - -- Comprehensive product vision -- Detailed requirements -- Business objectives -- Market considerations -- Complete epic breakdown - -**Architecture (required):** - -- System design -- Component architecture -- Data models -- Integration patterns -- Security design -- Performance requirements -- **Scales with complexity** (Level 3 vs Level 4) - -**Epic-tech-specs (recommended during implementation):** - -- Created before implementing each epic -- Code-level design decisions -- Epic-specific implementation approach -- Detailed testing strategy - -**Additional design docs (as-needed):** - -- For novel or complex subsystems -- Created during implementation -- Not all created upfront -- Examples: detailed integration specs, performance optimization plans - -**Created:** PRD + Architecture upfront, epic-tech-specs and detail docs during implementation - ---- - -## Brownfield Projects: Document-Project First - -### Critical Workflow Step - -🚨 **For ALL brownfield projects (Level 0-4):** - -**BEFORE running any workflow:** - -1. Run `document-project` workflow -2. This analyzes your codebase and creates `docs/index.md` -3. Output includes sharded documentation of: - - Project structure - - Key modules - - Existing patterns - - Dependencies - - Configuration - -**Why it's critical:** - -- **Tech-spec workflow** (Level 0-1) uses this for auto-detection -- **PRD workflow** (Level 2-4) references existing code -- **Architecture workflow** (Level 3-4) builds on existing structure -- **Epic-tech-specs** reference existing implementations +- Security analysis +- Integration architecture +- Risk assessment ### Brownfield Workflow Pattern +```mermaid +flowchart TD + START([Brownfield Project]) + CHECK{Has docs/
index.md?} + + START --> CHECK + CHECK -->|No| DOC[document-project workflow
10-30 min] + CHECK -->|Yes| TRACK[Choose Track] + + DOC --> TRACK + TRACK -->|Quick| QF[Tech-Spec] + TRACK -->|Method| M[PRD + Arch] + TRACK -->|Enterprise| E[PRD + Arch + Sec/Ops] + + style DOC fill:#ffb,stroke:#333,stroke-width:2px + style TRACK fill:#bfb,stroke:#333,stroke-width:2px ``` -Step 1: document-project (FIRST!) - ↓ - Creates docs/index.md with codebase analysis - ↓ -Step 2: workflow-init OR tech-spec directly - ↓ - Uses docs/index.md for context - ↓ -Step 3: Continue with level-appropriate workflows -``` - -**Without document-project:** - -- Workflows can't detect existing patterns -- Convention analysis won't work -- Integration planning is incomplete -- You'll miss existing code to reuse - ---- - -## Tech-Spec vs Epic-Tech-Spec - -### When to Use Each - -| Document | Level | Created When | Purpose | -| ------------------ | ----- | ------------------------ | ----------------------------------------------- | -| **Tech-Spec** | 0-1 | Upfront (Planning Phase) | Primary planning doc for small changes/features | -| **Epic-Tech-Spec** | 2-4 | During Implementation | Detailed technical guidance per epic | - -### Tech-Spec (Level 0-1) - -**Characteristics:** - -- Created in Planning Phase -- Serves as primary/only planning document -- Comprehensive for the entire change/feature -- Includes all context needed for implementation -- Can include UX considerations inline - -**Workflow context:** - -``` -Planning Phase: Tech-Spec created here - ↓ -Implementation Phase: Stories implemented using tech-spec -``` - -### Epic-Tech-Spec (Level 2-4) - -**Characteristics:** - -- Created in Implementation Phase -- Supplements PRD + Architecture -- Focused on single epic -- Detailed code-level design -- References architecture decisions - -**Workflow context:** - -``` -Planning Phase: PRD + Architecture created here - ↓ -Implementation Phase: - - Epic 1 starts - - Create epic-tech-spec-1 (just-before-implementation) - - Implement stories for epic 1 - - Retrospective - - Epic 2 starts - - Create epic-tech-spec-2 - - Implement stories for epic 2 - - Retrospective - - ... -``` - -**Why not created upfront?** - -- Implementation learnings inform later epic-tech-specs -- Avoids over-planning details that may change -- Keeps specs fresh and relevant -- Retrospectives provide input for next epic-tech-spec - ---- - -## Level 2 Architecture vs Tech-Spec - -### The Question - -"What takes the place of architecture with Level 2 since there is no tech-spec?" - -### The Answer - -Level 2 uses **Architecture document (optional)** instead of tech-spec for system-level planning. - -**Comparison:** - -| Aspect | Tech-Spec (Level 0-1) | Architecture (Level 2) | -| ------------ | ------------------------------------ | ---------------------------------- | -| **Purpose** | Implementation plan for small change | System design for medium project | -| **Scope** | Single change or small feature | Multiple epics and features | -| **Focus** | Code-level details | System-level design | -| **When** | Replaces need for PRD+Arch | Supplements PRD | -| **Required** | Yes (primary doc) | Optional (if system design needed) | - -**Level 2 Documentation Options:** - -**Option A: PRD Only (no architecture)** - -- For projects that don't need system design -- Features are independent -- No complex integrations -- Example: Admin dashboard with CRUD screens - -**Option B: PRD + Architecture** - -- For projects needing system design -- Components interact -- Integrations exist -- Example: Customer portal with notifications, webhooks, reporting - -**Plus Epic-Tech-Specs (recommended):** - -- Created during implementation -- One per epic -- Detailed technical guidance -- References Architecture decisions (if architecture exists) - ---- - -## Retrospectives in Multi-Epic Projects - -### When to Run Retrospectives - -**Trigger:** After completing each epic in Level 2-4 projects **when there are multiple epics** - -**Example:** - -- Level 2 project with 3 epics -- Complete Epic 1 β†’ Retrospective -- Complete Epic 2 β†’ Retrospective -- Complete Epic 3 β†’ Final retrospective - -**Purpose:** - -- Capture learnings from completed epic -- Identify improvements for next epic -- Adjust approach based on what worked/didn't -- Feed insights into next epic-tech-spec - -### Retrospective Contents - -- What went well? -- What could be improved? -- Technical insights gained -- Process adjustments needed -- Input for next epic planning - -**Output feeds into:** - -- Next epic-tech-spec -- Architecture refinements -- Team process improvements - ---- - -## How Level Detection Works - -### Automatic Detection (workflow-init) - -When you run `workflow-init`, it analyzes your project description using: - -#### 1. **Keyword Analysis** - -Scans for level-specific keywords: - -**Level 0 Keywords:** - -- fix, bug, typo, small change, quick update, patch - -**Level 1 Keywords:** - -- simple, basic, small feature, add, minor - -**Level 2 Keywords:** - -- dashboard, several features, admin panel, medium - -**Level 3 Keywords:** - -- platform, integration, complex, system, architecture - -**Level 4 Keywords:** - -- enterprise, multi-tenant, multiple products, ecosystem, scale - -#### 2. **Story Count Estimation** - -Asks about expected scope: - -| Level | Story Range | -| ------- | ------------- | -| Level 0 | 1 story | -| Level 1 | 1-10 stories | -| Level 2 | 5-15 stories | -| Level 3 | 12-40 stories | -| Level 4 | 40+ stories | - -#### 3. **Complexity Indicators** - -- Multiple teams involved? -- External integrations? -- Compliance requirements? -- Multi-tenant needs? -- Existing system modifications? (triggers brownfield) - -### Manual Override - -You can always override the detected level if workflow-init gets it wrong. The system is a guide, not a constraint. - ---- - -## Field Types: Greenfield vs Brownfield - -Each level has **two workflow paths**: - -### Greenfield (New Project) - -- Starting from scratch -- No existing codebase -- Establishing new patterns -- Freedom to choose stack - -**Special Features:** - -- Starter template recommendations -- Modern best practices via WebSearch -- Convention establishment - -**Workflow:** - -``` -workflow-init β†’ Level detection β†’ Greenfield path -``` - -### Brownfield (Existing Project) - -- Adding to existing code -- Working with established patterns -- Integration with current systems -- Stack already chosen - -**Special Features:** - -- Auto-detects existing conventions -- Analyzes current patterns -- Confirms before deviating -- Respects established standards - -**Workflow:** - -``` -document-project (FIRST!) β†’ workflow-init β†’ Level detection β†’ Brownfield path -``` - -**Critical difference:** Brownfield requires document-project BEFORE any other workflow. --- ## Common Scenarios -### Scenario 1: Bug Fix (Level 0) +### Scenario 1: Bug Fix (Quick Flow) -**Input:** "Fix email validation bug in login form" +**Input**: "Fix email validation bug in login form" -**Detection:** +**Detection**: Keywords "fix", "bug" -- Keywords: "fix", "bug" -- Estimated stories: 1 +**Track**: Quick Flow -**Result:** Level 0 β†’ Greenfield-level-0.yaml - -**Workflow:** +**Workflow**: 1. (Optional) Brief analysis 2. Tech-spec with single story 3. Implement immediately +**Time**: 2-4 hours total + --- -### Scenario 2: Small Feature (Level 1) +### Scenario 2: Small Feature (Quick Flow) -**Input:** "Add OAuth social login (Google, GitHub, Facebook)" +**Input**: "Add OAuth social login (Google, GitHub, Facebook)" -**Detection:** +**Detection**: Keywords "add", "feature", clear scope -- Keywords: "add", "feature" -- Estimated stories: 2-3 +**Track**: Quick Flow -**Result:** Level 1 β†’ Greenfield-level-1.yaml - -**Workflow:** +**Workflow**: 1. (Optional) Research OAuth providers -2. Tech-spec with epic + 3 stories -3. (Optional) UX Design if UI is complex -4. Implement story-by-story +2. Tech-spec with 3 stories +3. Implement story-by-story + +**Time**: 1-3 days --- -### Scenario 3: Customer Portal (Level 2) +### Scenario 3: Customer Portal (BMad Method) -**Input:** "Build customer portal with dashboard, tickets, billing" +**Input**: "Build customer portal with dashboard, tickets, billing" -**Detection:** +**Detection**: Keywords "portal", "dashboard", multiple features -- Keywords: "portal", "dashboard" -- Estimated stories: 10-12 +**Track**: BMad Method -**Result:** Level 2 β†’ Greenfield-level-2.yaml +**Workflow**: -**Workflow:** - -1. Product Brief (recommended) +1. (Recommended) Product Brief 2. PRD with epics -3. (Optional) UX Design -4. (Optional) Architecture if system design needed -5. Implement with sprint planning -6. Create epic-tech-spec for each epic as you implement -7. Run retrospective after each epic +3. (If UI) UX Design +4. Architecture (system design) +5. Gate Check +6. Implement with sprint planning + +**Time**: 1-2 weeks --- -### Scenario 4: E-commerce Platform (Level 3) +### Scenario 4: E-commerce Platform (BMad Method) -**Input:** "Build full e-commerce platform with products, cart, checkout, admin, analytics" +**Input**: "Build e-commerce platform with products, cart, checkout, admin, analytics" -**Detection:** +**Detection**: Keywords "platform", multiple subsystems -- Keywords: "platform", "full" -- Estimated stories: 30-35 +**Track**: BMad Method -**Result:** Level 3 β†’ Greenfield-level-3.yaml - -**Workflow:** +**Workflow**: 1. Research + Product Brief 2. Comprehensive PRD @@ -825,221 +470,130 @@ document-project (FIRST!) β†’ workflow-init β†’ Level detection β†’ Brownfield p 4. System Architecture (required) 5. Gate check 6. Implement with phased approach -7. Create epic-tech-spec per epic before implementing -8. Run retrospective after each epic -9. Create additional design docs as needed for complex subsystems + +**Time**: 3-6 weeks --- -### Scenario 5: Adding Feature to Existing App (Brownfield) +### Scenario 5: Brownfield Addition (BMad Method) -**Input:** "Add search functionality to existing product catalog" +**Input**: "Add search functionality to existing product catalog" -**Detection:** +**Detection**: Brownfield + moderate complexity -- Keywords: "add", "existing" -- Estimated stories: 3-4 -- Field type: Brownfield +**Track**: BMad Method (not Quick Flow) -**Result:** Level 1 β†’ Brownfield-level-1.yaml - -**Critical First Step:** +**Critical First Step**: 1. **Run document-project** to analyze existing codebase -**Then Workflow:** 2. Tech-spec (uses document-project output for analysis) 3. Auto-detects existing patterns 4. Confirms conventions 5. Implement following existing patterns +**Then Workflow**: 2. PRD for search feature 3. Architecture (integration design - highly recommended) 4. Implement following existing patterns + +**Time**: 1-2 weeks + +**Why Method not Quick Flow?**: Integration with existing catalog system benefits from architecture planning to ensure consistency. --- -## Workflow Paths Configuration +### Scenario 6: Multi-tenant Platform (Enterprise Method) -BMad Method stores workflow paths in YAML configuration files: +**Input**: "Add multi-tenancy to existing single-tenant SaaS platform" -### Path File Structure +**Detection**: Keywords "multi-tenant", enterprise scale -``` -src/modules/bmm/workflows/workflow-status/paths/ -β”œβ”€β”€ greenfield-level-0.yaml -β”œβ”€β”€ greenfield-level-1.yaml -β”œβ”€β”€ greenfield-level-2.yaml -β”œβ”€β”€ greenfield-level-3.yaml -β”œβ”€β”€ greenfield-level-4.yaml -β”œβ”€β”€ brownfield-level-0.yaml -β”œβ”€β”€ brownfield-level-1.yaml -β”œβ”€β”€ brownfield-level-2.yaml -β”œβ”€β”€ brownfield-level-3.yaml -β”œβ”€β”€ brownfield-level-4.yaml -β”œβ”€β”€ game-design.yaml -└── project-levels.yaml (source of truth) -``` +**Track**: Enterprise Method -### Path File Format +**Workflow**: -Each path file defines: +1. Document-project (mandatory) +2. Research (compliance, security) +3. PRD (multi-tenancy requirements) +4. Architecture (tenant isolation design) +5. Security Architecture (data isolation, auth) +6. DevOps Strategy (tenant provisioning, monitoring) +7. Test Strategy (tenant isolation testing) +8. Gate check +9. Phased implementation -```yaml -project_type: 'software' -level: 2 -field_type: 'greenfield' -description: 'Medium project - multiple epics' - -phases: - - phase: 1 - name: 'Analysis' - optional: true - workflows: - - id: 'brainstorm-project' - optional: true - agent: 'analyst' - command: 'brainstorm-project' - - - phase: 2 - name: 'Planning' - required: true - workflows: - - id: 'prd' - required: true - agent: 'pm' - command: 'prd' - output: 'Creates PRD with epics and stories' -``` - -### Phase Structure - -Each level defines **4 phases**: - -1. **Analysis Phase** - - Brainstorming - - Research - - Product Brief - - Complexity: Increases with level - -2. **Planning Phase** - - Level 0-1: Tech-spec - - Level 2-4: PRD + (optional/required) Architecture - -3. **Solutioning Phase** - - Level 0-2: Skipped or optional architecture - - Level 3-4: Required architecture + gate checks - -4. **Implementation Phase** - - Sprint planning - - Story-by-story development - - Epic-tech-specs created per epic (Level 2-4) - - Retrospectives after each epic (Level 2-4) +**Time**: 3-6 months --- ## Best Practices -### 1. **Document-Project First for Brownfield** +### 1. Document-Project First for Brownfield -Always run document-project before starting any brownfield workflow. This is critical for context. +Always run `document-project` before starting brownfield planning. AI agents need existing codebase context. -### 2. **Trust the Detection** +### 2. Trust the Recommendation -If workflow-init suggests Level 2, there's probably complexity you haven't considered. Review before overriding. +If `workflow-init` suggests BMad Method, there's probably complexity you haven't considered. Review carefully before overriding. -### 3. **Start Small, Upgrade Later** +### 3. Start Smaller if Uncertain -Uncertain between Level 1 and 2? Start with Level 1. You can always run PRD creation later if needed. +Uncertain between Quick Flow and Method? Start with Quick Flow. You can create PRD later if needed. -### 4. **Don't Skip Gate Checks** +### 4. Don't Skip Gate Checks -For Level 3-4, gate checks prevent costly mistakes. Invest the time upfront. +For BMad Method and Enterprise, gate checks prevent costly mistakes. Invest the time. -### 5. **Create Epic-Tech-Specs Just-Before-Implementation** +### 5. Architecture is Optional but Recommended for Brownfield -For Level 2-4, create epic-tech-spec right before implementing each epic. Don't create all upfront. +Brownfield BMad Method makes architecture optional, but it's highly recommended. It distills complex codebase into focused solution design. -### 6. **Run Retrospectives Between Epics** +### 6. Discovery Phase Based on Need -Capture learnings after each epic. Feed insights into next epic-tech-spec. +Brainstorming and research are offered regardless of track. Use them when you need to think through the problem space. -### 7. **Optional UX for Level 1** +### 7. Product Brief for Greenfield Method -If your Level 1 feature has complex UI, run separate UX Design. Otherwise, include UX notes in tech-spec. - -### 8. **Architecture Scales** - -Level 2 architecture is lighter than Level 3, which is lighter than Level 4. Don't over-architect. +Product Brief is only offered for greenfield BMad Method and Enterprise. It's optional but helps with strategic thinking. --- -## FAQ +## Key Differences from Legacy System -### Q: What's the difference between tech-spec and epic-tech-spec? +### Old System (Levels 0-4) -**A:** +- Arbitrary story count thresholds +- Level 2 vs Level 3 based on story count +- Confusing overlap zones (5-10 stories, 12-40 stories) +- Tech-spec and PRD shown as conflicting options -- **Tech-spec (Level 0-1):** Created upfront in Planning Phase, serves as primary planning doc -- **Epic-tech-spec (Level 2-4):** Created during Implementation Phase per epic, supplements PRD + Architecture +### New System (3 Tracks) -### Q: Why no tech-spec at Level 2+? - -**A:** At Level 2+, you need product-level planning (PRD) and optionally system-level design (Architecture). Tech-spec is too narrow. Instead, use epic-tech-specs during implementation for detailed technical guidance per epic. - -### Q: Do I always need Architecture at Level 2? - -**A:** No, it's optional. Only create Architecture if you need system-level design. Many Level 2 projects can work with just PRD + epic-tech-specs. - -### Q: What if I forget to run document-project on brownfield? - -**A:** Workflows will lack context about existing code. Run document-project and restart your workflow to get proper brownfield analysis. - -### Q: Can Level 1 include UX Design? - -**A:** Yes! You can either: - -- Include UX considerations in the tech-spec (simpler) -- Run separate UX Design workflow (complex UI) - -### Q: When do I create additional design documents? - -**A:** Create them during implementation as-needed for: - -- Very novel technical approaches -- Complex subsystems needing detailed design -- Integration specifications -- Performance optimization plans - -Don't create them all upfront - create just-before-needed. - -### Q: Can I change levels mid-project? - -**A:** Yes! If you started at Level 1 but realize it's Level 2, you can run `create-prd` to add proper planning docs. The system is flexible. +- Methodology-based distinction (not story counts) +- Story counts as guidance, not definitions +- Clear track purposes: + - Quick Flow = Implementation-focused + - BMad Method = Product + system design + - Enterprise = Extended with security/ops +- Mutually exclusive paths chosen upfront +- Educational decision-making --- -## Summary +## Migration from Old System -The Scale Adaptive System ensures: +If you have existing projects using the old level system: -βœ… **Level 0-1:** Fast, lean, tech-spec only β†’ Quick Spec Flow -βœ… **Level 2:** Structured, PRD-driven, optional architecture, epic-tech-specs during implementation -βœ… **Level 3-4:** Comprehensive, PRD + Architecture required, epic-tech-specs per epic, gate checks +- **Level 0-1** β†’ Quick Flow +- **Level 2-3** β†’ BMad Method +- **Level 4** β†’ Enterprise Method -**Key Principles:** - -- Match planning depth to project complexity -- Tech-spec for Level 0-1, PRD + Architecture for Level 2-4 -- Epic-tech-specs supplement Level 2-4 during implementation -- Document-project FIRST for all brownfield projects -- Create detailed docs just-before-needed, not all upfront - -**Result:** Right amount of ceremony for every project, maximum efficiency at every scale. +Run `workflow-init` on existing projects to migrate to new tracking system. It detects existing planning artifacts and creates appropriate workflow tracking. --- -## Learn More +## Related Documentation -- **Quick Spec Flow (Level 0-1):** [quick-spec-flow.md](./quick-spec-flow.md) -- **Full BMM Workflows (Level 2-4):** [../workflows/README.md](../workflows/README.md) -- **Document-Project Workflow:** Ask SM agent to run document-project -- **Run workflow-init:** Load PM agent and ask to run workflow-init -- **Path Configuration:** `../workflows/workflow-status/paths/` -- **Level Definitions:** `../workflows/workflow-status/project-levels.yaml` +- **[Quick Start Guide](./quick-start.md)** - Get started with BMM +- **[Quick Spec Flow](./quick-spec-flow.md)** - Details on Quick Flow track +- **[Brownfield Guide](./brownfield-guide.md)** - Existing codebase workflows +- **[Glossary](./glossary.md)** - Complete terminology +- **[FAQ](./faq.md)** - Common questions +- **[Workflows Guide](../workflows/README.md)** - Complete workflow reference --- -_Scale Adaptive System - Because one size doesn't fit all._ +_Scale Adaptive System - Right planning depth for every project._ diff --git a/bmad/bmm/docs/troubleshooting.md b/bmad/bmm/docs/troubleshooting.md new file mode 100644 index 00000000..93592855 --- /dev/null +++ b/bmad/bmm/docs/troubleshooting.md @@ -0,0 +1,680 @@ +# BMM Troubleshooting Guide + +Common issues and solutions for the BMad Method Module. + +--- + +## Quick Diagnosis + +**Use this flowchart to find your issue:** + +```mermaid +flowchart TD + START{What's the problem?} + + START -->|Can't get started| SETUP[Setup & Installation Issues] + START -->|Wrong level detected| LEVEL[Level Detection Problems] + START -->|Workflow not working| WORKFLOW[Workflow Issues] + START -->|Agent lacks context| CONTEXT[Context & Documentation Issues] + START -->|Implementation problems| IMPL[Implementation Issues] + START -->|Files/paths wrong| FILES[File & Path Issues] + + style START fill:#ffb,stroke:#333,stroke-width:2px + style SETUP fill:#bfb,stroke:#333,stroke-width:2px + style LEVEL fill:#bbf,stroke:#333,stroke-width:2px + style WORKFLOW fill:#fbf,stroke:#333,stroke-width:2px + style CONTEXT fill:#f9f,stroke:#333,stroke-width:2px +``` + +--- + +## Table of Contents + +- [Setup & Installation Issues](#setup--installation-issues) +- [Level Detection Problems](#level-detection-problems) +- [Workflow Issues](#workflow-issues) +- [Context & Documentation Issues](#context--documentation-issues) +- [Implementation Issues](#implementation-issues) +- [File & Path Issues](#file--path-issues) +- [Agent Behavior Issues](#agent-behavior-issues) +- [Integration Issues (Brownfield)](#integration-issues-brownfield) + +--- + +## Setup & Installation Issues + +### Problem: BMM not found after installation + +**Symptoms:** + +- `bmad` command not recognized +- Agent files not accessible +- Workflows don't load + +**Solution:** + +```bash +# Check if BMM is installed +ls bmad/ + +# If not present, run installer +npx bmad-method@alpha install + +# For fresh install +npx bmad-method@alpha install --skip-version-prompt +``` + +### Problem: Agents don't have menu + +**Symptoms:** + +- Load agent file but no menu appears +- Agent doesn't respond to commands + +**Solution:** + +1. Ensure you're loading the correct agent file path: `bmad/bmm/agents/[agent-name].md` +2. Wait a few seconds for agent to initialize +3. Try asking "show menu" or "help" +4. Check IDE supports Markdown rendering with context +5. For Claude Code: Ensure agent file is open in chat context + +### Problem: Workflows not found + +**Symptoms:** + +- Agent says workflow doesn't exist +- Menu shows workflow but won't run + +**Solution:** + +1. Check workflow exists: `ls bmad/bmm/workflows/` +2. Verify agent has access to workflow (check agent's workflow list) +3. Try using menu number instead of workflow name +4. Restart chat with agent in fresh session + +--- + +## Level Detection Problems + +### Problem: workflow-init suggests wrong level + +**Symptoms:** + +- Detects Level 3 but you only need Level 1 +- Suggests Level 1 but project is actually Level 2 +- Can't figure out appropriate level + +**Solution:** + +1. **Override the suggestion** - workflow-init always asks for confirmation, just say "no" and choose correct level +2. **Be specific in description** - Use level keywords when describing: + - "fix bug" β†’ Level 0 + - "add small feature" β†’ Level 1 + - "build dashboard" β†’ Level 2 +3. **Manual override** - You can always switch levels later if needed + +**Example:** + +``` +workflow-init: "Level 3 project?" +You: "No, this is just adding OAuth login - Level 1" +workflow-init: "Got it, creating Level 1 workflow" +``` + +### Problem: Project level unclear + +**Symptoms:** + +- Between Level 1 and Level 2 +- Not sure if architecture needed +- Story count uncertain + +**Solution:** +**When in doubt, start smaller:** + +- Choose Level 1 instead of Level 2 +- You can always run `create-prd` later if needed +- Level 1 is faster, less overhead +- Easy to upgrade, hard to downgrade + +**Decision criteria:** + +- Single epic with related stories? β†’ Level 1 +- Multiple independent epics? β†’ Level 2 +- Need product-level planning? β†’ Level 2 +- Just need technical plan? β†’ Level 1 + +### Problem: Old planning docs influencing level detection + +**Symptoms:** + +- Old Level 3 PRD in folder +- Working on new Level 0 bug fix +- workflow-init suggests Level 3 + +**Solution:** +workflow-init asks: "Is this work in progress or previous effort?" + +- Answer: "Previous effort" +- Then describe your NEW work clearly +- System will detect level based on NEW work, not old artifacts + +--- + +## Workflow Issues + +### Problem: Workflow fails or hangs + +**Symptoms:** + +- Workflow starts but doesn't complete +- Agent stops responding mid-workflow +- Progress stalls + +**Solution:** + +1. **Check context limits** - Start fresh chat for complex workflows +2. **Verify prerequisites**: + - Phase 2 needs Phase 1 complete (if used) + - Phase 3 needs Phase 2 complete + - Phase 4 needs Phase 3 complete (if Level 3-4) +3. **Restart workflow** - Load agent in new chat and restart +4. **Check status file** - Verify `bmm-workflow-status.md` or `sprint-status.yaml` is present and valid + +### Problem: Agent says "workflow not found" + +**Symptoms:** + +- Request workflow by name +- Agent doesn't recognize it +- Menu doesn't show workflow + +**Solution:** + +1. Check spelling/format - Use exact workflow name or menu shortcut (*prd not *PRD) +2. Verify agent has workflow: + - PM agent: prd, tech-spec + - Architect agent: create-architecture, validate-architecture + - SM agent: sprint-planning, create-story, story-context +3. Try menu number instead of name +4. Check you're using correct agent for workflow + +### Problem: Sprint-planning workflow fails + +**Symptoms:** + +- Can't create sprint-status.yaml +- Epics not extracted from files +- Status file empty or incorrect + +**Solution:** + +1. **Verify epic files exist**: + - Level 1: tech-spec with epic + - Level 2-4: epics.md or sharded epic files +2. **Check file format**: + - Epic files should be valid Markdown + - Epic headers should be clear (## Epic Name) +3. **Run in Phase 4 only** - Ensure Phase 2/3 complete first +4. **Check file paths** - Epic files should be in correct output folder + +### Problem: story-context generates empty or wrong context + +**Symptoms:** + +- Context file created but has no useful content +- Context doesn't reference existing code +- Missing technical guidance + +**Solution:** + +1. **Run epic-tech-context first** - story-context builds on epic context +2. **Check story file exists** - Verify story was created by create-story +3. **For brownfield**: + - Ensure document-project was run + - Verify docs/index.md exists with codebase context +4. **Try regenerating** - Sometimes needs fresh attempt with more specific story details + +--- + +## Context & Documentation Issues + +### Problem: AI agents lack codebase understanding (Brownfield) + +**Symptoms:** + +- Suggestions don't align with existing patterns +- Ignores available components +- Proposes approaches that conflict with architecture +- Doesn't reference existing code + +**Solution:** + +1. **Run document-project** - Critical for brownfield projects + ``` + Load Analyst agent β†’ run document-project + Choose scan level: Deep (recommended for PRD prep) + ``` +2. **Verify docs/index.md exists** - This is master entry point for AI agents +3. **Check documentation completeness**: + - Review generated docs/index.md + - Ensure key systems are documented +4. **Run deep-dive on specific areas** if needed + +### Problem: Have documentation but agents can't find it + +**Symptoms:** + +- README.md, ARCHITECTURE.md exist +- AI agents still ask questions answered in docs +- No docs/index.md file + +**Solution:** +**Option 1: Quick fix (2-5min)** +Run `index-docs` task: + +- Located at `bmad/core/tasks/index-docs.xml` +- Scans existing docs and generates index.md +- Lightweight, just creates navigation + +**Option 2: Comprehensive (10-30min)** +Run document-project workflow: + +- Discovers existing docs in Step 2 +- Generates NEW AI-friendly documentation from codebase +- Creates index.md linking to BOTH existing and new docs + +**Why this matters:** AI agents need structured entry point (index.md) to navigate docs efficiently. + +### Problem: document-project takes too long + +**Symptoms:** + +- Exhaustive scan running for hours +- Impatient to start planning + +**Solution:** +**Choose appropriate scan level:** + +- **Quick (2-5min)** - Pattern analysis, no source reading - Good for initial overview +- **Deep (10-30min)** - Reads critical paths - **Recommended for most brownfield projects** +- **Exhaustive (30-120min)** - Reads all files - Only for migration planning or complete understanding + +For most brownfield projects, **Deep scan is sufficient**. + +--- + +## Implementation Issues + +### Problem: Existing tests breaking (Brownfield) + +**Symptoms:** + +- Regression test failures +- Previously working functionality broken +- Integration tests failing + +**Solution:** + +1. **Review changes against existing patterns**: + - Check if new code follows existing conventions + - Verify API contracts unchanged (unless intentionally versioned) +2. **Run test-review workflow** (TEA agent): + - Analyzes test coverage + - Identifies regression risks + - Suggests fixes +3. **Add regression testing to DoD**: + - All existing tests must pass + - Add integration tests for new code +4. **Consider feature flags** for gradual rollout + +### Problem: Story takes much longer than estimated + +**Symptoms:** + +- Story estimated 4 hours, took 12 hours +- Acceptance criteria harder than expected +- Hidden complexity discovered + +**Solution:** +**This is normal!** Estimates are estimates. To handle: + +1. **Continue until DoD met** - Don't compromise quality +2. **Document learnings in retrospective**: + - What caused the overrun? + - What should we watch for next time? +3. **Consider splitting story** if it's truly two stories +4. **Adjust future estimates** based on this data + +**Don't stress about estimate accuracy** - use them for learning, not judgment. + +### Problem: Integration points unclear + +**Symptoms:** + +- Not sure how to connect new code to existing +- Unsure which files to modify +- Multiple possible integration approaches + +**Solution:** + +1. **For brownfield**: + - Ensure document-project captured existing architecture + - Review architecture docs before implementing +2. **Check story-context** - Should document integration points +3. **In tech-spec/architecture** - Explicitly document: + - Which existing modules to modify + - What APIs/services to integrate with + - Data flow between new and existing code +4. **Run integration-planning workflow** (Level 3-4): + - Architect agent creates integration strategy + +### Problem: Inconsistent patterns being introduced + +**Symptoms:** + +- New code style doesn't match existing +- Different architectural approach +- Not following team conventions + +**Solution:** + +1. **Check convention detection** (Quick Spec Flow): + - Should detect existing patterns + - Asks for confirmation before proceeding +2. **Review documentation** - Ensure document-project captured patterns +3. **Use story-context** - Injects pattern guidance per story +4. **Add to code-review checklist**: + - Pattern adherence + - Convention consistency + - Style matching +5. **Run retrospective** to identify pattern deviations early + +--- + +## File & Path Issues + +### Problem: Output files in wrong location + +**Symptoms:** + +- PRD created in wrong folder +- Story files not where expected +- Documentation scattered + +**Solution:** +Check `bmad/bmm/config.yaml` for configured paths: + +```yaml +output_folder: '{project-root}/docs' +dev_story_location: '{project-root}/docs/stories' +``` + +Default locations: + +- Planning docs (PRD, epics, architecture): `{output_folder}/` +- Stories: `{dev_story_location}/` +- Status files: `{output_folder}/bmm-workflow-status.md`, `{output_folder}/sprint-status.yaml` + +To change locations, edit config.yaml then re-run workflows. + +### Problem: Can't find status file + +**Symptoms:** + +- workflow-status says no status file +- Can't track progress +- Lost place in workflow + +**Solution:** + +1. **Check default location**: `docs/bmm-workflow-status.md` +2. **If missing, reinitialize**: + ``` + Load Analyst agent β†’ run workflow-init + ``` +3. **For Phase 4**: Look for `sprint-status.yaml` in same folder as PRD +4. **Search for it**: + ```bash + find . -name "bmm-workflow-status.md" + find . -name "sprint-status.yaml" + ``` + +### Problem: Sprint-status.yaml not updating + +**Symptoms:** + +- Workflows complete but status unchanged +- Stories stuck in old status +- Epic status not progressing + +**Solution:** + +1. **Manual update required** - Most status changes are manual: + ```yaml + stories: + - id: epic-1-story-1 + status: done # Change this manually + ``` +2. **Some workflows auto-update**: + - sprint-planning creates file + - epic-tech-context changes epic to "contexted" + - create-story changes story to "drafted" + - story-context changes to "ready-for-dev" + - dev-story may auto-update (check workflow) +3. **Re-run sprint-planning** to resync if needed + +--- + +## Agent Behavior Issues + +### Problem: Agent provides vague or generic responses + +**Symptoms:** + +- "Use appropriate framework" +- "Follow best practices" +- Generic advice without specifics + +**Solution:** + +1. **Provide more context** - Be specific in your description: + - "Add OAuth using passport.js to Express server" + - Not: "Add authentication" +2. **For brownfield**: + - Ensure document-project was run + - Agent needs codebase context for specific advice +3. **Reference existing docs**: + - "Based on the existing auth system in UserService..." +4. **Start fresh chat** - Context overload can cause generic responses + +### Problem: Agent hallucinating or making up information + +**Symptoms:** + +- References files that don't exist +- Suggests APIs that aren't in your stack +- Creates imaginary requirements + +**Solution:** + +1. **Use fresh chat** - Context overflow main cause of hallucinations +2. **Provide concrete constraints**: + - "We use Express 4.18.2, not Next.js" + - "Our database is PostgreSQL, not MongoDB" +3. **For brownfield**: + - Document-project provides factual grounding + - Agent sees actual code, not assumptions +4. **Correct immediately**: + - "No, we don't have UserService, we have AuthenticationModule" + +### Problem: Agent won't follow instructions + +**Symptoms:** + +- Ignores specific requests +- Does something different than asked +- Doesn't respect constraints + +**Solution:** + +1. **Be more explicit** - Agents respond to clear, specific instructions: + - "Use EXACTLY these three steps..." + - "Do NOT include database migrations in this story" +2. **Check agent capabilities** - Agent might not have access to requested workflow +3. **Try different phrasing** - Rephrase request to be more direct +4. **Use menu system** - Numbers are clearer than text commands + +--- + +## Integration Issues (Brownfield) + +### Problem: New code conflicts with existing architecture + +**Symptoms:** + +- Integration approach doesn't fit existing structure +- Would require major refactoring +- Conflicts with established patterns + +**Solution:** + +1. **Check if document-project was run** - Agents need architecture context +2. **Review existing architecture docs**: + - Read docs/architecture.md (from document-project) + - Understand current system design +3. **For Level 3-4**: + - Run architecture-review workflow before planning + - Use integration-planning workflow +4. **Explicitly document integration strategy** in architecture: + - How new components fit existing structure + - What modifications needed to existing code + - Migration path if changing patterns + +### Problem: Breaking changes to existing APIs + +**Symptoms:** + +- Changing API breaks consumers +- Downstream services affected +- Need backward compatibility + +**Solution:** + +1. **Identify all API consumers** (document-project should show this) +2. **Plan versioning strategy**: + - API v1 (existing) + v2 (new) + - Deprecation timeline +3. **Use feature flags** for gradual rollout +4. **Document migration guide** for API consumers +5. **Add to testing strategy**: + - Existing consumers still work (v1) + - New functionality works (v2) + +### Problem: Data migration required + +**Symptoms:** + +- Schema changes needed +- Existing data needs transformation +- Risk of data loss + +**Solution:** + +1. **Create explicit migration strategy** in architecture: + - Forward migration (old β†’ new schema) + - Rollback plan (new β†’ old schema) + - Data validation approach +2. **Test migrations thoroughly**: + - On copy of production data + - Measure performance impact +3. **Plan rollout**: + - Staging environment first + - Gradual production rollout + - Monitoring for issues +4. **Document in tech-spec/architecture**: + - Migration scripts + - Rollback procedures + - Expected downtime + +--- + +## Still Stuck? + +### Getting More Help + +If your issue isn't covered here: + +1. **Check other documentation**: + - [FAQ](./faq.md) - Common questions + - [Glossary](./glossary.md) - Terminology + - [Quick Start](./quick-start.md) - Basic usage + - [Brownfield Guide](./brownfield-guide.md) - Existing codebases + - [Scale Adaptive System](./scale-adaptive-system.md) - Understanding levels + +2. **Community support**: + - [Discord](https://discord.gg/gk8jAdXWmj) - #general-dev, #bugs-issues + - Active community, fast responses + - Share your specific situation + +3. **Report bugs**: + - [GitHub Issues](https://github.com/bmad-code-org/BMAD-METHOD/issues) + - Include version, steps to reproduce, expected vs actual behavior + +4. **Video tutorials**: + - [YouTube Channel](https://www.youtube.com/@BMadCode) + - Visual walkthroughs of common workflows + +--- + +## Common Error Messages + +### "No workflow status file found" + +**Cause:** Haven't run workflow-init yet +**Fix:** Load Analyst agent β†’ run workflow-init + +### "Epic file not found" + +**Cause:** PRD/epics not created, or wrong path +**Fix:** Verify PRD/epics exist in output folder, check config.yaml paths + +### "Story not in sprint-status.yaml" + +**Cause:** Sprint-planning not run, or story file not created +**Fix:** Run sprint-planning workflow, verify story files exist + +### "Documentation insufficient for brownfield" + +**Cause:** No docs/index.md or document-project not run +**Fix:** Run document-project workflow with Deep scan + +### "Level detection failed" + +**Cause:** Ambiguous project description +**Fix:** Be more specific, use level keywords (fix, feature, platform, etc.) + +### "Context generation failed" + +**Cause:** Missing prerequisites (epic context, story file, or docs) +**Fix:** Verify epic-tech-context run, story file exists, docs present + +--- + +## Prevention Tips + +**Avoid common issues before they happen:** + +1. βœ… **Always run document-project for brownfield** - Saves hours of context issues later +2. βœ… **Use fresh chats for complex workflows** - Prevents hallucinations and context overflow +3. βœ… **Verify files exist before running workflows** - Check PRD, epics, stories are present +4. βœ… **Read agent menu before requesting workflows** - Confirm agent has the workflow +5. βœ… **Start with smaller level if unsure** - Easy to upgrade (Level 1 β†’ 2), hard to downgrade +6. βœ… **Keep status files updated** - Manual updates when needed, don't let them drift +7. βœ… **Run retrospectives after epics** - Catch issues early, improve next epic +8. βœ… **Follow phase sequence** - Don't skip required phases (Phase 2 before 3, 3 before 4) + +--- + +**Issue not listed?** Please [report it](https://github.com/bmad-code-org/BMAD-METHOD/issues) so we can add it to this guide! diff --git a/bmad/bmm/workflows/3-solutioning/architecture/README.md b/bmad/bmm/docs/workflow-architecture-reference.md similarity index 74% rename from bmad/bmm/workflows/3-solutioning/architecture/README.md rename to bmad/bmm/docs/workflow-architecture-reference.md index 383ebdbe..d8761965 100644 --- a/bmad/bmm/workflows/3-solutioning/architecture/README.md +++ b/bmad/bmm/docs/workflow-architecture-reference.md @@ -1,15 +1,24 @@ -# Decision Architecture Workflow +# Decision Architecture Workflow - Technical Reference + +**Module:** BMM (BMAD Method Module) +**Type:** Solutioning Workflow + +--- ## Overview The Decision Architecture workflow is a complete reimagining of how architectural decisions are made in the BMAD Method. Instead of template-driven documentation, this workflow facilitates an intelligent conversation that produces a **decision-focused architecture document** optimized for preventing AI agent conflicts during implementation. +--- + ## Core Philosophy **The Problem**: When multiple AI agents implement different parts of a system, they make conflicting technical decisions leading to incompatible implementations. **The Solution**: A "consistency contract" that documents all critical technical decisions upfront, ensuring every agent follows the same patterns and uses the same technologies. +--- + ## Key Features ### 1. Starter Template Intelligence ⭐ NEW @@ -56,6 +65,8 @@ The Decision Architecture workflow is a complete reimagining of how architectura - Validated against hard requirements - Optimized for AI agent consumption +--- + ## Workflow Structure ``` @@ -75,6 +86,8 @@ Step 11: Validate document completeness Step 12: Final review and update workflow status ``` +--- + ## Files in This Workflow - **workflow.yaml** - Configuration and metadata @@ -85,6 +98,8 @@ Step 12: Final review and update workflow status - **checklist.md** - Validation requirements for the output document - **architecture-template.md** - Strict format for the final document +--- + ## How It's Different from Old architecture | Aspect | Old Workflow | New Workflow | @@ -98,6 +113,8 @@ Step 12: Final review and update workflow status | **Time** | Confusing and slow | 30-90 minutes depending on skill level | | **Elicitation** | Never used | Integrated at decision points | +--- + ## Expected Inputs - **PRD** (Product Requirements Document) with: @@ -117,6 +134,8 @@ Step 12: Final review and update workflow status - Platform-specific UI requirements - Performance expectations for interactions +--- + ## Output Document A single `architecture.md` file containing: @@ -128,84 +147,100 @@ A single `architecture.md` file containing: - Integration specifications - Consistency rules for AI agents +--- + ## How Novel Pattern Design Works Step 7 handles unique or complex patterns that need to be INVENTED: -1. **Detection**: - The workflow analyzes the PRD for concepts that don't have standard solutions: - - Novel interaction patterns (e.g., "swipe to match" when Tinder doesn't exist) - - Complex multi-epic workflows (e.g., "viral invitation system") - - Unique data relationships (e.g., "social graph" before Facebook) - - New paradigms (e.g., "ephemeral messages" before Snapchat) +### 1. Detection -2. **Design Collaboration**: - Instead of just picking technologies, the workflow helps DESIGN the solution: - - Identifies the core problem to solve - - Explores different approaches with the user - - Documents how components interact - - Creates sequence diagrams for complex flows - - Uses elicitation to find innovative solutions +The workflow analyzes the PRD for concepts that don't have standard solutions: -3. **Documentation**: - Novel patterns become part of the architecture with: - - Pattern name and purpose - - Component interactions - - Data flow diagrams - - Which epics/stories are affected - - Implementation guidance for agents +- Novel interaction patterns (e.g., "swipe to match" when Tinder doesn't exist) +- Complex multi-epic workflows (e.g., "viral invitation system") +- Unique data relationships (e.g., "social graph" before Facebook) +- New paradigms (e.g., "ephemeral messages" before Snapchat) -4. **Example**: - ``` - PRD: "Users can create 'circles' of friends with overlapping membership" - ↓ - Workflow detects: This is a novel social structure pattern - ↓ - Designs with user: Circle membership model, permission cascading, UI patterns - ↓ - Documents: "Circle Pattern" with component design and data flow - ↓ - All agents understand how to implement circle-related features consistently - ``` +### 2. Design Collaboration + +Instead of just picking technologies, the workflow helps DESIGN the solution: + +- Identifies the core problem to solve +- Explores different approaches with the user +- Documents how components interact +- Creates sequence diagrams for complex flows +- Uses elicitation to find innovative solutions + +### 3. Documentation + +Novel patterns become part of the architecture with: + +- Pattern name and purpose +- Component interactions +- Data flow diagrams +- Which epics/stories are affected +- Implementation guidance for agents + +### 4. Example + +``` +PRD: "Users can create 'circles' of friends with overlapping membership" +↓ +Workflow detects: This is a novel social structure pattern +↓ +Designs with user: Circle membership model, permission cascading, UI patterns +↓ +Documents: "Circle Pattern" with component design and data flow +↓ +All agents understand how to implement circle-related features consistently +``` + +--- ## How Implementation Patterns Work Step 8 prevents agent conflicts by defining patterns for consistency: -1. **The Core Principle**: +### 1. The Core Principle - > "Any time multiple agents might make the SAME decision DIFFERENTLY, that's a pattern to capture" +> "Any time multiple agents might make the SAME decision DIFFERENTLY, that's a pattern to capture" - The LLM asks: "What could an agent encounter where they'd have to guess?" +The LLM asks: "What could an agent encounter where they'd have to guess?" -2. **Pattern Categories** (principles, not prescriptions): - - **Naming**: How things are named (APIs, database fields, files) - - **Structure**: How things are organized (folders, modules, layers) - - **Format**: How data is formatted (JSON structures, responses) - - **Communication**: How components talk (events, messages, protocols) - - **Lifecycle**: How states change (workflows, transitions) - - **Location**: Where things go (URLs, paths, storage) - - **Consistency**: Cross-cutting concerns (dates, errors, logs) +### 2. Pattern Categories (principles, not prescriptions) -3. **LLM Intelligence**: - - Uses the principle to identify patterns beyond the 7 categories - - Figures out what specific patterns matter for chosen tech - - Only asks about patterns that could cause conflicts - - Skips obvious patterns that the tech choice determines +- **Naming**: How things are named (APIs, database fields, files) +- **Structure**: How things are organized (folders, modules, layers) +- **Format**: How data is formatted (JSON structures, responses) +- **Communication**: How components talk (events, messages, protocols) +- **Lifecycle**: How states change (workflows, transitions) +- **Location**: Where things go (URLs, paths, storage) +- **Consistency**: Cross-cutting concerns (dates, errors, logs) -4. **Example**: - ``` - Tech chosen: REST API + PostgreSQL + React - ↓ - LLM identifies needs: - - REST: URL structure, response format, status codes - - PostgreSQL: table naming, column naming, FK patterns - - React: component structure, state management, test location - ↓ - Facilitates each with user - ↓ - Documents as Implementation Patterns in architecture - ``` +### 3. LLM Intelligence + +- Uses the principle to identify patterns beyond the 7 categories +- Figures out what specific patterns matter for chosen tech +- Only asks about patterns that could cause conflicts +- Skips obvious patterns that the tech choice determines + +### 4. Example + +``` +Tech chosen: REST API + PostgreSQL + React +↓ +LLM identifies needs: +- REST: URL structure, response format, status codes +- PostgreSQL: table naming, column naming, FK patterns +- React: component structure, state management, test location +↓ +Facilitates each with user +↓ +Documents as Implementation Patterns in architecture +``` + +--- ## How Starter Templates Work @@ -234,6 +269,8 @@ Workflow only asks about: Database choice, deployment target, additional service First story becomes: "npx create t3-app@latest my-app --trpc --nextauth --prisma" ``` +--- + ## Usage ```bash @@ -249,6 +286,8 @@ The AI agent will: 4. Generate a comprehensive architecture document 5. Validate completeness +--- + ## Design Principles 1. **Facilitation over Prescription** - Guide users to good decisions rather than imposing templates @@ -257,6 +296,8 @@ The AI agent will: 4. **Adaptation over Uniformity** - Meet users where they are while ensuring quality output 5. **Collaboration over Output** - The conversation matters as much as the document +--- + ## For Developers This workflow assumes: @@ -266,6 +307,8 @@ This workflow assumes: - AI agents need clear constraints to prevent conflicts - The architecture document is for agents, not humans +--- + ## Migration from architecture Projects using the old `architecture` workflow should: @@ -274,9 +317,11 @@ Projects using the old `architecture` workflow should: 2. Use `architecture` for new projects 3. The old workflow remains available but is deprecated -## Version +--- -1.3.2 - UX specification integration and fuzzy file matching +## Version History + +**1.3.2** - UX specification integration and fuzzy file matching - Added UX spec as optional input with fuzzy file matching - Updated workflow.yaml with input file references @@ -284,7 +329,7 @@ Projects using the old `architecture` workflow should: - Added UX alignment validation to checklist - Instructions use variable references for flexible file names - 1.3.1 - Workflow refinement and standardization +**1.3.1** - Workflow refinement and standardization - Added workflow status checking at start (Steps 0 and 0.5) - Added workflow status updating at end (Step 12) @@ -292,7 +337,7 @@ Projects using the old `architecture` workflow should: - Enhanced with intent-based approach throughout - Improved cohesiveness across all workflow components - 1.3.0 - Novel pattern design for unique architectures +**1.3.0** - Novel pattern design for unique architectures - Added novel pattern design (now Step 7, formerly Step 5.3) - Detects novel concepts in PRD that need architectural invention @@ -300,7 +345,7 @@ Projects using the old `architecture` workflow should: - Uses elicitation for innovative approaches - Documents custom patterns for multi-epic consistency - 1.2.0 - Implementation patterns for agent consistency +**1.2.0** - Implementation patterns for agent consistency - Added implementation patterns (now Step 8, formerly Step 5.5) - Created principle-based pattern-categories.csv (7 principles, not 118 prescriptions) @@ -308,11 +353,19 @@ Projects using the old `architecture` workflow should: - LLM uses principle to identify patterns beyond the categories - Prevents agent conflicts through intelligent pattern discovery - 1.1.0 - Enhanced with starter template discovery and version verification +**1.1.0** - Enhanced with starter template discovery and version verification - Added intelligent starter template detection and integration (now Step 2) - Added dynamic version verification via web search - Starter decisions are documented as "PROVIDED BY STARTER" - First implementation story uses starter initialization command - 1.0.0 - Initial release replacing architecture workflow +**1.0.0** - Initial release replacing architecture workflow + +--- + +**Related Documentation:** + +- [Solutioning Workflows](./workflows-solutioning.md) +- [Planning Workflows](./workflows-planning.md) +- [Scale Adaptive System](./scale-adaptive-system.md) diff --git a/bmad/bmm/workflows/document-project/README.md b/bmad/bmm/docs/workflow-document-project-reference.md similarity index 97% rename from bmad/bmm/workflows/document-project/README.md rename to bmad/bmm/docs/workflow-document-project-reference.md index 8171ed87..f5350420 100644 --- a/bmad/bmm/workflows/document-project/README.md +++ b/bmad/bmm/docs/workflow-document-project-reference.md @@ -1,15 +1,18 @@ -# Document Project Workflow +# Document Project Workflow - Technical Reference -**Version:** 1.2.0 **Module:** BMM (BMAD Method Module) **Type:** Action Workflow (Documentation Generator) +--- + ## Purpose Analyzes and documents brownfield projects by scanning codebase, architecture, and patterns to create comprehensive reference documentation for AI-assisted development. Generates a master index and multiple documentation files tailored to project structure and type. **NEW in v1.2.0:** Context-safe architecture with scan levels, resumability, and write-as-you-go pattern to prevent context exhaustion. +--- + ## Key Features - **Multi-Project Type Support**: Handles web, backend, mobile, CLI, game, embedded, data, infra, library, desktop, and extension projects @@ -23,6 +26,8 @@ Analyzes and documents brownfield projects by scanning codebase, architecture, a - **Architecture Matching**: Matches projects to 170+ architecture templates from the solutioning registry - **Brownfield PRD Ready**: Generates documentation specifically designed for AI agents planning new features +--- + ## How to Invoke ```bash @@ -35,6 +40,8 @@ Or from BMAD CLI: /bmad:bmm:workflows:document-project ``` +--- + ## Scan Levels (NEW in v1.2.0) Choose the right scan depth for your needs: @@ -79,6 +86,8 @@ Choose the right scan depth for your needs: **Note:** Deep-dive mode ALWAYS uses exhaustive scan (no choice) +--- + ## Resumability (NEW in v1.2.0) The workflow can be interrupted and resumed without losing progress: @@ -110,6 +119,8 @@ Would you like to: Your choice [1/2/3]: ``` +--- + ## What It Does ### Step-by-Step Process @@ -160,6 +171,8 @@ Your choice [1/2/3]: - `project-scan-report.json` - State file for resumability (NEW v1.2.0) - Additional conditional files per part (API, data models, etc.) +--- + ## Data Files The workflow uses a single comprehensive CSV file: @@ -175,6 +188,8 @@ The workflow uses a single comprehensive CSV file: - Self-contained: All project detection AND scanning requirements in one file - Architecture patterns inferred from tech stack (no external registry needed) +--- + ## Use Cases ### Primary Use Case: Brownfield PRD Creation @@ -197,6 +212,8 @@ PRD Workflow: Loads docs/index.md - **Technical Debt Assessment** - Identify patterns and anti-patterns - **Migration Planning** - Understand current state before refactoring +--- + ## Requirements ### Recommended Inputs (Optional) @@ -211,6 +228,8 @@ PRD Workflow: Loads docs/index.md - Code analysis - Git repository analysis (optional) +--- + ## Configuration ### Default Output Location @@ -225,6 +244,8 @@ Default: `/docs/` folder in project root - Add new project types to `project-types.csv` - Add new architecture templates to `registry.csv` +--- + ## Example: Multi-Part Web App **Input:** @@ -260,6 +281,8 @@ docs/ └── project-parts.json ``` +--- + ## Example: Simple CLI Tool **Input:** @@ -286,6 +309,8 @@ docs/ └── source-tree-analysis.md ``` +--- + ## Deep-Dive Mode ### What is Deep-Dive Mode? @@ -353,6 +378,8 @@ You can deep-dive multiple areas over time: All deep-dive docs are linked from the master index. +--- + ## Validation The workflow includes a comprehensive 160+ point checklist covering: @@ -365,6 +392,8 @@ The workflow includes a comprehensive 160+ point checklist covering: - Brownfield PRD readiness - Deep-dive completeness (if applicable) +--- + ## Next Steps After Completion 1. **Review** `docs/index.md` - Your master documentation index @@ -372,6 +401,8 @@ The workflow includes a comprehensive 160+ point checklist covering: 3. **Use for PRD** - Point brownfield PRD workflow to index.md 4. **Maintain** - Re-run workflow when architecture changes significantly +--- + ## File Structure ``` @@ -387,6 +418,8 @@ document-project/ └── README.md # This file ``` +--- + ## Troubleshooting **Issue: Project type not detected correctly** @@ -405,6 +438,8 @@ document-project/ - Solution: Check registry.csv; may need to add new template or adjust matching criteria +--- + ## Architecture Improvements in v1.2.0 ### Context-Safe Design @@ -442,3 +477,11 @@ Optimized JSON (no pretty-printing): "resume_instructions": "..." } ``` + +--- + +**Related Documentation:** + +- [Brownfield Development Guide](./brownfield-guide.md) +- [Implementation Workflows](./workflows-implementation.md) +- [Scale Adaptive System](./scale-adaptive-system.md) diff --git a/bmad/bmm/docs/workflows-analysis.md b/bmad/bmm/docs/workflows-analysis.md new file mode 100644 index 00000000..42eaaf36 --- /dev/null +++ b/bmad/bmm/docs/workflows-analysis.md @@ -0,0 +1,670 @@ +# BMM Analysis Workflows (Phase 1) + +**Reading Time:** ~12 minutes + +## Overview + +Phase 1 (Analysis) workflows are **optional** exploration and discovery tools that help you understand your project space before committing to detailed planning. These workflows facilitate creative thinking, market validation, and strategic alignment. + +**When to use Analysis workflows:** + +- Starting a new project from scratch +- Exploring a problem space or opportunity +- Validating market fit before significant investment +- Gathering strategic context for planning phases + +**When to skip Analysis workflows:** + +- Continuing an existing project with clear requirements +- Working on well-defined features with known solutions +- Operating under strict time constraints where discovery is complete + +## Quick Reference + +| Workflow | Agent | Duration | Required | Purpose | +| ------------------ | ------- | --------- | ----------- | ----------------------------------------------------------- | +| brainstorm-project | Analyst | 30-60 min | No | Explore solution approaches and architectures | +| brainstorm-game | Analyst | 45-90 min | No | Generate game concepts using creative techniques | +| product-brief | PM | 60-90 min | Recommended | Define product vision and strategy | +| game-brief | PM | 60-90 min | Recommended | Capture game vision before GDD | +| research | Analyst | Varies | No | Multi-type research system (market, technical, competitive) | + +--- + +## brainstorm-project + +### Purpose + +Generate multiple solution approaches for software projects through parallel ideation tracks that align technical and business thinking from inception. + +**Agent:** Analyst +**Phase:** 1 (Analysis) +**Required:** No +**Typical Duration:** 30-60 minutes + +### When to Use + +- You have a business objective but unclear technical approach +- Multiple solution paths exist and you need to evaluate trade-offs +- Hidden assumptions need discovery before planning +- Innovation beyond obvious solutions is valuable + +### Prerequisites + +- Business objectives and constraints +- Technical environment context +- Stakeholder needs identified +- Success criteria defined (at least preliminary) + +### Process Overview + +**1. Context Capture** + +- Business objectives and constraints +- Technical environment +- Stakeholder needs +- Success criteria + +**2. Parallel Ideation** + +- **Architecture Track**: Technical approaches with trade-offs +- **UX Track**: Interface paradigms and user journeys +- **Integration Track**: System connection patterns +- **Value Track**: Feature prioritization and delivery sequences + +**3. Solution Synthesis** + +- Evaluate feasibility and impact +- Align with strategic objectives +- Surface hidden assumptions +- Generate recommendations with rationale + +### Inputs + +| Input | Type | Purpose | +| ----------------- | -------- | --------------------------------------------- | +| Project Context | Document | Business objectives, environment, constraints | +| Problem Statement | Optional | Core challenge or opportunity to address | + +### Outputs + +| Output | Content | +| ------------------------ | ------------------------------------------- | +| Architecture Proposals | Multiple approaches with trade-off analysis | +| Value Framework | Prioritized features aligned to objectives | +| Risk Analysis | Dependencies, challenges, opportunities | +| Strategic Recommendation | Synthesized direction with rationale | + +### Example Scenario + +**Starting Point:** +"We need a customer dashboard for our SaaS product" + +**After brainstorm-project:** + +- **Architecture Option A**: Monolith with server-side rendering (faster to market, easier ops) +- **Architecture Option B**: Microservices + SPA (better scalability, more complex) +- **Architecture Option C**: Hybrid approach (SSR shell + client-side islands) +- **Recommendation**: Option A for MVP, with clear path to Option C as we scale +- **Risk**: Option A may require rewrite if we hit 10K+ concurrent users + +### Related Workflows + +- **research** - Deep investigation of market/technical options +- **product-brief** - Strategic planning document +- **prd** (Phase 2) - Requirements document from chosen approach + +--- + +## brainstorm-game + +### Purpose + +Generate and refine game concepts through systematic creative exploration using five distinct brainstorming techniques, grounded in practical constraints. + +**Agent:** Analyst +**Phase:** 1 (Analysis) +**Required:** No +**Typical Duration:** 45-90 minutes + +### When to Use + +- Generating original game concepts +- Exploring variations on a theme +- Breaking creative blocks +- Validating game ideas against constraints + +### Prerequisites + +- Platform specifications (mobile, PC, console, web) +- Genre preferences or inspirations +- Technical constraints understood +- Target audience defined +- Core design pillars identified (at least preliminary) + +### Process Overview + +**Five Brainstorming Methods** (applied in isolation, then synthesized): + +| Method | Focus | Output Characteristics | +| ----------------------- | ------------------------ | ---------------------------------- | +| SCAMPER | Systematic modification | Structured transformation analysis | +| Mind Mapping | Hierarchical exploration | Visual concept relationships | +| Lotus Blossom | Radial expansion | Layered thematic development | +| Six Thinking Hats | Multi-perspective | Balanced evaluation framework | +| Random Word Association | Lateral thinking | Unexpected conceptual combinations | + +Each method generates distinct artifacts that are then evaluated against design pillars, technical feasibility, and market positioning. + +### Inputs + +- **Game Context Document**: Platform specs, genre, technical constraints, target audience, monetization approach, design pillars +- **Initial Concept Seed** (optional): High-level game idea or theme + +### Outputs + +- **Method-Specific Artifacts**: Five separate brainstorming documents +- **Consolidated Concept Document**: Synthesized game concepts with feasibility assessments and unique value propositions +- **Design Pillar Alignment Matrix**: Evaluation of concepts against stated objectives + +### Example Scenario + +**Starting Point:** +"A roguelike with psychological themes" + +**After brainstorm-game:** + +- **SCAMPER Result**: "What if standard roguelike death β†’ becomes emotional regression?" +- **Mind Map Result**: Emotion types (anger, fear, joy) as character classes +- **Lotus Blossom Result**: Inner demons as enemies, therapy sessions as rest points +- **Six Thinking Hats Result**: White (data) - mental health market growing; Red (emotion) - theme may alienate hardcore players +- **Random Word Association Result**: "Mirror" + "Roguelike" = reflection mechanics that change gameplay + +**Synthesized Concept:** +"Mirror of Mind: A roguelike card battler where you play as emotions battling inner demons. Deck composition affects narrative, emotional theme drives mechanics, 3 characters representing anger/fear/joy, target audience: core gamers interested in mental health themes." + +### Related Workflows + +- **game-brief** - Capture validated concept in structured brief +- **gdd** (Phase 2) - Full game design document + +--- + +## product-brief + +### Purpose + +Interactive product brief creation that guides users through defining their product vision with multiple input sources and conversational collaboration. + +**Agent:** PM +**Phase:** 1 (Analysis) +**Required:** Recommended (skip only if PRD already exists) +**Typical Duration:** 60-90 minutes (Interactive), 20-30 minutes (YOLO) + +### When to Use + +- Starting a new product or major feature initiative +- Aligning stakeholders before detailed planning +- Transitioning from exploration to strategy +- Creating executive-level product documentation + +### Prerequisites + +- Business context understood +- Problem or opportunity identified +- Stakeholders accessible for input +- Strategic objectives defined + +### Modes of Operation + +**Interactive Mode** (Recommended): + +- Step-by-step collaborative development +- Probing questions to refine thinking +- Deep exploration of problem/solution fit +- 60-90 minutes with high-quality output + +**YOLO Mode**: + +- AI generates complete draft from initial context +- User reviews and refines sections iteratively +- 20-30 minutes for rapid draft +- Best for time-constrained situations or when you have clear vision + +### Process Overview + +**Phase 1: Initialization and Context (Steps 0-2)** + +- Project setup and context capture +- Input document gathering +- Mode selection +- Context extraction + +**Phase 2: Interactive Development (Steps 3-12) - Interactive Mode** + +- Problem definition and pain points +- Solution articulation and value proposition +- User segmentation +- Success metrics and KPIs +- MVP scoping (ruthlessly defined) +- Financial planning and ROI +- Technical context +- Risk assessment and assumptions + +**Phase 3: Rapid Generation (Steps 3-4) - YOLO Mode** + +- Complete draft generation from context +- Iterative refinement of sections +- Quality validation + +**Phase 4: Finalization (Steps 13-15)** + +- Executive summary creation +- Supporting materials compilation +- Final review and handoff preparation + +### Inputs + +- Optional: Market research, competitive analysis, brainstorming results +- User input through conversational process +- Business context and objectives + +### Outputs + +**Primary Output:** `product-brief-{project_name}-{date}.md` + +**Output Structure:** + +1. Executive Summary +2. Problem Statement (with evidence) +3. Proposed Solution (core approach and differentiators) +4. Target Users (primary and secondary segments) +5. Goals and Success Metrics +6. MVP Scope (must-have features) +7. Post-MVP Vision +8. Financial Impact (investment and ROI) +9. Strategic Alignment +10. Technical Considerations +11. Constraints and Assumptions +12. Risks and Open Questions +13. Supporting Materials + +### Example Scenario + +**Starting Point:** +"We see customers struggling with project tracking" + +**After product-brief (Interactive Mode):** + +- **Problem**: Teams using 3+ tools for project management, causing 40% efficiency loss +- **Solution**: Unified workspace combining tasks, docs, and communication +- **Target Users**: 10-50 person product teams, SaaS-first companies +- **MVP Scope**: Task management + Real-time collaboration + Integrations (GitHub, Slack) +- **Success Metrics**: 30% reduction in tool-switching time, 20% faster project completion +- **Financial Impact**: $2M investment, $10M ARR target year 2 + +### Related Workflows + +- **brainstorm-project** - Generate solution approaches first +- **research** - Gather market/competitive intelligence +- **prd** (Phase 2) - Detailed requirements from product brief + +--- + +## game-brief + +### Purpose + +Lightweight, interactive brainstorming and planning session that captures game vision before diving into detailed Game Design Documents. + +**Agent:** PM +**Phase:** 1 (Analysis) +**Required:** Recommended for game projects +**Typical Duration:** 60-90 minutes + +### When to Use + +- Starting a new game project from scratch +- Exploring a game idea before committing +- Pitching a concept to team/stakeholders +- Validating market fit and feasibility +- Preparing input for GDD workflow + +**Skip if:** + +- You already have a complete GDD +- Continuing an existing project +- Prototyping without planning needs + +### Comparison: Game Brief vs GDD + +| Aspect | Game Brief | GDD | +| --------------- | --------------------------- | ------------------------- | +| Purpose | Validate concept | Design for implementation | +| Detail Level | High-level vision | Detailed specifications | +| Time Investment | 1-2 hours | 4-10 hours | +| Audience | Self, team, stakeholders | Development team | +| Scope | Concept validation | Implementation roadmap | +| Format | Conversational, exploratory | Structured, comprehensive | +| Output | 3-5 pages | 10-30+ pages | + +### Comparison: Game Brief vs Product Brief + +| Aspect | Game Brief | Product Brief | +| ------------- | ---------------------------- | --------------------------------- | +| Focus | Player experience, fun, feel | User problems, features, value | +| Metrics | Engagement, retention, fun | Revenue, conversion, satisfaction | +| Core Elements | Gameplay pillars, mechanics | Problem/solution, user segments | +| References | Other games | Competitors, market | +| Vision | Emotional experience | Business outcomes | + +### Workflow Structure + +**Interactive Mode** (Recommended): + +1. Game Vision (concept, pitch, vision statement) +2. Target Market (audience, competition, positioning) +3. Game Fundamentals (pillars, mechanics, experience goals) +4. Scope and Constraints (platforms, timeline, budget, team) +5. Reference Framework (inspiration, competitors, differentiators) +6. Content Framework (world, narrative, volume) +7. Art and Audio Direction +8. Risk Assessment (risks, challenges, mitigation) +9. Success Criteria (MVP, metrics, launch goals) +10. Next Steps + +**YOLO Mode**: AI generates complete draft, then you refine iteratively + +### Inputs + +Optional: + +- Market research +- Brainstorming results +- Competitive analysis +- Design notes +- Reference game lists + +### Outputs + +**Primary Output:** `game-brief-{game_name}-{date}.md` + +**Sections:** + +- Executive summary +- Complete game vision +- Target market analysis +- Core gameplay definition +- Scope and constraints +- Reference framework +- Art/audio direction +- Risk assessment +- Success criteria +- Next steps + +### Example Scenario + +**Starting Point:** +"I want to make a roguelike card game with a twist" + +**After Game Brief:** + +- **Core Concept**: Roguelike card battler where you play as emotions battling inner demons +- **Target Audience**: Core gamers who love Slay the Spire, interested in mental health themes +- **Differentiator**: Emotional narrative system where deck composition affects story +- **MVP Scope**: 3 characters, 80 cards, 30 enemy types, 3 bosses, 6-hour first run +- **Platform**: PC (Steam) first, mobile later +- **Timeline**: 12 months with 2-person team +- **Key Risk**: Emotional theme might alienate hardcore roguelike fans +- **Mitigation**: Prototype early, test with target audience, offer "mechanical-only" mode + +**Next Steps:** + +1. Build card combat prototype (2 weeks) +2. Test emotional resonance with players +3. Proceed to GDD workflow if prototype validates + +### Related Workflows + +- **brainstorm-game** - Generate initial concepts +- **gdd** (Phase 2) - Full game design document +- **narrative** (Phase 2) - For story-heavy games + +--- + +## research + +### Purpose + +Comprehensive, adaptive multi-type research system that consolidates various research methodologies into a single powerful tool. + +**Agent:** Analyst +**Phase:** 1 (Analysis) +**Required:** No +**Typical Duration:** Varies by type (Quick: 30-60 min, Standard: 2-4 hours, Comprehensive: 4-8 hours) + +### Research Types + +**6 Research Types Available:** + +| Type | Purpose | Use When | +| --------------- | ------------------------------------------------------ | ----------------------------------- | +| **market** | Market intelligence, TAM/SAM/SOM, competitive analysis | Need market viability validation | +| **deep_prompt** | Generate optimized research prompts for AI platforms | Need AI to research deeper topics | +| **technical** | Technology evaluation, architecture decisions | Choosing frameworks/platforms | +| **competitive** | Deep competitor analysis | Understanding competitive landscape | +| **user** | Customer insights, personas, JTBD | Need user understanding | +| **domain** | Industry deep dives, trends | Understanding domain/industry | + +### Market Research (Type: market) + +**Key Features:** + +- Real-time web research +- TAM/SAM/SOM calculations with multiple methodologies +- Competitive landscape analysis +- Customer persona development +- Porter's Five Forces and strategic frameworks +- Go-to-market strategy recommendations + +**Inputs:** + +- Product or business description +- Target customer hypotheses (optional) +- Known competitors list (optional) + +**Outputs:** + +- Market size analysis (TAM/SAM/SOM) +- Competitive positioning +- Customer segments and personas +- Market trends and opportunities +- Strategic recommendations +- Financial projections (optional) + +### Deep Research Prompt (Type: deep_prompt) + +**Key Features:** + +- Optimized for AI research platforms (ChatGPT Deep Research, Gemini, Grok, Claude Projects) +- Prompt engineering best practices +- Platform-specific optimization +- Context packaging for optimal AI understanding +- Research question refinement + +**Inputs:** + +- Research question or topic +- Background context documents (optional) +- Target AI platform preference (optional) + +**Outputs:** + +- Platform-optimized research prompt +- Multi-stage research workflow +- Context documents packaged +- Execution guidance + +### Technical Research (Type: technical) + +**Key Features:** + +- Technology evaluation and comparison matrices +- Architecture pattern research +- Framework/library assessment +- Technical feasibility studies +- Cost-benefit analysis +- Architecture Decision Records (ADR) + +**Inputs:** + +- Technical requirements +- Current architecture (if brownfield) +- Technical constraints + +**Outputs:** + +- Technology comparison matrix +- Trade-off analysis +- Cost-benefit assessment +- ADR with recommendation +- Implementation guidance + +### Configuration Options + +Can be customized through workflow.yaml: + +- **research_depth**: `quick`, `standard`, or `comprehensive` +- **enable_web_research**: Enable real-time data gathering +- **enable_competitor_analysis**: Competitive intelligence +- **enable_financial_modeling**: Financial projections + +### Frameworks Available + +**Market Research:** + +- TAM/SAM/SOM Analysis +- Porter's Five Forces +- Jobs-to-be-Done (JTBD) +- Technology Adoption Lifecycle +- SWOT Analysis +- Value Chain Analysis + +**Technical Research:** + +- Trade-off Analysis Matrix +- Architecture Decision Records (ADR) +- Technology Radar +- Comparison Matrix +- Cost-Benefit Analysis +- Technical Risk Assessment + +### Example Scenario + +**Type: market** + +**Input:** +"SaaS project management tool for remote teams" + +**Output:** + +- **TAM**: $50B (global project management software) +- **SAM**: $5B (remote-first teams 10-50 people) +- **SOM**: $50M (achievable in year 3) +- **Top Competitors**: Asana, Monday.com, ClickUp +- **Positioning**: "Real-time collaboration focused, vs async-first competitors" +- **Customer Personas**: Product Managers (primary), Engineering Leads (secondary) +- **Key Trends**: Remote work permanence, tool consolidation, AI features +- **Go-to-Market**: PLG motion, free tier, viral invite mechanics + +### Related Workflows + +- **product-brief** - Use research to inform brief +- **prd** (Phase 2) - Research feeds requirements +- **architecture** (Phase 3) - Technical research informs design + +--- + +## Best Practices for Phase 1 + +### 1. Don't Over-Invest in Analysis + +Analysis workflows are optional for a reason. If you already know what you're building and why, skip to Phase 2 (Planning). + +### 2. Iterate Between Workflows + +It's common to: + +1. Run **brainstorm-project** to explore +2. Use **research** to validate +3. Create **product-brief** to synthesize + +### 3. Document Assumptions + +Analysis phase is about surfacing and validating assumptions. Document them explicitly so planning can challenge them. + +### 4. Keep It Strategic + +Analysis workflows focus on "what" and "why", not "how". Leave implementation details for Planning and Solutioning phases. + +### 5. Involve Stakeholders + +Analysis workflows are collaborative. Use them to align stakeholders before committing to detailed planning. + +--- + +## Decision Guide: Which Analysis Workflow? + +### Starting a Software Project + +1. **brainstorm-project** (if unclear solution) β†’ **research** (market/technical) β†’ **product-brief** + +### Starting a Game Project + +1. **brainstorm-game** (if generating concepts) β†’ **research** (market/competitive) β†’ **game-brief** + +### Validating an Idea + +1. **research** (market type) β†’ **product-brief** or **game-brief** + +### Technical Decision + +1. **research** (technical type) β†’ Use ADR in **architecture** (Phase 3) + +### Understanding Market + +1. **research** (market or competitive type) β†’ **product-brief** + +### Generating Deep Research + +1. **research** (deep_prompt type) β†’ External AI research platform β†’ Return with findings + +--- + +## Integration with Phase 2 (Planning) + +Analysis workflows feed directly into Planning: + +| Analysis Output | Planning Input | +| --------------------------- | -------------------------- | +| product-brief.md | **prd** workflow | +| game-brief.md | **gdd** workflow | +| market-research.md | **prd** context | +| technical-research.md | **architecture** (Phase 3) | +| competitive-intelligence.md | **prd** positioning | + +The Planning phase (Phase 2) will load these documents automatically if they exist in the output folder. + +--- + +## Summary + +Phase 1 Analysis workflows are your strategic thinking tools. Use them to: + +- **Explore** problem spaces and solutions +- **Validate** ideas before heavy investment +- **Align** stakeholders on vision +- **Research** markets, competitors, and technologies +- **Document** strategic thinking for future reference + +Remember: **These workflows are optional.** If you know what you're building and why, skip to Phase 2 (Planning) to define requirements and create your PRD/GDD. diff --git a/bmad/bmm/docs/workflows-implementation.md b/bmad/bmm/docs/workflows-implementation.md new file mode 100644 index 00000000..9545eeb6 --- /dev/null +++ b/bmad/bmm/docs/workflows-implementation.md @@ -0,0 +1,1758 @@ +# BMM Implementation Workflows (Phase 4) + +**Reading Time:** ~20 minutes + +## Overview + +Phase 4 (Implementation) workflows manage the iterative sprint-based development cycle. This phase uses a **story-centric workflow** where each story moves through a defined lifecycle from creation to completion. + +**Key principle:** One story at a time, move it through the entire lifecycle before starting the next. + +## Quick Reference + +| Workflow | Agent | Duration | Purpose | +| --------------------- | ------- | -------------- | ------------------------------------ | +| **sprint-planning** | SM | 30-60 min | Initialize sprint tracking file | +| **epic-tech-context** | SM | 15-30 min/epic | Epic-specific technical guidance | +| **create-story** | SM | 10-20 min | Create next story from epics | +| **story-context** | PM | 10-15 min | Assemble dynamic story context | +| **dev-story** | DEV | 2-8 hours | Implement story with tests | +| **code-review** | DEV | 30-60 min | Senior dev review of completed story | +| **correct-course** | SM | 30-90 min | Handle mid-sprint changes | +| **retrospective** | SM | 60-90 min | Post-epic review and lessons | +| **workflow-status** | All | 2-5 min | Check "what should I do now?" | +| **document-project** | Analyst | 1-3 hours | Document brownfield projects | + +--- + +## Understanding the Implementation Phase + +### Story Lifecycle + +Every story moves through this lifecycle: + +``` +1. TODO (Not Started) + ↓ [sprint-planning creates status file] + +2. IN PROGRESS (Being Implemented) + ↓ [create-story generates story file] + ↓ [story-context assembles context] + ↓ [dev-story implements with tests] + +3. READY FOR REVIEW (Implementation Complete) + ↓ [code-review validates quality] + +4. DONE (Accepted) + ↓ [story-done marks complete] + ↓ [Repeat for next story] +``` + +### Sprint-Based Development Model + +**Sprint Structure:** + +- **Sprint 0 (Planning)**: Phases 1-3 complete +- **Sprint 1**: Epic 1 stories (P0/P1) +- **Sprint 2**: Epic 2 stories (P0/P1) +- **Sprint 3**: Epic 3+ stories (P0/P1) +- **Sprint N**: P2/P3 stories, polish + +**Typical Sprint Timeline:** + +- Week 1-2: Epic 1 implementation +- Week 3-4: Epic 2 implementation +- Week 5-6: Epic 3 implementation +- Week 7+: Refinement, P2/P3, polish + +### Multi-Agent Workflow + +Phase 4 involves coordination between agents: + +| Agent | Primary Workflows | Role | +| ----------- | ------------------------------------------------------------------------------- | -------------------------- | +| **SM** | sprint-planning, epic-tech-context, create-story, correct-course, retrospective | Orchestration, tracking | +| **PM** | story-context | Context assembly | +| **DEV** | dev-story, code-review | Implementation, quality | +| **Analyst** | document-project | Documentation (brownfield) | + +--- + +## sprint-planning + +### Purpose + +Generate and manage the sprint status tracking file for Phase 4 implementation, extracting all epics and stories from epic files and tracking their status through the development lifecycle. + +**Agent:** SM (Scrum Master) +**Phase:** 4 (Implementation) +**Required:** Yes (first step of Phase 4) +**Typical Duration:** 30-60 minutes + +### When to Use + +Run **once at the start of Phase 4** after solutioning-gate-check passes (or after PRD for Level 0-2). + +**Trigger Points:** + +- solutioning-gate-check PASS (Level 3-4) +- PRD complete (Level 2) +- tech-spec complete (Level 0-1) + +### Purpose of Sprint Planning + +**Creates:** + +- Sprint status tracking file (`sprint-status.yaml`) +- Story queue (ordered by priority and dependencies) +- Epic-level tracking +- Sprint assignments + +**Enables:** + +- workflow-status to answer "what's next?" +- Progress tracking throughout implementation +- Dependency management +- Velocity measurement + +### Process Overview + +**Phase 1: Context Loading (Step 1)** + +- Load epics.md +- Load individual epic files +- Load architecture.md (if exists) +- Extract all stories + +**Phase 2: Story Extraction (Steps 2-3)** + +- Parse stories from epic files +- Extract acceptance criteria +- Identify priorities (P0/P1/P2/P3) +- Extract dependencies + +**Phase 3: Sprint Assignment (Steps 4-5)** + +- Group stories by epic +- Sequence by priority and dependencies +- Assign to sprints (Sprint 1, 2, 3, etc.) +- Calculate sprint capacity estimates + +**Phase 4: Status File Creation (Step 6)** + +- Generate sprint-status.yaml +- Initialize all stories as TODO +- Document sprint plan +- Save to output folder + +### Inputs + +Required: + +- epics.md +- Epic files (epic-1-_.md, epic-2-_.md, etc.) + +Optional: + +- architecture.md (for technical dependencies) +- Team velocity data (for sprint sizing) + +### Outputs + +**Primary Output:** `sprint-status.yaml` + +**File Structure:** + +```yaml +metadata: + project_name: 'E-Commerce Platform' + total_epics: 3 + total_stories: 24 + current_sprint: 1 + sprint_start_date: '2025-11-02' + +sprints: + sprint_1: + name: 'Epic 1: Authentication' + start_date: '2025-11-02' + end_date: '2025-11-15' + capacity_points: 40 + stories: + - id: '1.1' + title: 'User can register with email' + status: 'TODO' + priority: 'P0' + epic: 1 + estimated_hours: 8 + assigned_to: null + dependencies: [] + - id: '1.2' + title: 'User can login with email' + status: 'TODO' + priority: 'P0' + epic: 1 + estimated_hours: 6 + assigned_to: null + dependencies: ['1.1'] + + sprint_2: + name: 'Epic 2: Product Catalog' + # ... + +story_queue: + - '1.1' # No dependencies, P0 + - '1.2' # Depends on 1.1, P0 + - '1.3' # Depends on 1.2, P0 + # ... + +epics: + - id: 1 + name: 'Authentication' + total_stories: 8 + completed_stories: 0 + status: 'IN_PROGRESS' + - id: 2 + name: 'Product Catalog' + total_stories: 10 + completed_stories: 0 + status: 'TODO' + - id: 3 + name: 'Shopping Cart' + total_stories: 6 + completed_stories: 0 + status: 'TODO' +``` + +### Example Scenario + +**Input:** 3 epics with 24 total stories + +**Output:** + +- **Sprint 1**: Epic 1 (8 stories, 2 weeks) +- **Sprint 2**: Epic 2 (10 stories, 2 weeks) +- **Sprint 3**: Epic 3 (6 stories, 1 week) + +**Story Queue:** + +1. Story 1.1 (P0, no deps) β†’ Start here +2. Story 1.2 (P0, deps: 1.1) +3. Story 1.3 (P0, deps: 1.2) +4. Story 2.1 (P0, no deps) β†’ Can parallelize with 1.x + ... + +### Related Workflows + +- **solutioning-gate-check** (Phase 3) - Must PASS before sprint-planning +- **workflow-status** - Uses sprint-status.yaml to answer "what's next?" +- **create-story** - Uses story_queue to determine next story + +--- + +## epic-tech-context + +### Purpose + +Generate epic-specific technical context document that provides implementation guidance, patterns, and technical decisions for a single epic. Bridges architecture and story implementation. + +**Agent:** SM (Scrum Master) +**Phase:** 4 (Implementation) +**Required:** Optional (recommended for Level 3-4) +**Typical Duration:** 15-30 minutes per epic + +### When to Use + +Run **once per epic** before starting epic stories. + +**Trigger Points:** + +- Before implementing first story of an epic +- When starting a new epic in a sprint +- When architecture guidance is needed + +**Skip if:** + +- Level 0-1 (no epics) +- Level 2 (simple epics, architecture is straightforward) + +### Purpose of Epic Tech Context + +**Provides:** + +- Epic-specific technical guidance +- Code patterns and examples +- Integration points +- Testing strategy for epic +- Epic-level architectural decisions + +**Prevents:** + +- Re-reading entire architecture.md for each story +- Inconsistent implementations within epic +- Missing epic-level integration patterns + +### Process Overview + +**Phase 1: Context Loading (Step 1)** + +- Load architecture.md +- Load epic file (epic-X-\*.md) +- Load sprint-status.yaml +- Identify epic stories + +**Phase 2: Technical Extraction (Steps 2-4)** + +- Extract relevant architecture sections for epic +- Identify epic-specific ADRs +- Determine code patterns +- Identify integration points + +**Phase 3: Implementation Guidance (Steps 5-7)** + +- Define directory structure for epic +- Specify testing approach +- Provide code examples +- Document epic-level constants/config + +**Phase 4: Documentation (Step 8)** + +- Generate epic-tech-context.md +- Save to output folder +- Update sprint-status.yaml with context path + +### Inputs + +Required: + +- architecture.md +- epic-X-\*.md (specific epic file) +- sprint-status.yaml + +### Outputs + +**Primary Output:** `epic-{N}-tech-context.md` + +**Document Structure:** + +1. Epic Overview +2. Relevant Architecture Decisions + - ADRs applicable to this epic + - Technology selections +3. Directory Structure + - Files to create/modify + - Module organization +4. Code Patterns + - Epic-specific patterns + - Code examples +5. Integration Points + - APIs to create/consume + - Database interactions + - Third-party services +6. Testing Strategy + - Test levels for epic (E2E, API, Unit) + - Test fixtures needed + - Mock strategies +7. Configuration + - Environment variables + - Feature flags + - Constants + +### Example: Epic 1 Tech Context (Authentication) + +```markdown +# Epic 1 Tech Context: Authentication + +## Architecture Decisions + +**ADR-001: Use NextAuth.js** + +- All stories in this epic use NextAuth.js +- Database adapter: PostgreSQL (via Prisma) +- Session strategy: Database sessions (not JWT) + +**ADR-003: Password Security** + +- Use bcrypt with 12 rounds +- Minimum password length: 8 characters +- Require: uppercase, lowercase, number + +## Directory Structure +``` + +/pages/api/auth/ +[...nextauth].ts # Story 1.1 +register.ts # Story 1.2 +verify-email.ts # Story 1.3 + +/lib/auth/ +validation.ts # Story 1.2 +email-service.ts # Story 1.3 + +/prisma/schema.prisma +User model # Story 1.1 +Session model # Story 1.1 + +```` + +## Code Patterns + +**User Registration (Story 1.2):** +```typescript +// /lib/auth/validation.ts +export const validatePassword = (password: string) => { + const minLength = 8; + const hasUppercase = /[A-Z]/.test(password); + const hasLowercase = /[a-z]/.test(password); + const hasNumber = /\d/.test(password); + + if (password.length < minLength) { + throw new Error('Password too short'); + } + // ... +}; +```` + +## Integration Points + +**Database:** + +- Create User table with Prisma migration (Story 1.1) +- Create Session table with Prisma migration (Story 1.1) + +**Third-Party Services:** + +- SendGrid for email verification (Story 1.3) + - API Key: SENDGRID_API_KEY env variable + - From email: no-reply@example.com + +## Testing Strategy + +**E2E Tests:** + +- Story 1.1: Full registration flow +- Story 1.2: Login flow +- Story 1.3: Email verification flow + +**API Tests:** + +- All /api/auth/\* endpoints +- Error cases: duplicate email, invalid password + +**Unit Tests:** + +- validation.ts functions +- email-service.ts functions + +**Test Fixtures:** + +- Create `tests/fixtures/auth.fixture.ts` +- Provide: createTestUser(), loginTestUser(), cleanupTestUser() + +## Configuration + +**Environment Variables:** + +``` +DATABASE_URL=postgresql://... +NEXTAUTH_URL=http://localhost:3000 +NEXTAUTH_SECRET= +SENDGRID_API_KEY=SG.xxx +``` + +**Constants:** + +```typescript +// /lib/auth/constants.ts +export const PASSWORD_MIN_LENGTH = 8; +export const BCRYPT_ROUNDS = 12; +export const EMAIL_VERIFICATION_EXPIRY_HOURS = 24; +``` + +```` + +### Related Workflows +- **architecture** (Phase 3) - Source of technical guidance +- **story-context** - Uses epic-tech-context as input +- **dev-story** - References epic-tech-context during implementation + +--- + +## create-story + +### Purpose +Create the next user story markdown from epics/PRD and architecture, using a standard template and saving to the stories folder. + +**Agent:** SM (Scrum Master) +**Phase:** 4 (Implementation) +**Required:** Yes (for each story) +**Typical Duration:** 10-20 minutes per story + +### When to Use +Run **before implementing each story** to generate story file. + +**Trigger Points:** +- Before starting work on a new story +- When story_queue identifies next story +- After completing previous story + +### Process Overview + +**Phase 1: Story Selection (Step 1)** +- Load sprint-status.yaml +- Read story_queue +- Select next story (first in queue with dependencies met) + +**Phase 2: Story Extraction (Steps 2-3)** +- Load epic file for selected story +- Extract story details +- Extract acceptance criteria +- Extract dependencies + +**Phase 3: Context Gathering (Steps 4-5)** +- Load PRD/GDD for product context +- Load architecture for technical context +- Load epic-tech-context (if exists) + +**Phase 4: Story File Creation (Step 6)** +- Generate story markdown using template +- Include acceptance criteria +- Include technical notes +- Save to stories/ folder + +**Phase 5: Status Update (Step 7)** +- Update sprint-status.yaml +- Move story from TODO β†’ IN PROGRESS +- Update workflow-status.md + +### Inputs +Required: +- sprint-status.yaml (story queue) +- epic-X-*.md (for story details) +- PRD.md or GDD.md + +Optional: +- architecture.md +- epic-tech-context.md + +### Outputs + +**Primary Output:** `story-{epic}.{num}-{title}.md` + +**Story File Structure:** +```markdown +# Story {Epic}.{Num}: {Title} + +**Epic:** {Epic Name} +**Priority:** P0/P1/P2/P3 +**Status:** IN PROGRESS +**Estimated Hours:** {Hours} +**Dependencies:** {Story IDs or "None"} + +## User Story + +As a {user type}, +I want to {action}, +So that {benefit}. + +## Acceptance Criteria + +- [ ] AC-1: {Criterion} +- [ ] AC-2: {Criterion} +- [ ] AC-3: {Criterion} + +## Technical Notes + +{From architecture/epic-tech-context} + +## Implementation Checklist + +- [ ] Read story-context.xml for dynamic context +- [ ] Implement feature code +- [ ] Write tests (unit, integration, E2E as needed) +- [ ] Update documentation +- [ ] Run tests locally +- [ ] Verify acceptance criteria +- [ ] Mark story as READY FOR REVIEW + +## Definition of Done + +- [ ] All acceptance criteria met +- [ ] Tests written and passing +- [ ] Code reviewed +- [ ] Documentation updated +- [ ] No regressions in existing features +```` + +### Example: Story 1.2 - User Can Login + +```markdown +# Story 1.2: User Can Login with Email + +**Epic:** Epic 1 - Authentication +**Priority:** P0 +**Status:** IN PROGRESS +**Estimated Hours:** 6 +**Dependencies:** Story 1.1 (User Registration) + +## User Story + +As a registered user, +I want to login with my email and password, +So that I can access my account. + +## Acceptance Criteria + +- [ ] AC-1: User can enter email and password on login page +- [ ] AC-2: Valid credentials redirect to dashboard +- [ ] AC-3: Invalid credentials show error message +- [ ] AC-4: Error message does not reveal if email exists (security) +- [ ] AC-5: Login creates session that persists across page refreshes + +## Technical Notes + +**From Architecture (ADR-001):** + +- Use NextAuth.js with database session strategy +- Session stored in PostgreSQL via Prisma + +**From Epic Tech Context:** + +- Implement /pages/api/auth/[...nextauth].ts +- Use bcrypt.compare() for password validation +- Return generic error for security (don't reveal "email not found" vs "wrong password") + +## Implementation Checklist + +- [ ] Read story-context.xml +- [ ] Create /pages/login.tsx +- [ ] Configure NextAuth.js credentials provider +- [ ] Implement password comparison logic +- [ ] Write E2E test: Valid login β†’ Dashboard +- [ ] Write E2E test: Invalid login β†’ Error +- [ ] Write API test: POST /api/auth/callback/credentials +- [ ] Verify AC-1 through AC-5 +- [ ] Mark READY FOR REVIEW + +## Definition of Done + +- [ ] Login page exists and is styled +- [ ] Valid credentials authenticate successfully +- [ ] Invalid credentials show error +- [ ] Session persists across page loads +- [ ] Tests pass (2 E2E, 3 API) +- [ ] Code reviewed +``` + +### Related Workflows + +- **sprint-planning** - Creates story_queue +- **story-context** - Run after create-story +- **dev-story** - Implements the story + +--- + +## story-context + +### Purpose + +Assemble dynamic story context XML by pulling latest documentation and existing code/library artifacts relevant to a drafted story. + +**Agent:** PM (Project Manager) +**Phase:** 4 (Implementation) +**Required:** Yes (before implementing story) +**Typical Duration:** 10-15 minutes per story + +### When to Use + +Run **after create-story** and **before dev-story** for each story. + +**Trigger Points:** + +- Immediately after create-story generates story file +- Before DEV agent starts implementation + +### Purpose of Story Context + +**Problem Without Context:** + +- DEV agent re-reads entire PRD, architecture, epic files (100+ pages) +- Slow context loading +- Irrelevant information clutters thinking + +**Solution With Context:** + +- PM assembles **only relevant** context for this story +- DEV agent receives focused, story-specific information +- Fast, targeted implementation + +### Process Overview + +**Phase 1: Story Loading (Step 1)** + +- Load story file (story-{epic}.{num}-{title}.md) +- Extract story ID, epic, dependencies +- Extract acceptance criteria + +**Phase 2: Documentation Context (Steps 2-4)** + +- Load relevant PRD/GDD sections +- Load relevant architecture sections +- Load epic-tech-context (if exists) +- Load dependent story files + +**Phase 3: Code Context (Steps 5-6)** + +- Identify existing code files related to story +- Load relevant library code (models, services, utils) +- Load related test files + +**Phase 4: Context Assembly (Step 7)** + +- Generate story-context.xml +- Organize context by type (docs, code, tests) +- Include only relevant sections +- Save to output folder + +### Inputs + +Required: + +- story-{epic}.{num}-{title}.md + +Optional (loaded as needed): + +- PRD.md or GDD.md +- architecture.md +- epic-tech-context.md +- Existing codebase files + +### Outputs + +**Primary Output:** `story-{epic}.{num}-context.xml` + +**XML Structure:** + +```xml + + + + User can enter email and password on login page + Valid credentials redirect to dashboard + + + + + +
+ +
+
+ + + + + +
+ +
+
+ + +
+ +
+
+ + + + + + + + + + + + + + + +
+``` + +### Example: Story 1.2 Context Assembly + +**Story 1.2: User Can Login** + +**Context Assembled:** + +1. **Product Context** (from PRD): + - Authentication requirements section (2 pages) + - User personas: Primary user is buyer + +2. **Architecture Context** (from architecture.md): + - ADR-001: Use NextAuth.js (full ADR) + - Authentication Architecture section (1 page) + +3. **Epic Context** (from epic-1-tech-context.md): + - Code patterns for login + - Integration points (NextAuth.js config) + - Testing strategy + +4. **Code Context** (existing files): + - `/prisma/schema.prisma` - User and Session models + - `/lib/auth/validation.ts` - Password validation (from Story 1.1) + - `/pages/api/auth/[...nextauth].ts` - Auth config (created in Story 1.1) + +5. **Dependency Context** (Story 1.1): + - Summary: User registration creates User in DB + - Dependency: User table must exist + +**Result:** DEV agent receives 8-10 pages of **focused** context instead of 100+ pages of full documentation. + +### Related Workflows + +- **create-story** - Creates story file that story-context uses +- **dev-story** - Consumes story-context.xml + +--- + +## dev-story + +### Purpose + +Execute a story by implementing tasks/subtasks, writing tests, validating, and updating the story file per acceptance criteria. + +**Agent:** DEV (Developer) +**Phase:** 4 (Implementation) +**Required:** Yes (for each story) +**Typical Duration:** 2-8 hours per story (varies by complexity) + +### When to Use + +Run **after story-context** to implement the story. + +**Trigger Points:** + +- After story-context.xml is generated +- When story status is IN PROGRESS +- For each story in story_queue + +### Process Overview + +**Phase 1: Context Loading (Step 1)** + +- Load story file +- Load story-context.xml +- Review acceptance criteria +- Review technical notes + +**Phase 2: Implementation Planning (Steps 2-3)** + +- Break story into tasks +- Identify files to create/modify +- Plan test strategy +- Estimate implementation approach + +**Phase 3: Implementation (Steps 4-6)** + +- Write code to satisfy acceptance criteria +- Follow architecture decisions +- Apply code patterns from epic-tech-context +- Write tests (unit, integration, E2E as needed) + +**Phase 4: Validation (Steps 7-8)** + +- Run tests locally +- Verify all acceptance criteria met +- Check for regressions +- Ensure code quality + +**Phase 5: Documentation (Step 9)** + +- Update story file (check off AC items) +- Document any deviations +- Mark story as READY FOR REVIEW +- Update sprint-status.yaml + +### Inputs + +Required: + +- story-{epic}.{num}-{title}.md +- story-{epic}.{num}-context.xml + +### Outputs + +- Implementation code (multiple files) +- Test files +- Updated story file (AC checked off) +- Updated sprint-status.yaml (status: READY FOR REVIEW) + +### Example: Implementing Story 1.2 (Login) + +**Phase 1: Planning** +Tasks identified: + +1. Create /pages/login.tsx (UI) +2. Configure NextAuth credentials provider +3. Implement password verification logic +4. Write E2E test: Valid login +5. Write E2E test: Invalid login +6. Write API test: /api/auth/callback/credentials + +**Phase 2: Implementation** +Files created/modified: + +- `/pages/login.tsx` (new) +- `/pages/api/auth/[...nextauth].ts` (modified - add credentials provider) +- `/lib/auth/password.ts` (new - password verification) +- `/tests/e2e/auth-login.spec.ts` (new) +- `/tests/api/auth-api.spec.ts` (modified - add login tests) + +**Phase 3: Testing** + +```bash +npm run test:e2e +npm run test:api +npm run test:unit +``` + +All tests pass βœ… + +**Phase 4: Verification** + +- [x] AC-1: Login page exists with email/password inputs +- [x] AC-2: Valid credentials β†’ Dashboard +- [x] AC-3: Invalid credentials β†’ Error message +- [x] AC-4: Error message generic (security) +- [x] AC-5: Session persists across page refreshes + +**Phase 5: Documentation** +Update story file: + +```markdown +## Acceptance Criteria + +- [x] AC-1: User can enter email and password on login page +- [x] AC-2: Valid credentials redirect to dashboard +- [x] AC-3: Invalid credentials show error message +- [x] AC-4: Error message does not reveal if email exists (security) +- [x] AC-5: Login creates session that persists across page refreshes + +## Implementation Summary + +Files Created: + +- /pages/login.tsx +- /lib/auth/password.ts +- /tests/e2e/auth-login.spec.ts + +Files Modified: + +- /pages/api/auth/[...nextauth].ts +- /tests/api/auth-api.spec.ts + +Tests Added: + +- 2 E2E tests (valid/invalid login) +- 3 API tests (credentials endpoint) + +**Status:** READY FOR REVIEW +``` + +### Related Workflows + +- **story-context** - Provides focused context +- **code-review** - Next step after implementation +- **correct-course** - If changes needed mid-story + +--- + +## code-review + +### Purpose + +Perform a Senior Developer code review on a completed story flagged Ready for Review, leveraging story-context, epic-tech-context, repo docs, MCP servers for latest best-practices, and web search as fallback. + +**Agent:** DEV (Senior Developer persona) +**Phase:** 4 (Implementation) +**Required:** Recommended (especially for P0/P1 stories) +**Typical Duration:** 30-60 minutes per story + +### When to Use + +Run **after dev-story** when story status is READY FOR REVIEW. + +**Trigger Points:** + +- Story status: READY FOR REVIEW +- Before marking story as DONE +- For P0/P1 stories (required) +- For P2/P3 stories (optional but recommended) + +### Process Overview + +**Phase 1: Context Loading (Step 1)** + +- Load story file +- Load story-context.xml +- Load implementation files +- Load test files + +**Phase 2: Review Criteria (Steps 2-5)** + +- **Acceptance Criteria**: All AC met? +- **Architecture Alignment**: Follows architecture decisions? +- **Code Quality**: Readable, maintainable, follows conventions? +- **Test Coverage**: Sufficient tests, tests passing? +- **Best Practices**: Uses latest framework patterns? + +**Phase 3: Knowledge Loading (Steps 6-7)** + +- Load repository documentation (CONTRIBUTING.md, CODE_STYLE.md) +- Use MCP servers for framework best practices (if available) +- Web search for latest patterns (fallback) + +**Phase 4: Review Execution (Steps 8-10)** + +- Review each file changed +- Identify issues (critical, high, medium, low) +- Suggest improvements +- Verify tests + +**Phase 5: Review Report (Step 11)** + +- Generate code-review.md +- Append to story file +- Update sprint-status.yaml + +### Review Criteria + +**Acceptance Criteria Validation:** + +- [ ] All AC items checked off in story file +- [ ] AC validated through tests +- [ ] AC validated manually (if needed) + +**Architecture Alignment:** + +- [ ] Follows ADRs +- [ ] Uses specified technology choices +- [ ] Follows directory structure conventions +- [ ] Follows code patterns from epic-tech-context + +**Code Quality:** + +- [ ] Readable and maintainable +- [ ] Follows repository conventions +- [ ] No code smells (long functions, god classes, etc.) +- [ ] Appropriate error handling +- [ ] Security best practices followed + +**Test Coverage:** + +- [ ] Tests exist for all AC +- [ ] Tests pass locally +- [ ] Edge cases covered +- [ ] Tests follow framework best practices +- [ ] No flaky tests + +**Best Practices:** + +- [ ] Uses latest framework patterns +- [ ] Avoids deprecated APIs +- [ ] Performance considerations addressed +- [ ] Accessibility requirements met (if applicable) + +### Inputs + +Required: + +- story-{epic}.{num}-{title}.md (with READY FOR REVIEW status) +- story-{epic}.{num}-context.xml +- Implementation files (code) +- Test files + +Optional: + +- Repository documentation (CONTRIBUTING.md, CODE_STYLE.md) +- MCP servers for best practices +- Web search for latest patterns + +### Outputs + +**Primary Output:** Code review appended to story file + +**Review Structure:** + +````markdown +--- + +## Code Review - {Date} + +**Reviewer:** DEV (Senior Developer) +**Status:** APPROVED / REQUEST CHANGES / APPROVED WITH COMMENTS + +### Summary + +{Overall assessment} + +### Acceptance Criteria Validation + +- [x] AC-1: Validated βœ… +- [x] AC-2: Validated βœ… +- [x] AC-3: Validated βœ… +- [x] AC-4: Validated βœ… +- [x] AC-5: Validated βœ… + +### Architecture Alignment + +βœ… Follows ADR-001 (NextAuth.js) +βœ… Uses database session strategy +βœ… Follows epic-tech-context patterns + +### Code Quality Issues + +**Critical Issues (Must Fix):** +None + +**High Priority (Should Fix Before Merge):** + +1. /lib/auth/password.ts:15 - Use constant for bcrypt rounds instead of magic number + + ```typescript + // Current: + const hash = await bcrypt.hash(password, 12); + + // Suggested: + import { BCRYPT_ROUNDS } from './constants'; + const hash = await bcrypt.hash(password, BCRYPT_ROUNDS); + ``` +```` + +**Medium Priority (Address in Follow-up):** + +1. /pages/login.tsx:42 - Consider extracting form validation to custom hook +2. Add JSDoc comments to public functions in /lib/auth/password.ts + +**Low Priority (Nice to Have):** + +1. Consider using react-hook-form for login form (reduces boilerplate) + +### Test Coverage + +βœ… E2E tests cover happy and sad paths +βœ… API tests cover error cases +⚠️ Consider adding unit test for password validation edge cases + +### Best Practices + +βœ… Uses latest Next.js 14 patterns +βœ… Follows React best practices +βœ… Accessibility: Form has labels and error messages + +### Recommendation + +**APPROVED WITH COMMENTS** - Address high priority issue #1, then merge. + +Medium/low priority items can be addressed in future stories. + +```` + +### Review Outcomes + +**APPROVED** βœ… +- All criteria met +- No critical/high issues +- Story can be marked DONE +- **Action**: Run story-done workflow + +**APPROVED WITH COMMENTS** βœ…βš οΈ +- Minor issues noted +- Suggestions for improvement +- Story can be marked DONE +- **Action**: Address comments in follow-up (optional) + +**REQUEST CHANGES** ❌ +- Critical or high-priority issues found +- Changes required before merge +- Story remains READY FOR REVIEW +- **Action**: Fix issues, re-request review + +### Related Workflows +- **dev-story** - Implementation that's being reviewed +- **story-done** - Next step if approved +- **correct-course** - If significant changes needed + +--- + +## correct-course + +### Purpose +Navigate significant changes during sprint execution by analyzing impact, proposing solutions, and routing for implementation. + +**Agent:** SM (Scrum Master) +**Phase:** 4 (Implementation) +**Required:** As needed +**Typical Duration:** 30-90 minutes + +### When to Use +Run when **significant changes** occur mid-sprint: + +**Trigger Scenarios:** +- New requirements discovered during implementation +- Architecture decision needs revision +- Story dependencies change +- External factors impact sprint (API changes, platform updates) +- Critical bug discovered requiring immediate attention + +**Don't Use For:** +- Minor clarifications β†’ Clarify in story file +- Small scope adjustments β†’ Adjust AC in story +- Typical development blockers β†’ Resolve within team + +### Process Overview + +**Phase 1: Change Analysis (Steps 1-3)** +- Identify change type (requirements, technical, external) +- Assess impact (stories, epics, architecture) +- Determine urgency (blocking, high, medium, low) + +**Phase 2: Impact Assessment (Steps 4-6)** +- Stories affected +- Epics affected +- Architecture changes needed +- Timeline impact + +**Phase 3: Solution Proposal (Steps 7-9)** +- **Option A**: Adjust scope (remove stories, defer features) +- **Option B**: Adjust architecture (revise decisions) +- **Option C**: Adjust timeline (extend sprint) +- **Option D**: Combination approach + +**Phase 4: Decision and Routing (Steps 10-12)** +- Consult stakeholders (if needed) +- Select solution +- Route to appropriate workflow: + - Requirements change β†’ Update PRD β†’ Re-run create-story + - Architecture change β†’ Update architecture β†’ Re-run epic-tech-context + - Story change β†’ Update story file β†’ Continue dev-story +- Update sprint-status.yaml + +### Change Types + +**Requirements Change:** +- New AC discovered +- AC invalidated by new information +- Feature scope expansion/reduction + +**Technical Change:** +- Architecture decision no longer viable +- Technology choice needs revision +- Integration approach changed + +**External Change:** +- Third-party API changed +- Platform update breaks implementation +- Regulatory requirement introduced + +### Inputs +Required: +- Description of change +- Current story/epic affected +- Current sprint-status.yaml + +### Outputs +- Change impact analysis document +- Updated documentation (PRD/architecture/stories) +- Updated sprint-status.yaml +- Routing recommendations + +### Example: API Change Mid-Sprint + +**Change:** SendGrid deprecated email API, requires migration to new API + +**Impact Analysis:** +- **Stories Affected**: Story 1.3 (Email Verification) - IN PROGRESS +- **Epics Affected**: Epic 1 (Authentication) +- **Architecture Impact**: ADR-004 (Email Service) needs revision +- **Timeline Impact**: +1 day (API migration work) + +**Solution Options:** + +**Option A:** Continue with deprecated API, plan migration for later +- **Pros**: No sprint disruption +- **Cons**: Technical debt, API sunset in 6 months + +**Option B:** Migrate to new API now +- **Pros**: No technical debt, future-proof +- **Cons**: +1 day to sprint + +**Option C:** Defer email verification to next sprint +- **Pros**: No disruption to current sprint +- **Cons**: Story 1.3 incomplete, Epic 1 not done + +**Decision:** Option B (Migrate now) + +**Actions:** +1. Update architecture.md (ADR-004: Use SendGrid v4 API) +2. Update epic-1-tech-context.md (new email patterns) +3. Update Story 1.3 acceptance criteria (new API endpoints) +4. Continue dev-story with new approach +5. Extend sprint by 1 day + +### Related Workflows +- **architecture** - May need updates +- **create-story** - May need to create new stories +- **sprint-planning** - May need to re-prioritize +- **retrospective** - Document learnings + +--- + +## retrospective + +### Purpose +Run after epic completion to review overall success, extract lessons learned, and explore if new information emerged that might impact the next epic. + +**Agent:** SM (Scrum Master) +**Phase:** 4 (Implementation) +**Required:** Recommended (after each epic) +**Typical Duration:** 60-90 minutes + +### When to Use +Run **after completing an epic** (all stories DONE). + +**Trigger Points:** +- Epic status: DONE +- All epic stories completed +- Before starting next epic +- Before final release (after all epics) + +### Process Overview + +**Phase 1: Data Gathering (Steps 1-3)** +- Load sprint-status.yaml +- Load completed story files +- Load code-review feedback +- Gather metrics (velocity, story cycle time) + +**Phase 2: Review Execution (Steps 4-7)** +- **What Went Well**: Successes and wins +- **What Didn't Go Well**: Challenges and issues +- **Lessons Learned**: Actionable insights +- **Process Improvements**: Changes for next epic + +**Phase 3: Technical Insights (Steps 8-10)** +- Architecture decisions review +- Technology choices validation +- Code quality assessment +- Test coverage and quality + +**Phase 4: Planning Insights (Steps 11-13)** +- Estimation accuracy +- Requirements clarity +- Dependency management +- Scope changes + +**Phase 5: Action Items (Step 14)** +- Process changes for next epic +- Architecture updates needed +- Documentation improvements +- Training or knowledge gaps + +### Inputs +Required: +- sprint-status.yaml (epic completion data) +- Completed story files +- code-review feedback + +Optional: +- Team velocity data +- CI/CD metrics +- Bug reports + +### Outputs + +**Primary Output:** `retrospective-epic-{N}-{date}.md` + +**Document Structure:** +1. Epic Summary + - Stories completed + - Time taken + - Velocity achieved +2. What Went Well +3. What Didn't Go Well +4. Lessons Learned +5. Technical Insights +6. Planning Insights +7. Action Items for Next Epic +8. Process Improvements + +### Example: Epic 1 Retrospective + +```markdown +# Retrospective: Epic 1 - Authentication + +**Date:** 2025-11-15 +**Duration:** 2 weeks (planned), 2.5 weeks (actual) +**Stories Completed:** 8/8 +**Velocity:** 48 points (target: 60 points) + +## What Went Well + +βœ… **Architecture decisions solid** +- NextAuth.js choice worked well +- Database sessions simpler than JWT + +βœ… **Test coverage excellent** +- All stories have E2E + API tests +- No critical bugs in production + +βœ… **Team collaboration strong** +- Code reviews thorough +- Knowledge sharing effective + +## What Didn't Go Well + +❌ **Estimation inaccurate** +- Stories took 20% longer than estimated +- Story 1.3 (Email Verification) took 2 days instead of 1 + +❌ **Third-party integration surprise** +- SendGrid API deprecation discovered mid-sprint +- Required correct-course workflow + +❌ **Testing setup overhead** +- Test fixtures took longer than expected to set up +- Should have created fixtures earlier + +## Lessons Learned + +πŸ’‘ **Buffer time for integrations** +- Add 25% buffer to stories with third-party APIs +- Research API stability before committing + +πŸ’‘ **Test fixtures upfront** +- Create test fixtures in first story of epic +- Reuse across all stories + +πŸ’‘ **Architecture review cadence** +- Mid-epic architecture check-in would have caught issues earlier + +## Technical Insights + +**Architecture:** +- ADR-001 (NextAuth.js) validated βœ… +- ADR-004 (SendGrid) needed revision (v3 β†’ v4) + +**Code Quality:** +- Average code-review score: 8.5/10 +- No critical issues +- 3 high-priority issues (all addressed) + +**Test Coverage:** +- E2E: 95% of critical paths +- API: 100% of endpoints +- Unit: 85% of business logic + +## Planning Insights + +**Estimation Accuracy:** +- Estimated: 60 points +- Actual: 72 points +- Variance: +20% +- **Adjustment**: Use 1.2Γ— multiplier for next epic + +**Requirements Clarity:** +- PRD was clear βœ… +- Architecture was thorough βœ… +- Story AC needed refinement in 2 stories + +**Dependency Management:** +- Story dependencies well-sequenced +- No blocking issues + +## Action Items for Epic 2 + +1. **Create test fixtures first** (Story 2.1) + - Owner: DEV + - Timeline: First story of Epic 2 + +2. **Add 25% buffer to integration stories** + - Owner: SM + - Apply in epic-2 estimates + +3. **Mid-epic architecture check-in** + - Owner: Architect + - Schedule after 50% epic completion + +4. **Research third-party API stability** + - Owner: DEV + - Before starting stories with external APIs + +## Process Improvements + +**For Next Epic:** +- βœ… Run architecture review mid-epic +- βœ… Create test fixtures in first story +- βœ… Add buffer time to estimates +- βœ… Document third-party API versions in architecture + +**For Future Projects:** +- Document API stability research process +- Create reusable test fixture templates +```` + +### Related Workflows + +- **sprint-planning** - Next epic planning +- **architecture** - May need updates from insights +- **create-story** - Apply lessons to story creation + +--- + +## Utility Workflows + +### workflow-status + +**Purpose:** Check "what should I do now?" for any agent. + +**Agent:** All +**Duration:** 2-5 minutes +**When to Use:** Anytime you're unsure of next step + +**How It Works:** + +1. Loads sprint-status.yaml +2. Determines current phase +3. Identifies next workflow to run +4. Provides clear recommendation + +**Example Output:** + +``` +Current Phase: 4 (Implementation) +Current Epic: Epic 1 (Authentication) +Current Sprint: Sprint 1 + +Next Story: Story 1.3 (Email Verification) +Status: TODO +Dependencies: Story 1.2 (DONE) βœ… + +**Recommendation:** Run `create-story` to generate Story 1.3 + +After create-story: +1. Run story-context +2. Run dev-story +3. Run code-review +4. Run story-done +``` + +See: [workflow-status README](../workflows/workflow-status/README.md) + +--- + +### document-project + +**Purpose:** Analyze and document brownfield projects by scanning codebase, architecture, and patterns. + +**Agent:** Analyst +**Duration:** 1-3 hours +**When to Use:** Brownfield projects without documentation + +**How It Works:** + +1. Scans codebase structure +2. Identifies architecture patterns +3. Documents technology stack +4. Creates reference documentation +5. Generates PRD-like document from existing code + +**Output:** `project-documentation-{date}.md` + +**When to Run:** + +- Before starting work on legacy project +- When inheriting undocumented codebase +- Creating onboarding documentation + +See: [document-project README](../workflows/document-project/README.md) + +--- + +## Story Lifecycle Visualization + +``` +β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” +β”‚ PHASE 4: IMPLEMENTATION (Iterative Story Lifecycle) β”‚ +β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ + +β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” +β”‚ Sprint Planning β”‚ β†’ Creates sprint-status.yaml +β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜ Defines story queue + β”‚ + β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” + β”‚ β”‚ + β–Ό β”‚ +β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ +β”‚ Epic Tech Context β”‚ β†’ Optional per epic β”‚ +β”‚ (Once per epic) β”‚ Provides technical β”‚ +β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ guidance β”‚ + β”‚ β”‚ + β–Ό β”‚ +β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ +β”‚ FOR EACH STORY IN QUEUE: β”‚ +β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ + β”‚ β”‚ + β–Ό β”‚ +β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ +β”‚ Create Story β”‚ β†’ Generates story file β”‚ +β”‚ (TODO β†’ IN PROGRESS) β”‚ +β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ + β”‚ β”‚ + β–Ό β”‚ +β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ +β”‚ Story Context β”‚ β†’ Assembles focused context β”‚ +β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ + β”‚ β”‚ + β–Ό β”‚ +β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ +β”‚ Dev Story β”‚ β†’ Implements + tests β”‚ +β”‚ (IN PROGRESS) β”‚ β”‚ +β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ + β”‚ β”‚ + β–Ό β”‚ +β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ +β”‚ Code Review β”‚ β†’ Senior dev review β”‚ +β”‚ (IN PROGRESS β†’ β”‚ β”‚ +β”‚ READY FOR REVIEW) β”‚ +β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ + β”‚ β”‚ + β”Œβ”€β”€β”€β”€β”΄β”€β”€β”€β”€β” β”‚ + β”‚ Result? β”‚ β”‚ + β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜ β”‚ + β”‚ β”‚ + β”Œβ”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ + β”‚ β”‚ β”‚ β”‚ + β–Ό β–Ό β–Ό β”‚ +APPROVED APPROVED REQUEST β”‚ + WITH COMMENTS CHANGES β”‚ + β”‚ β”‚ β”‚ β”‚ + β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ + β”‚ β”‚ + β–Ό β”‚ + β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ + β”‚ Story Done β”‚ β†’ READY FOR REVIEW β†’ DONEβ”‚ + β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ + β”‚ β”‚ + β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ + β”‚ More stories? + β”‚ + β–Ό + β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” + β”‚ Epic Complete? β”‚ + β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜ + β”‚ + β”Œβ”€β”€β”€β”€β”Όβ”€β”€β”€β”€β” + β”‚ β”‚ + Yes No + β”‚ └──> Continue to next story + β”‚ + β–Ό +β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” +β”‚ Retrospective β”‚ β†’ Review epic, lessons learned +β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ + β”‚ + β–Ό + All epics done? + β”‚ + Yes β†’ PROJECT COMPLETE +``` + +--- + +## Best Practices for Phase 4 + +### 1. One Story at a Time + +**Focus on completing stories fully** before starting new ones. Don't parallelize stories unless you have multiple developers. + +### 2. Always Run story-context + +Don't skip context assembly. DEV agent performs better with focused, relevant context. + +### 3. Write Tests First (ATDD) + +For P0/P1 stories, write failing tests first (acceptance test-driven development), then implement to make them pass. + +### 4. Code Review P0/P1 Stories + +Always review critical stories. P2/P3 can be optional reviews. + +### 5. Run Retrospectives + +Don't skip retrospectives. They provide valuable insights that improve velocity in subsequent epics. + +### 6. Use workflow-status + +When unsure what to do next, run workflow-status. It will guide you. + +### 7. Document Deviations + +If you deviate from architecture or PRD, document why in story file. + +--- + +## Common Anti-Patterns + +### ❌ Starting Multiple Stories Simultaneously + +"Let's parallelize 5 stories to go faster." +β†’ **Result**: Context switching, incomplete stories, harder to track + +### ❌ Skipping story-context + +"The DEV agent can just read the full PRD." +β†’ **Result**: Slow context loading, irrelevant info, slower implementation + +### ❌ No Code Reviews + +"Code reviews slow us down, skip them." +β†’ **Result**: Technical debt, inconsistent quality, bugs in production + +### ❌ Skipping Retrospectives + +"We're too busy shipping, no time for retros." +β†’ **Result**: Repeat mistakes, no process improvement, lower velocity + +### βœ… Correct Approach + +- Focus on one story at a time +- Always assemble story context +- Review P0/P1 stories +- Run retrospectives after epics +- Use workflow-status for guidance + +--- + +## Summary + +Phase 4 Implementation follows a **story-centric workflow**: + +| Workflow | Purpose | Frequency | +| --------------------- | ------------------- | ----------------- | +| **sprint-planning** | Initialize tracking | Once at start | +| **epic-tech-context** | Technical guidance | Once per epic | +| **create-story** | Generate story file | Per story | +| **story-context** | Assemble context | Per story | +| **dev-story** | Implement story | Per story | +| **code-review** | Review quality | Per story (P0/P1) | +| **correct-course** | Handle changes | As needed | +| **retrospective** | Learn and improve | After each epic | + +**Key Takeaway:** Implementation is iterative and incremental. Move one story through its full lifecycle before starting the next. Use retrospectives to continuously improve. + +**Next:** Testing & QA (testarch workflows) run in parallel with implementation. + +See: [workflows-testing.md](./workflows-testing.md) diff --git a/bmad/bmm/docs/workflows-planning.md b/bmad/bmm/docs/workflows-planning.md new file mode 100644 index 00000000..d08d818f --- /dev/null +++ b/bmad/bmm/docs/workflows-planning.md @@ -0,0 +1,1086 @@ +# BMM Planning Workflows (Phase 2) + +**Reading Time:** ~15 minutes + +## Overview + +Phase 2 (Planning) workflows are **required** for all projects. They transform strategic vision into actionable requirements that guide implementation. BMM uses a **scale-adaptive planning system** where the workflow automatically selects the right level of detail based on project complexity. + +**Key principle:** One workflow to rule them all - `plan-project` intelligently routes to the appropriate planning flow based on project characteristics. + +## Quick Reference + +| Workflow | Project Levels | Duration | Purpose | +| ------------- | -------------- | ---------- | --------------------------------------- | +| **prd** | 2-4 | 2-6 hours | Strategic PRD + tactical epic breakdown | +| **tech-spec** | 0-1 | 30-90 min | Lightweight technical specification | +| **gdd** | 2-4 (games) | 4-10 hours | Complete game design document | +| **narrative** | 2-4 (story) | 3-8 hours | Story-driven game/experience design | +| **ux** | 2-4 (UX-heavy) | 3-6 hours | UX-first design specification | + +**Note:** The `plan-project` workflow is your single entry point. It automatically routes to the right planning workflow based on your answers to discovery questions. + +--- + +## Understanding Scale-Adaptive Planning + +### Project Complexity Levels + +BMM categorizes projects into 5 levels (0-4) to determine the appropriate planning detail: + +| Level | Scope | Planning Workflow | Examples | +| ----------- | ----------------------- | -------------------------- | ------------------------------------------------------------ | +| **Level 0** | Single atomic change | **tech-spec** (Quick Spec) | Bug fix, single endpoint, config change | +| **Level 1** | Simple isolated feature | **tech-spec** (Quick Spec) | Add validation rule, new API field, small UI component | +| **Level 2** | Medium feature | **prd** (Lightweight) | User profile page, search feature, data export | +| **Level 3** | Large feature set | **prd** (Standard) | Complete authentication system, admin dashboard | +| **Level 4** | Multi-phase initiative | **prd** (Comprehensive) | Platform migration, new product line, enterprise integration | + +### How Scale-Adaptive Planning Works + +**Step 1: Intent Discovery** +The `plan-project` workflow asks you questions to understand: + +- What are you building? +- How complex is it? +- Is this greenfield or brownfield? +- What are the primary concerns? (features, UX, story, technical architecture) + +**Step 2: Intelligent Routing** +Based on your answers, the workflow routes to: + +- **tech-spec** (Levels 0-1): Quick Spec Flow for simple changes +- **prd** (Levels 2-4): Strategic PRD with epic breakdown +- **gdd** (Levels 2-4, games): Game Design Document +- **narrative** (Levels 2-4, story-heavy): Narrative-first design +- **ux** (Levels 2-4, UX-first): UX specification with prototypes + +**Step 3: Adaptive Detail** +Each workflow adjusts its depth based on level: + +- Level 2: Lightweight documentation +- Level 3: Standard documentation with multiple epics +- Level 4: Comprehensive documentation with phased delivery + +--- + +## plan-project (Entry Point) + +### Purpose + +Single unified entry point for all planning workflows. Uses conversational discovery to understand your project and intelligently route to the appropriate planning flow. + +**Agent:** PM (orchestrates other agents as needed) +**Phase:** 2 (Planning) +**Required:** Yes (for all projects) +**Typical Duration:** Varies by target workflow + +### When to Use + +**Always use this as your planning starting point.** Do not call prd, gdd, narrative, ux, or tech-spec directly unless you explicitly want to skip discovery. + +### Process Overview + +**Phase 1: Discovery (Steps 1-3)** + +- Understand project context +- Assess complexity level (0-4) +- Identify primary concerns (features, UX, story, technical) + +**Phase 2: Routing Decision (Step 4)** + +- Determine target workflow +- Explain routing rationale +- Confirm with user + +**Phase 3: Execute Target Workflow (Steps 5-6)** + +- Invoke appropriate planning workflow +- Pass context and decisions +- Return to plan-project for completion + +**Phase 4: Handoff (Step 7)** + +- Document planning decisions +- Recommend next phase workflows +- Update workflow status + +### Discovery Questions + +**Project Type:** + +- What are you building? (software product, game, internal tool, etc.) +- Is this greenfield (new) or brownfield (existing)? + +**Complexity Assessment:** + +- How would you describe the scope? (single change, simple feature, medium feature, large feature set, multi-phase initiative) +- How many user-facing features are involved? +- How many systems or integrations are affected? + +**Primary Concerns:** + +- What's most important for this project? (feature functionality, user experience, narrative/story, technical architecture, performance) + +**Special Characteristics:** + +- Is this a game project? +- Is storytelling central to the experience? +- Is UX innovation the primary differentiator? +- Are there unique technical constraints? + +### Routing Logic + +``` +IF game_project AND level >= 2: + β†’ Route to gdd + +ELSE IF story_central AND level >= 2: + β†’ Route to narrative + +ELSE IF ux_innovation AND level >= 2: + β†’ Route to ux + +ELSE IF level <= 1: + β†’ Route to tech-spec (Quick Spec Flow) + +ELSE: + β†’ Route to prd (with level-appropriate depth) +``` + +### Outputs + +- Planning decision document (routing rationale) +- Output from target workflow (PRD, GDD, Tech Spec, etc.) +- Handoff recommendations for Phase 3 + +### Example Scenarios + +**Scenario 1: Bug Fix** + +- **Input**: "Fix null pointer exception in user service" +- **Discovery**: Level 0 (single atomic change) +- **Route**: tech-spec (Quick Spec Flow) +- **Duration**: 20 minutes + +**Scenario 2: E-commerce Checkout** + +- **Input**: "Build complete checkout flow with payment processing" +- **Discovery**: Level 3 (large feature set), feature-focused +- **Route**: prd (Standard depth) +- **Duration**: 4 hours + +**Scenario 3: Roguelike Card Game** + +- **Input**: "Roguelike card battler with emotional narrative" +- **Discovery**: Level 3 (large feature set), game project +- **Route**: gdd +- **Duration**: 6 hours + +**Scenario 4: Story-Driven Adventure** + +- **Input**: "Narrative adventure game with branching story" +- **Discovery**: Level 3, story-central +- **Route**: narrative (then gdd for mechanics) +- **Duration**: 8 hours total + +--- + +## tech-spec (Quick Spec Flow) + +### Purpose + +Lightweight technical specification for Levels 0-1 projects (single changes, simple features). Focuses on implementation details without heavy strategic planning. + +**Agent:** Architect +**Phase:** 2 (Planning) +**Project Levels:** 0-1 +**Typical Duration:** 30-90 minutes + +### When to Use + +- Bug fixes +- Single API endpoint additions +- Configuration changes +- Small UI component additions +- Isolated validation rules +- Single-file modifications + +**When NOT to use:** + +- Multiple interconnected changes β†’ Use **prd** +- User-facing feature with multiple screens β†’ Use **prd** +- Requires epic breakdown β†’ Use **prd** + +### Process Overview + +**Step 1: Problem Definition** + +- What's broken or missing? +- What's the desired behavior? +- What are the constraints? + +**Step 2: Technical Analysis** + +- Current state assessment +- Root cause (if bug) +- Dependencies identified + +**Step 3: Solution Design** + +- Implementation approach +- Code changes required +- Test strategy +- Rollback plan + +**Step 4: Documentation** + +- Quick Spec document generated +- Handoff to implementation + +### Inputs + +- Problem description or feature request +- Current codebase context (if brownfield) +- Technical constraints +- Acceptance criteria (simple) + +### Outputs + +**Primary Output:** `tech-spec-{feature-name}-{date}.md` + +**Document Structure:** + +1. Problem Statement +2. Current State Analysis +3. Proposed Solution +4. Implementation Details + - Files to modify + - API changes + - Database changes (if any) + - Configuration changes +5. Test Strategy +6. Rollback Plan +7. Acceptance Criteria +8. Risk Assessment (lightweight) + +### Example Output + +**Problem:** Null pointer exception when user has no profile image + +**Solution:** + +```markdown +# Quick Spec: Fix Profile Image Null Pointer + +## Problem + +Users without profile images cause NPE in UserProfileService.java:line 42 + +## Root Cause + +Method assumes profileImageUrl is never null, but DB allows NULL + +## Solution + +1. Add null check in UserProfileService +2. Return default placeholder image URL +3. Add unit test for null case + +## Implementation + +- File: `UserProfileService.java` +- Change: Add null guard: `if (user.profileImageUrl == null) return DEFAULT_AVATAR_URL;` +- Test: `UserProfileServiceTest.java` - new test case +- No DB migration needed + +## Acceptance Criteria + +- AC-1: Users with null profile image see default avatar +- AC-2: No NPE in logs +- AC-3: Unit test passes + +## Risk: LOW + +- Isolated change, single method +- Backward compatible +``` + +### Related Workflows + +- **dev-story** (Phase 4) - Implement the spec +- **prd** - Use for more complex features + +--- + +## prd (Product Requirements Document) + +### Purpose + +Strategic PRD with tactical epic breakdown for Levels 2-4 projects. Unified workflow that adapts depth based on project complexity. + +**Agent:** PM (with Architect and Analyst support) +**Phase:** 2 (Planning) +**Project Levels:** 2-4 +**Typical Duration:** + +- Level 2: 2-3 hours (Lightweight) +- Level 3: 3-5 hours (Standard) +- Level 4: 5-8 hours (Comprehensive) + +### When to Use + +- Medium to large feature sets +- Multi-screen user experiences +- Complex business logic +- Multiple system integrations +- Phased delivery required + +### Scale-Adaptive Structure + +**Level 2 (Lightweight PRD):** + +- Single epic with 5-10 stories +- Simplified competitive analysis +- Basic technical considerations +- 10-15 pages + +**Level 3 (Standard PRD):** + +- 2-4 epics with 15-30 stories +- Comprehensive competitive analysis +- Detailed technical requirements +- Risk assessment +- 20-30 pages + +**Level 4 (Comprehensive PRD):** + +- 5+ epics with 30-50+ stories +- Multi-phase delivery plan +- Enterprise architecture considerations +- Extensive stakeholder analysis +- Success metrics framework +- 30-50+ pages + +### Process Overview + +**Phase 1: Strategic Foundation (Steps 1-4)** + +- Problem and opportunity definition +- User research and personas +- Competitive analysis +- Success criteria and metrics + +**Phase 2: Solution Definition (Steps 5-8)** + +- Core capabilities and features +- User experience principles +- Technical requirements +- Integration points + +**Phase 3: Epic Breakdown (Steps 9-12)** + +- Identify epics (level-appropriate count) +- Define user stories per epic +- Prioritize stories (P0/P1/P2/P3) +- Sequence for delivery + +**Phase 4: Planning and Risks (Steps 13-15)** + +- Resource estimation +- Risk assessment +- Assumptions and dependencies +- Success metrics finalized + +**Phase 5: Documentation (Step 16)** + +- Generate final PRD +- Create epic files +- Handoff preparation + +### Inputs + +Optional: + +- product-brief.md (from Phase 1) +- market-research.md (from Phase 1) +- competitive-analysis.md (from Phase 1) +- User input through conversational process + +### Outputs + +**Primary Outputs:** + +1. **PRD.md**: Complete product requirements document +2. **epics.md**: All epics with story breakdown +3. **Epic Files**: Individual files per epic (e.g., `epic-1-authentication.md`) + +**PRD Structure:** + +1. Executive Summary +2. Problem Statement (with evidence) +3. Goals and Success Metrics +4. User Personas and Scenarios +5. Competitive Landscape +6. Feature Requirements + - Core capabilities + - User stories (organized by epic) + - Acceptance criteria +7. User Experience Requirements +8. Technical Requirements +9. Integration Requirements +10. Non-Functional Requirements (NFRs) +11. Assumptions and Constraints +12. Risks and Mitigation +13. Success Metrics +14. Glossary + +**Epic File Structure:** + +- Epic overview and objectives +- User stories with acceptance criteria +- Story priorities (P0/P1/P2/P3) +- Dependencies and sequencing +- Technical notes +- Success criteria + +### Example: Level 3 PRD for E-commerce Checkout + +**Strategic Section:** + +- **Problem**: 68% cart abandonment rate vs 45% industry average +- **Goal**: Reduce abandonment to 50% in 6 months +- **Users**: Primary (buyers), Secondary (guest checkout) +- **Competitors**: Shopify (1-click), Amazon (save payment) + +**Epic Breakdown:** + +1. **Epic 1: Guest Checkout** (7 stories) + - P0: Guest can checkout without account + - P1: Email receipt sent + - P2: Optional account creation +2. **Epic 2: Payment Processing** (8 stories) + - P0: Credit card integration (Stripe) + - P1: Saved payment methods + - P2: Alternative payments (PayPal, Apple Pay) +3. **Epic 3: Order Management** (6 stories) + - P0: Order confirmation + - P1: Order history + - P2: Order tracking + +**Total:** 3 epics, 21 stories, 4-6 week delivery + +### Related Workflows + +- **product-brief** (Phase 1) - Strategic input +- **architecture** (Phase 3) - Technical design +- **tech-spec** (Phase 3) - Detailed specifications +- **create-epics-and-stories** (Phase 4) - If manual epic creation needed + +--- + +## gdd (Game Design Document) + +### Purpose + +Complete game design document for Levels 2-4 game projects, adapted from industry-standard GDD formats with practical scoping. + +**Agent:** PM (Game Designer persona) +**Phase:** 2 (Planning) +**Project Levels:** 2-4 (games) +**Typical Duration:** + +- Level 2: 3-4 hours (Small indie game) +- Level 3: 5-7 hours (Medium game) +- Level 4: 8-12 hours (Large/commercial game) + +### When to Use + +- Designing a game (any genre) +- Need comprehensive design documentation +- Team needs shared vision +- Publisher/stakeholder communication + +### Comparison to Traditional GDD + +**Traditional GDD Weaknesses:** + +- Too detailed too early +- Assumes waterfall delivery +- No connection to implementation tracking +- No epic/story breakdown + +**BMM GDD Improvements:** + +- Scale-adaptive detail +- Agile epic structure +- Direct handoff to implementation (Phase 4) +- Integrated with testing workflows + +### Process Overview + +**Phase 1: Core Concept (Steps 1-4)** + +- High concept and elevator pitch +- Core gameplay loop +- Design pillars +- Player experience goals + +**Phase 2: Game Systems (Steps 5-10)** + +- Mechanics definition +- Progression systems +- Economy and balance +- Combat/interaction systems +- Level/world design +- Art and audio direction + +**Phase 3: Content Scope (Steps 11-13)** + +- Content volume (levels, characters, items) +- Narrative overview (if applicable) +- Monetization strategy (if F2P/premium) + +**Phase 4: Technical and Production (Steps 14-16)** + +- Platform and technical requirements +- Team and timeline +- Risks and challenges +- Success metrics + +**Phase 5: Epic Breakdown (Step 17)** + +- Convert design into epics +- Create user stories per epic +- Prioritize features (MVP vs post-launch) +- Sequence delivery + +### Inputs + +Optional: + +- game-brief.md (from Phase 1) +- brainstorm-game results (from Phase 1) +- market-research.md (from Phase 1) +- Reference game analysis + +### Outputs + +**Primary Output:** `GDD-{game-name}-{date}.md` + +**GDD Structure:** + +1. Executive Summary +2. Core Concept + - High concept + - Elevator pitch + - Design pillars +3. Gameplay + - Core loop + - Mechanics + - Player actions + - Progression +4. Game Systems + - Combat/interaction + - Economy + - Progression + - Customization +5. World and Narrative + - Setting + - Story (if applicable) + - Characters +6. Content Scope + - Levels/missions + - Characters/enemies + - Items/abilities + - Estimated play time +7. Art Direction +8. Audio Direction +9. User Interface/UX +10. Technical Requirements +11. Platforms and Performance +12. Monetization (if applicable) +13. Epic Breakdown +14. Success Metrics +15. Risks and Mitigations + +**Epic Breakdown** (unique to BMM GDD): + +- **Epic 1: Core Loop** (foundational mechanics) +- **Epic 2: Content** (levels, enemies, items) +- **Epic 3: Progression** (unlocks, upgrades) +- **Epic 4: Polish** (VFX, audio, UI) + +### Example: Level 3 GDD for Roguelike Card Game + +**Core Concept:** + +- **High Concept**: Slay the Spire meets Hades with emotional narrative +- **Elevator Pitch**: Roguelike card battler where you play as emotions fighting inner demons +- **Design Pillars**: Strategic depth, emotional resonance, replayability + +**Gameplay:** + +- **Core Loop**: Draw cards β†’ Play cards β†’ Resolve combat β†’ Choose path β†’ Repeat +- **Progression**: Unlock new cards, characters, and story branches +- **Run Length**: 45-60 minutes per run + +**Content Scope:** + +- 3 playable characters (Anger, Fear, Joy) +- 120 cards total (40 per character) +- 50 enemy types +- 10 bosses +- 4 zones (acts) + +**Epic Breakdown:** + +1. **Epic 1: Core Combat** (8 stories) + - P0: Card playing and resolution + - P0: Enemy AI + - P1: Card effects and combos +2. **Epic 2: Meta Progression** (6 stories) + - P0: Unlock system + - P1: Character progression +3. **Epic 3: Content** (12 stories) + - P1: Character 1 (Anger) complete + - P1: Character 2 (Fear) complete + - P2: Character 3 (Joy) complete + +**Estimated Timeline:** 12 months with 3-person team + +### Related Workflows + +- **game-brief** (Phase 1) - Strategic input +- **narrative** (Phase 2) - If story-heavy game +- **architecture** (Phase 3) - Technical design + +--- + +## narrative (Narrative Design) + +### Purpose + +Story-driven design workflow for games and experiences where narrative is central. Creates comprehensive narrative documentation including story structure, character arcs, dialogue systems, and narrative implementation guidance. + +**Agent:** PM (Narrative Designer persona) + Creative Problem Solver (CIS) +**Phase:** 2 (Planning) +**Project Levels:** 2-4 (story-driven projects) +**Typical Duration:** + +- Level 2: 2-4 hours (Linear narrative) +- Level 3: 4-6 hours (Branching narrative) +- Level 4: 6-10 hours (Complex branching with multiple arcs) + +### When to Use + +- Story is central to the experience +- Branching narrative with player choices +- Character-driven games +- Visual novels, adventure games, RPGs +- Interactive fiction + +**When to combine with GDD:** + +1. Run **narrative** workflow first (get story structure) +2. Then run **gdd** workflow (integrate story with gameplay) + +### Process Overview + +**Phase 1: Story Foundation (Steps 1-4)** + +- Story premise and themes +- Setting and world-building +- Narrative structure (linear, branching, open) +- Tone and emotional beats + +**Phase 2: Character Development (Steps 5-7)** + +- Protagonist and supporting cast +- Character arcs and motivations +- Relationships and dynamics + +**Phase 3: Story Structure (Steps 8-11)** + +- Act breakdown (3-act, 5-act, hero's journey) +- Key narrative beats +- Choice points and consequences +- Branching paths (if applicable) + +**Phase 4: Dialogue and Implementation (Steps 12-15)** + +- Dialogue system design +- Voice and writing style +- Narrative implementation approach +- Asset requirements (VO, cutscenes, etc.) + +**Phase 5: Integration Planning (Step 16)** + +- How narrative integrates with gameplay +- Pacing and player agency +- Narrative-gameplay harmony + +### Inputs + +Optional: + +- Story outlines or treatments +- Character sketches +- World-building documents +- Reference stories + +### Outputs + +**Primary Output:** `narrative-design-{project-name}-{date}.md` + +**Document Structure:** + +1. Narrative Overview + - Premise + - Themes + - Tone +2. Story Structure + - Act breakdown + - Key beats + - Branching diagram (if applicable) +3. Characters + - Character profiles + - Arcs + - Relationships +4. World-Building + - Setting + - Lore + - History +5. Dialogue System + - Dialogue structure + - Choice mechanics + - Consequence tracking +6. Implementation Guide + - Narrative assets needed + - Integration with gameplay + - Technical requirements +7. Narrative Content Scope + - Total word count + - Number of scenes/beats + - Number of endings (if branching) + - VO line count (if voiced) + +### Example: Level 3 Narrative for Choice-Driven RPG + +**Story Premise:** +You play as a wandering medic in a post-apocalyptic world where healing is outlawed. Each patient you treat changes the world. + +**Structure:** + +- 3 acts, 12 chapters +- 5 major choice points with persistent consequences +- 3 possible endings (altruistic, pragmatic, corrupted) + +**Characters:** + +- **Protagonist**: Dr. Elara Chen (complex moral compass) +- **Antagonist**: The Overseer (believes healing prolongs suffering) +- **Supporting**: 8 recurring characters + +**Branching:** + +``` +Chapter 1 β†’ Choice: Save child or save supplies + β”œβ”€ Save child β†’ Village trusts you (Path A) + └─ Save supplies β†’ Village fears you (Path B) + +Chapter 5 β†’ Paths converge, new choice: Reveal or hide ability + β”œβ”€ Reveal β†’ Public hero route + └─ Hide β†’ Underground resistance route +``` + +**Implementation:** + +- Total word count: ~60,000 words +- 40 narrative scenes +- 15 hours of gameplay +- 200+ dialogue nodes +- Optional VO (2,000 lines) + +**Epic Breakdown:** + +1. **Epic 1: Act 1 Narrative** (6 stories) +2. **Epic 2: Act 2 Narrative** (8 stories) +3. **Epic 3: Act 3 Narrative** (7 stories) +4. **Epic 4: Branching Implementation** (5 stories) + +### Related Workflows + +- **gdd** (Phase 2) - Combine narrative with gameplay +- **ux** (Phase 2) - Narrative UI/UX design + +--- + +## ux (UX-First Design) + +### Purpose + +UX specification workflow for projects where user experience is the primary differentiator or innovation area. Facilitates visual exploration and informed decision-making rather than template-driven design. + +**Agent:** UX Designer +**Phase:** 2 (Planning) +**Project Levels:** 2-4 (UX-heavy projects) +**Typical Duration:** + +- Level 2: 2-3 hours (Single feature UX) +- Level 3: 4-5 hours (Multi-screen experience) +- Level 4: 6-8 hours (Platform-wide UX system) + +### When to Use + +- UX is the primary competitive advantage +- Complex user workflows needing design thinking +- Innovative interaction patterns +- Design system creation +- Accessibility-critical experiences + +**When NOT to use:** + +- Standard CRUD interfaces β†’ Use **prd** +- Gameplay-first games β†’ Use **gdd** +- Backend-focused APIs β†’ Use **tech-spec** + +### Collaborative UX Design Approach + +**This is NOT a template filler.** The UX workflow facilitates: + +1. **Visual Exploration**: Generate multiple design options +2. **Informed Decisions**: Evaluate options with user needs +3. **Collaborative Design**: Work with AI to refine iteratively +4. **Living Documentation**: UX spec evolves with project + +### Process Overview + +**Phase 1: UX Foundation (Steps 1-4)** + +- User research and personas +- User journeys and workflows +- Pain points and opportunities +- UX principles and goals + +**Phase 2: Design Exploration (Steps 5-8)** + +- Generate multiple design directions +- Wireframes and mockups +- Interaction patterns +- Visual design options + +**Phase 3: Design Refinement (Steps 9-12)** + +- Collaborative iteration +- Accessibility validation +- Responsive design considerations +- Component library definition + +**Phase 4: Specification (Steps 13-15)** + +- Detailed interaction specs +- Design system documentation +- Handoff to development +- Epic breakdown with UX stories + +### Inputs + +Optional: + +- User research data +- Analytics and heatmaps +- Competitor UX analysis +- Brand guidelines +- Accessibility requirements + +### Outputs + +**Primary Output:** `ux-spec-{project-name}-{date}.md` + +**Document Structure:** + +1. UX Vision and Principles +2. User Research Summary +3. User Journeys +4. Information Architecture +5. Wireframes and Mockups +6. Interaction Specifications + - Screen-by-screen flows + - Micro-interactions + - Error states + - Loading states +7. Design System + - Components + - Patterns + - Tokens (colors, typography, spacing) +8. Accessibility Requirements +9. Responsive Behavior +10. Epic Breakdown (UX Stories) + +### Example: Level 3 UX Spec for Dashboard Redesign + +**UX Vision:** +"Information at a glance with progressive disclosure" + +**User Journey:** + +1. User lands on dashboard +2. Scans key metrics (glanceable) +3. Drills into details (progressive disclosure) +4. Takes action (in-context controls) + +**Wireframes Generated:** + +- Option A: Card-based layout (familiar, modular) +- Option B: Single-column feed (mobile-first) +- Option C: Split-pane (power user) + +**Decision:** Option A (card-based) with Option C (split-pane) for power users via toggle + +**Design System:** + +- 5 card components (metric, chart, table, activity, action) +- 12 color tokens (accessible contrast ratios) +- Responsive grid (12-column) + +**Epic Breakdown:** + +1. **Epic 1: Core Layout** (4 stories) + - P0: Responsive grid system + - P0: Card component library +2. **Epic 2: Data Visualization** (6 stories) + - P1: Chart components + - P1: Real-time updates +3. **Epic 3: Accessibility** (3 stories) + - P0: Keyboard navigation + - P1: Screen reader support + +### Related Workflows + +- **prd** (Phase 2) - UX spec feeds feature requirements +- **architecture** (Phase 3) - Frontend architecture decisions + +--- + +## Decision Guide: Which Planning Workflow? + +### Use `plan-project` (Recommended) + +Let the workflow discover your needs and route appropriately. + +### Direct Workflow Selection (Advanced) + +**For bug fixes or single changes:** +β†’ **tech-spec** (Quick Spec Flow) + +**For software products (Levels 2-4):** +β†’ **prd** + +**For games (Levels 2-4):** +β†’ **gdd** (if gameplay-first) +β†’ **narrative** + **gdd** (if story-first) + +**For story-driven experiences (non-games):** +β†’ **narrative** + **prd** + +**For UX-first projects:** +β†’ **ux** + **prd** + +--- + +## Integration with Phase 3 (Solutioning) + +Planning workflows produce requirements that feed into Solutioning: + +| Planning Output | Solutioning Input | +| -------------------- | ------------------------------------- | +| PRD.md | **architecture** workflow (Level 3-4) | +| epics.md | **tech-spec** workflow (Level 3-4) | +| GDD.md | **architecture** workflow (game tech) | +| narrative-design.md | **architecture** (narrative systems) | +| ux-spec.md | **architecture** (frontend design) | +| tech-spec.md (Quick) | **dev-story** (Level 0-1) | + +**Key Decision Point:** + +- **Levels 0-1**: Skip Solutioning, go directly to Phase 4 (Implementation) +- **Levels 2**: Optional Solutioning (simple architecture) +- **Levels 3-4**: **Required** Solutioning (architecture + tech-spec) + +See: [workflows-solutioning.md](./workflows-solutioning.md) + +--- + +## Best Practices for Phase 2 + +### 1. Always Start with `plan-project` + +Unless you're absolutely certain which workflow you need, use the entry point. It will save time and ensure you get the right level of detail. + +### 2. Level Honestly + +Don't over-plan simple features or under-plan complex initiatives. Be honest about project complexity. + +### 3. Iterate on Requirements + +Planning documents are living. You can refine PRDs/GDDs as you learn more during Solutioning and Implementation. + +### 4. Involve Stakeholders Early + +Review PRDs/GDDs with stakeholders before proceeding to Solutioning. Catch misalignment early. + +### 5. Focus on "What" Not "How" + +Planning defines **what** to build and **why**. Leave **how** (technical design) to Phase 3 (Solutioning). + +--- + +## Common Anti-Patterns + +### ❌ Skipping Planning + +"We'll just start coding and figure it out." +β†’ **Result**: Scope creep, rework, missed requirements + +### ❌ Over-Planning Simple Changes + +"Let me write a 20-page PRD for this button color change." +β†’ **Result**: Wasted time, analysis paralysis + +### ❌ Planning Without Discovery + +"I already know what I want, skip the questions." +β†’ **Result**: Solving wrong problem, missing opportunities + +### ❌ Treating PRD as Immutable + +"The PRD is locked, no changes allowed." +β†’ **Result**: Ignoring new information, rigid planning + +### βœ… Correct Approach + +- Use scale-adaptive planning (right level for complexity) +- Involve stakeholders in review +- Iterate as you learn +- Keep planning docs living and updated + +--- + +## Summary + +Phase 2 Planning workflows transform vision into actionable requirements: + +| Input | Planning Workflow | Output | +| ----------------- | ----------------- | ---------------- | +| Product idea | **prd** | PRD + Epics | +| Game concept | **gdd** | GDD + Epics | +| Story idea | **narrative** | Narrative Design | +| UX innovation | **ux** | UX Specification | +| Bug/simple change | **tech-spec** | Quick Spec | + +**Key Takeaway:** Planning is **required** for all projects, but the **depth adapts** to project complexity. Trust the scale-adaptive system to guide the right level of detail. + +**Next Phase:** Solutioning (Phase 3) - Technical architecture and detailed specifications + +See: [workflows-solutioning.md](./workflows-solutioning.md) diff --git a/bmad/bmm/docs/workflows-solutioning.md b/bmad/bmm/docs/workflows-solutioning.md new file mode 100644 index 00000000..c28f69c5 --- /dev/null +++ b/bmad/bmm/docs/workflows-solutioning.md @@ -0,0 +1,726 @@ +# BMM Solutioning Workflows (Phase 3) + +**Reading Time:** ~8 minutes + +## Overview + +Phase 3 (Solutioning) workflows translate **what** to build (from Planning) into **how** to build it (technical design). This phase is **required for Levels 3-4** and **optional for Level 2** projects. + +**Key principle:** Prevent agent conflicts by making architectural decisions explicit and documented before implementation begins. + +## Quick Reference + +| Workflow | Project Levels | Duration | Purpose | +| -------------------------- | -------------- | --------- | ------------------------------------------- | +| **architecture** | 2-4 | 2-6 hours | Technical architecture and design decisions | +| **solutioning-gate-check** | 3-4 | 15-30 min | Validate planning/solutioning completeness | + +**When to Skip Solutioning:** + +- **Level 0-1**: Simple changes don't need architecture β†’ Skip to Phase 4 (Implementation) +- **Level 2**: Optional - use if technically complex, skip if straightforward + +**When Solutioning is Required:** + +- **Level 3-4**: Multi-epic, multi-agent projects β†’ Architecture prevents conflicts + +--- + +## Understanding the Solutioning Phase + +### Why Solutioning Matters + +**Problem Without Solutioning:** + +1. DEV agent implements Epic 1 using REST API +2. DEV agent implements Epic 2 using GraphQL +3. **Conflict**: Inconsistent API design, integration nightmare + +**Solution With Solutioning:** + +1. **architecture** workflow decides: "Use GraphQL for all APIs" +2. All DEV agents follow architecture decisions +3. **Result**: Consistent implementation, no conflicts + +### Solutioning vs Planning + +| Aspect | Planning (Phase 2) | Solutioning (Phase 3) | +| -------- | ------------------ | ------------------------ | +| Question | What and Why? | How? | +| Output | Requirements | Technical Design | +| Agent | PM | Architect | +| Audience | Stakeholders | Developers | +| Document | PRD/GDD | Architecture + Tech Spec | +| Level | Business logic | Implementation detail | + +### Scale-Adaptive Solutioning + +**Level 0-1 (Skip Solutioning):** + +- Planning: Quick Spec (tech-spec workflow) +- Solutioning: **None** +- Implementation: dev-story directly + +**Level 2 (Optional Solutioning):** + +- Planning: Lightweight PRD +- Solutioning: **Optional** architecture +- Implementation: dev-story with or without architecture + +**Level 3-4 (Required Solutioning):** + +- Planning: Standard/Comprehensive PRD +- Solutioning: **Required** architecture + epic-tech-context +- Gate Check: **Required** solutioning-gate-check +- Implementation: dev-story guided by architecture + +--- + +## architecture + +### Purpose + +Collaborative architectural decision facilitation that produces a decision-focused architecture document optimized for preventing agent conflicts. Replaces template-driven architecture with intelligent, adaptive conversation. + +**Agent:** Architect +**Phase:** 3 (Solutioning) +**Project Levels:** 2-4 +**Required:** Level 3-4, Optional Level 2 +**Typical Duration:** + +- Level 2: 1-2 hours (Simple architecture) +- Level 3: 2-4 hours (Standard architecture) +- Level 4: 4-8 hours (Complex architecture with ADRs) + +### When to Use + +- Multi-epic projects (Level 3-4) +- Cross-cutting technical concerns +- Multiple agents will implement different parts +- Integration complexity exists +- Technology choices need alignment + +**When to Skip:** + +- Level 0-1 (simple changes) +- Level 2 with straightforward tech stack +- Single epic with clear technical approach + +### Adaptive Conversation Approach + +**This is NOT a template filler.** The architecture workflow: + +1. **Discovers** your technical needs through conversation +2. **Proposes** architectural options with trade-offs +3. **Documents** decisions that prevent agent conflicts +4. **Focuses** on decision points, not exhaustive documentation + +### Process Overview + +**Phase 1: Context Discovery (Steps 1-3)** + +- Load PRD/GDD for requirements +- Understand project level and complexity +- Identify technical constraints +- Determine existing architecture (if brownfield) + +**Phase 2: Architecture Definition (Steps 4-10)** + +- System architecture (monolith, microservices, etc.) +- Data architecture (database, state management) +- API design (REST, GraphQL, gRPC) +- Frontend architecture (if applicable) +- Integration patterns +- Security architecture +- Deployment architecture + +**Phase 3: Decision Documentation (Steps 11-13)** + +- Architecture Decision Records (ADRs) +- Trade-off analysis +- Technology selections with rationale +- Non-negotiable standards + +**Phase 4: Implementation Guidance (Step 14)** + +- Epic-specific technical notes +- Directory structure +- Coding standards +- Testing strategy + +### Inputs + +Required: + +- **PRD.md** or **GDD.md** (from Phase 2) +- **epics.md** (epic breakdown) + +Optional: + +- Existing architecture documentation (brownfield) +- Technical constraints document +- Infrastructure requirements +- Security requirements + +### Outputs + +**Primary Output:** `architecture-{project-name}-{date}.md` + +**Document Structure:** + +**1. Architecture Overview** + +- System context +- Key principles +- Architectural style + +**2. System Architecture** + +- High-level system diagram +- Component interactions +- Communication patterns + +**3. Data Architecture** + +- Database design approach +- State management +- Caching strategy +- Data flow + +**4. API Architecture** + +- API style (REST/GraphQL/gRPC) +- Authentication/authorization +- Versioning strategy +- Error handling patterns + +**5. Frontend Architecture** (if applicable) + +- Framework selection +- State management +- Component architecture +- Routing approach + +**6. Integration Architecture** + +- Third-party integrations +- Message queuing +- Event-driven patterns +- API gateways + +**7. Security Architecture** + +- Authentication/authorization +- Data protection +- Security boundaries +- Compliance requirements + +**8. Deployment Architecture** + +- Deployment model +- CI/CD pipeline +- Environment strategy +- Monitoring and observability + +**9. Architecture Decision Records (ADRs)** + +- Key decisions with context +- Options considered +- Trade-off analysis +- Rationale for choices + +**10. Epic-Specific Guidance** + +- Technical notes per epic +- Implementation priorities +- Dependency sequencing + +**11. Standards and Conventions** + +- Directory structure +- Naming conventions +- Code organization +- Testing requirements + +### Architecture Decision Records (ADRs) + +**Purpose:** Document **why** decisions were made, not just what was decided. + +**ADR Template:** + +```markdown +## ADR-001: Use GraphQL for All APIs + +**Status:** Accepted +**Date:** 2025-11-02 +**Context:** PRD requires flexible querying across multiple epics + +**Decision:** Use GraphQL for all client-server communication + +**Options Considered:** + +1. REST API - Familiar, well-understood, but requires multiple endpoints +2. GraphQL - Flexible querying, single endpoint, learning curve +3. gRPC - High performance, but poor browser support + +**Rationale:** + +- PRD requires flexible data fetching (Epic 1, Epic 3) +- Mobile app needs bandwidth optimization (Epic 2) +- Team has GraphQL experience from previous project +- Allows frontend flexibility without backend changes + +**Consequences:** + +- Positive: Flexible querying, reduced API versioning +- Negative: Caching complexity, N+1 query risk +- Mitigation: Use DataLoader for batching + +**Implications for Epics:** + +- Epic 1: User Management β†’ GraphQL mutations +- Epic 2: Mobile App β†’ Optimized queries +- Epic 3: Admin Dashboard β†’ Complex nested queries +``` + +### Example: Level 3 Architecture for E-Commerce Platform + +**System Architecture:** + +- Monolith (early stage, < 50K users) +- PostgreSQL database +- Redis for caching and sessions +- Next.js for frontend +- Deployed on Vercel + Railway + +**Key ADRs:** + +1. **ADR-001**: Use Next.js (vs React + Express) + - Rationale: SEO critical, SSR needed, unified codebase +2. **ADR-002**: Use GraphQL (vs REST) + - Rationale: Flexible querying for dashboard, mobile optimization +3. **ADR-003**: Use Stripe (vs PayPal + Stripe) + - Rationale: Simpler integration, lower fees, better UX + +**Epic Guidance:** + +- **Epic 1 (Auth)**: NextAuth.js with PostgreSQL adapter +- **Epic 2 (Products)**: GraphQL with DataLoader for categories +- **Epic 3 (Cart)**: Redis for session-based cart (no DB writes) +- **Epic 4 (Checkout)**: Stripe webhooks for payment confirmation + +**Standards:** + +``` +Directory Structure: +/pages - Next.js routes +/components - Reusable UI components +/lib - Business logic + /graphql - GraphQL schema and resolvers + /db - Prisma models and migrations + /services - Third-party integrations +/tests - Test files mirror /lib +``` + +### Related Workflows + +- **prd/gdd** (Phase 2) - Requirements input +- **solutioning-gate-check** (Phase 3) - Validate completeness +- **tech-spec** (Phase 3) - Epic-level specifications (optional) +- **sprint-planning** (Phase 4) - Implementation tracking + +--- + +## solutioning-gate-check + +### Purpose + +Systematically validate that all planning and solutioning phases are complete and properly aligned before transitioning to Phase 4 implementation. Ensures PRD, architecture, and stories are cohesive with no gaps or contradictions. + +**Agent:** SM (Scrum Master) +**Phase:** 3 (Solutioning) +**Project Levels:** 3-4 +**Required:** Level 3-4 only +**Typical Duration:** 15-30 minutes + +### When to Use + +**Always run before starting Phase 4** for Level 3-4 projects. + +**Trigger Points:** + +- After architecture workflow completes +- Before sprint-planning workflow +- When stakeholders request readiness check +- Before kicking off implementation + +**Skip if:** + +- Level 0-2 (no solutioning phase) +- Exploratory prototype (no formal planning) + +### Purpose of Gate Check + +**Prevents Common Issues:** + +- ❌ Architecture doesn't address all epics +- ❌ Stories conflict with architecture decisions +- ❌ Requirements ambiguous or contradictory +- ❌ Missing critical dependencies +- ❌ Unclear success criteria + +**Ensures:** + +- βœ… PRD β†’ Architecture β†’ Stories alignment +- βœ… All epics have clear technical approach +- βœ… No contradictions or gaps +- βœ… Team ready to implement +- βœ… Stakeholders aligned + +### Process Overview + +**Phase 1: Document Loading (Step 1)** + +- Load PRD/GDD +- Load architecture document +- Load epic files +- Load story files (if created) + +**Phase 2: Completeness Check (Steps 2-4)** + +- **PRD Completeness**: All required sections present +- **Architecture Completeness**: All technical areas addressed +- **Epic Completeness**: All epics from PRD have stories + +**Phase 3: Alignment Check (Steps 5-7)** + +- **PRD ↔ Architecture**: Architecture addresses all requirements +- **Architecture ↔ Epics**: Epics align with architecture decisions +- **Cross-Epic**: No contradictions between epics + +**Phase 4: Quality Check (Steps 8-10)** + +- **Acceptance Criteria**: All stories have clear AC +- **Dependencies**: Dependencies identified and sequenced +- **Risks**: High-risk items have mitigation plans + +**Phase 5: Reporting (Step 11)** + +- Generate gate check report +- List gaps and blockers +- Provide recommendations +- Issue PASS/CONCERNS/FAIL decision + +### Gate Check Criteria + +**PRD/GDD Completeness:** + +- [ ] Problem statement clear and evidence-based +- [ ] Success metrics defined +- [ ] User personas identified +- [ ] Feature requirements complete +- [ ] All epics defined with objectives +- [ ] Non-functional requirements (NFRs) specified +- [ ] Risks and assumptions documented + +**Architecture Completeness:** + +- [ ] System architecture defined +- [ ] Data architecture specified +- [ ] API architecture decided +- [ ] Key ADRs documented +- [ ] Security architecture addressed +- [ ] Epic-specific guidance provided +- [ ] Standards and conventions defined + +**Epic/Story Completeness:** + +- [ ] All PRD features mapped to stories +- [ ] Stories have acceptance criteria +- [ ] Stories prioritized (P0/P1/P2/P3) +- [ ] Dependencies identified +- [ ] Story sequencing logical + +**Alignment Checks:** + +- [ ] Architecture addresses all PRD requirements +- [ ] Stories align with architecture decisions +- [ ] No contradictions between epics +- [ ] NFRs have technical approach +- [ ] Integration points clear + +**Quality Checks:** + +- [ ] Acceptance criteria testable +- [ ] Stories appropriately sized (<5 days) +- [ ] High-risk items have mitigation +- [ ] Success metrics measurable + +### Gate Decision Logic + +**PASS** βœ… + +- All critical criteria met (PRD, Architecture, Epic completeness) +- Minor gaps acceptable with documented plan +- **Action**: Proceed to Phase 4 (Implementation) + +**CONCERNS** ⚠️ + +- Some criteria not met but not blockers +- Gaps identified with clear resolution path +- Risks documented with mitigation +- **Action**: Proceed with caution, address gaps in parallel + +**FAIL** ❌ + +- Critical gaps or contradictions +- Architecture missing key decisions +- Stories conflict with PRD/architecture +- **Action**: BLOCK Phase 4, resolve issues first + +### Inputs + +Required: + +- PRD.md or GDD.md +- architecture.md +- epics.md +- Epic files (epic-1-_.md, epic-2-_.md, etc.) + +Optional: + +- Story files (if already created) +- Tech spec documents + +### Outputs + +**Primary Output:** `solutioning-gate-check-{date}.md` + +**Document Structure:** + +1. Executive Summary (PASS/CONCERNS/FAIL) +2. Completeness Assessment + - PRD/GDD Score + - Architecture Score + - Epic/Story Score +3. Alignment Assessment + - PRD ↔ Architecture alignment + - Architecture ↔ Epic alignment + - Cross-epic consistency +4. Quality Assessment + - Story quality + - Dependency clarity + - Risk mitigation +5. Gaps and Recommendations + - Critical gaps (blockers) + - Minor gaps (address in parallel) + - Recommendations for remediation +6. Gate Decision (PASS/CONCERNS/FAIL) +7. Next Steps + +### Example: Gate Check for E-Commerce Platform + +**Result:** CONCERNS ⚠️ + +**Completeness:** + +- βœ… PRD complete (18/18 criteria) +- ⚠️ Architecture missing security section (15/18 criteria) +- βœ… Epics complete (24/24 criteria) + +**Alignment:** + +- βœ… PRD ↔ Architecture aligned +- ⚠️ Epic 4 (Checkout) has payment gateway undefined in architecture +- βœ… No cross-epic contradictions + +**Quality:** + +- βœ… Stories have acceptance criteria +- ⚠️ Epic 2, Story 3 is too large (10 day estimate) +- βœ… Dependencies identified + +**Gaps Identified:** + +1. **Critical**: Architecture missing security architecture section + - **Impact**: Epic 1 (Auth) and Epic 4 (Checkout) lack security guidance + - **Recommendation**: Complete security architecture (2 hours) + +2. **High**: Payment gateway not selected + - **Impact**: Epic 4 (Checkout) cannot proceed + - **Recommendation**: Add ADR for payment gateway selection (1 hour) + +3. **Medium**: Epic 2, Story 3 too large + - **Impact**: Risk of story scope creep + - **Recommendation**: Split into 2 stories (30 min) + +**Gate Decision:** CONCERNS ⚠️ + +- **Rationale**: Critical and high gaps block Epic 1 and Epic 4 +- **Action**: Resolve gaps #1 and #2 before starting implementation +- **Timeline**: Address in 3 hours, then re-run gate check + +**Next Steps:** + +1. Complete security architecture section +2. Document payment gateway ADR +3. Split Epic 2, Story 3 +4. Re-run solutioning-gate-check +5. If PASS β†’ Proceed to sprint-planning + +### Related Workflows + +- **architecture** (Phase 3) - Must complete before gate check +- **prd/gdd** (Phase 2) - Input to gate check +- **sprint-planning** (Phase 4) - Runs after PASS decision + +--- + +## Integration with Phase 2 (Planning) and Phase 4 (Implementation) + +### Planning β†’ Solutioning Flow + +**Level 0-1:** + +``` +Planning (tech-spec Quick Spec) + β†’ Skip Solutioning + β†’ Implementation (dev-story) +``` + +**Level 2:** + +``` +Planning (prd Lightweight) + β†’ Optional: architecture (if complex) + β†’ Implementation (sprint-planning β†’ dev-story) +``` + +**Level 3-4:** + +``` +Planning (prd Standard/Comprehensive) + β†’ architecture (Required) + β†’ solutioning-gate-check (Required) + β†’ Implementation (sprint-planning β†’ dev-story) +``` + +### Solutioning β†’ Implementation Handoff + +**Documents Produced:** + +1. `architecture.md` β†’ Guides all dev-story workflows +2. `ADRs` (in architecture) β†’ Referenced by agents during implementation +3. `solutioning-gate-check.md` β†’ Confirms readiness + +**How Implementation Uses Solutioning:** + +- **sprint-planning**: Loads architecture for epic sequencing +- **dev-story**: References architecture decisions and ADRs +- **code-review**: Validates code follows architectural standards + +--- + +## Best Practices for Phase 3 + +### 1. Make Decisions Explicit + +Don't leave technology choices implicit. Document decisions with rationale so future agents understand context. + +### 2. Focus on Agent Conflicts + +Architecture's primary job is preventing conflicting implementations by different agents. Focus on cross-cutting concerns. + +### 3. Use ADRs for Key Decisions + +Every significant technology choice should have an ADR explaining the "why", not just the "what". + +### 4. Keep It Practical + +Don't over-architect Level 2 projects. Simple projects need simple architecture. + +### 5. Run Gate Check Before Implementation + +Catching alignment issues in solutioning is 10Γ— faster than discovering them mid-implementation. + +### 6. Iterate Architecture + +Architecture documents are living. Update them as you learn during implementation. + +--- + +## Common Anti-Patterns + +### ❌ Skipping Architecture for Level 3-4 + +"Architecture slows us down, let's just start coding." +β†’ **Result**: Agent conflicts, inconsistent design, rework + +### ❌ Over-Architecting Level 2 + +"Let me design this simple feature like a distributed system." +β†’ **Result**: Wasted time, over-engineering + +### ❌ Template-Driven Architecture + +"Fill out every section of this architecture template." +β†’ **Result**: Documentation theater, no real decisions made + +### ❌ Skipping Gate Check + +"PRD and architecture look good enough, let's start." +β†’ **Result**: Gaps discovered mid-sprint, wasted implementation time + +### βœ… Correct Approach + +- Use architecture for Level 3-4 (required) +- Keep Level 2 architecture simple (if used) +- Focus on decisions, not documentation volume +- Always run gate check before implementation + +--- + +## Decision Guide: When to Use Solutioning Workflows + +### Level 0-1 Projects + +- **Planning**: tech-spec (Quick Spec) +- **Solutioning**: **Skip entirely** +- **Implementation**: dev-story directly + +### Level 2 Projects (Simple) + +- **Planning**: prd (Lightweight) +- **Solutioning**: **Skip** if straightforward tech +- **Implementation**: sprint-planning β†’ dev-story + +### Level 2 Projects (Technically Complex) + +- **Planning**: prd (Lightweight) +- **Solutioning**: architecture (simplified) +- **Gate Check**: Optional +- **Implementation**: sprint-planning β†’ dev-story + +### Level 3-4 Projects + +- **Planning**: prd/gdd (Standard/Comprehensive) +- **Solutioning**: architecture (comprehensive) β†’ **Required** +- **Gate Check**: solutioning-gate-check β†’ **Required** +- **Implementation**: sprint-planning β†’ epic-tech-context β†’ dev-story + +--- + +## Summary + +Phase 3 Solutioning workflows bridge planning and implementation: + +| Workflow | Purpose | When Required | +| -------------------------- | ------------------------------------- | ---------------------------------------- | +| **architecture** | Make technical decisions explicit | Level 3-4 (required), Level 2 (optional) | +| **solutioning-gate-check** | Validate readiness for implementation | Level 3-4 only | + +**Key Takeaway:** Solutioning prevents agent conflicts in multi-epic projects by documenting architectural decisions before implementation begins. + +**Next Phase:** Implementation (Phase 4) - Sprint-based story development + +See: [workflows-implementation.md](./workflows-implementation.md) diff --git a/bmad/bmm/tasks/retrospective.xml b/bmad/bmm/tasks/retrospective.xml deleted file mode 100644 index d0e7189a..00000000 --- a/bmad/bmm/tasks/retrospective.xml +++ /dev/null @@ -1,104 +0,0 @@ - - - MANDATORY: Execute ALL steps in the flow section IN EXACT ORDER - DO NOT skip steps or change the sequence - HALT immediately when halt-conditions are met - Each andlt;actionandgt; within andlt;stepandgt; is a REQUIRED action to complete that step - Sections outside flow (validation, output, critical-context) provide essential context - review and apply throughout execution - - - - Check {project-root}{output_folder}/stories/ for highest completed story - Extract epic number from story (e.g., "Epic: 003") - Read epic from {project-root}{output_folder}/prd/epic{number}.md - List all stories for this epic in {project-root}{output_folder}/stories/ - Check completion status of each story - Extract key metrics (velocity, blockers encountered) - Review epic goals and success criteria - Compare actual outcomes vs. planned - Note technical debt incurred - Document architectural decisions made - - - - Read next epic from d{project-root}{output_folder}/prd/epic{next-number}.md - Identify dependencies on completed work - Note potential gaps or preparation needed - Check for technical prerequisites - - - - - πŸ”„ TEAM RETROSPECTIVE - Epic {{number}}: {{Epic Name}} - - Bob (Scrum Master) facilitating - - Epic Summary: - - Completed: {{completed}}/{{total}} stories ({{percentage}}%) - - Velocity: {{actual-points}} story points (planned: {{planned-points}}) - - Duration: {{actual-sprints}} sprints (planned: {{planned-sprints}}) - - Technical Debt: {{debt-items}} - - Next Epic Preview: Epic {{next-number}}: {{Next Epic Name}} - - Dependencies on Epic {{number}}: {{dependencies}} - - Preparation needed: {{preparation-gaps}} - - Team assembled for reflection: - {{agents-based-on-story-records}} - - Focus: Learning from Epic {{number}} and preparing for Epic {{next-number}} - - - - - Each agent shares referencing actual story data - What Went Well: Successes from completed stories, effective practices, velocity achievements - What Could Improve: Challenges from story records, blockers that slowed progress, technical debt incurred - Lessons Learned: Key insights for future epics, patterns to repeat or avoid - - - - Each agent addresses preparation needs - Dependencies Check: What from completed epic is needed for next epic, any incomplete blocking work - Preparation Needs: Technical setup required, knowledge gaps to fill, refactoring needed - Risk Assessment: Potential issues based on experience, mitigation strategies - - - - Bob identifies patterns across feedback - Synthesizes into team agreements - Assigns ownership to action items - Creates preparation sprint tasks if needed - - πŸ“ EPIC {{number}} ACTION ITEMS: - {{numbered-action-items-with-owners}} - - πŸš€ EPIC {{next-number}} PREPARATION SPRINT: - {{preparation-tasks-with-timeline}} - - ⚠️ CRITICAL PATH: - {{critical-dependencies-and-timeline}} - - - - - - Testing Verification: Has full regression testing been completed? - Deployment Status: Has epic been deployed to production? - Business Validation: Have stakeholders reviewed and accepted deliverables? - Technical Health: Is codebase in stable, maintainable state? - Final Checks: Any unresolved blockers that will impact next epic? - - - - - - This task extends party-mode with retrospective-specific structure - Bob (Scrum Master) facilitates the discussion ensuring psychological safety - No blame, focus on systems and processes - Everyone contributes with specific examples preferred - Action items must be achievable with clear ownership - End with team agreements and clear next steps - Two-part format: Epic Review + Next Epic Preparation - - \ No newline at end of file diff --git a/bmad/bmm/testarch/README.md b/bmad/bmm/testarch/README.md deleted file mode 100644 index efda1375..00000000 --- a/bmad/bmm/testarch/README.md +++ /dev/null @@ -1,311 +0,0 @@ ---- -last-redoc-date: 2025-10-14 ---- - -# Test Architect (TEA) Agent Guide - -## Overview - -- **Persona:** Murat, Master Test Architect and Quality Advisor focused on risk-based testing, fixture architecture, ATDD, and CI/CD governance. -- **Mission:** Deliver actionable quality strategies, automation coverage, and gate decisions that scale with project level and compliance demands. -- **Use When:** Project level β‰₯2, integration risk is non-trivial, brownfield regression risk exists, or compliance/NFR evidence is required. - -## TEA Workflow Lifecycle - -TEA integrates across the entire BMad development lifecycle, providing quality assurance at every phase: - -``` -β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” -β”‚ BMM Phase 2: PLANNING β”‚ -β”‚ β”‚ -β”‚ PM: *prd β”‚ -β”‚ ↓ β”‚ -β”‚ TEA: *framework ──→ *ci ──→ *test-design β”‚ -β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ -β”‚ β”‚ (Setup once per project) β”‚ -β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ - ↓ -β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” -β”‚ BMM Phase 4: IMPLEMENTATION β”‚ -β”‚ (Per Story Cycle) β”‚ -β”‚ β”‚ -β”‚ β”Œβ”€β†’ SM: *create-story β”‚ -β”‚ β”‚ ↓ β”‚ -β”‚ β”‚ TEA: *atdd (optional, before dev) β”‚ -β”‚ β”‚ ↓ β”‚ -β”‚ β”‚ DEV: implements story β”‚ -β”‚ β”‚ ↓ β”‚ -β”‚ β”‚ TEA: *automate ──→ *test-review (optional) β”‚ -β”‚ β”‚ ↓ β”‚ -β”‚ β”‚ TEA: *trace (refresh coverage) β”‚ -β”‚ β”‚ ↓ β”‚ -β”‚ └───[next story] β”‚ -β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ - ↓ -β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” -β”‚ EPIC/RELEASE GATE β”‚ -β”‚ β”‚ -β”‚ TEA: *nfr-assess (if not done earlier) β”‚ -β”‚ ↓ β”‚ -β”‚ TEA: *test-review (final audit, optional) β”‚ -β”‚ ↓ β”‚ -β”‚ TEA: *trace (Phase 2: Gate) ──→ PASS | CONCERNS | FAIL | WAIVED β”‚ -β”‚ β”‚ -β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ -``` - -### TEA Integration with BMad v6 Workflow - -TEA operates **across all four BMad phases**, unlike other agents that are phase-specific: - -
-Cross-Phase Integration & Workflow Complexity - -### Phase-Specific Agents (Standard Pattern) - -- **Phase 1 (Analysis)**: Analyst agent -- **Phase 2 (Planning)**: PM agent -- **Phase 3 (Solutioning)**: Architect agent -- **Phase 4 (Implementation)**: SM, DEV agents - -### TEA: Cross-Phase Quality Agent (Unique Pattern) - -TEA is **the only agent that spans all phases**: - -``` -Phase 1 (Analysis) β†’ [TEA not typically used] - ↓ -Phase 2 (Planning) β†’ TEA: *framework, *ci, *test-design (setup) - ↓ -Phase 3 (Solutioning) β†’ [TEA validates architecture testability] - ↓ -Phase 4 (Implementation) β†’ TEA: *atdd, *automate, *test-review, *trace (per story) - ↓ -Epic/Release Gate β†’ TEA: *nfr-assess, *trace Phase 2 (release decision) -``` - -### Why TEA Needs 8 Workflows - -**Standard agents**: 1-3 workflows per phase -**TEA**: 8 workflows across 3+ phases - -| Phase | TEA Workflows | Frequency | Purpose | -| ----------- | -------------------------------------- | ---------------- | -------------------------------- | -| **Phase 2** | *framework, *ci, \*test-design | Once per project | Establish quality infrastructure | -| **Phase 4** | *atdd, *automate, *test-review, *trace | Per story/sprint | Continuous quality validation | -| **Release** | *nfr-assess, *trace (Phase 2: gate) | Per epic/release | Go/no-go decision | - -**Note**: `*trace` is a two-phase workflow: Phase 1 (traceability) + Phase 2 (gate decision). This reduces cognitive load while maintaining natural workflow. - -This complexity **requires specialized documentation** (this guide), **extensive knowledge base** (19+ fragments), and **unique architecture** (`testarch/` directory). - -
- -## Prerequisites and Setup - -1. Run the core planning workflows first: - - Analyst `*product-brief` - - Product Manager `*prd` - - Architect `*create-architecture` -2. Confirm `bmad/bmm/config.yaml` defines `project_name`, `output_folder`, `dev_story_location`, and language settings. -3. Ensure a test test framework setup exists; if not, use `*framework` command to create a test framework setup, prior to development. -4. Skim supporting references (knowledge under `testarch/`, command workflows under `workflows/testarch/`). - - `tea-index.csv` + `knowledge/*.md` - -## High-Level Cheat Sheets - -### Greenfield Feature Launch (Level 2) - -| Phase | Test Architect | Dev / Team | Outputs | -| ------------------ | ------------------------------------------------------------------------- | --------------------------------------------------------------------- | ---------------------------------------------------------------------------- | -| Setup | - | Analyst `*product-brief`, PM `*prd`, Architect `*create-architecture` | `{output_folder}/product-brief*.md`, `PRD.md`, `epics.md`, `architecture.md` | -| Pre-Implementation | Run `*framework` (if harness missing), `*ci`, and `*test-design` | Review risk/design/CI guidance, align backlog | Test scaffold, CI pipeline, risk and coverage strategy | -| Story Prep | - | Scrum Master `*create-story`, `*story-context` | Story markdown + context XML | -| Implementation | (Optional) Trigger `*atdd` before dev to supply failing tests + checklist | Implement story guided by ATDD checklist | Failing acceptance tests + implementation checklist | -| Post-Dev | Execute `*automate`, (Optional) `*test-review`, re-run `*trace` | Address recommendations, update code/tests | Regression specs, quality report, refreshed coverage matrix | -| Release | (Optional) `*test-review` for final audit, Run `*trace` (Phase 2) | Confirm Definition of Done, share release notes | Quality audit, Gate YAML + release summary (owners, waivers) | - -
-Execution Notes - -- Run `*framework` only once per repo or when modern harness support is missing. -- `*framework` followed by `*ci` establishes install + pipeline; `*test-design` then handles risk scoring, mitigations, and scenario planning in one pass. -- Use `*atdd` before coding when the team can adopt ATDD; share its checklist with the dev agent. -- Post-implementation, keep `*trace` current, expand coverage with `*automate`, optionally review test quality with `*test-review`. For release gate, run `*trace` with Phase 2 enabled to get deployment decision. -- Use `*test-review` after `*atdd` to validate generated tests, after `*automate` to ensure regression quality, or before gate for final audit. - -
- -
-Worked Example – β€œNova CRM” Greenfield Feature - -1. **Planning:** Analyst runs `*product-brief`; PM executes `*prd` to produce PRD and epics; Architect completes `*create-architecture` for the new module. -2. **Setup:** TEA checks harness via `*framework`, configures `*ci`, and runs `*test-design` to capture risk/coverage plans. -3. **Story Prep:** Scrum Master generates the story via `*create-story`; PO validates using `*solutioning-gate-check`. -4. **Implementation:** TEA optionally runs `*atdd`; Dev implements with guidance from failing tests and the plan. -5. **Post-Dev and Release:** TEA runs `*automate`, optionally `*test-review` to audit test quality, re-runs `*trace` with Phase 2 enabled to generate both traceability and gate decision. - -
- -### Brownfield Feature Enhancement (Level 3–4) - -| Phase | Test Architect | Dev / Team | Outputs | -| ----------------- | -------------------------------------------------------------------------------------- | ------------------------------------------------------------ | ----------------------------------------------------------------------- | -| Refresh Context | - | Analyst/PM/Architect rerun planning workflows | Updated planning artifacts in `{output_folder}` | -| Baseline Coverage | Run `*trace` to inventory existing tests | Review matrix, flag hotspots | Coverage matrix + initial gate snippet | -| Risk Targeting | Run `*test-design` | Align remediation/backlog priorities | Brownfield risk memo + scenario matrix | -| Story Prep | - | Scrum Master `*create-story` | Updated story markdown | -| Implementation | (Optional) Run `*atdd` before dev | Implement story, referencing checklist/tests | Failing acceptance tests + implementation checklist | -| Post-Dev | Apply `*automate`, (Optional) `*test-review`, re-run `*trace`, `*nfr-assess` if needed | Resolve gaps, update docs/tests | Regression specs, quality report, refreshed coverage matrix, NFR report | -| Release | (Optional) `*test-review` for final audit, Run `*trace` (Phase 2) | Product Owner `*solutioning-gate-check`, share release notes | Quality audit, Gate YAML + release summary | - -
-Execution Notes - -- Lead with `*trace` so remediation plans target true coverage gaps. Ensure `*framework` and `*ci` are in place early in the engagement; if the brownfield lacks them, run those setup steps immediately after refreshing context. -- `*test-design` should highlight regression hotspots, mitigations, and P0 scenarios. -- Use `*atdd` when stories benefit from ATDD; otherwise proceed to implementation and rely on post-dev automation. -- After development, expand coverage with `*automate`, optionally review test quality with `*test-review`, re-run `*trace` (Phase 2 for gate decision). Run `*nfr-assess` now if non-functional risks weren't addressed earlier. -- Use `*test-review` to validate existing brownfield tests or audit new tests before gate. -- Product Owner `*solutioning-gate-check` confirms the team has artifacts before handoff or release. - -
- -
-Worked Example – β€œAtlas Payments” Brownfield Story - -1. **Context Refresh:** Analyst reruns `*product-brief`; PM executes `*prd` to update PRD, analysis, and `epics.md`; Architect triggers `*create-architecture` capturing legacy payment flows. -2. **Baseline Coverage:** TEA executes `*trace` to record current coverage in `docs/qa/assessments/atlas-payment-trace.md`. -3. **Risk and Design:** `*test-design` flags settlement edge cases, plans mitigations, and allocates new API/E2E scenarios with P0 priorities. -4. **Story Prep:** Scrum Master generates `stories/story-1.1.md` via `*create-story`, automatically pulling updated context. -5. **ATDD First:** TEA runs `*atdd`, producing failing Playwright specs under `tests/e2e/payments/` plus an implementation checklist. -6. **Implementation:** Dev pairs with the checklist/tests to deliver the story. -7. **Post-Implementation:** TEA applies `*automate`, optionally `*test-review` to audit test quality, re-runs `*trace` with Phase 2 enabled, performs `*nfr-assess` to validate SLAs. The `*trace` Phase 2 output marks PASS with follow-ups. - -
- -### Enterprise / Compliance Program (Level 4) - -| Phase | Test Architect | Dev / Team | Outputs | -| ------------------- | ----------------------------------------------------------------- | ---------------------------------------------- | ---------------------------------------------------------- | -| Strategic Planning | - | Analyst/PM/Architect standard workflows | Enterprise-grade PRD, epics, architecture | -| Quality Planning | Run `*framework`, `*test-design`, `*nfr-assess` | Review guidance, align compliance requirements | Harness scaffold, risk + coverage plan, NFR documentation | -| Pipeline Enablement | Configure `*ci` | Coordinate secrets, pipeline approvals | `.github/workflows/test.yml`, helper scripts | -| Execution | Enforce `*atdd`, `*automate`, `*test-review`, `*trace` per story | Implement stories, resolve TEA findings | Tests, fixtures, quality reports, coverage matrices | -| Release | (Optional) `*test-review` for final audit, Run `*trace` (Phase 2) | Capture sign-offs, archive artifacts | Quality audit, updated assessments, gate YAML, audit trail | - -
-Execution Notes - -- Use `*atdd` for every story when feasible so acceptance tests lead implementation in regulated environments. -- `*ci` scaffolds selective testing scripts, burn-in jobs, caching, and notifications for long-running suites. -- Enforce `*test-review` per story or sprint to maintain quality standards and ensure compliance with testing best practices. -- Prior to release, rerun coverage (`*trace`, `*automate`), perform final quality audit with `*test-review`, and formalize the decision with `*trace` Phase 2 (gate decision); store everything for audits. Call `*nfr-assess` here if compliance/performance requirements weren't captured during planning. - -
- -
-Worked Example – β€œHelios Ledger” Enterprise Release - -1. **Strategic Planning:** Analyst/PM/Architect complete PRD, epics, and architecture using the standard workflows. -2. **Quality Planning:** TEA runs `*framework`, `*test-design`, and `*nfr-assess` to establish mitigations, coverage, and NFR targets. -3. **Pipeline Setup:** TEA configures CI via `*ci` with selective execution scripts. -4. **Execution:** For each story, TEA enforces `*atdd`, `*automate`, `*test-review`, and `*trace`; Dev teams iterate on the findings. -5. **Release:** TEA re-checks coverage, performs final quality audit with `*test-review`, and logs the final gate decision via `*trace` Phase 2, archiving artifacts for compliance. - -
- -## Command Catalog - -
-Optional Playwright MCP Enhancements - -**Two Playwright MCP servers** (actively maintained, continuously updated): - -- `playwright` - Browser automation (`npx @playwright/mcp@latest`) -- `playwright-test` - Test runner with failure analysis (`npx playwright run-test-mcp-server`) - -**How MCP Enhances TEA Workflows**: - -MCP provides additional capabilities on top of TEA's default AI-based approach: - -1. `*test-design`: - - Default: Analysis + documentation - - **+ MCP**: Interactive UI discovery with `browser_navigate`, `browser_click`, `browser_snapshot`, behavior observation - - Benefit:Discover actual functionality, edge cases, undocumented features - -2. `*atdd`, `*automate`: - - Default: Infers selectors and interactions from requirements and knowledge fragments - - **+ MCP**: Generates tests **then** verifies with `generator_setup_page`, `browser_*` tools, validates against live app - - Benefit: Accurate selectors from real DOM, verified behavior, refined test code - -3. `*automate`: - - Default: Pattern-based fixes from error messages + knowledge fragments - - **+ MCP**: Pattern fixes **enhanced with** `browser_snapshot`, `browser_console_messages`, `browser_network_requests`, `browser_generate_locator` - - Benefit: Visual failure context, live DOM inspection, root cause discovery - -**Config example**: - -```json -{ - "mcpServers": { - "playwright": { - "command": "npx", - "args": ["@playwright/mcp@latest"] - }, - "playwright-test": { - "command": "npx", - "args": ["playwright", "run-test-mcp-server"] - } - } -} -``` - -**To disable**: Set `tea_use_mcp_enhancements: false` in `bmad/bmm/config.yaml` OR remove MCPs from IDE config. - -
- -

- -| Command | Workflow README | Primary Outputs | Notes | With Playwright MCP Enhancements | -| -------------- | ------------------------------------------------- | --------------------------------------------------------------------------------------------- | ---------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ | -| `*framework` | [πŸ“–](../workflows/testarch/framework/README.md) | Playwright/Cypress scaffold, `.env.example`, `.nvmrc`, sample specs | Use when no production-ready harness exists | - | -| `*ci` | [πŸ“–](../workflows/testarch/ci/README.md) | CI workflow, selective test scripts, secrets checklist | Platform-aware (GitHub Actions default) | - | -| `*test-design` | [πŸ“–](../workflows/testarch/test-design/README.md) | Combined risk assessment, mitigation plan, and coverage strategy | Risk scoring + optional exploratory mode | **+ Exploratory**: Interactive UI discovery with browser automation (uncover actual functionality) | -| `*atdd` | [πŸ“–](../workflows/testarch/atdd/README.md) | Failing acceptance tests + implementation checklist | TDD red phase + optional recording mode | **+ Recording**: AI generation verified with live browser (accurate selectors from real DOM) | -| `*automate` | [πŸ“–](../workflows/testarch/automate/README.md) | Prioritized specs, fixtures, README/script updates, DoD summary | Optional healing/recording, avoid duplicate coverage | **+ Healing**: Pattern fixes enhanced with visual debugging + **+ Recording**: AI verified with live browser | -| `*test-review` | [πŸ“–](../workflows/testarch/test-review/README.md) | Test quality review report with 0-100 score, violations, fixes | Reviews tests against knowledge base patterns | - | -| `*nfr-assess` | [πŸ“–](../workflows/testarch/nfr-assess/README.md) | NFR assessment report with actions | Focus on security/performance/reliability | - | -| `*trace` | [πŸ“–](../workflows/testarch/trace/README.md) | Phase 1: Coverage matrix, recommendations. Phase 2: Gate decision (PASS/CONCERNS/FAIL/WAIVED) | Two-phase workflow: traceability + gate decision | - | - -**πŸ“–** = Click to view detailed workflow documentation - -## Why TEA is Architecturally Different - -TEA is the only BMM agent with its own top-level module directory (`bmm/testarch/`). This intentional design pattern reflects TEA's unique requirements: - -
-Unique Architecture Pattern & Rationale - -### Directory Structure - -``` -src/modules/bmm/ -β”œβ”€β”€ agents/ -β”‚ └── tea.agent.yaml # Agent definition (standard location) -β”œβ”€β”€ workflows/ -β”‚ └── testarch/ # TEA workflows (standard location) -└── testarch/ # Knowledge base (UNIQUE!) - β”œβ”€β”€ knowledge/ # 21 production-ready test pattern fragments - β”œβ”€β”€ tea-index.csv # Centralized knowledge lookup (21 fragments indexed) - └── README.md # This guide -``` - -### Why TEA Gets Special Treatment - -TEA uniquely requires **extensive domain knowledge** (21 fragments, 12,821 lines: test patterns, CI/CD, fixtures, quality practices, healing strategies), a **centralized reference system** (`tea-index.csv` for on-demand fragment loading), **cross-cutting concerns** (domain-specific patterns vs project-specific artifacts like PRDs/stories), and **optional MCP integration** (healing, exploratory, verification modes). Other BMM agents don't require this architecture. - -
diff --git a/bmad/bmm/workflows/1-analysis/brainstorm-project/README.md b/bmad/bmm/workflows/1-analysis/brainstorm-project/README.md deleted file mode 100644 index 0541accf..00000000 --- a/bmad/bmm/workflows/1-analysis/brainstorm-project/README.md +++ /dev/null @@ -1,113 +0,0 @@ -# Project Brainstorming Workflow - -Structured ideation for software projects exploring problem spaces, architectures, and innovative solutions beyond traditional requirements gathering. - -## Table of Contents - -- [Purpose](#purpose) -- [Usage](#usage) -- [Process](#process) -- [Inputs & Outputs](#inputs--outputs) -- [Integration](#integration) - -## Purpose - -Generate multiple solution approaches for software projects through: - -- Parallel ideation tracks (architecture, UX, integration, value delivery) -- Technical-business alignment from inception -- Hidden assumption discovery -- Innovation beyond obvious solutions - -## Usage - -```bash -# Run brainstorming session -bmad bmm *brainstorm-project - -# Or via Analyst agent -*brainstorm-project -``` - -## Process - -### 1. Context Capture - -- Business objectives and constraints -- Technical environment -- Stakeholder needs -- Success criteria - -### 2. Parallel Ideation - -- **Architecture Track**: Technical approaches with trade-offs -- **UX Track**: Interface paradigms and user journeys -- **Integration Track**: System connection patterns -- **Value Track**: Feature prioritization and delivery - -### 3. Solution Synthesis - -- Evaluate feasibility and impact -- Align with strategic objectives -- Surface hidden assumptions -- Generate recommendations - -## Inputs & Outputs - -### Inputs - -| Input | Type | Purpose | -| ----------------- | -------- | --------------------------------------------- | -| Project Context | Document | Business objectives, environment, constraints | -| Problem Statement | Optional | Core challenge or opportunity | - -### Outputs - -| Output | Content | -| ------------------------ | ------------------------------------------- | -| Architecture Proposals | Multiple approaches with trade-off analysis | -| Value Framework | Prioritized features aligned to objectives | -| Risk Analysis | Dependencies, challenges, opportunities | -| Strategic Recommendation | Synthesized direction with rationale | - -## Integration - -### Workflow Chain - -1. **brainstorm-project** ← Current step -2. research (optional deep dive) -3. product-brief (strategic document) -4. Phase 2 planning (PRD/tech-spec) - -### Feed Into - -- Product Brief development -- Architecture decisions -- PRD requirements -- Epic prioritization - -## Best Practices - -1. **Prepare context** - Gather business and technical background -2. **Think broadly** - Explore non-obvious approaches -3. **Document assumptions** - Capture implicit beliefs -4. **Consider constraints** - Technical, organizational, resource -5. **Focus on value** - Align to business objectives - -## Configuration - -```yaml -# bmad/bmm/config.yaml -output_folder: ./output -project_name: Your Project -``` - -## Related Workflows - -- [Research](../research/README.md) - Deep investigation -- [Product Brief](../product-brief/README.md) - Strategic planning -- [PRD](../../2-plan-workflows/prd/README.md) - Requirements document - ---- - -Part of BMad Method v6 - Phase 1 Analysis workflows diff --git a/bmad/bmm/workflows/1-analysis/product-brief/README.md b/bmad/bmm/workflows/1-analysis/product-brief/README.md deleted file mode 100644 index 24f5de77..00000000 --- a/bmad/bmm/workflows/1-analysis/product-brief/README.md +++ /dev/null @@ -1,180 +0,0 @@ -# Product Brief Workflow - -## Overview - -Interactive product brief creation workflow that guides users through defining their product vision with multiple input sources and conversational collaboration. Supports both structured interactive mode and rapid "YOLO" mode for quick draft generation. - -## Key Features - -- **Dual Mode Operation** - Interactive step-by-step or rapid draft generation -- **Multi-Input Support** - Integrates market research, competitive analysis, and brainstorming results -- **Conversational Design** - Guides users through strategic thinking with probing questions -- **Executive Summary Generation** - Creates compelling summaries for stakeholder communication -- **Comprehensive Coverage** - Addresses all critical product planning dimensions -- **Stakeholder Ready** - Generates professional briefs suitable for PM handoff - -## Usage - -### Basic Invocation - -```bash -workflow product-brief -``` - -### With Input Documents - -```bash -# With market research -workflow product-brief --input market-research.md - -# With multiple inputs -workflow product-brief --input market-research.md --input competitive-analysis.md -``` - -### Configuration - -- **brief_format**: "comprehensive" (full detail) or "executive" (3-page limit) -- **autonomous**: false (requires user collaboration) -- **output_folder**: Location for generated brief - -## Workflow Structure - -### Files Included - -``` -product-brief/ -β”œβ”€β”€ workflow.yaml # Configuration and metadata -β”œβ”€β”€ instructions.md # Interactive workflow steps -β”œβ”€β”€ template.md # Product brief document structure -β”œβ”€β”€ checklist.md # Validation criteria -└── README.md # This file -``` - -## Workflow Process - -### Phase 1: Initialization and Context (Steps 0-2) - -- **Project Setup**: Captures project name and basic context -- **Input Gathering**: Collects and analyzes available documents -- **Mode Selection**: Chooses interactive or YOLO collaboration approach -- **Context Extraction**: Identifies core problems and opportunities - -### Phase 2: Interactive Development (Steps 3-12) - Interactive Mode - -- **Problem Definition**: Deep dive into user pain points and market gaps -- **Solution Articulation**: Develops clear value proposition and approach -- **User Segmentation**: Defines primary and secondary target audiences -- **Success Metrics**: Establishes measurable goals and KPIs -- **MVP Scoping**: Ruthlessly defines minimum viable features -- **Financial Planning**: Assesses ROI and strategic alignment -- **Technical Context**: Captures platform and technology considerations -- **Risk Assessment**: Identifies constraints, assumptions, and unknowns - -### Phase 3: Rapid Generation (Steps 3-4) - YOLO Mode - -- **Complete Draft**: Generates full brief based on initial context -- **Iterative Refinement**: User-guided section improvements -- **Quality Validation**: Ensures completeness and consistency - -### Phase 4: Finalization (Steps 13-15) - -- **Executive Summary**: Creates compelling overview for stakeholders -- **Supporting Materials**: Compiles research summaries and references -- **Final Review**: Quality check and handoff preparation - -## Output - -### Generated Files - -- **Primary output**: product-brief-{project_name}-{date}.md -- **Supporting files**: Research summaries and stakeholder input documentation - -### Output Structure - -1. **Executive Summary** - High-level product concept and value proposition -2. **Problem Statement** - Detailed problem analysis with evidence -3. **Proposed Solution** - Core approach and key differentiators -4. **Target Users** - Primary and secondary user segments with personas -5. **Goals and Success Metrics** - Business objectives and measurable KPIs -6. **MVP Scope** - Must-have features and out-of-scope items -7. **Post-MVP Vision** - Phase 2 features and long-term roadmap -8. **Financial Impact** - Investment requirements and ROI projections -9. **Strategic Alignment** - Connection to company OKRs and initiatives -10. **Technical Considerations** - Platform requirements and preferences -11. **Constraints and Assumptions** - Resource limits and key assumptions -12. **Risks and Open Questions** - Risk assessment and research needs -13. **Supporting Materials** - Research summaries and references - -## Requirements - -No special requirements - designed to work with or without existing documentation. - -## Best Practices - -### Before Starting - -1. **Gather Available Research**: Collect any market research, competitive analysis, or user feedback -2. **Define Stakeholder Audience**: Know who will use this brief for decision-making -3. **Set Time Boundaries**: Interactive mode requires 60-90 minutes for quality results - -### During Execution - -1. **Be Specific**: Avoid generic statements - provide concrete examples and data -2. **Think Strategically**: Focus on "why" and "what" rather than "how" -3. **Challenge Assumptions**: Use the conversation to test and refine your thinking -4. **Scope Ruthlessly**: Resist feature creep in MVP definition - -### After Completion - -1. **Validate with Checklist**: Use included criteria to ensure completeness -2. **Stakeholder Review**: Share executive summary first, then full brief -3. **Iterate Based on Feedback**: Product briefs should evolve with new insights - -## Troubleshooting - -### Common Issues - -**Issue**: Brief lacks specificity or contains vague statements - -- **Solution**: Restart problem definition with concrete examples and measurable impacts -- **Check**: Ensure each section answers "so what?" and provides actionable insights - -**Issue**: MVP scope is too large or undefined - -- **Solution**: Use the "what's the minimum to validate core hypothesis?" filter -- **Check**: Verify that each MVP feature is truly essential for initial value delivery - -**Issue**: Missing strategic context or business justification - -- **Solution**: Return to financial impact and strategic alignment sections -- **Check**: Ensure connection to company goals and clear ROI potential - -## Customization - -To customize this workflow: - -1. **Modify Questions**: Update instructions.md to add industry-specific or company-specific prompts -2. **Adjust Template**: Customize template.md sections for organizational brief standards -3. **Add Validation**: Extend checklist.md with company-specific quality criteria -4. **Configure Modes**: Adjust brief_format settings for different output styles - -## Version History - -- **v6.0.0** - Interactive conversational design with dual modes - - Interactive and YOLO mode support - - Multi-input document integration - - Executive summary generation - - Strategic alignment focus - -## Support - -For issues or questions: - -- Review the workflow creation guide at `/bmad/bmb/workflows/create-workflow/workflow-creation-guide.md` -- Validate output using `checklist.md` -- Consider running market research workflow first if lacking business context -- Consult BMAD documentation for product planning methodology - ---- - -_Part of the BMad Method v6 - BMM (Method) Module_ diff --git a/bmad/bmm/workflows/1-analysis/research/README.md b/bmad/bmm/workflows/1-analysis/research/README.md deleted file mode 100644 index c3359593..00000000 --- a/bmad/bmm/workflows/1-analysis/research/README.md +++ /dev/null @@ -1,454 +0,0 @@ -# Research Workflow - Multi-Type Research System - -## Overview - -The Research Workflow is a comprehensive, adaptive research system that supports multiple research types through an intelligent router pattern. This workflow consolidates various research methodologies into a single, powerful tool that adapts to your specific research needs - from market analysis to technical evaluation to AI prompt generation. - -**Version 2.0.0** - Multi-type research system with router-based architecture - -## Key Features - -### πŸ”€ Intelligent Research Router - -- **6 Research Types**: Market, Deep Prompt, Technical, Competitive, User, Domain -- **Dynamic Instructions**: Loads appropriate instruction set based on research type -- **Adaptive Templates**: Selects optimal output format for research goal -- **Context-Aware**: Adjusts frameworks and methods per research type - -### πŸ” Market Research (Type: `market`) - -- Real-time web research for current market data -- TAM/SAM/SOM calculations with multiple methodologies -- Competitive landscape analysis and positioning -- Customer persona development and Jobs-to-be-Done -- Porter's Five Forces and strategic frameworks -- Go-to-market strategy recommendations - -### πŸ€– Deep Research Prompt Generation (Type: `deep_prompt`) - -- **Optimized for AI Research Platforms**: ChatGPT Deep Research, Gemini, Grok DeepSearch, Claude Projects -- **Prompt Engineering Best Practices**: Multi-stage research workflows, iterative refinement -- **Platform-Specific Optimization**: Tailored prompts for each AI research tool -- **Context Packaging**: Structures background information for optimal AI understanding -- **Research Question Refinement**: Transforms vague questions into precise research prompts - -### πŸ—οΈ Technical/Architecture Research (Type: `technical`) - -- Technology evaluation and comparison matrices -- Architecture pattern research and trade-off analysis -- Framework/library assessment with pros/cons -- Technical feasibility studies -- Cost-benefit analysis for technology decisions -- Architecture Decision Records (ADR) generation - -### 🎯 Competitive Intelligence (Type: `competitive`) - -- Deep competitor analysis and profiling -- Competitive positioning and gap analysis -- Strategic group mapping -- Feature comparison matrices -- Pricing strategy analysis -- Market share and growth tracking - -### πŸ‘₯ User Research (Type: `user`) - -- Customer insights and behavioral analysis -- Persona development with demographics and psychographics -- Jobs-to-be-Done framework application -- Customer journey mapping -- Pain point identification -- Willingness-to-pay analysis - -### 🌐 Domain/Industry Research (Type: `domain`) - -- Industry deep dives and trend analysis -- Regulatory landscape assessment -- Domain expertise synthesis -- Best practices identification -- Standards and compliance requirements -- Emerging patterns and disruptions - -## Usage - -### Basic Invocation - -```bash -workflow research -``` - -The workflow will prompt you to select a research type. - -### Direct Research Type Selection - -```bash -# Market research -workflow research --type market - -# Deep research prompt generation -workflow research --type deep_prompt - -# Technical evaluation -workflow research --type technical - -# Competitive intelligence -workflow research --type competitive - -# User research -workflow research --type user - -# Domain analysis -workflow research --type domain -``` - -### With Input Documents - -```bash -workflow research --type market --input product-brief.md --input competitor-list.md -workflow research --type technical --input requirements.md --input architecture.md -workflow research --type deep_prompt --input research-question.md -``` - -### Configuration Options - -Can be customized through `workflow.yaml`: - -- **research_depth**: `quick`, `standard`, or `comprehensive` -- **enable_web_research**: `true`/`false` for real-time data gathering -- **enable_competitor_analysis**: `true`/`false` (market/competitive types) -- **enable_financial_modeling**: `true`/`false` (market type) - -## Workflow Structure - -### Files Included - -``` -research/ -β”œβ”€β”€ workflow.yaml # Multi-type configuration -β”œβ”€β”€ instructions-router.md # Router logic (loads correct instructions) -β”œβ”€β”€ instructions-market.md # Market research workflow -β”œβ”€β”€ instructions-deep-prompt.md # Deep prompt generation workflow -β”œβ”€β”€ instructions-technical.md # Technical evaluation workflow -β”œβ”€β”€ template-market.md # Market research report template -β”œβ”€β”€ template-deep-prompt.md # Research prompt template -β”œβ”€β”€ template-technical.md # Technical evaluation template -β”œβ”€β”€ checklist.md # Universal validation criteria -β”œβ”€β”€ README.md # This file -└── claude-code/ # Claude Code enhancements (optional) - β”œβ”€β”€ injections.yaml # Integration configuration - └── sub-agents/ # Specialized research agents - β”œβ”€β”€ bmm-market-researcher.md - β”œβ”€β”€ bmm-trend-spotter.md - β”œβ”€β”€ bmm-data-analyst.md - β”œβ”€β”€ bmm-competitor-analyzer.md - β”œβ”€β”€ bmm-user-researcher.md - └── bmm-technical-evaluator.md -``` - -## Workflow Process - -### Phase 1: Research Type Selection and Setup - -1. Router presents research type menu -2. User selects research type (market, deep_prompt, technical, competitive, user, domain) -3. Router loads appropriate instructions and template -4. Gather research parameters and inputs - -### Phase 2: Research Type-Specific Execution - -**For Market Research:** - -1. Define research objectives and market boundaries -2. Conduct web research across multiple sources -3. Calculate TAM/SAM/SOM with triangulation -4. Develop customer segments and personas -5. Analyze competitive landscape -6. Apply industry frameworks (Porter's Five Forces, etc.) -7. Identify trends and opportunities -8. Develop strategic recommendations -9. Create financial projections (optional) -10. Compile comprehensive report - -**For Deep Prompt Generation:** - -1. Analyze research question or topic -2. Identify optimal AI research platform (ChatGPT, Gemini, Grok, Claude) -3. Structure research context and background -4. Generate platform-optimized prompt -5. Create multi-stage research workflow -6. Define iteration and refinement strategy -7. Package with context documents -8. Provide execution guidance - -**For Technical Research:** - -1. Define technical requirements and constraints -2. Identify technologies/frameworks to evaluate -3. Research each option (documentation, community, maturity) -4. Create comparison matrix with criteria -5. Perform trade-off analysis -6. Calculate cost-benefit for each option -7. Generate Architecture Decision Record (ADR) -8. Provide recommendation with rationale - -**For Competitive/User/Domain:** - -- Uses market research workflow with specific focus -- Adapts questions and frameworks to research type -- Customizes output format for target audience - -### Phase 3: Validation and Delivery - -1. Review outputs against checklist -2. Validate completeness and quality -3. Generate final report/document -4. Provide next steps and recommendations - -## Output - -### Generated Files by Research Type - -**Market Research:** - -- `market-research-{product_name}-{date}.md` -- Comprehensive market analysis report (10+ sections) - -**Deep Research Prompt:** - -- `deep-research-prompt-{date}.md` -- Optimized AI research prompt with context and instructions - -**Technical Research:** - -- `technical-research-{date}.md` -- Technology evaluation with comparison matrix and ADR - -**Competitive Intelligence:** - -- `competitive-intelligence-{date}.md` -- Detailed competitor analysis and positioning - -**User Research:** - -- `user-research-{date}.md` -- Customer insights and persona documentation - -**Domain Research:** - -- `domain-research-{date}.md` -- Industry deep dive with trends and best practices - -## Requirements - -### All Research Types - -- BMAD Core v6 project structure -- Web search capability (for real-time research) -- Access to research data sources - -### Market Research - -- Product or business description -- Target customer hypotheses (optional) -- Known competitors list (optional) - -### Deep Prompt Research - -- Research question or topic -- Background context documents (optional) -- Target AI platform preference (optional) - -### Technical Research - -- Technical requirements document -- Current architecture (if brownfield) -- Technical constraints list - -## Best Practices - -### Before Starting - -1. **Know Your Research Goal**: Select the most appropriate research type -2. **Gather Context**: Collect relevant documents before starting -3. **Set Depth Level**: Choose appropriate research_depth (quick/standard/comprehensive) -4. **Define Success Criteria**: What decisions will this research inform? - -### During Execution - -**Market Research:** - -- Provide specific product/service details -- Validate market boundaries carefully -- Review TAM/SAM/SOM assumptions -- Challenge competitive positioning - -**Deep Prompt Generation:** - -- Be specific about research platform target -- Provide rich context documents -- Clarify expected research outcome -- Define iteration strategy - -**Technical Research:** - -- List all evaluation criteria upfront -- Weight criteria by importance -- Consider long-term implications -- Include cost analysis - -### After Completion - -1. Review using the validation checklist -2. Update with any missing information -3. Share with stakeholders for feedback -4. Schedule follow-up research if needed -5. Document decisions made based on research - -## Research Frameworks Available - -### Market Research Frameworks - -- TAM/SAM/SOM Analysis -- Porter's Five Forces -- Jobs-to-be-Done (JTBD) -- Technology Adoption Lifecycle -- SWOT Analysis -- Value Chain Analysis - -### Technical Research Frameworks - -- Trade-off Analysis Matrix -- Architecture Decision Records (ADR) -- Technology Radar -- Comparison Matrix -- Cost-Benefit Analysis -- Technical Risk Assessment - -### Deep Prompt Frameworks - -- ChatGPT Deep Research Best Practices -- Gemini Deep Research Framework -- Grok DeepSearch Optimization -- Claude Projects Methodology -- Iterative Prompt Refinement - -## Data Sources - -The workflow leverages multiple data sources: - -- Industry reports and publications -- Government statistics and databases -- Financial reports and SEC filings -- News articles and press releases -- Academic research papers -- Technical documentation and RFCs -- GitHub repositories and discussions -- Stack Overflow and developer forums -- Market research firm reports -- Social media and communities -- Patent databases -- Benchmarking studies - -## Claude Code Enhancements - -### Available Subagents - -1. **bmm-market-researcher** - Market intelligence gathering -2. **bmm-trend-spotter** - Emerging trends and weak signals -3. **bmm-data-analyst** - Quantitative analysis and modeling -4. **bmm-competitor-analyzer** - Competitive intelligence -5. **bmm-user-researcher** - Customer insights and personas -6. **bmm-technical-evaluator** - Technology assessment - -These are automatically invoked during workflow execution if Claude Code integration is configured. - -## Troubleshooting - -### Issue: Don't know which research type to choose - -- **Solution**: Start with research question - "What do I need to know?" - - Market viability? β†’ `market` - - Best technology? β†’ `technical` - - Need AI to research deeper? β†’ `deep_prompt` - - Who are competitors? β†’ `competitive` - - Who are users? β†’ `user` - - Industry understanding? β†’ `domain` - -### Issue: Market research results seem incomplete - -- **Solution**: Increase research_depth to `comprehensive` -- **Check**: Enable web_research in workflow.yaml -- **Try**: Run competitive and user research separately for more depth - -### Issue: Deep prompt doesn't work with target platform - -- **Solution**: Review platform-specific best practices in generated prompt -- **Check**: Ensure context documents are included -- **Try**: Regenerate with different platform selection - -### Issue: Technical comparison is subjective - -- **Solution**: Add more objective criteria (performance metrics, cost, community size) -- **Check**: Weight criteria by business importance -- **Try**: Run pilot implementations for top 2 options - -## Customization - -### Adding New Research Types - -1. Create new instructions file: `instructions-{type}.md` -2. Create new template file: `template-{type}.md` -3. Add research type to `workflow.yaml` `research_types` section -4. Update router logic in `instructions-router.md` - -### Modifying Existing Research Types - -1. Edit appropriate `instructions-{type}.md` file -2. Update corresponding `template-{type}.md` if needed -3. Adjust validation criteria in `checklist.md` - -### Creating Custom Frameworks - -Add to `workflow.yaml` `frameworks` section under appropriate research type. - -## Version History - -- **v2.0.0** - Multi-type research system with router architecture - - Added deep_prompt research type for AI research platform optimization - - Added technical research type for technology evaluation - - Consolidated competitive, user, domain under market with focus variants - - Router-based instruction loading - - Template selection by research type - - Enhanced Claude Code subagent support - -- **v1.0.0** - Initial market research only implementation - - Single-purpose market research workflow - - Now deprecated in favor of v2.0.0 multi-type system - -## Support - -For issues or questions: - -- Review workflow creation guide at `/bmad/bmb/workflows/create-workflow/workflow-creation-guide.md` -- Check validation against `checklist.md` -- Examine router logic in `instructions-router.md` -- Review research type-specific instructions -- Consult BMAD Method v6 documentation - -## Migration from v1.0 market-research - -If you're used to the standalone `market-research` workflow: - -```bash -# Old way -workflow market-research - -# New way -workflow research --type market -# Or just: workflow research (then select market) -``` - -All market research functionality is preserved and enhanced in v2.0.0. - ---- - -_Part of the BMad Method v6 - BMM (BMad Method) Module - Empowering systematic research and analysis_ diff --git a/bmad/bmm/workflows/2-plan-workflows/README.md b/bmad/bmm/workflows/2-plan-workflows/README.md deleted file mode 100644 index 7a20e960..00000000 --- a/bmad/bmm/workflows/2-plan-workflows/README.md +++ /dev/null @@ -1,258 +0,0 @@ ---- -last-redoc-date: 2025-10-01 ---- - -# Project Planning Workflow (Phase 2) - -The Phase 2 Planning workflow is **scale-adaptive**, meaning it automatically determines the right level of planning documentation based on project complexity (Levels 0-4). This ensures planning overhead matches project valueβ€”from minimal tech specs for bug fixes to comprehensive PRDs for enterprise platforms. - -## Scale-Adaptive Flow (Levels 0-4) - -The workflow routes to different planning approaches based on project level: - -### Level 0 - Single File Change / Bug Fix - -**Planning:** Tech-spec only (lightweight implementation plan) -**Output:** `tech-spec.md` with single story -**Next Phase:** Direct to implementation (Phase 4) - -### Level 1 - Small Feature (1-3 files, 2-5 stories) - -**Planning:** Tech-spec only (implementation-focused) -**Output:** `tech-spec.md` with epic breakdown and stories -**Next Phase:** Direct to implementation (Phase 4) - -### Level 2 - Feature Set / Small Project (5-15 stories, 1-2 epics) - -**Planning:** PRD (product-focused) + Tech-spec (technical planning) -**Output:** `PRD.md`, `epics.md`, `tech-spec.md` -**Next Phase:** Tech-spec workflow (lightweight solutioning), then implementation (Phase 4) -**Note:** Level 2 uses tech-spec instead of full architecture to keep planning lightweight - -### Level 3 - Medium Project (15-40 stories, 2-5 epics) - -**Planning:** PRD (strategic product document) -**Output:** `PRD.md`, `epics.md` -**Next Phase:** create-architecture workflow (Phase 3), then implementation (Phase 4) - -### Level 4 - Large/Enterprise Project (40-100+ stories, 5-10 epics) - -**Planning:** PRD (comprehensive product specification) -**Output:** `PRD.md`, `epics.md` -**Next Phase:** create-architecture workflow (Phase 3), then implementation (Phase 4) - -**Critical Distinction:** - -- **Levels 0-1:** No PRD, tech-spec only -- **Level 2:** PRD + tech-spec (skips full architecture) -- **Levels 3-4:** PRD β†’ full create-architecture workflow - -Critical to v6's flow improvement is this workflow's integration with the bmm-workflow-status.md tracking document, which maintains project state across sessions, tracks which agents participate in each phase, and provides continuity for multi-session planning efforts. The workflow can resume from any point, intelligently detecting existing artifacts and determining next steps without redundant work. For UX-heavy projects, it can generate standalone UX specifications or AI frontend prompts from existing specs. - -## Key Features - -- **Scale-adaptive planning** - Automatically determines output based on project complexity -- **Intelligent routing** - Uses router system to load appropriate instruction sets -- **Continuation support** - Can resume from previous sessions and handle incremental work -- **Multi-level outputs** - Supports 5 project levels (0-4) with appropriate artifacts -- **Input integration** - Leverages product briefs and market research when available -- **Template-driven** - Uses validated templates for consistent output structure - -### Configuration - -The workflow adapts automatically based on project assessment, but key configuration options include: - -- **scale_parameters**: Defines story/epic counts for each project level -- **output_folder**: Where all generated documents are stored -- **project_name**: Used in document names and templates - -## Workflow Structure - -### Files Included - -``` -2-plan-workflows/ -β”œβ”€β”€ README.md # Overview and usage details -β”œβ”€β”€ checklist.md # Shared validation criteria -β”œβ”€β”€ prd/ -β”‚ β”œβ”€β”€ epics-template.md # Epic breakdown template -β”‚ β”œβ”€β”€ instructions.md # Level 2-4 PRD instructions -β”‚ β”œβ”€β”€ prd-template.md # Product Requirements Document template -β”‚ └── workflow.yaml -β”œβ”€β”€ tech-spec/ -β”‚ β”œβ”€β”€ epics-template.md # Epic-to-story handoff template -β”‚ β”œβ”€β”€ instructions-level0-story.md -β”‚ β”œβ”€β”€ instructions-level1-stories.md -β”‚ β”œβ”€β”€ instructions.md # Level 0-1 tech-spec instructions -β”‚ β”œβ”€β”€ tech-spec-template.md # Technical Specification template -β”‚ β”œβ”€β”€ user-story-template.md # Story template for Level 0/1 -β”‚ └── workflow.yaml -β”œβ”€β”€ gdd/ -β”‚ β”œβ”€β”€ instructions-gdd.md # Game Design Document instructions -β”‚ β”œβ”€β”€ gdd-template.md # GDD template -β”‚ β”œβ”€β”€ game-types.csv # Genre catalog -β”‚ β”œβ”€β”€ game-types/ # Genre-specific templates -β”‚ └── workflow.yaml -β”œβ”€β”€ narrative/ -β”‚ β”œβ”€β”€ instructions-narrative.md # Narrative design instructions -β”‚ β”œβ”€β”€ narrative-template.md # Narrative planning template -β”‚ └── workflow.yaml -└── create-ux-design/ - β”œβ”€β”€ instructions.md # UX design instructions - β”œβ”€β”€ ux-design-template.md # UX design template - β”œβ”€β”€ checklist.md # UX design validation checklist - └── workflow.yaml -``` - -## Workflow Process - -### Phase 1: Assessment and Routing (Steps 1-5) - -- **Project Analysis**: Determines project type (greenfield/brownfield/legacy) -- **Scope Assessment**: Classifies into 5 levels based on complexity -- **Document Discovery**: Identifies existing inputs and documentation -- **Workflow Routing**: Loads appropriate instruction set based on level -- **Continuation Handling**: Resumes from previous work when applicable - -### Phase 2: Level-Specific Planning (Steps vary by level) - -**Level 0 (Single File Change / Bug Fix)**: - -- Tech-spec only workflow -- Single story implementation plan -- Direct to Phase 4 (implementation) - -**Level 1 (Small Feature)**: - -- Tech-spec only workflow -- Epic breakdown with 2-5 stories -- Direct to Phase 4 (implementation) - -**Level 2 (Feature Set / Small Project)**: - -- PRD workflow (strategic product document) -- Generates `PRD.md` and `epics.md` -- Then runs tech-spec workflow (lightweight solutioning) -- Then to Phase 4 (implementation) - -**Level 3-4 (Medium to Enterprise Projects)**: - -- PRD workflow (comprehensive product specification) -- Generates `PRD.md` and `epics.md` -- Hands off to Phase 3 (create-architecture workflow) -- Full architecture design before implementation - -### Phase 3: Validation and Handoff (Final steps) - -- **Document Review**: Validates outputs against checklists -- **Architect Preparation**: For Level 3-4, prepares handoff materials -- **Next Steps**: Provides guidance for development phase - -## Output - -### Generated Files - -- **Primary output**: PRD.md (except Level 0), tech-spec.md, bmm-workflow-status.md -- **Supporting files**: epics.md (Level 2-4), PRD-validation-report.md (if validation run) - -### Output Structure by Level - -**Level 0 - Tech Spec Only**: - -- `tech-spec.md` - Single story implementation plan -- Direct to implementation - -**Level 1 - Tech Spec with Epic Breakdown**: - -- `tech-spec.md` - Epic breakdown with 2-5 stories -- Direct to implementation - -**Level 2 - PRD + Tech Spec**: - -- `PRD.md` - Strategic product document (goals, requirements, user journeys, UX principles, UI goals, epic list, scope) -- `epics.md` - Tactical implementation roadmap (detailed story breakdown) -- `tech-spec.md` - Lightweight technical planning (generated after PRD) -- Then to implementation - -**Level 3-4 - PRD + Full Architecture**: - -- `PRD.md` - Comprehensive product specification -- `epics.md` - Complete epic/story breakdown -- Hands off to create-architecture workflow (Phase 3) -- `architecture.md` - Generated by architect workflow -- Then to implementation - -## Requirements - -- **Input Documents**: Product brief and/or market research (recommended but not required) -- **Project Configuration**: Valid config.yaml with project_name and output_folder -- **Assessment Readiness**: Clear understanding of project scope and objectives - -## Best Practices - -### Before Starting - -1. **Gather Context**: Collect any existing product briefs, market research, or requirements -2. **Define Scope**: Have a clear sense of project boundaries and complexity -3. **Prepare Stakeholders**: Ensure key stakeholders are available for input if needed - -### During Execution - -1. **Be Honest About Scope**: Accurate assessment ensures appropriate planning depth -2. **Leverage Existing Work**: Reference previous documents and avoid duplication -3. **Think Incrementally**: Remember that planning can evolve - start with what you know - -### After Completion - -1. **Validate Against Checklist**: Use included validation criteria to ensure completeness -2. **Share with Stakeholders**: Distribute appropriate documents to relevant team members -3. **Prepare for Architecture**: For Level 3-4 projects, ensure architect has complete context - -## Troubleshooting - -### Common Issues - -**Issue**: Workflow creates wrong level of documentation - -- **Solution**: Review project assessment and restart with correct scope classification -- **Check**: Verify the bmm-workflow-status.md reflects actual project complexity - -**Issue**: Missing input documents cause incomplete planning - -- **Solution**: Gather recommended inputs or proceed with manual context gathering -- **Check**: Ensure critical business context is captured even without formal documents - -**Issue**: Continuation from previous session fails - -- **Solution**: Check for existing bmm-workflow-status.md and ensure output folder is correct -- **Check**: Verify previous session completed at a valid checkpoint - -## Customization - -To customize this workflow: - -1. **Modify Assessment Logic**: Update instructions-router.md to adjust level classification -2. **Adjust Templates**: Customize PRD, tech-spec, or epic templates for organizational needs -3. **Add Validation**: Extend checklist.md with organization-specific quality criteria -4. **Configure Outputs**: Modify workflow.yaml to change file naming or structure - -## Version History - -- **v6.0.0** - Scale-adaptive architecture with intelligent routing - - Multi-level project support (0-4) - - Continuation and resumption capabilities - - Template-driven output generation - - Input document integration - -## Support - -For issues or questions: - -- Review the workflow creation guide at `/bmad/bmb/workflows/create-workflow/workflow-creation-guide.md` -- Validate output using `checklist.md` -- Consult project assessment in `bmm-workflow-status.md` -- Check continuation status in existing output documents - ---- - -_Part of the BMad Method v6 - BMM (Method) Module_ diff --git a/bmad/bmm/workflows/2-plan-workflows/tech-spec/workflow.yaml b/bmad/bmm/workflows/2-plan-workflows/tech-spec/workflow.yaml index bc05a4a3..c9e28af4 100644 --- a/bmad/bmm/workflows/2-plan-workflows/tech-spec/workflow.yaml +++ b/bmad/bmm/workflows/2-plan-workflows/tech-spec/workflow.yaml @@ -1,5 +1,5 @@ # Technical Specification Workflow (Level 0) -name: tech-spec +name: tech-spec-sm description: "Technical specification workflow for Level 0 projects (single atomic changes). Creates focused tech spec for bug fixes, single endpoint additions, or small isolated changes. Tech-spec only - no PRD needed." author: "BMad" diff --git a/bmad/bmm/workflows/2-plan-workflows/tech-spec/workflow.yaml.bak b/bmad/bmm/workflows/2-plan-workflows/tech-spec/workflow.yaml.bak new file mode 100644 index 00000000..bc05a4a3 --- /dev/null +++ b/bmad/bmm/workflows/2-plan-workflows/tech-spec/workflow.yaml.bak @@ -0,0 +1,60 @@ +# Technical Specification Workflow (Level 0) +name: tech-spec +description: "Technical specification workflow for Level 0 projects (single atomic changes). Creates focused tech spec for bug fixes, single endpoint additions, or small isolated changes. Tech-spec only - no PRD needed." +author: "BMad" + +# Critical variables from config +config_source: "{project-root}/bmad/bmm/config.yaml" +project_name: "{config_source}:project_name" +output_folder: "{config_source}:output_folder" +user_name: "{config_source}:user_name" +communication_language: "{config_source}:communication_language" +document_output_language: "{config_source}:document_output_language" +user_skill_level: "{config_source}:user_skill_level" +date: system-generated + +# Runtime variables (captured during workflow execution) +project_level: runtime-captured +project_type: runtime-captured +development_context: runtime-captured +change_type: runtime-captured +field_type: runtime-captured + +# Workflow components +installed_path: "{project-root}/bmad/bmm/workflows/2-plan-workflows/tech-spec" +instructions: "{installed_path}/instructions.md" +template: "{installed_path}/tech-spec-template.md" + +# Story generation instructions (invoked based on level) +instructions_level0_story: "{installed_path}/instructions-level0-story.md" +instructions_level1_stories: "{installed_path}/instructions-level1-stories.md" + +# Templates +user_story_template: "{installed_path}/user-story-template.md" +epics_template: "{installed_path}/epics-template.md" + +# Output configuration +default_output_file: "{output_folder}/tech-spec.md" +user_story_file: "{output_folder}/user-story.md" +epics_file: "{output_folder}/epics.md" + +# Recommended input documents (optional for Level 0) +recommended_inputs: + - bug_report: "Bug description or issue ticket" + - feature_request: "Brief feature description" + +# Smart input file references - handles both whole docs and sharded docs +# Priority: Whole document first, then sharded version +input_file_patterns: + product_brief: + whole: "{output_folder}/*brief*.md" + sharded: "{output_folder}/*brief*/index.md" + + research: + whole: "{output_folder}/*research*.md" + sharded: "{output_folder}/*research*/index.md" + + document_project: + sharded: "{output_folder}/docs/index.md" + +standalone: true diff --git a/bmad/bmm/workflows/3-solutioning/README.md b/bmad/bmm/workflows/3-solutioning/README.md deleted file mode 100644 index f987e364..00000000 --- a/bmad/bmm/workflows/3-solutioning/README.md +++ /dev/null @@ -1 +0,0 @@ -New Doc Incoming... diff --git a/bmad/bmm/workflows/3-solutioning/solutioning-gate-check/README.md b/bmad/bmm/workflows/3-solutioning/solutioning-gate-check/README.md deleted file mode 100644 index 98c90788..00000000 --- a/bmad/bmm/workflows/3-solutioning/solutioning-gate-check/README.md +++ /dev/null @@ -1,177 +0,0 @@ -# Implementation Ready Check Workflow - -## Overview - -The Implementation Ready Check workflow provides a systematic validation of all planning and solutioning artifacts before transitioning from Phase 3 (Solutioning) to Phase 4 (Implementation) in the BMad Method. This workflow ensures that PRDs, architecture documents, and story breakdowns are properly aligned with no critical gaps or contradictions. - -## Purpose - -This workflow is designed to: - -- **Validate Completeness**: Ensure all required planning documents exist and are complete -- **Verify Alignment**: Check that PRD, architecture, and stories are cohesive and aligned -- **Identify Gaps**: Detect missing stories, unaddressed requirements, or sequencing issues -- **Assess Risks**: Find contradictions, conflicts, or potential implementation blockers -- **Provide Confidence**: Give teams confidence that planning is solid before starting development - -## When to Use - -This workflow should be invoked: - -- At the end of Phase 3 (Solutioning) for Level 2-4 projects -- Before beginning Phase 4 (Implementation) -- After significant planning updates or architectural changes -- When validating readiness for Level 0-1 projects (simplified validation) - -## Project Level Adaptations - -The workflow adapts its validation based on project level: - -### Level 0-1 Projects - -- Validates tech spec and simple stories only -- Checks internal consistency and basic coverage -- Lighter validation appropriate for simple projects - -### Level 2 Projects - -- Validates PRD, tech spec (with embedded architecture), and stories -- Ensures PRD requirements are fully covered -- Verifies technical approach aligns with business goals - -### Level 3-4 Projects - -- Full validation of PRD, architecture document, and comprehensive stories -- Deep cross-reference checking across all artifacts -- Validates architectural decisions don't introduce scope creep -- Checks UX artifacts if applicable - -## How to Invoke - -### Via Scrum Master Agent - -``` -*solutioning-gate-check -``` - -### Direct Workflow Invocation - -``` -workflow solutioning-gate-check -``` - -## Expected Inputs - -The workflow will automatically search your project's output folder for: - -- Product Requirements Documents (PRD) -- Architecture documents -- Technical Specifications -- Epic and Story breakdowns -- UX artifacts (if applicable) - -No manual input file specification needed - the workflow discovers documents automatically. - -## Generated Output - -The workflow produces a comprehensive **Implementation Readiness Report** containing: - -1. **Executive Summary** - Overall readiness status -2. **Document Inventory** - What was found and reviewed -3. **Alignment Validation** - Cross-reference analysis results -4. **Gap Analysis** - Missing items and risks identified -5. **Findings by Severity** - Critical, High, Medium, Low issues -6. **Recommendations** - Specific actions to address issues -7. **Readiness Decision** - Ready, Ready with Conditions, or Not Ready - -Output Location: `{output_folder}/implementation-readiness-report-{date}.md` - -## Workflow Steps - -1. **Initialize** - Get current workflow status and project level -2. **Document Discovery** - Find all planning artifacts -3. **Deep Analysis** - Extract requirements, decisions, and stories -4. **Cross-Reference Validation** - Check alignment between all documents -5. **Gap and Risk Analysis** - Identify issues and conflicts -6. **UX Validation** (optional) - Verify UX concerns are addressed -7. **Generate Report** - Compile comprehensive readiness assessment -8. **Status Update** (optional) - Offer to advance workflow to next phase - -## Validation Criteria - -The workflow uses systematic validation rules adapted to each project level: - -- **Document completeness and quality** -- **Requirement to story traceability** -- **Architecture to implementation alignment** -- **Story sequencing and dependencies** -- **Greenfield project setup coverage** -- **Risk identification and mitigation** - -For projects using the new architecture workflow (decision-architecture.md), additional validations include: - -- **Implementation patterns defined for consistency** -- **Technology versions verified and current** -- **Starter template initialization as first story** -- **UX specification alignment (if provided)** - -## Special Features - -### Intelligent Adaptation - -- Automatically adjusts validation based on project level -- Recognizes when UX workflow is active -- Handles greenfield vs. brownfield projects differently - -### Comprehensive Coverage - -- Validates not just presence but quality and alignment -- Checks for both gaps and gold-plating -- Ensures logical story sequencing - -### Actionable Output - -- Provides specific, actionable recommendations -- Categorizes issues by severity -- Includes positive findings and commendations - -## Integration with BMad Method - -This workflow integrates seamlessly with the BMad Method workflow system: - -- Uses workflow-status to understand project context -- Can update workflow status to advance to next phase -- Follows standard BMad document naming conventions -- Searches standard output folders automatically - -## Troubleshooting - -### Documents Not Found - -- Ensure documents are in the configured output folder -- Check that document names follow BMad conventions -- Verify workflow-status is properly configured - -### Validation Too Strict - -- The workflow adapts to project level automatically -- Level 0-1 projects get lighter validation -- Consider if your project level is set correctly - -### Report Too Long - -- Focus on Critical and High priority issues first -- Use the executive summary for quick decisions -- Review detailed findings only for areas of concern - -## Support - -For issues or questions about this workflow: - -- Consult the BMad Method documentation -- Check the SM agent for workflow guidance -- Review validation-criteria.yaml for detailed rules - ---- - -_This workflow is part of the BMad Method v6-alpha suite of planning and solutioning tools_ diff --git a/bmad/bmm/workflows/4-implementation/README.md b/bmad/bmm/workflows/4-implementation/README.md deleted file mode 100644 index f3bcf53d..00000000 --- a/bmad/bmm/workflows/4-implementation/README.md +++ /dev/null @@ -1,221 +0,0 @@ -# Phase 4: Implementation - -## Overview - -Phase 4 is where planning transitions into actual development. This phase manages the iterative implementation of stories defined in the epic files, tracking their progress through a well-defined status workflow. - -## Status Definitions - -### Epic Status - -Epics progress through a simple two-state flow: - -| Status | Description | Next Status | -| ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------- | -| **backlog** | Epic exists in epic file but technical context has not been created | contexted | -| **contexted** | Epic technical context has been created via `epic-tech-context` workflow. This is a prerequisite before any stories in the epic can be drafted. | - | - -**File Indicators:** - -- `backlog`: No `epic-{n}-context.md` file exists -- `contexted`: `{output_folder}/epic-{n}-context.md` file exists - -### Story Status - -Stories progress through a six-state flow representing their journey from idea to implementation: - -| Status | Description | Set By | Next Status | -| ----------------- | ---------------------------------------------------------------------------------- | ------------- | ------------- | -| **backlog** | Story only exists in the epic file, no work has begun | Initial state | drafted | -| **drafted** | Story file has been created via `create-story` workflow | SM Agent | ready-for-dev | -| **ready-for-dev** | Story has been drafted, approved, and context created via `story-context` workflow | SM Agent | in-progress | -| **in-progress** | Developer is actively implementing the story | Dev Agent | review | -| **review** | Implementation complete, under SM review via `code-review` workflow | Dev Agent | done | -| **done** | Story has been reviewed and completed | Dev Agent | - | - -**File Indicators:** - -- `backlog`: No story file exists -- `drafted`: `{story_dir}/{story-key}.md` file exists (e.g., `1-1-user-auth.md`) -- `ready-for-dev`: Both story file and context exist (e.g., `1-1-user-auth-context.md`) -- `in-progress`, `review`, `done`: Manual status updates in sprint-status.yaml - -### Retrospective Status - -Optional retrospectives can be completed after an epic: - -| Status | Description | -| ------------- | -------------------------------------------------- | -| **optional** | Retrospective can be completed but is not required | -| **completed** | Retrospective has been completed | - -## Status Transitions - -### Epic Flow - -```mermaid -graph LR - backlog --> contexted[contexted via epic-tech-context] -``` - -### Story Flow - -```mermaid -graph LR - backlog --> drafted[drafted via create-story] - drafted --> ready[ready-for-dev via story-context] - ready --> progress[in-progress - dev starts] - progress --> review[review via code-review] - review --> done[done - dev completes] -``` - -## Sprint Status Management - -The `sprint-status.yaml` file is the single source of truth for tracking all work items. It contains: - -- All epics with their current status -- All stories with their current status -- Retrospective placeholders for each epic -- Clear documentation of status definitions - -### Example Sprint Status File - -```yaml -development_status: - epic-1: contexted - 1-1-project-foundation: done - 1-2-app-shell: done - 1-3-user-authentication: in-progress - 1-4-plant-data-model: ready-for-dev - 1-5-add-plant-manual: drafted - 1-6-photo-identification: backlog - 1-7-plant-naming: backlog - epic-1-retrospective: optional - - epic-2: backlog - 2-1-personality-system: backlog - 2-2-chat-interface: backlog - 2-3-llm-integration: backlog - epic-2-retrospective: optional -``` - -## Workflows in Phase 4 - -### Core Workflows - -| Workflow | Purpose | Updates Status | -| --------------------- | -------------------------------------------------- | ----------------------------------- | -| **sprint-planning** | Generate/update sprint-status.yaml from epic files | Auto-detects file-based statuses | -| **epic-tech-context** | Create technical context for an epic | epic: backlog β†’ contexted | -| **create-story** | Draft a story from epics/PRD | story: backlog β†’ drafted | -| **story-context** | Add implementation context to story | story: drafted β†’ ready-for-dev | -| **dev-story** | Developer implements the story | story: ready-for-dev β†’ in-progress | -| **code-review** | SM reviews implementation | story: in-progress β†’ review | -| **retrospective** | Conduct epic retrospective | retrospective: optional β†’ completed | -| **correct-course** | Course correction when needed | Various status updates | - -### Sprint Planning Workflow - -The `sprint-planning` workflow is the foundation of Phase 4. It: - -1. **Parses all epic files** (`epic*.md` or `epics.md`) -2. **Extracts all epics and stories** maintaining their order -3. **Auto-detects current status** based on existing files: - - Checks for epic context files - - Checks for story files - - Checks for story context files -4. **Generates sprint-status.yaml** with current reality -5. **Preserves manual status updates** (won't downgrade statuses) - -Run this workflow: - -- Initially after Phase 3 completion -- After creating epic contexts -- Periodically to sync file-based status -- To verify current project state - -### Workflow Guidelines - -1. **Epic Context First**: Epics should be contexted before drafting their stories -2. **Flexible Parallelism**: Multiple stories can be in-progress based on team capacity -3. **Sequential Default**: Stories within an epic are typically worked in order -4. **Learning Transfer**: SM drafts next story after previous is done, incorporating learnings -5. **Review Flow**: Dev moves to review, SM reviews, Dev moves to done - -## Agent Responsibilities - -### SM (Scrum Master) Agent - -- Run `sprint-planning` to generate initial status -- Create epic contexts (`epic-tech-context`) -- Draft stories (`create-story`) -- Create story contexts (`story-context`) -- Review completed work (`code-review`) -- Update status in sprint-status.yaml - -### Developer Agent - -- Check sprint-status.yaml for `ready-for-dev` stories -- Update status to `in-progress` when starting -- Implement stories (`dev-story`) -- Move to `review` when complete -- Address review feedback -- Update to `done` after approval - -### Test Architect - -- Monitor stories entering `review` status -- Track epic progress -- Identify when retrospectives needed -- Validate implementation quality - -## Best Practices - -1. **Always run sprint-planning first** to establish current state -2. **Update status immediately** as work progresses -3. **Check sprint-status.yaml** before starting any work -4. **Preserve learning** by drafting stories sequentially when possible -5. **Document decisions** in story and context files - -## Naming Conventions - -### Story File Naming - -- Format: `{epic}-{story}-{kebab-title}.md` -- Example: `1-1-user-authentication.md` -- Avoids YAML float parsing issues (1.1 vs 1.10) -- Makes files self-descriptive - -### Git Branch Naming - -- Format: `feat/{epic}-{story}-{kebab-title}` -- Example: `feat/1-1-user-authentication` -- Consistent with story file naming -- Clean for branch management - -## File Structure - -``` -{output_folder}/ -β”œβ”€β”€ sprint-status.yaml # Sprint status tracking -β”œβ”€β”€ epic*.md or epics.md # Epic definitions -β”œβ”€β”€ epic-1-context.md # Epic technical contexts -β”œβ”€β”€ epic-2-context.md -└── stories/ - β”œβ”€β”€ 1-1-user-authentication.md # Story drafts - β”œβ”€β”€ 1-1-user-authentication-context.md # Story contexts - β”œβ”€β”€ 1-2-account-management.md - β”œβ”€β”€ 1-2-account-management-context.md - └── ... -``` - -## Next Steps - -After Phase 4 implementation, projects typically move to: - -- Deployment and release -- User acceptance testing -- Production monitoring -- Maintenance and updates - -The sprint-status.yaml file provides a complete audit trail of the development process and can be used for project reporting and retrospectives. diff --git a/bmad/bmm/workflows/4-implementation/code-review/README.md b/bmad/bmm/workflows/4-implementation/code-review/README.md deleted file mode 100644 index 6f0431a4..00000000 --- a/bmad/bmm/workflows/4-implementation/code-review/README.md +++ /dev/null @@ -1,69 +0,0 @@ -# Review Story (Senior Developer Code Review) - -Perform an AI-driven Senior Developer Code Review on a story flagged "Ready for Review". The workflow ingests the story, its Story Context, and the epic’s Tech Spec, consults local docs, uses enabled MCP servers for up-to-date best practices (with web search fallback), and appends structured review notes to the story. - -## What It Does - -- Auto-discovers the target story or accepts an explicit `story_path` -- Verifies the story is in a reviewable state (e.g., Ready for Review/Review) -- Loads Story Context (from Dev Agent Record β†’ Context Reference or auto-discovery) -- Locates the epic Tech Spec and relevant architecture/standards docs -- Uses MCP servers for best-practices and security references; falls back to web search -- Reviews implementation vs Acceptance Criteria, Tech Spec, and repo standards -- Evaluates code quality, security, and test coverage -- Appends a "Senior Developer Review (AI)" section to the story with findings and action items -- Optionally updates story Status based on outcome - -## How to Invoke - -- Tell the Dev Agent to perform a \*code-review after loading the dev agent. This is a context intensive operation so this should not be done in the same context as a just completed dev session - clear the context, reload the dev, then run code-review! - -## Inputs and Variables - -- `story_path` (optional): Explicit path to a story file -- `story_dir` (from config): `{project-root}/bmad/bmm/config.yaml` β†’ `dev_story_location` -- `allow_status_values`: Defaults include `Ready for Review`, `Review` -- `auto_discover_context` (default: true) -- `auto_discover_tech_spec` (default: true) -- `tech_spec_glob_template`: `tech-spec-epic-{{epic_num}}*.md` -- `arch_docs_search_dirs`: Defaults to `docs/` and `outputs/` -- `enable_mcp_doc_search` (default: true) -- `enable_web_fallback` (default: true) -- `update_status_on_result` (default: false) - -## Story Updates - -- Appends a section titled: `Senior Developer Review (AI)` at the end -- Adds a Change Log entry: "Senior Developer Review notes appended" -- If enabled, updates `Status` based on outcome - -## Persistence and Backlog - -To ensure review findings become actionable work, the workflow can persist action items to multiple targets (configurable): - -- Story tasks: Inserts unchecked items under `Tasks / Subtasks` in a "Review Follow-ups (AI)" subsection so `dev-story` can pick them up next. -- Story review section: Keeps a full list under "Senior Developer Review (AI) β†’ Action Items". -- Backlog file: Appends normalized rows to `docs/backlog.md` (created if missing) for cross-cutting or longer-term improvements. -- Epic follow-ups: If an epic Tech Spec is found, appends to its `Post-Review Follow-ups` section. - -Configure via `workflow.yaml` variables: - -- `persist_action_items` (default: true) -- `persist_targets`: `story_tasks`, `story_review_section`, `backlog_file`, `epic_followups` -- `backlog_file` (default: `{project-root}/docs/backlog.md`) -- `update_epic_followups` (default: true) -- `epic_followups_section_title` (default: `Post-Review Follow-ups`) - -Routing guidance: - -- Put must-fix items to ship the story into the story’s tasks. -- Put same-epic but non-blocking improvements into the epic Tech Spec follow-ups. -- Put cross-cutting, future, or refactor work into the backlog file. - -## Related Workflows - -- `dev-story` β€” Implements tasks/subtasks and can act on review action items -- `story-context` β€” Generates Story Context for a single story -- `tech-spec` β€” Generates epic Tech Spec documents - -_Part of the BMAD Method v6 β€” Implementation Phase_ diff --git a/bmad/bmm/workflows/4-implementation/correct-course/README.md b/bmad/bmm/workflows/4-implementation/correct-course/README.md deleted file mode 100644 index 804bbf27..00000000 --- a/bmad/bmm/workflows/4-implementation/correct-course/README.md +++ /dev/null @@ -1,73 +0,0 @@ ---- -last-redoc-date: 2025-10-01 ---- - -# Correct Course Workflow - -The correct-course workflow is v6's adaptive response mechanism for stories that encounter issues during development or review, enabling intelligent course correction without restarting from scratch. Run by the Scrum Master (SM) or Team Lead, this workflow analyzes why a story is blocked or has issues, determines whether the story scope needs adjustment, requirements need clarification, technical approach needs revision, or the story needs to be split or reconsidered. This represents the agile principle of embracing change even late in the development cycle, but doing so in a structured way that captures learning and maintains project coherence. - -Unlike simply abandoning failed work or blindly pushing forward, correct-course provides a systematic approach to diagnosing issues and determining appropriate remediation. The workflow examines the original story specification, what was actually implemented, what issues arose during development or review, and the broader epic context to recommend the best path forward. This might involve clarifying requirements, adjusting acceptance criteria, revising technical approach, splitting the story into smaller pieces, or even determining the story should be deprioritized. - -The critical value of this workflow is that it prevents thrashingβ€”endless cycles of implementation and rework without clear direction. By stepping back to analyze what went wrong and charting a clear path forward, the correct-course workflow enables teams to learn from difficulties and adapt intelligently rather than stubbornly proceeding with a flawed approach. - -## Usage - -```bash -# Analyze issues and recommend course correction -bmad run correct-course -``` - -The workflow should be run when: - -- Review identifies critical issues requiring rethinking -- Developer encounters blocking issues during implementation -- Acceptance criteria prove infeasible or unclear -- Technical approach needs significant revision -- Story scope needs adjustment based on discoveries - -## Inputs - -**Required Context:** - -- **Story Document**: Original story specification -- **Implementation Attempts**: Code changes and approaches tried -- **Review Feedback**: Issues and concerns identified -- **Epic Context**: Overall epic goals and current progress -- **Technical Constraints**: Architecture decisions and limitations discovered - -**Analysis Focus:** - -- Root cause of issues or blockages -- Feasibility of current story scope -- Clarity of requirements and acceptance criteria -- Appropriateness of technical approach -- Whether story should be split or revised - -## Outputs - -**Primary Deliverable:** - -- **Course Correction Report** (`[story-id]-correction.md`): Analysis and recommendations including: - - Issue root cause analysis - - Impact assessment on epic and project - - Recommended corrective actions with rationale - - Revised story specification if applicable - - Updated acceptance criteria if needed - - Technical approach adjustments - - Timeline and effort implications - -**Possible Outcomes:** - -1. **Clarify Requirements**: Update story with clearer acceptance criteria -2. **Revise Scope**: Adjust story scope to be more achievable -3. **Split Story**: Break into multiple smaller stories -4. **Change Approach**: Recommend different technical approach -5. **Deprioritize**: Determine story should be deferred or cancelled -6. **Unblock**: Identify and address blocking dependencies - -**Artifacts:** - -- Updated story document if revision needed -- New story documents if splitting story -- Updated epic backlog reflecting changes -- Lessons learned for retrospective diff --git a/bmad/bmm/workflows/4-implementation/create-story/README.md b/bmad/bmm/workflows/4-implementation/create-story/README.md deleted file mode 100644 index 83516724..00000000 --- a/bmad/bmm/workflows/4-implementation/create-story/README.md +++ /dev/null @@ -1,146 +0,0 @@ -# Create Story Workflow - -Just-in-time story generation creating one story at a time based on epic backlog state. Run by Scrum Master (SM) agent to ensure planned stories align with approved epics. - -## Table of Contents - -- [Usage](#usage) -- [Key Features](#key-features) -- [Inputs & Outputs](#inputs--outputs) -- [Workflow Behavior](#workflow-behavior) -- [Integration](#integration) - -## Usage - -```bash -# SM initiates next story creation -bmad sm *create-story -``` - -**When to run:** - -- Sprint has capacity for new work -- Previous story is Done/Approved -- Team ready for next planned story - -## Key Features - -### Strict Planning Enforcement - -- **Only creates stories enumerated in epics.md** -- Halts if story not found in epic plan -- Prevents scope creep through validation - -### Intelligent Document Discovery - -- Auto-finds tech spec: `tech-spec-epic-{N}-*.md` -- Discovers architecture docs across directories -- Builds prioritized requirement sources - -### Source Document Grounding - -- Every requirement traced to source -- No invention of domain facts -- Citations included in output - -### Non-Interactive Mode - -- Default "#yolo" mode minimizes prompts -- Smooth automated story preparation -- Only prompts when critical - -## Inputs & Outputs - -### Required Files - -| File | Purpose | Priority | -| ------------------------ | ----------------------------- | -------- | -| epics.md | Story enumeration (MANDATORY) | Critical | -| tech-spec-epic-{N}-\*.md | Epic technical spec | High | -| PRD.md | Product requirements | Medium | -| Architecture docs | Technical constraints | Low | - -### Auto-Discovered Docs - -- `tech-stack.md`, `unified-project-structure.md` -- `testing-strategy.md`, `backend/frontend-architecture.md` -- `data-models.md`, `database-schema.md`, `api-specs.md` - -### Output - -**Story Document:** `{story_dir}/story-{epic}.{story}.md` - -- User story statement (role, action, benefit) -- Acceptance criteria from tech spec/epics -- Tasks mapped to ACs -- Testing requirements -- Dev notes with sources -- Status: "Draft" - -## Workflow Behavior - -### Story Number Management - -- Auto-detects next story number -- No duplicates or skipped numbers -- Maintains epic.story convention - -### Update vs Create - -- **If current story not Done:** Updates existing -- **If current story Done:** Creates next (if planned) - -### Validation Safeguards - -**No Story Found:** - -``` -"No planned next story found in epics.md for epic {N}. -Run *correct-course to add/modify epic stories." -``` - -**Missing Config:** -Ensure `dev_story_location` set in config.yaml - -## Integration - -### v6 Implementation Cycle - -1. **create-story** ← Current step (defines "what") -2. story-context (adds technical "how") -3. dev-story (implementation) -4. code-review (validation) -5. correct-course (if needed) -6. retrospective (after epic) - -### Document Priority - -1. **tech_spec_file** - Epic-specific spec -2. **epics_file** - Story breakdown -3. **prd_file** - Business requirements -4. **architecture_docs** - Technical guidance - -## Configuration - -```yaml -# bmad/bmm/config.yaml -dev_story_location: ./stories -output_folder: ./output - -# workflow.yaml defaults -non_interactive: true -auto_run_context: true -``` - -## Troubleshooting - -| Issue | Solution | -| ----------------------- | ------------------------------------------ | -| "No planned next story" | Run `*correct-course` to add story to epic | -| Missing story_dir | Set `dev_story_location` in config | -| Tech spec not found | Use naming: `tech-spec-epic-{N}-*.md` | -| No architecture docs | Add docs to docs/ or output/ folder | - ---- - -For workflow details, see [instructions.md](./instructions.md) and [checklist.md](./checklist.md). diff --git a/bmad/bmm/workflows/4-implementation/dev-story/README.md b/bmad/bmm/workflows/4-implementation/dev-story/README.md deleted file mode 100644 index da3ed655..00000000 --- a/bmad/bmm/workflows/4-implementation/dev-story/README.md +++ /dev/null @@ -1,206 +0,0 @@ -# Dev Story Workflow - -The dev-story workflow is where v6's just-in-time context approach delivers its primary value, enabling the Developer (DEV) agent to implement stories with expert-level guidance injected directly into their context. This workflow is run EXCLUSIVELY by the DEV agent and operates on a single story that has been prepared by the SM through create-story and enhanced with story-context. The DEV loads both the story specification and the dynamically-generated story context XML, then proceeds through implementation with the combined knowledge of requirements and domain-specific expertise. - -The workflow operates with two critical inputs: the story file (created by SM's create-story) containing acceptance criteria, tasks, and requirements; and the story-context XML (generated by SM's story-context) providing just-in-time expertise injection tailored to the story's technical needs. This dual-input approach ensures the developer has both the "what" (from the story) and the "how" (from the context) needed for successful implementation. The workflow iterates through tasks sequentially, implementing code, writing tests, and updating the story document's allowed sections until all tasks are complete. - -A critical aspect of v6 flow is that dev-story may be run multiple times for the same story. Initially run to implement the story, it may be run again after code-review identifies issues that need correction. The workflow intelligently resumes from incomplete tasks, making it ideal for both initial implementation and post-review fixes. The DEV agent maintains strict boundaries on what can be modified in the story fileβ€”only Tasks/Subtasks checkboxes, Dev Agent Record, File List, Change Log, and Status may be updated, preserving the story's requirements integrity. - -## Usage - -```bash -# Developer implements the story with injected context -bmad dev *develop - -# Or if returning to fix review issues -bmad dev *develop # Will resume from incomplete tasks -``` - -The DEV runs this workflow: - -- After SM completes both create-story and story-context -- When a story status is "Draft" or "Approved" (ready for development) -- After code-review identifies issues requiring fixes -- To resume work on a partially completed story - -## Inputs - -**Required Files:** - -- **Story Document** (`{story_dir}/story-{epic}.{story}.md`): Complete specification including: - - User story statement - - Acceptance criteria (immutable during dev) - - Tasks and subtasks (checkable during implementation) - - Dev Notes section (for context and guidance) - - Status field (Draft β†’ In Progress β†’ Ready for Review) - -- **Story Context XML** (`{story_dir}/story-{epic}.{story}-context.xml`): Domain expertise including: - - Technical patterns and best practices - - Gotchas and common pitfalls - - Testing strategies - - Relevant code references - - Architecture constraints - -**Configuration:** - -- `dev_story_location`: Directory containing story files (from bmm/config.yaml) -- `story_selection_limit`: Number of recent stories to show (default: 10) -- `run_tests_command`: Test command (default: auto-detected) -- `strict`: Whether to halt on test failures (default: true) - -## Outputs - -**Code Implementation:** - -- Production code satisfying acceptance criteria -- Unit, integration, and E2E tests as appropriate -- Documentation updates -- Migration scripts if needed - -**Story File Updates (allowed sections only):** - -- **Tasks/Subtasks**: Checkboxes marked complete as work progresses -- **Dev Agent Record**: Debug log and completion notes -- **File List**: All files created or modified -- **Change Log**: Summary of implementation changes -- **Status**: Updated to "Ready for Review" when complete - -**Validation:** - -- All tests passing (existing + new) -- Acceptance criteria verified -- Code quality checks passed -- No regression in existing functionality - -## Key Features - -**Story-Context Integration**: The workflow loads and leverages the story-context XML throughout implementation, providing expert guidance without cluttering the main conversation. This ensures best practices are followed while maintaining developer autonomy. - -**Task-by-Task Iteration**: Implements one task at a time, marking completion before moving to the next. This granular approach enables progress tracking and clean resumption if interrupted or after review feedback. - -**Strict File Boundaries**: Only specific sections of the story file may be modified, preserving requirement integrity. The story's acceptance criteria, main description, and other planning sections remain immutable during development. - -**Test-Driven Approach**: For each task, the workflow emphasizes writing tests that verify acceptance criteria before or alongside implementation, ensuring requirements are actually met. - -**Resumable Implementation**: If the workflow is run again on a story with incomplete tasks (e.g., after code-review finds issues), it intelligently resumes from where it left off rather than starting over. - -## Integration with v6 Flow - -The dev-story workflow is step 3 in the v6 implementation cycle: - -1. SM: create-story (generates the story specification) -2. SM: story-context (adds JIT technical expertise) -3. **DEV: dev-story** ← You are here (initial implementation) -4. DEV/SR: code-review (validates completion) -5. If issues found: **DEV: dev-story** ← May return here for fixes -6. After epic: retrospective (captures learnings) - -This workflow may be executed multiple times for the same story as part of the review-fix cycle. Each execution picks up from incomplete tasks, making it efficient for iterative improvement. - -## Workflow Process - -### Phase 1: Story Selection - -- If `story_path` provided: Use that story directly -- Otherwise: List recent stories from `dev_story_location` -- Parse story structure and validate format -- Load corresponding story-context XML - -### Phase 2: Task Implementation Loop - -For each incomplete task: - -1. **Plan**: Log approach in Dev Agent Record -2. **Implement**: Write code following story-context guidance -3. **Test**: Create tests verifying acceptance criteria -4. **Validate**: Run tests and quality checks -5. **Update**: Mark task complete, update File List - -### Phase 3: Completion - -- Verify all tasks completed -- Run full test suite -- Update Status to "Ready for Review" -- Add completion notes to Dev Agent Record - -## Story File Structure - -The workflow expects stories with this structure: - -```markdown -# Story {epic}.{story}: {Title} - -**Status**: Draft|In Progress|Ready for Review|Done -**Epic**: {epic_number} -**Estimated Effort**: {estimate} - -## Story - -As a {role}, I want to {action} so that {benefit} - -## Acceptance Criteria - -- [ ] AC1... -- [ ] AC2... - -## Tasks and Subtasks - -- [ ] Task 1 - - [ ] Subtask 1.1 -- [ ] Task 2 - -## Dev Notes - -{Context and guidance from story creation} - -## Dev Agent Record - -### Debug Log - -{Implementation notes added during development} - -### Completion Notes - -{Summary added when complete} - -## File List - -{Files created/modified} - -## Change Log - -{Implementation summary} -``` - -## Best Practices - -**Load Context First**: Always ensure the story-context XML is loaded at the start. This provides the expert guidance needed throughout implementation. - -**Follow Task Order**: Implement tasks in the order listed. Dependencies are typically structured in the task sequence. - -**Test Each Task**: Don't wait until the end to write tests. Test each task as you complete it to ensure it meets acceptance criteria. - -**Update Incrementally**: Update the story file after each task completion rather than batching updates at the end. - -**Respect Boundaries**: Never modify acceptance criteria or story description. If they seem wrong, that's a code-review or correct-course issue, not a dev-story fix. - -**Use Context Guidance**: Actively reference the story-context for patterns, gotchas, and best practices. It's there to help you succeed. - -## Troubleshooting - -**Story Not Found**: Ensure story exists in `dev_story_location` and follows naming pattern `story-{epic}.{story}.md` - -**Context XML Missing**: The story-context workflow must be run first. Check for `story-{epic}.{story}-context.xml` - -**Tests Failing**: If strict mode is on, the workflow halts. Fix tests before continuing or set strict=false for development iteration. - -**Can't Modify Story Section**: Remember only Tasks, Dev Agent Record, File List, Change Log, and Status can be modified. Other sections are immutable. - -**Resuming After Review**: If code-review found issues, the workflow automatically picks up from incomplete tasks when run again. - -## Related Workflows - -- **create-story**: Creates the story specification (run by SM) -- **story-context**: Generates the context XML (run by SM) -- **code-review**: Validates implementation (run by SR/DEV) -- **correct-course**: Handles major issues or scope changes (run by SM) diff --git a/bmad/bmm/workflows/4-implementation/epic-tech-context/README.md b/bmad/bmm/workflows/4-implementation/epic-tech-context/README.md deleted file mode 100644 index 3ad27fef..00000000 --- a/bmad/bmm/workflows/4-implementation/epic-tech-context/README.md +++ /dev/null @@ -1,195 +0,0 @@ -# Technical Specification Workflow - -## Overview - -Generate a comprehensive Technical Specification for a single epic from PRD, Epics file and Architecture to produce a document with full acceptance criteria and traceability mapping. Creates detailed implementation guidance that bridges business requirements with technical execution. - -## Key Features - -- **PRD-Architecture Integration** - Synthesizes business requirements with technical constraints -- **Traceability Mapping** - Links acceptance criteria to technical components and tests -- **Multi-Input Support** - Leverages PRD, architecture, front-end specs, and brownfield notes -- **Implementation Focus** - Provides concrete technical guidance for development teams -- **Testing Integration** - Includes test strategy aligned with acceptance criteria -- **Validation Ready** - Generates specifications suitable for architectural review - -## Usage - -### Basic Invocation - -```bash -workflow tech-spec -``` - -### With Input Documents - -```bash -# With specific PRD and architecture -workflow tech-spec --input PRD.md --input architecture.md - -# With comprehensive inputs -workflow tech-spec --input PRD.md --input architecture.md --input front-end-spec.md -``` - -### Configuration - -- **output_folder**: Location for generated technical specification -- **epic_id**: Used in output filename (extracted from PRD or prompted) -- **recommended_inputs**: PRD, architecture, front-end spec, brownfield notes - -## Workflow Structure - -### Files Included - -``` -tech-spec/ -β”œβ”€β”€ workflow.yaml # Configuration and metadata -β”œβ”€β”€ instructions.md # Step-by-step execution guide -β”œβ”€β”€ template.md # Technical specification structure -β”œβ”€β”€ checklist.md # Validation criteria -└── README.md # This file -``` - -## Workflow Process - -### Phase 1: Input Collection and Analysis (Steps 1-2) - -- **Document Discovery**: Locates PRD and Architecture documents -- **Epic Extraction**: Identifies epic title and ID from PRD content -- **Template Initialization**: Creates tech-spec document from template -- **Context Analysis**: Reviews complete PRD and architecture for alignment - -### Phase 2: Technical Design Specification (Step 3) - -- **Service Architecture**: Defines services/modules with responsibilities and interfaces -- **Data Modeling**: Specifies entities, schemas, and relationships -- **API Design**: Documents endpoints, request/response models, and error handling -- **Workflow Definition**: Details sequence flows and data processing patterns - -### Phase 3: Non-Functional Requirements (Step 4) - -- **Performance Specs**: Defines measurable latency, throughput, and scalability targets -- **Security Requirements**: Specifies authentication, authorization, and data protection -- **Reliability Standards**: Documents availability, recovery, and degradation behavior -- **Observability Framework**: Defines logging, metrics, and tracing requirements - -### Phase 4: Dependencies and Integration (Step 5) - -- **Dependency Analysis**: Scans repository for package manifests and frameworks -- **Integration Mapping**: Identifies external systems and API dependencies -- **Version Management**: Documents version constraints and compatibility requirements -- **Infrastructure Needs**: Specifies deployment and runtime dependencies - -### Phase 5: Acceptance and Testing (Step 6) - -- **Criteria Normalization**: Extracts and refines acceptance criteria from PRD -- **Traceability Matrix**: Maps acceptance criteria to technical components -- **Test Strategy**: Defines testing approach for each acceptance criterion -- **Component Mapping**: Links requirements to specific APIs and modules - -### Phase 6: Risk and Validation (Steps 7-8) - -- **Risk Assessment**: Identifies technical risks, assumptions, and open questions -- **Mitigation Planning**: Provides strategies for addressing identified risks -- **Quality Validation**: Ensures specification meets completeness criteria -- **Checklist Verification**: Validates against workflow quality standards - -## Output - -### Generated Files - -- **Primary output**: tech-spec-{epic_id}-{date}.md -- **Traceability data**: Embedded mapping tables linking requirements to implementation - -### Output Structure - -1. **Overview and Scope** - Project context and boundaries -2. **System Architecture Alignment** - Connection to architecture -3. **Detailed Design** - Services, data models, APIs, and workflows -4. **Non-Functional Requirements** - Performance, security, reliability, observability -5. **Dependencies and Integrations** - External systems and technical dependencies -6. **Acceptance Criteria** - Testable requirements from PRD -7. **Traceability Mapping** - Requirements-to-implementation mapping -8. **Test Strategy** - Testing approach and framework alignment -9. **Risks and Assumptions** - Technical risks and mitigation strategies - -## Requirements - -- **PRD Document**: Product Requirements Document with clear acceptance criteria -- **Architecture Document**: architecture or technical design -- **Repository Access**: For dependency analysis and framework detection -- **Epic Context**: Clear epic identification and scope definition - -## Best Practices - -### Before Starting - -1. **Validate Inputs**: Ensure PRD and architecture documents are complete and current -2. **Review Requirements**: Confirm acceptance criteria are specific and testable -3. **Check Dependencies**: Verify repository structure supports automated dependency analysis - -### During Execution - -1. **Maintain Traceability**: Ensure every acceptance criterion maps to implementation -2. **Be Implementation-Specific**: Provide concrete technical guidance, not high-level concepts -3. **Consider Constraints**: Factor in existing system limitations and brownfield challenges - -### After Completion - -1. **Architect Review**: Have technical lead validate design decisions -2. **Developer Walkthrough**: Ensure implementation team understands specifications -3. **Test Planning**: Use traceability matrix for test case development - -## Troubleshooting - -### Common Issues - -**Issue**: Missing or incomplete technical details - -- **Solution**: Review architecture document for implementation specifics -- **Check**: Ensure PRD contains sufficient functional requirements detail - -**Issue**: Acceptance criteria don't map cleanly to technical components - -- **Solution**: Break down complex criteria into atomic, testable statements -- **Check**: Verify PRD acceptance criteria are properly structured - -**Issue**: Dependency analysis fails or is incomplete - -- **Solution**: Check repository structure and manifest file locations -- **Check**: Verify repository contains standard dependency files (package.json, etc.) - -**Issue**: Non-functional requirements are too vague - -- **Solution**: Extract specific performance and quality targets from architecture -- **Check**: Ensure architecture document contains measurable NFR specifications - -## Customization - -To customize this workflow: - -1. **Modify Template**: Update template.md to match organizational technical spec standards -2. **Extend Dependencies**: Add support for additional package managers or frameworks -3. **Enhance Validation**: Extend checklist.md with company-specific technical criteria -4. **Add Sections**: Include additional technical concerns like DevOps or monitoring - -## Version History - -- **v6.0.0** - Comprehensive technical specification with traceability - - PRD-Architecture integration - - Automated dependency detection - - Traceability mapping - - Test strategy alignment - -## Support - -For issues or questions: - -- Review the workflow creation guide at `/bmad/bmb/workflows/create-workflow/workflow-creation-guide.md` -- Validate output using `checklist.md` -- Ensure PRD and architecture documents are complete before starting -- Consult BMAD documentation for technical specification standards - ---- - -_Part of the BMad Method v6 - BMM (Method) Module_ diff --git a/bmad/bmm/workflows/4-implementation/epic-tech-context/workflow.yaml b/bmad/bmm/workflows/4-implementation/epic-tech-context/workflow.yaml index f426499f..49594af9 100644 --- a/bmad/bmm/workflows/4-implementation/epic-tech-context/workflow.yaml +++ b/bmad/bmm/workflows/4-implementation/epic-tech-context/workflow.yaml @@ -1,4 +1,4 @@ -name: tech-spec +name: epic-tech-context description: "Generate a comprehensive Technical Specification from PRD and Architecture with acceptance criteria and traceability mapping" author: "BMAD BMM" diff --git a/bmad/bmm/workflows/4-implementation/retrospective/README.md b/bmad/bmm/workflows/4-implementation/retrospective/README.md deleted file mode 100644 index ed71e468..00000000 --- a/bmad/bmm/workflows/4-implementation/retrospective/README.md +++ /dev/null @@ -1,77 +0,0 @@ ---- -last-redoc-date: 2025-10-01 ---- - -# Retrospective Workflow - -The retrospective workflow is v6's learning capture mechanism, run by the Scrum Master (SM) after epic completion to systematically harvest insights, patterns, and improvements discovered during implementation. Unlike traditional retrospectives that focus primarily on process and team dynamics, this workflow performs deep technical and methodological analysis of the entire epic journeyβ€”from story creation through implementation to reviewβ€”identifying what worked well, what could improve, and what patterns emerged. The retrospective produces actionable intelligence that informs future epics, improves workflow templates, and evolves the team's shared knowledge. - -This workflow represents a critical feedback loop in the v6 methodology. Each epic is an experiment in adaptive software development, and the retrospective is where we analyze the results of that experiment. The SM examines completed stories, review feedback, course corrections made, story-context effectiveness, technical decisions, and team collaboration patterns to extract transferable learning. This learning manifests as updates to workflow templates, new story-context patterns, refined estimation approaches, and documented best practices. - -The retrospective is not just a compliance ritual but a genuine opportunity for continuous improvement. By systematically analyzing what happened during the epic, the team builds institutional knowledge that makes each subsequent epic smoother, faster, and higher quality. The insights captured here directly improve future story creation, context generation, development efficiency, and review effectiveness. - -## Usage - -```bash -# Conduct retrospective after epic completion -bmad run retrospective -``` - -The SM should run this workflow: - -- After all stories in an epic are completed -- Before starting the next major epic -- When significant learning has accumulated -- As preparation for improving future epic execution - -## Inputs - -**Required Context:** - -- **Epic Document**: Complete epic specification and goals -- **All Story Documents**: Every story created for the epic -- **Review Reports**: All review feedback and findings -- **Course Corrections**: Any correct-course actions taken -- **Story Contexts**: Generated expert guidance for each story -- **Implementation Artifacts**: Code commits, test results, deployment records - -**Analysis Targets:** - -- Story creation accuracy and sizing -- Story-context effectiveness and relevance -- Implementation challenges and solutions -- Review findings and patterns -- Technical decisions and outcomes -- Estimation accuracy -- Team collaboration and communication -- Workflow effectiveness - -## Outputs - -**Primary Deliverable:** - -- **Retrospective Report** (`[epic-id]-retrospective.xml`): Comprehensive analysis including: - - Executive summary of epic outcomes - - Story-by-story analysis of what was learned - - Technical insights and architecture learnings - - Story-context effectiveness assessment - - Process improvements identified - - Patterns discovered (good and bad) - - Recommendations for future epics - - Metrics and statistics (velocity, cycle time, etc.) - -**Actionable Outputs:** - -- **Template Updates**: Improvements to workflow templates based on learning -- **Pattern Library**: New story-context patterns for common scenarios -- **Best Practices**: Documented approaches that worked well -- **Gotchas**: Issues to avoid in future work -- **Estimation Refinements**: Better story sizing guidance -- **Process Changes**: Workflow adjustments for next epic - -**Artifacts:** - -- Epic marked as complete with retrospective attached -- Knowledge base updated with new patterns -- Workflow templates updated if needed -- Team learning captured for onboarding diff --git a/bmad/bmm/workflows/4-implementation/sprint-planning/README.md b/bmad/bmm/workflows/4-implementation/sprint-planning/README.md deleted file mode 100644 index 38d25935..00000000 --- a/bmad/bmm/workflows/4-implementation/sprint-planning/README.md +++ /dev/null @@ -1,156 +0,0 @@ -# Sprint Planning Workflow - -## Overview - -The sprint-planning workflow generates and manages the sprint status tracking file that serves as the single source of truth for Phase 4 implementation. It extracts all epics and stories from epic files and tracks their progress through the development lifecycle. - -In Agile terminology, this workflow facilitates **Sprint Planning** or **Sprint 0 Kickoff** - the transition from planning/architecture into actual development execution. - -## Purpose - -This workflow creates a `sprint-status.yaml` file that: - -- Lists all epics, stories, and retrospectives in order -- Tracks the current status of each item -- Provides a clear view of what needs to be worked on next -- Ensures only one story is in progress at a time -- Maintains the development flow from backlog to done - -## When to Use - -Run this workflow: - -1. **Initially** - After Phase 3 (solutioning) is complete and epics are finalized -2. **After epic context creation** - To update epic status to 'contexted' -3. **Periodically** - To auto-detect newly created story files -4. **For status checks** - To see overall project progress - -## Status State Machine - -### Epic Flow - -``` -backlog β†’ contexted -``` - -### Story Flow - -``` -backlog β†’ drafted β†’ ready-for-dev β†’ in-progress β†’ review β†’ done -``` - -### Retrospective Flow - -``` -optional ↔ completed -``` - -## Key Guidelines - -1. **Epic Context Recommended**: Epics should be `contexted` before their stories can be `drafted` -2. **Flexible Parallelism**: Multiple stories can be `in-progress` based on team capacity -3. **Sequential Default**: Stories within an epic are typically worked in order, but parallel work is supported -4. **Review Flow**: Stories should go through `review` before `done` -5. **Learning Transfer**: SM typically drafts next story after previous is `done`, incorporating learnings - -## File Locations - -### Input Files - -- **Epic Files**: `{output_folder}/epic*.md` or `{output_folder}/epics.md` -- **Epic Context**: `{output_folder}/epic-{n}-context.md` -- **Story Files**: `{story_dir}/{epic}-{story}-{title}.md` - - Example: `stories/1-1-user-authentication.md` -- **Story Context**: `{story_dir}/{epic}-{story}-{title}-context.md` - - Example: `stories/1-1-user-authentication-context.md` - -### Output File - -- **Status File**: `{output_folder}/sprint-status.yaml` - -## Usage by Agents - -### SM (Scrum Master) Agent - -```yaml -Tasks: - - Check sprint-status.yaml for stories in 'done' status - - Identify next 'backlog' story to draft - - Run create-story workflow - - Update status to 'drafted' - - Create story context - - Update status to 'ready-for-dev' -``` - -### Developer Agent - -```yaml -Tasks: - - Find stories with 'ready-for-dev' status - - Update to 'in-progress' when starting - - Implement the story - - Update to 'review' when complete - - Address review feedback - - Update to 'done' after review -``` - -### Test Architect - -```yaml -Tasks: - - Monitor stories entering 'review' - - Track epic progress - - Identify when retrospectives are needed -``` - -## Example Output - -```yaml -# Sprint Status -# Generated: 2025-01-20 -# Project: MyPlantFamily - -development_status: - epic-1: contexted - 1-1-project-foundation: done - 1-2-app-shell: done - 1-3-user-authentication: in-progress - 1-4-plant-data-model: ready-for-dev - 1-5-add-plant-manual: drafted - 1-6-photo-identification: backlog - epic-1-retrospective: optional - - epic-2: contexted - 2-1-personality-system: in-progress - 2-2-chat-interface: drafted - 2-3-llm-integration: backlog - 2-4-reminder-system: backlog - epic-2-retrospective: optional -``` - -## Integration with BMM Workflow - -This workflow is part of Phase 4 (Implementation) and integrates with: - -1. **epic-tech-context** - Creates technical context for epics -2. **create-story** - Drafts individual story files -3. **story-context** - Adds implementation context to stories -4. **dev-story** - Developer implements the story -5. **code-review** - SM reviews implementation -6. **retrospective** - Optional epic retrospective - -## Benefits - -- **Clear Visibility**: Everyone knows what's being worked on -- **Flexible Capacity**: Supports both sequential and parallel work patterns -- **Learning Transfer**: SM can incorporate learnings when drafting next story -- **Progress Tracking**: Easy to see overall project status -- **Automation Friendly**: Simple YAML format for agent updates - -## Tips - -1. **Initial Generation**: Run immediately after epics are finalized -2. **Regular Updates**: Agents should update status as they work -3. **Manual Override**: You can manually edit the file if needed -4. **Backup First**: The workflow backs up existing status before regenerating -5. **Validation**: The workflow validates legal status transitions diff --git a/bmad/bmm/workflows/4-implementation/story-context/README.md b/bmad/bmm/workflows/4-implementation/story-context/README.md deleted file mode 100644 index e3cb2665..00000000 --- a/bmad/bmm/workflows/4-implementation/story-context/README.md +++ /dev/null @@ -1,234 +0,0 @@ -# Story Context Assembly Workflow - -## Overview - -Assembles a dynamic Story Context XML by pulling latest documentation and existing code/library artifacts relevant to a drafted story. Creates comprehensive development context for AI agents and developers working on specific stories. - -## Key Features - -- **Automated Context Discovery** - Scans documentation and codebase for relevant artifacts -- **XML Output Format** - Structured context optimized for LLM consumption -- **Dependency Detection** - Identifies frameworks, packages, and technical dependencies -- **Interface Mapping** - Locates existing APIs and interfaces to reuse -- **Testing Integration** - Includes testing standards and generates test ideas -- **Status Tracking** - Updates story status and maintains context references - -## Usage - -### Basic Invocation - -```bash -workflow story-context -``` - -### With Specific Story - -```bash -# Process specific story file -workflow story-context --input /path/to/story.md - -# Using story path variable -workflow story-context --story_path "docs/stories/1.2.feature-name.md" -``` - -### Configuration - -- **story_path**: Path to target story markdown file (defaults to latest.md) -- **auto_update_status**: Whether to automatically update story status (default: false) - -## Workflow Structure - -### Files Included - -``` -story-context/ -β”œβ”€β”€ workflow.yaml # Configuration and metadata -β”œβ”€β”€ instructions.md # Step-by-step execution guide -β”œβ”€β”€ context-template.xml # XML structure template -β”œβ”€β”€ checklist.md # Validation criteria -└── README.md # This file -``` - -## Workflow Process - -### Phase 1: Story Analysis (Steps 1-2) - -- **Story Location**: Finds and loads target story markdown file -- **Content Parsing**: Extracts epic ID, story ID, title, acceptance criteria, and tasks -- **Template Initialization**: Creates initial XML context structure -- **User Story Extraction**: Parses "As a... I want... So that..." components - -### Phase 2: Documentation Discovery (Step 3) - -- **Keyword Analysis**: Identifies relevant terms from story content -- **Document Scanning**: Searches docs and module documentation -- **Authority Prioritization**: Prefers PRDs, architecture docs, and specs -- **Context Extraction**: Captures relevant sections with snippets - -### Phase 3: Code Analysis (Step 4) - -- **Symbol Search**: Finds relevant modules, functions, and components -- **Interface Identification**: Locates existing APIs and interfaces -- **Constraint Extraction**: Identifies development patterns and requirements -- **Reuse Opportunities**: Highlights existing code to leverage - -### Phase 4: Dependency Analysis (Step 5) - -- **Manifest Detection**: Scans for package.json, requirements.txt, go.mod, etc. -- **Framework Identification**: Identifies Unity, Node.js, Python, Go ecosystems -- **Version Tracking**: Captures dependency versions where available -- **Configuration Discovery**: Finds relevant project configurations - -### Phase 5: Testing Context (Step 6) - -- **Standards Extraction**: Identifies testing frameworks and patterns -- **Location Mapping**: Documents where tests should be placed -- **Test Ideas**: Generates initial test concepts for acceptance criteria -- **Framework Integration**: Links to existing test infrastructure - -### Phase 6: Validation and Updates (Steps 7-8) - -- **XML Validation**: Ensures proper structure and completeness -- **Status Updates**: Changes story status from Draft to ContextReadyDraft -- **Reference Tracking**: Adds context file reference to story document -- **Quality Assurance**: Validates against workflow checklist - -## Output - -### Generated Files - -- **Primary output**: story-context-{epic_id}.{story_id}-{date}.xml -- **Story updates**: Modified original story file with context references - -### Output Structure - -```xml - - - - ... - ... - ... - ... - - - ... - ... - ... - - - ... - - - ... - - - - - - - - - - - - - - - - - - - - - - - ... - - - - ... - - ... - - - ... - - - -``` - -## Requirements - -- **Story File**: Valid story markdown with proper structure (epic.story.title.md format) -- **Repository Access**: Ability to scan documentation and source code -- **Documentation**: Project documentation in standard locations (docs/, src/, etc.) - -## Best Practices - -### Before Starting - -1. **Ensure Story Quality**: Verify story has clear acceptance criteria and tasks -2. **Update Documentation**: Ensure relevant docs are current and discoverable -3. **Clean Repository**: Remove obsolete code that might confuse context assembly - -### During Execution - -1. **Review Extracted Context**: Verify that discovered artifacts are actually relevant -2. **Check Interface Accuracy**: Ensure identified APIs and interfaces are current -3. **Validate Dependencies**: Confirm dependency information matches project state - -### After Completion - -1. **Review XML Output**: Validate the generated context makes sense -2. **Test with Developer**: Have a developer review context usefulness -3. **Update Story Status**: Verify story status was properly updated - -## Troubleshooting - -### Common Issues - -**Issue**: Context contains irrelevant or outdated information - -- **Solution**: Review keyword extraction and document filtering logic -- **Check**: Ensure story title and acceptance criteria are specific and clear - -**Issue**: Missing relevant code or interfaces - -- **Solution**: Verify code search patterns and symbol extraction -- **Check**: Ensure relevant code follows project naming conventions - -**Issue**: Dependency information is incomplete or wrong - -- **Solution**: Check for multiple package manifests or unusual project structure -- **Check**: Verify dependency files are in expected locations and formats - -## Customization - -To customize this workflow: - -1. **Modify Search Patterns**: Update instructions.md to adjust code and doc discovery -2. **Extend XML Schema**: Customize context-template.xml for additional context types -3. **Add Validation**: Extend checklist.md with project-specific quality criteria -4. **Configure Dependencies**: Adjust dependency detection for specific tech stacks - -## Version History - -- **v6.0.0** - XML-based context assembly with comprehensive artifact discovery - - Multi-ecosystem dependency detection - - Interface and constraint extraction - - Testing context integration - - Story status management - -## Support - -For issues or questions: - -- Review the workflow creation guide at `/bmad/bmb/workflows/create-workflow/workflow-creation-guide.md` -- Validate output using `checklist.md` -- Ensure story files follow expected markdown structure -- Check that repository structure supports automated discovery - ---- - -_Part of the BMad Method v6 - BMM (Method) Module_ diff --git a/bmad/bmm/workflows/README.md b/bmad/bmm/workflows/README.md deleted file mode 100644 index 941cb760..00000000 --- a/bmad/bmm/workflows/README.md +++ /dev/null @@ -1,256 +0,0 @@ -# BMM Workflows - Complete v6 Guide - -Master guide for BMM's four-phase methodology that adapts to project scale (Level 0-4) and context (greenfield/brownfield). - -## Table of Contents - -- [Core Innovations](#core-innovations) -- [Universal Entry Point](#universal-entry-point) -- [Four Phases Overview](#four-phases-overview) -- [Phase Details](#phase-details) - - [Documentation Prerequisite](#documentation-prerequisite) - - [Phase 1: Analysis](#phase-1-analysis) - - [Phase 2: Planning](#phase-2-planning) - - [Phase 3: Solutioning](#phase-3-solutioning) - - [Phase 4: Implementation](#phase-4-implementation) -- [Scale Levels](#scale-levels) -- [Greenfield vs Brownfield](#greenfield-vs-brownfield) -- [Critical Rules](#critical-rules) - -## Core Innovations - -- **Scale-Adaptive Planning** - Automatic routing based on complexity (Level 0-4) -- **Just-In-Time Design** - Tech specs created per epic during implementation -- **Dynamic Expertise Injection** - Story-specific technical guidance -- **Continuous Learning Loop** - Retrospectives improve each cycle -- **Document Sharding Support** - All workflows handle whole or sharded documents for efficiency - -## Universal Entry Point - -**Always start with `workflow-status` or `workflow-init`** - -### workflow-status - -- Checks for existing workflow status file -- Displays current phase and progress -- Routes to appropriate next workflow -- Shows Phase 4 implementation state - -### workflow-init - -- Creates initial bmm-workflow-status.md -- Detects greenfield vs brownfield -- Routes undocumented brownfield to document-project -- Sets up workflow tracking - -## Four Phases Overview - -``` -PREREQUISITE: document-project (brownfield without docs) - ↓ -PHASE 1: Analysis (optional) - brainstorm β†’ research β†’ brief - ↓ -PHASE 2: Planning (required, scale-adaptive) - Level 0-1: tech-spec only - Level 2-4: PRD + epics - ↓ -PHASE 3: Solutioning (Level 2-4 only) - architecture β†’ validation β†’ gate-check - ↓ -PHASE 4: Implementation (iterative) - sprint-planning β†’ epic-context β†’ story cycle -``` - -## Phase Details - -### Documentation Prerequisite - -**When:** Brownfield projects without documentation OR post-completion cleanup - -| Workflow | Purpose | Output | -| ---------------- | ----------------------------- | ------------------ | -| document-project | Analyze and document codebase | Comprehensive docs | - -**Use Cases:** - -1. **Pre-Phase 1**: Understand existing brownfield code -2. **Post-Phase 4**: Create clean documentation replacing scattered artifacts - -### Phase 1: Analysis - -**Optional workflows for discovery and requirements gathering** - -| Workflow | Agent | Purpose | Output | -| ------------------ | ------------- | --------------------- | ---------------------- | -| brainstorm-project | Analyst | Software ideation | Architecture proposals | -| brainstorm-game | Game Designer | Game concept ideation | Concept proposals | -| research | Analyst | Multi-mode research | Research artifacts | -| product-brief | Analyst | Strategic planning | Product brief | -| game-brief | Game Designer | Game foundation | Game brief | - -### Phase 2: Planning - -**Required phase with scale-adaptive routing** - -| Workflow | Agent | Output | Levels | -| ---------------- | ------------- | -------------- | ----------- | -| prd | PM | PRD.md + epics | 2-4 | -| tech-spec | PM | tech-spec.md | 0-1 | -| gdd | Game Designer | GDD.md | Games | -| create-ux-design | UX | ux-design.md | Conditional | - -### Phase 3: Solutioning - -**Architecture phase for Level 2-4 projects** - -| Workflow | Agent | Purpose | Output | -| ---------------------- | --------- | ----------------- | ---------------------- | -| create-architecture | Architect | System design | architecture.md + ADRs | -| validate-architecture | Architect | Design validation | Validation report | -| solutioning-gate-check | Architect | PRD/UX/arch check | Gate report | - -### Phase 4: Implementation - -**Sprint-based development cycle** - -#### Sprint Status System - -**Epic Flow:** `backlog β†’ contexted` - -**Story Flow:** `backlog β†’ drafted β†’ ready-for-dev β†’ in-progress β†’ review β†’ done` - -#### Implementation Workflows - -| Workflow | Agent | Purpose | Status Updates | -| ----------------- | ----- | ----------------------- | ------------------------------------------- | -| sprint-planning | SM | Initialize tracking | Creates sprint-status.yaml | -| epic-tech-context | SM | Epic technical context | Epic: backlog β†’ contexted | -| create-story | SM | Draft story files | Story: backlog β†’ drafted | -| story-context | SM | Implementation guidance | Story: drafted β†’ ready-for-dev | -| dev-story | DEV | Implement | Story: ready-for-dev β†’ in-progress β†’ review | -| code-review | DEV | Quality validation | No auto update | -| retrospective | SM | Capture learnings | Retrospective: optional β†’ completed | -| correct-course | SM | Handle issues | Adaptive | - -#### Implementation Loop - -``` -sprint-planning (creates sprint-status.yaml) - ↓ -For each epic: - epic-tech-context - ↓ - For each story: - create-story β†’ story-context β†’ dev-story β†’ code-review - ↓ - Mark done in sprint-status.yaml - ↓ - retrospective (epic complete) -``` - -## Scale Levels - -| Level | Scope | Documentation | Path | -| ----- | ------------- | --------------------- | --------------- | -| 0 | Single change | tech-spec only | Phase 2 β†’ 4 | -| 1 | 1-10 stories | tech-spec only | Phase 2 β†’ 4 | -| 2 | 5-15 stories | PRD + architecture | Phase 2 β†’ 3 β†’ 4 | -| 3 | 12-40 stories | PRD + full arch | Phase 2 β†’ 3 β†’ 4 | -| 4 | 40+ stories | PRD + enterprise arch | Phase 2 β†’ 3 β†’ 4 | - -## Greenfield vs Brownfield - -### Greenfield (New Projects) - -``` -Phase 1 (optional) β†’ Phase 2 β†’ Phase 3 (L2-4) β†’ Phase 4 -``` - -- Clean slate for design -- No existing constraints -- Direct to planning - -### Brownfield (Existing Code) - -``` -document-project (if needed) β†’ Phase 1 (optional) β†’ Phase 2 β†’ Phase 3 (L2-4) β†’ Phase 4 -``` - -- Must understand existing patterns -- Documentation prerequisite if undocumented -- Consider technical debt in planning - -## Critical Rules - -### Phase Transitions - -1. **Check workflow-status** before any Phase 1-3 workflow -2. **Document brownfield** before planning if undocumented -3. **Complete planning** before solutioning -4. **Complete architecture** (L2-4) before implementation - -### Implementation Rules - -1. **Epic context first** - Must context epic before drafting stories -2. **Sequential by default** - Work stories in order within epic -3. **Learning transfer** - Draft next story after previous done -4. **Manual status updates** - Update sprint-status.yaml as needed - -### Story Management - -1. **Single source of truth** - sprint-status.yaml tracks everything -2. **No story search** - Agents read exact story from status file -3. **Context injection** - Each story gets specific technical guidance -4. **Retrospective learning** - Capture improvements per epic - -### Best Practices - -1. **Trust the process** - Let workflows guide you -2. **Respect scale** - Don't over-document small projects -3. **Use status tracking** - Always know where you are -4. **Iterate and learn** - Each epic improves the next -5. **Consider sharding** - Split large documents (PRD, epics, architecture) for efficiency - -## Document Sharding - -For large multi-epic projects, consider sharding planning documents to improve workflow efficiency. - -### What is Sharding? - -Splits large markdown files into smaller section-based files: - -- PRD with 15 epics β†’ `prd/epic-1.md`, `prd/epic-2.md`, etc. -- Large epics file β†’ Individual epic files -- Architecture layers β†’ Separate layer files - -### Benefits - -**Phase 1-3 Workflows:** - -- Workflows load entire sharded documents (transparent to user) -- Better organization for large projects - -**Phase 4 Workflows:** - -- **Selective loading** - Only load the epic/section needed -- **Massive efficiency** - 90%+ token reduction for 10+ epic projects -- Examples: `epic-tech-context`, `create-story`, `story-context`, `code-review` - -### Usage - -``` -Load bmad-master or analyst agent: -/shard-doc - -Source: docs/PRD.md -Destination: docs/prd/ -``` - -**All BMM workflows automatically support both whole and sharded documents.** - -**[β†’ Complete Sharding Guide](../../../docs/document-sharding-guide.md)** - ---- - -For specific workflow details, see individual workflow READMEs in their respective directories. diff --git a/bmad/bmm/workflows/document-project/templates/README.md b/bmad/bmm/workflows/document-project/templates/README.md deleted file mode 100644 index dc55fcf4..00000000 --- a/bmad/bmm/workflows/document-project/templates/README.md +++ /dev/null @@ -1,38 +0,0 @@ -# Document Project Workflow Templates - -This directory contains template files for the `document-project` workflow. - -## Template Files - -- **index-template.md** - Master index template (adapts for single/multi-part projects) -- **project-overview-template.md** - Executive summary and high-level overview -- **source-tree-template.md** - Annotated directory structure - -## Template Usage - -The workflow dynamically selects and populates templates based on: - -1. **Project structure** (single part vs multi-part) -2. **Project type** (web, backend, mobile, etc.) -3. **Documentation requirements** (from documentation-requirements.csv) - -## Variable Naming Convention - -Templates use Handlebars-style variables: - -- `{{variable_name}}` - Simple substitution -- `{{#if condition}}...{{/if}}` - Conditional blocks -- `{{#each collection}}...{{/each}}` - Iteration - -## Additional Templates - -Architecture-specific templates are dynamically loaded from: -`/bmad/bmm/workflows/3-solutioning/templates/` - -Based on the matched architecture type from the registry. - -## Notes - -- Templates support both simple and complex project structures -- Multi-part projects get part-specific file naming (e.g., `architecture-{part_id}.md`) -- Single-part projects use simplified naming (e.g., `architecture.md`) diff --git a/bmad/bmm/workflows/techdoc/documentation-standards.md b/bmad/bmm/workflows/techdoc/documentation-standards.md index 734e06c6..ffc878cd 100644 --- a/bmad/bmm/workflows/techdoc/documentation-standards.md +++ b/bmad/bmm/workflows/techdoc/documentation-standards.md @@ -1,6 +1,6 @@ # Technical Documentation Standards for BMAD -**For Agent: Paige (Documentation Guide)** +**For Agent: Technical Writer** **Purpose: Concise reference for documentation creation and review** --- @@ -122,6 +122,7 @@ Apply in this hierarchy: - Alt text for diagrams: Describe what it shows - Semantic heading hierarchy (don't skip levels) - Tables have headers +- Emojis are acceptable if user preferences allow (modern accessibility tools support emojis well) --- diff --git a/bmad/bmm/workflows/techdoc/documentation-standards.md.bak b/bmad/bmm/workflows/techdoc/documentation-standards.md.bak new file mode 100644 index 00000000..734e06c6 --- /dev/null +++ b/bmad/bmm/workflows/techdoc/documentation-standards.md.bak @@ -0,0 +1,238 @@ +# Technical Documentation Standards for BMAD + +**For Agent: Paige (Documentation Guide)** +**Purpose: Concise reference for documentation creation and review** + +--- + +## CRITICAL RULE: CommonMark Strict Compliance + +ALL documentation MUST follow CommonMark specification exactly. No exceptions. + +### CommonMark Essentials + +**Headers:** + +- Use ATX-style ONLY: `#` `##` `###` (NOT Setext underlines) +- Single space after `#`: `# Title` (NOT `#Title`) +- No trailing `#`: `# Title` (NOT `# Title #`) +- Hierarchical order: Don't skip levels (h1β†’h2β†’h3, not h1β†’h3) + +**Code Blocks:** + +- Use fenced blocks with language identifier: + ````markdown + ```javascript + const example = 'code'; + ``` + ```` +- NOT indented code blocks (ambiguous) + +**Lists:** + +- Consistent markers within list: all `-` or all `*` or all `+` (don't mix) +- Proper indentation for nested items (2 or 4 spaces, stay consistent) +- Blank line before/after list for clarity + +**Links:** + +- Inline: `[text](url)` +- Reference: `[text][ref]` then `[ref]: url` at bottom +- NO bare URLs without `<>` brackets + +**Emphasis:** + +- Italic: `*text*` or `_text_` +- Bold: `**text**` or `__text__` +- Consistent style within document + +**Line Breaks:** + +- Two spaces at end of line + newline, OR +- Blank line between paragraphs +- NO single line breaks (they're ignored) + +--- + +## Mermaid Diagrams: Valid Syntax Required + +**Critical Rules:** + +1. Always specify diagram type first line +2. Use valid Mermaid v10+ syntax +3. Test syntax before outputting (mental validation) +4. Keep focused: 5-10 nodes ideal, max 15 + +**Diagram Type Selection:** + +- **flowchart** - Process flows, decision trees, workflows +- **sequenceDiagram** - API interactions, message flows, time-based processes +- **classDiagram** - Object models, class relationships, system structure +- **erDiagram** - Database schemas, entity relationships +- **stateDiagram-v2** - State machines, lifecycle stages +- **gitGraph** - Branch strategies, version control flows + +**Formatting:** + +````markdown +```mermaid +flowchart TD + Start[Clear Label] --> Decision{Question?} + Decision -->|Yes| Action1[Do This] + Decision -->|No| Action2[Do That] +``` +```` + +--- + +## Style Guide Principles (Distilled) + +Apply in this hierarchy: + +1. **Project-specific guide** (if exists) - always ask first +2. **BMAD conventions** (this document) +3. **Google Developer Docs style** (defaults below) +4. **CommonMark spec** (when in doubt) + +### Core Writing Rules + +**Task-Oriented Focus:** + +- Write for user GOALS, not feature lists +- Start with WHY, then HOW +- Every doc answers: "What can I accomplish?" + +**Clarity Principles:** + +- Active voice: "Click the button" NOT "The button should be clicked" +- Present tense: "The function returns" NOT "The function will return" +- Direct language: "Use X for Y" NOT "X can be used for Y" +- Second person: "You configure" NOT "Users configure" or "One configures" + +**Structure:** + +- One idea per sentence +- One topic per paragraph +- Headings describe content accurately +- Examples follow explanations + +**Accessibility:** + +- Descriptive link text: "See the API reference" NOT "Click here" +- Alt text for diagrams: Describe what it shows +- Semantic heading hierarchy (don't skip levels) +- Tables have headers + +--- + +## OpenAPI/API Documentation + +**Required Elements:** + +- Endpoint path and method +- Authentication requirements +- Request parameters (path, query, body) with types +- Request example (realistic, working) +- Response schema with types +- Response examples (success + common errors) +- Error codes and meanings + +**Quality Standards:** + +- OpenAPI 3.0+ specification compliance +- Complete schemas (no missing fields) +- Examples that actually work +- Clear error messages +- Security schemes documented + +--- + +## Documentation Types: Quick Reference + +**README:** + +- What (overview), Why (purpose), How (quick start) +- Installation, Usage, Contributing, License +- Under 500 lines (link to detailed docs) + +**API Reference:** + +- Complete endpoint coverage +- Request/response examples +- Authentication details +- Error handling +- Rate limits if applicable + +**User Guide:** + +- Task-based sections (How to...) +- Step-by-step instructions +- Screenshots/diagrams where helpful +- Troubleshooting section + +**Architecture Docs:** + +- System overview diagram (Mermaid) +- Component descriptions +- Data flow +- Technology decisions (ADRs) +- Deployment architecture + +**Developer Guide:** + +- Setup/environment requirements +- Code organization +- Development workflow +- Testing approach +- Contribution guidelines + +--- + +## Quality Checklist + +Before finalizing ANY documentation: + +- [ ] CommonMark compliant (no violations) +- [ ] Headers in proper hierarchy +- [ ] All code blocks have language tags +- [ ] Links work and have descriptive text +- [ ] Mermaid diagrams render correctly +- [ ] Active voice, present tense +- [ ] Task-oriented (answers "how do I...") +- [ ] Examples are concrete and working +- [ ] Accessibility standards met +- [ ] Spelling/grammar checked +- [ ] Reads clearly at target skill level + +--- + +## BMAD-Specific Conventions + +**File Organization:** + +- `README.md` at root of each major component +- `docs/` folder for extensive documentation +- Workflow-specific docs in workflow folder +- Cross-references use relative paths + +**Frontmatter:** +Use YAML frontmatter when appropriate: + +```yaml +--- +title: Document Title +description: Brief description +author: Author name +date: YYYY-MM-DD +--- +``` + +**Metadata:** + +- Always include last-updated date +- Version info for versioned docs +- Author attribution for accountability + +--- + +**Remember: This is your foundation. Follow these rules consistently, and all documentation will be clear, accessible, and maintainable.** diff --git a/bmad/bmm/workflows/testarch/README.md b/bmad/bmm/workflows/testarch/README.md deleted file mode 100644 index fd42efd8..00000000 --- a/bmad/bmm/workflows/testarch/README.md +++ /dev/null @@ -1,26 +0,0 @@ -# Test Architect Workflows - -This directory houses the per-command workflows used by the Test Architect agent (`tea`). Each workflow wraps the standalone instructions that used to live under `testarch/` so they can run through the standard BMAD workflow runner. - -## Available workflows - -- `framework` – scaffolds Playwright/Cypress harnesses. -- `atdd` – generates failing acceptance tests before coding. -- `automate` – expands regression coverage after implementation. -- `ci` – bootstraps CI/CD pipelines aligned with TEA practices. -- `test-design` – combines risk assessment and coverage planning. -- `trace` – maps requirements to tests (Phase 1) and makes quality gate decisions (Phase 2). -- `nfr-assess` – evaluates non-functional requirements. -- `test-review` – reviews test quality using knowledge base patterns and generates quality score. - -**Note**: The `gate` workflow has been merged into `trace` as Phase 2. The `*trace` command now performs both requirements-to-tests traceability mapping AND quality gate decision (PASS/CONCERNS/FAIL/WAIVED) in a single atomic operation. - -Each subdirectory contains: - -- `README.md` – comprehensive workflow documentation with usage, inputs, outputs, and integration notes. -- `instructions.md` – detailed workflow steps in pure markdown v4.0 format. -- `workflow.yaml` – metadata, variables, and configuration for BMAD workflow runner. -- `checklist.md` – validation checklist for quality assurance and completeness verification. -- `template.md` – output template for workflow deliverables (where applicable). - -The TEA agent now invokes these workflows via `run-workflow` rather than executing instruction files directly. diff --git a/bmad/bmm/workflows/testarch/atdd/README.md b/bmad/bmm/workflows/testarch/atdd/README.md deleted file mode 100644 index 7bd697bc..00000000 --- a/bmad/bmm/workflows/testarch/atdd/README.md +++ /dev/null @@ -1,672 +0,0 @@ -# ATDD (Acceptance Test-Driven Development) Workflow - -Generates failing acceptance tests BEFORE implementation following TDD's red-green-refactor cycle. Creates comprehensive test coverage at appropriate levels (E2E, API, Component) with supporting infrastructure (fixtures, factories, mocks) and provides an implementation checklist to guide development toward passing tests. - -**Core Principle**: Tests fail first (red phase), guide development to green, then enable confident refactoring. - -## Usage - -```bash -bmad tea *atdd -``` - -The TEA agent runs this workflow when: - -- User story is approved with clear acceptance criteria -- Development is about to begin (before any implementation code) -- Team is practicing Test-Driven Development (TDD) -- Need to establish test-first contract with DEV team - -## Inputs - -**Required Context Files:** - -- **Story markdown** (`{story_file}`): User story with acceptance criteria, functional requirements, and technical constraints -- **Framework configuration**: Test framework config (playwright.config.ts or cypress.config.ts) from framework workflow - -**Workflow Variables:** - -- `story_file`: Path to story markdown with acceptance criteria (required) -- `test_dir`: Directory for test files (default: `{project-root}/tests`) -- `test_framework`: Detected from framework workflow (playwright or cypress) -- `test_levels`: Which test levels to generate (default: "e2e,api,component") -- `primary_level`: Primary test level for acceptance criteria (default: "e2e") -- `start_failing`: Tests must fail initially - red phase (default: true) -- `use_given_when_then`: BDD-style test structure (default: true) -- `network_first`: Route interception before navigation to prevent race conditions (default: true) -- `one_assertion_per_test`: Atomic test design (default: true) -- `generate_factories`: Create data factory stubs using faker (default: true) -- `generate_fixtures`: Create fixture architecture with auto-cleanup (default: true) -- `auto_cleanup`: Fixtures clean up their data automatically (default: true) -- `include_data_testids`: List required data-testid attributes for DEV (default: true) -- `include_mock_requirements`: Document mock/stub needs (default: true) -- `auto_load_knowledge`: Load fixture-architecture, data-factories, component-tdd fragments (default: true) -- `share_with_dev`: Provide implementation checklist to DEV agent (default: true) -- `output_checklist`: Path for implementation checklist (default: `{output_folder}/atdd-checklist-{story_id}.md`) - -**Optional Context:** - -- **Test design document**: For risk/priority context alignment (P0-P3 scenarios) -- **Existing fixtures/helpers**: For consistency with established patterns -- **Architecture documents**: For understanding system boundaries and integration points - -## Outputs - -**Primary Deliverable:** - -- **ATDD Checklist** (`atdd-checklist-{story_id}.md`): Implementation guide containing: - - Story summary and acceptance criteria breakdown - - Test files created with paths and line counts - - Data factories created with patterns - - Fixtures created with auto-cleanup logic - - Mock requirements for external services - - Required data-testid attributes list - - Implementation checklist mapping tests to code tasks - - Red-green-refactor workflow guidance - - Execution commands for running tests - -**Test Files Created:** - -- **E2E tests** (`tests/e2e/{feature-name}.spec.ts`): Full user journey tests for critical paths -- **API tests** (`tests/api/{feature-name}.api.spec.ts`): Business logic and service contract tests -- **Component tests** (`tests/component/{ComponentName}.test.tsx`): UI component behavior tests - -**Supporting Infrastructure:** - -- **Data factories** (`tests/support/factories/{entity}.factory.ts`): Factory functions using @faker-js/faker for generating test data with overrides support -- **Test fixtures** (`tests/support/fixtures/{feature}.fixture.ts`): Playwright fixtures with setup/teardown and auto-cleanup -- **Mock/stub documentation**: Requirements for external service mocking (payment gateways, email services, etc.) -- **data-testid requirements**: List of required test IDs for stable selectors in UI implementation - -**Validation Safeguards:** - -- All tests must fail initially (red phase verified by local test run) -- Failure messages are clear and actionable -- Tests use Given-When-Then format for readability -- Network-first pattern applied (route interception before navigation) -- One assertion per test (atomic test design) -- No hard waits or sleeps (explicit waits only) - -## Key Features - -### Red-Green-Refactor Cycle - -**RED Phase** (TEA Agent responsibility): - -- Write failing tests first defining expected behavior -- Tests fail for right reason (missing implementation, not test bugs) -- All supporting infrastructure (factories, fixtures, mocks) created - -**GREEN Phase** (DEV Agent responsibility): - -- Implement minimal code to pass one test at a time -- Use implementation checklist as guide -- Run tests frequently to verify progress - -**REFACTOR Phase** (DEV Agent responsibility): - -- Improve code quality with confidence (tests provide safety net) -- Extract duplications, optimize performance -- Ensure tests still pass after changes - -### Test Level Selection Framework - -**E2E (End-to-End)**: - -- Critical user journeys (login, checkout, core workflows) -- Multi-system integration -- User-facing acceptance criteria -- Characteristics: High confidence, slow execution, brittle - -**API (Integration)**: - -- Business logic validation -- Service contracts and data transformations -- Backend integration without UI -- Characteristics: Fast feedback, good balance, stable - -**Component**: - -- UI component behavior (buttons, forms, modals) -- Interaction testing (click, hover, keyboard navigation) -- Visual regression and state management -- Characteristics: Fast, isolated, granular - -**Unit**: - -- Pure business logic and algorithms -- Edge cases and error handling -- Minimal dependencies -- Characteristics: Fastest, most granular - -**Selection Strategy**: Avoid duplicate coverage. Use E2E for critical happy path, API for business logic variations, component for UI edge cases, unit for pure logic. - -### Recording Mode (NEW - Phase 2.5) - -**atdd** can record complex UI interactions instead of AI generation. - -**Activation**: Automatic for complex UI when config.tea_use_mcp_enhancements is true and MCP available - -- Fallback: AI generation (silent, automatic) - -**When to Use Recording Mode:** - -- βœ… Complex UI interactions (drag-drop, multi-step forms, wizards) -- βœ… Visual workflows (modals, dialogs, animations) -- βœ… Unclear requirements (exploratory, discovering expected behavior) -- βœ… Multi-page flows (checkout, registration, onboarding) -- ❌ NOT for simple CRUD (AI generation faster) -- ❌ NOT for API-only tests (no UI to record) - -**When to Use AI Generation (Default):** - -- βœ… Clear acceptance criteria available -- βœ… Standard patterns (login, CRUD, navigation) -- βœ… Need many tests quickly -- βœ… API/backend tests (no UI interaction) - -**How Test Generation Works (Default - AI-Based):** - -TEA generates tests using AI by: - -1. **Analyzing acceptance criteria** from story markdown -2. **Inferring selectors** from requirement descriptions (e.g., "login button" β†’ `[data-testid="login-button"]`) -3. **Synthesizing test code** based on knowledge base patterns -4. **Estimating interactions** using common UI patterns (click, type, verify) -5. **Applying best practices** from knowledge fragments (Given-When-Then, network-first, fixtures) - -**This works well for:** - -- βœ… Clear requirements with known UI patterns -- βœ… Standard workflows (login, CRUD, navigation) -- βœ… When selectors follow conventions (data-testid attributes) - -**What MCP Adds (Interactive Verification & Enhancement):** - -When Playwright MCP is available, TEA **additionally**: - -1. **Verifies generated tests** by: - - **Launching real browser** with `generator_setup_page` - - **Executing generated test steps** with `browser_*` tools (`navigate`, `click`, `type`) - - **Seeing actual UI** with `browser_snapshot` (visual verification) - - **Discovering real selectors** with `browser_generate_locator` (auto-generate from live DOM) - -2. **Enhances AI-generated tests** by: - - **Validating selectors exist** in actual DOM (not just guesses) - - **Verifying behavior** with `browser_verify_text`, `browser_verify_visible`, `browser_verify_url` - - **Capturing actual interaction log** with `generator_read_log` - - **Refining test code** with real observed behavior - -3. **Catches issues early** by: - - **Finding missing selectors** before DEV implements (requirements clarification) - - **Discovering edge cases** not in requirements (loading states, error messages) - - **Validating assumptions** about UI structure and behavior - -**Key Benefits of MCP Enhancement:** - -- βœ… **AI generates tests** (fast, based on requirements) **+** **MCP verifies tests** (accurate, based on reality) -- βœ… **Accurate selectors**: Validated against actual DOM, not just inferred -- βœ… **Visual validation**: TEA sees what user sees (modals, animations, state changes) -- βœ… **Complex flows**: Records multi-step interactions precisely -- βœ… **Edge case discovery**: Observes actual app behavior beyond requirements -- βœ… **Selector resilience**: MCP generates robust locators from live page (role-based, text-based, fallback chains) - -**Example Enhancement Flow:** - -``` -1. AI generates test based on acceptance criteria - β†’ await page.click('[data-testid="submit-button"]') - -2. MCP verifies selector exists (browser_generate_locator) - β†’ Found: button[type="submit"].btn-primary - β†’ No data-testid attribute exists! - -3. TEA refines test with actual selector - β†’ await page.locator('button[type="submit"]').click() - β†’ Documents requirement: "Add data-testid='submit-button' to button" -``` - -**Recording Workflow (MCP-Based):** - -``` -1. Set generation_mode: "recording" -2. Use generator_setup_page to init recording session -3. For each acceptance criterion: - a. Execute scenario with browser_* tools: - - browser_navigate, browser_click, browser_type - - browser_select, browser_check - b. Add verifications with browser_verify_* tools: - - browser_verify_text, browser_verify_visible - - browser_verify_url - c. Capture log with generator_read_log - d. Generate test with generator_write_test -4. Enhance generated tests with knowledge base patterns: - - Add Given-When-Then comments - - Replace selectors with data-testid - - Add network-first interception - - Add fixtures/factories -5. Verify tests fail (RED phase) -``` - -**Example: Recording a Checkout Flow** - -```markdown -Recording session for: "User completes checkout with credit card" - -Actions recorded: - -1. browser_navigate('/cart') -2. browser_click('[data-testid="checkout-button"]') -3. browser_type('[data-testid="card-number"]', '4242424242424242') -4. browser_type('[data-testid="expiry"]', '12/25') -5. browser_type('[data-testid="cvv"]', '123') -6. browser_click('[data-testid="place-order"]') -7. browser_verify_text('Order confirmed') -8. browser_verify_url('/confirmation') - -Generated test (enhanced): - -- Given-When-Then structure added -- data-testid selectors used -- Network-first payment API mock added -- Card factory created for test data -- Test verified to FAIL (checkout not implemented) -``` - -**Graceful Degradation:** - -- Recording mode is OPTIONAL (default: AI generation) -- Requires Playwright MCP (falls back to AI if unavailable) -- Generated tests enhanced with knowledge base patterns -- Same quality output regardless of generation method - -### Given-When-Then Structure - -All tests follow BDD format for clarity: - -```typescript -test('should display error for invalid credentials', async ({ page }) => { - // GIVEN: User is on login page - await page.goto('/login'); - - // WHEN: User submits invalid credentials - await page.fill('[data-testid="email-input"]', 'invalid@example.com'); - await page.fill('[data-testid="password-input"]', 'wrongpassword'); - await page.click('[data-testid="login-button"]'); - - // THEN: Error message is displayed - await expect(page.locator('[data-testid="error-message"]')).toHaveText('Invalid email or password'); -}); -``` - -### Network-First Testing Pattern - -**Critical pattern to prevent race conditions**: - -```typescript -// βœ… CORRECT: Intercept BEFORE navigation -await page.route('**/api/data', handler); -await page.goto('/page'); - -// ❌ WRONG: Navigate then intercept (race condition) -await page.goto('/page'); -await page.route('**/api/data', handler); // Too late! -``` - -Always set up route interception before navigating to pages that make network requests. - -### Data Factory Architecture - -Use faker for all test data generation: - -```typescript -// tests/support/factories/user.factory.ts -import { faker } from '@faker-js/faker'; - -export const createUser = (overrides = {}) => ({ - id: faker.number.int(), - email: faker.internet.email(), - name: faker.person.fullName(), - createdAt: faker.date.recent().toISOString(), - ...overrides, -}); - -export const createUsers = (count: number) => Array.from({ length: count }, () => createUser()); -``` - -**Factory principles:** - -- Use faker for random data (no hardcoded values to prevent collisions) -- Support overrides for specific test scenarios -- Generate complete valid objects matching API contracts -- Include helper functions for bulk creation - -### Fixture Architecture with Auto-Cleanup - -Playwright fixtures with automatic data cleanup: - -```typescript -// tests/support/fixtures/auth.fixture.ts -import { test as base } from '@playwright/test'; - -export const test = base.extend({ - authenticatedUser: async ({ page }, use) => { - // Setup: Create and authenticate user - const user = await createUser(); - await page.goto('/login'); - await page.fill('[data-testid="email"]', user.email); - await page.fill('[data-testid="password"]', 'password123'); - await page.click('[data-testid="login-button"]'); - await page.waitForURL('/dashboard'); - - // Provide to test - await use(user); - - // Cleanup: Delete user (automatic) - await deleteUser(user.id); - }, -}); -``` - -**Fixture principles:** - -- Auto-cleanup (always delete created data in teardown) -- Composable (fixtures can use other fixtures via mergeTests) -- Isolated (each test gets fresh data) -- Type-safe with TypeScript - -### One Assertion Per Test (Atomic Design) - -Each test should verify exactly one behavior: - -```typescript -// βœ… CORRECT: One assertion -test('should display user name', async ({ page }) => { - await expect(page.locator('[data-testid="user-name"]')).toHaveText('John'); -}); - -// ❌ WRONG: Multiple assertions (not atomic) -test('should display user info', async ({ page }) => { - await expect(page.locator('[data-testid="user-name"]')).toHaveText('John'); - await expect(page.locator('[data-testid="user-email"]')).toHaveText('john@example.com'); -}); -``` - -**Why?** If second assertion fails, you don't know if first is still valid. Split into separate tests for clear failure diagnosis. - -### Implementation Checklist for DEV - -Maps each failing test to concrete implementation tasks: - -```markdown -## Implementation Checklist - -### Test: User Login with Valid Credentials - -- [ ] Create `/login` route -- [ ] Implement login form component -- [ ] Add email/password validation -- [ ] Integrate authentication API -- [ ] Add `data-testid` attributes: `email-input`, `password-input`, `login-button` -- [ ] Implement error handling -- [ ] Run test: `npm run test:e2e -- login.spec.ts` -- [ ] βœ… Test passes (green phase) -``` - -Provides clear path from red to green for each test. - -## Integration with Other Workflows - -**Before this workflow:** - -- **framework** workflow: Must run first to establish test framework architecture (Playwright or Cypress config, directory structure, base fixtures) -- **test-design** workflow: Optional but recommended for P0-P3 priority alignment and risk assessment context - -**After this workflow:** - -- **DEV agent** implements features guided by failing tests and implementation checklist -- **test-review** workflow: Review generated test quality before sharing with DEV team -- **automate** workflow: After story completion, expand regression suite with additional edge case coverage - -**Coordinates with:** - -- **Story approval process**: ATDD runs after story is approved but before DEV begins implementation -- **Quality gates**: Failing tests serve as acceptance criteria for story completion (all tests must pass) - -## Important Notes - -### ATDD is Test-First, Not Test-After - -**Critical timing**: Tests must be written BEFORE any implementation code. This ensures: - -- Tests define the contract (what needs to be built) -- Implementation is guided by tests (no over-engineering) -- Tests verify behavior, not implementation details -- Confidence in refactoring (tests catch regressions) - -### All Tests Must Fail Initially - -**Red phase verification is mandatory**: - -- Run tests locally after creation to confirm RED phase -- Failure should be due to missing implementation, not test bugs -- Failure messages should be clear and actionable -- Document expected failure messages in ATDD checklist - -If a test passes before implementation, it's not testing the right thing. - -### Use data-testid for Stable Selectors - -**Why data-testid?** - -- CSS classes change frequently (styling refactors) -- IDs may not be unique or stable -- Text content changes with localization -- data-testid is explicit contract between tests and UI - -```typescript -// βœ… CORRECT: Stable selector -await page.click('[data-testid="login-button"]'); - -// ❌ FRAGILE: Class-based selector -await page.click('.btn.btn-primary.login-btn'); -``` - -ATDD checklist includes complete list of required data-testid attributes for DEV team. - -### No Hard Waits or Sleeps - -**Use explicit waits only**: - -```typescript -// βœ… CORRECT: Explicit wait for condition -await page.waitForSelector('[data-testid="user-name"]'); -await expect(page.locator('[data-testid="user-name"]')).toBeVisible(); - -// ❌ WRONG: Hard wait (flaky, slow) -await page.waitForTimeout(2000); -``` - -Playwright's auto-waiting is preferred (expect() automatically waits up to timeout). - -### Component Tests for Complex UI Only - -**When to use component tests:** - -- Complex UI interactions (drag-drop, keyboard navigation) -- Form validation logic -- State management within component -- Visual edge cases - -**When NOT to use:** - -- Simple rendering (snapshot tests are sufficient) -- Integration with backend (use E2E or API tests) -- Full user journeys (use E2E tests) - -Component tests are valuable but should complement, not replace, E2E and API tests. - -### Auto-Cleanup is Non-Negotiable - -**Every test must clean up its data**: - -- Use fixtures with automatic teardown -- Never leave test data in database/storage -- Each test should be isolated (no shared state) - -**Cleanup patterns:** - -- Fixtures: Cleanup in teardown function -- Factories: Provide deletion helpers -- Tests: Use `test.afterEach()` for manual cleanup if needed - -Without auto-cleanup, tests become flaky and depend on execution order. - -## Knowledge Base References - -This workflow automatically consults: - -- **fixture-architecture.md** - Test fixture patterns with setup/teardown and auto-cleanup using Playwright's test.extend() -- **data-factories.md** - Factory patterns using @faker-js/faker for random test data generation with overrides support -- **component-tdd.md** - Component test strategies using Playwright Component Testing (@playwright/experimental-ct-react) -- **network-first.md** - Route interception patterns (intercept before navigation to prevent race conditions) -- **test-quality.md** - Test design principles (Given-When-Then, one assertion per test, determinism, isolation) -- **test-levels-framework.md** - Test level selection framework (E2E vs API vs Component vs Unit) - -See `tea-index.csv` for complete knowledge fragment mapping and additional references. - -## Example Output - -After running this workflow, the ATDD checklist will contain: - -````markdown -# ATDD Checklist - Epic 3, Story 5: User Authentication - -## Story Summary - -As a user, I want to log in with email and password so that I can access my personalized dashboard. - -## Acceptance Criteria - -1. User can log in with valid credentials -2. User sees error message with invalid credentials -3. User is redirected to dashboard after successful login - -## Failing Tests Created (RED Phase) - -### E2E Tests (3 tests) - -- `tests/e2e/user-authentication.spec.ts` (87 lines) - - βœ… should log in with valid credentials (RED - missing /login route) - - βœ… should display error for invalid credentials (RED - error message not implemented) - - βœ… should redirect to dashboard after login (RED - redirect logic missing) - -### API Tests (2 tests) - -- `tests/api/auth.api.spec.ts` (54 lines) - - βœ… POST /api/auth/login - should return token for valid credentials (RED - endpoint not implemented) - - βœ… POST /api/auth/login - should return 401 for invalid credentials (RED - validation missing) - -## Data Factories Created - -- `tests/support/factories/user.factory.ts` - createUser(), createUsers(count) - -## Fixtures Created - -- `tests/support/fixtures/auth.fixture.ts` - authenticatedUser fixture with auto-cleanup - -## Required data-testid Attributes - -### Login Page - -- `email-input` - Email input field -- `password-input` - Password input field -- `login-button` - Submit button -- `error-message` - Error message container - -### Dashboard Page - -- `user-name` - User name display -- `logout-button` - Logout button - -## Implementation Checklist - -### Test: User Login with Valid Credentials - -- [ ] Create `/login` route -- [ ] Implement login form component -- [ ] Add email/password validation -- [ ] Integrate authentication API -- [ ] Add data-testid attributes: `email-input`, `password-input`, `login-button` -- [ ] Run test: `npm run test:e2e -- user-authentication.spec.ts` -- [ ] βœ… Test passes (green phase) - -### Test: Display Error for Invalid Credentials - -- [ ] Add error state management -- [ ] Display error message UI -- [ ] Add `data-testid="error-message"` -- [ ] Run test: `npm run test:e2e -- user-authentication.spec.ts` -- [ ] βœ… Test passes (green phase) - -### Test: Redirect to Dashboard After Login - -- [ ] Implement redirect logic after successful auth -- [ ] Verify authentication token stored -- [ ] Add dashboard route protection -- [ ] Run test: `npm run test:e2e -- user-authentication.spec.ts` -- [ ] βœ… Test passes (green phase) - -## Running Tests - -```bash -# Run all failing tests -npm run test:e2e - -# Run specific test file -npm run test:e2e -- user-authentication.spec.ts - -# Run tests in headed mode (see browser) -npm run test:e2e -- --headed - -# Debug specific test -npm run test:e2e -- user-authentication.spec.ts --debug -``` -```` - -## Red-Green-Refactor Workflow - -**RED Phase** (Complete): - -- βœ… All tests written and failing -- βœ… Fixtures and factories created -- βœ… data-testid requirements documented - -**GREEN Phase** (DEV Team - Next Steps): - -1. Pick one failing test from checklist -2. Implement minimal code to make it pass -3. Run test to verify green -4. Check off task in checklist -5. Move to next test -6. Repeat until all tests pass - -**REFACTOR Phase** (DEV Team - After All Tests Pass): - -1. All tests passing (green) -2. Improve code quality (extract functions, optimize) -3. Remove duplications -4. Ensure tests still pass after each refactor - -## Next Steps - -1. Review this checklist with team -2. Run failing tests to confirm RED phase: `npm run test:e2e` -3. Begin implementation using checklist as guide -4. Share progress in daily standup -5. When all tests pass, run `bmad sm story-done` to move story to DONE - -``` - -This comprehensive checklist guides DEV team from red to green with clear tasks and validation steps. -``` diff --git a/bmad/bmm/workflows/testarch/automate/README.md b/bmad/bmm/workflows/testarch/automate/README.md deleted file mode 100644 index f1ad2d42..00000000 --- a/bmad/bmm/workflows/testarch/automate/README.md +++ /dev/null @@ -1,869 +0,0 @@ -# Automate Workflow - -Expands test automation coverage by generating comprehensive test suites at appropriate levels (E2E, API, Component, Unit) with supporting infrastructure. This workflow operates in **dual mode** - works seamlessly WITH or WITHOUT BMad artifacts. - -**Core Principle**: Generate prioritized, deterministic tests that avoid duplicate coverage and follow testing best practices. - -## Usage - -```bash -bmad tea *automate -``` - -The TEA agent runs this workflow when: - -- **BMad-Integrated**: After story implementation to expand coverage beyond ATDD tests -- **Standalone**: Point at any codebase/feature and generate tests independently ("work out of thin air") -- **Auto-discover**: No targets specified - scans codebase for features needing tests - -## Inputs - -**Execution Modes:** - -1. **BMad-Integrated Mode** (story available) - OPTIONAL -2. **Standalone Mode** (no BMad artifacts) - Direct code analysis -3. **Auto-discover Mode** (no targets) - Scan for coverage gaps - -**Required Context Files:** - -- **Framework configuration**: Test framework config (playwright.config.ts or cypress.config.ts) - REQUIRED - -**Optional Context (BMad-Integrated Mode):** - -- **Story markdown** (`{story_file}`): User story with acceptance criteria (enhances coverage targeting but NOT required) -- **Tech spec**: Technical specification (provides architectural context) -- **Test design**: Risk/priority context (P0-P3 alignment) -- **PRD**: Product requirements (business context) - -**Optional Context (Standalone Mode):** - -- **Source code**: Feature implementation to analyze -- **Existing tests**: Current test suite for gap analysis - -**Workflow Variables:** - -- `standalone_mode`: Can work without BMad artifacts (default: true) -- `story_file`: Path to story markdown (optional) -- `target_feature`: Feature name or directory to analyze (e.g., "user-authentication" or "src/auth/") -- `target_files`: Specific files to analyze (comma-separated paths) -- `test_dir`: Directory for test files (default: `{project-root}/tests`) -- `source_dir`: Source code directory (default: `{project-root}/src`) -- `auto_discover_features`: Automatically find features needing tests (default: true) -- `analyze_coverage`: Check existing test coverage gaps (default: true) -- `coverage_target`: Coverage strategy - "critical-paths", "comprehensive", "selective" (default: "critical-paths") -- `test_levels`: Which levels to generate - "e2e,api,component,unit" (default: all) -- `avoid_duplicate_coverage`: Don't test same behavior at multiple levels (default: true) -- `include_p0`: Include P0 critical path tests (default: true) -- `include_p1`: Include P1 high priority tests (default: true) -- `include_p2`: Include P2 medium priority tests (default: true) -- `include_p3`: Include P3 low priority tests (default: false) -- `use_given_when_then`: BDD-style test structure (default: true) -- `one_assertion_per_test`: Atomic test design (default: true) -- `network_first`: Route interception before navigation (default: true) -- `deterministic_waits`: No hard waits or sleeps (default: true) -- `generate_fixtures`: Create/enhance fixture architecture (default: true) -- `generate_factories`: Create/enhance data factories (default: true) -- `update_helpers`: Add utility functions (default: true) -- `use_test_design`: Load test-design.md if exists (default: true) -- `use_tech_spec`: Load tech-spec.md if exists (default: true) -- `use_prd`: Load PRD.md if exists (default: true) -- `update_readme`: Update test README with new specs (default: true) -- `update_package_scripts`: Add test execution scripts (default: true) -- `output_summary`: Path for automation summary (default: `{output_folder}/automation-summary.md`) -- `max_test_duration`: Maximum seconds per test (default: 90) -- `max_file_lines`: Maximum lines per test file (default: 300) -- `require_self_cleaning`: All tests must clean up data (default: true) -- `auto_load_knowledge`: Load relevant knowledge fragments (default: true) -- `run_tests_after_generation`: Verify tests pass/fail as expected (default: true) -- `auto_validate`: Run generated tests after creation (default: true) **NEW** -- `auto_heal_failures`: Enable automatic healing (default: false, opt-in) **NEW** -- `max_healing_iterations`: Maximum healing attempts per test (default: 3) **NEW** -- `fail_on_unhealable`: Fail workflow if tests can't be healed (default: false) **NEW** -- `mark_unhealable_as_fixme`: Mark unfixable tests with test.fixme() (default: true) **NEW** -- `use_mcp_healing`: Use Playwright MCP if available (default: true) **NEW** -- `healing_knowledge_fragments`: Healing patterns to load (default: "test-healing-patterns,selector-resilience,timing-debugging") **NEW** - -## Outputs - -**Primary Deliverable:** - -- **Automation Summary** (`automation-summary.md`): Comprehensive report containing: - - Execution mode (BMad-Integrated, Standalone, Auto-discover) - - Feature analysis (source files analyzed, coverage gaps) - - Tests created (E2E, API, Component, Unit) with counts and paths - - Infrastructure created (fixtures, factories, helpers) - - Test execution instructions - - Coverage analysis (P0-P3 breakdown, coverage percentage) - - Definition of Done checklist - - Next steps and recommendations - -**Test Files Created:** - -- **E2E tests** (`tests/e2e/{feature-name}.spec.ts`): Critical user journeys (P0-P1) -- **API tests** (`tests/api/{feature-name}.api.spec.ts`): Business logic and contracts (P1-P2) -- **Component tests** (`tests/component/{ComponentName}.test.tsx`): UI behavior (P1-P2) -- **Unit tests** (`tests/unit/{module-name}.test.ts`): Pure logic (P2-P3) - -**Supporting Infrastructure:** - -- **Fixtures** (`tests/support/fixtures/{feature}.fixture.ts`): Setup/teardown with auto-cleanup -- **Data factories** (`tests/support/factories/{entity}.factory.ts`): Random test data using faker -- **Helpers** (`tests/support/helpers/{utility}.ts`): Utility functions (waitFor, retry, etc.) - -**Documentation Updates:** - -- **Test README** (`tests/README.md`): Test suite overview, execution instructions, priority tagging, patterns -- **package.json scripts**: Test execution commands (test:e2e, test:e2e:p0, test:api, etc.) - -**Validation Safeguards:** - -- All tests follow Given-When-Then format -- All tests have priority tags ([P0], [P1], [P2], [P3]) -- All tests use data-testid selectors (stable, not CSS classes) -- All tests are self-cleaning (fixtures with auto-cleanup) -- No hard waits or flaky patterns (deterministic) -- Test files under 300 lines (lean and focused) -- Tests run under 1.5 minutes each (fast feedback) - -## Key Features - -### Dual-Mode Operation - -**BMad-Integrated Mode** (story available): - -- Uses story acceptance criteria for coverage targeting -- Aligns with test-design risk/priority assessment -- Expands ATDD tests with edge cases and negative paths -- Optional - story enhances coverage but not required - -**Standalone Mode** (no story): - -- Analyzes source code independently -- Identifies coverage gaps automatically -- Generates tests based on code analysis -- Works with any project (BMad or non-BMad) - -**Auto-discover Mode** (no targets): - -- Scans codebase for features needing tests -- Prioritizes features with no coverage -- Generates comprehensive test plan - -### Avoid Duplicate Coverage - -**Critical principle**: Don't test same behavior at multiple levels - -**Good coverage strategy:** - -- **E2E**: User can login β†’ Dashboard loads (critical happy path only) -- **API**: POST /auth/login returns correct status codes (variations: 200, 401, 400) -- **Component**: LoginForm validates input (UI edge cases: empty fields, invalid format) -- **Unit**: validateEmail() logic (pure function edge cases) - -**Bad coverage (duplicate):** - -- E2E: User can login β†’ Dashboard loads -- E2E: User can login with different emails β†’ Dashboard loads (unnecessary duplication) -- API: POST /auth/login returns 200 (already covered in E2E) - -Use E2E sparingly for critical paths. Use API/Component/Unit for variations and edge cases. - -### Healing Capabilities (NEW - Phase 2.5) - -**automate** automatically validates and heals test failures after generation. - -**Configuration**: Controlled by `config.tea_use_mcp_enhancements` (default: true) - -- If true + MCP available β†’ MCP-assisted healing -- If true + MCP unavailable β†’ Pattern-based healing -- If false β†’ No healing, document failures for manual review - -**Constants**: Max 3 healing attempts, unfixable tests marked as `test.fixme()` - -**How Healing Works (Default - Pattern-Based):** - -TEA heals tests using pattern-based analysis by: - -1. **Parsing error messages** from test output logs -2. **Matching patterns** against known failure signatures -3. **Applying fixes** from healing knowledge fragments: - - `test-healing-patterns.md` - Common failure patterns (selectors, timing, data, network) - - `selector-resilience.md` - Selector refactoring (CSS β†’ data-testid, nth() β†’ filter()) - - `timing-debugging.md` - Race condition fixes (hard waits β†’ event-based waits) -4. **Re-running tests** to verify fix (max 3 iterations) -5. **Marking unfixable tests** as `test.fixme()` with detailed comments - -**This works well for:** - -- βœ… Common failure patterns (stale selectors, timing issues, dynamic data) -- βœ… Text-based errors with clear signatures -- βœ… Issues documented in knowledge base -- βœ… Automated CI environments without browser access - -**What MCP Adds (Interactive Debugging Enhancement):** - -When Playwright MCP is available, TEA **additionally**: - -1. **Debugs failures interactively** before applying pattern-based fixes: - - **Pause test execution** with `playwright_test_debug_test` (step through, inspect state) - - **See visual failure context** with `browser_snapshot` (screenshot of failure state) - - **Inspect live DOM** with browser tools (find why selector doesn't match) - - **Analyze console logs** with `browser_console_messages` (JS errors, warnings, debug output) - - **Inspect network activity** with `browser_network_requests` (failed API calls, CORS errors, timeouts) - -2. **Enhances pattern-based fixes** with real-world data: - - **Pattern match identifies issue** (e.g., "stale selector") - - **MCP discovers actual selector** with `browser_generate_locator` from live page - - **TEA applies refined fix** using real DOM structure (not just pattern guess) - - **Verification happens in browser** (see if fix works visually) - -3. **Catches root causes** pattern matching might miss: - - **Network failures**: MCP shows 500 error on API call (not just timeout) - - **JS errors**: MCP shows `TypeError: undefined` in console (not just "element not found") - - **Timing issues**: MCP shows loading spinner still visible (not just "selector timeout") - - **State problems**: MCP shows modal blocking button (not just "not clickable") - -**Key Benefits of MCP Enhancement:** - -- βœ… **Pattern-based fixes** (fast, automated) **+** **MCP verification** (accurate, context-aware) -- βœ… **Visual debugging**: See exactly what user sees when test fails -- βœ… **DOM inspection**: Discover why selectors don't match (element missing, wrong attributes, dynamic IDs) -- βœ… **Network visibility**: Identify API failures, slow requests, CORS issues -- βœ… **Console analysis**: Catch JS errors that break page functionality -- βœ… **Robust selectors**: Generate locators from actual DOM (role, text, testid hierarchy) -- βœ… **Faster iteration**: Debug and fix in same browser session (no restart needed) -- βœ… **Higher success rate**: MCP helps diagnose failures pattern matching can't solve - -**Example Enhancement Flow:** - -``` -1. Pattern-based healing identifies issue - β†’ Error: "Locator '.submit-btn' resolved to 0 elements" - β†’ Pattern match: Stale selector (CSS class) - β†’ Suggested fix: Replace with data-testid - -2. MCP enhances diagnosis (if available) - β†’ browser_snapshot shows button exists but has class ".submit-button" (not ".submit-btn") - β†’ browser_generate_locator finds: button[type="submit"].submit-button - β†’ browser_console_messages shows no errors - -3. TEA applies refined fix - β†’ await page.locator('button[type="submit"]').click() - β†’ (More accurate than pattern-based guess) -``` - -**Healing Modes:** - -1. **MCP-Enhanced Healing** (when Playwright MCP available): - - Pattern-based analysis **+** Interactive debugging - - Visual context with `browser_snapshot` - - Console log analysis with `browser_console_messages` - - Network inspection with `browser_network_requests` - - Live DOM inspection with `browser_generate_locator` - - Step-by-step debugging with `playwright_test_debug_test` - -2. **Pattern-Based Healing** (always available): - - Error message parsing and pattern matching - - Automated fixes from healing knowledge fragments - - Text-based analysis (no visual/DOM inspection) - - Works in CI without browser access - -**Healing Workflow:** - -``` -1. Generate tests β†’ Run tests -2. IF pass β†’ Success βœ… -3. IF fail AND auto_heal_failures=false β†’ Report failures ⚠️ -4. IF fail AND auto_heal_failures=true β†’ Enter healing loop: - a. Identify failure pattern (selector, timing, data, network) - b. Apply automated fix from knowledge base - c. Re-run test (max 3 iterations) - d. IF healed β†’ Success βœ… - e. IF unhealable β†’ Mark test.fixme() with detailed comment -``` - -**Example Healing Outcomes:** - -```typescript -// ❌ Original (failing): CSS class selector -await page.locator('.btn-primary').click(); - -// βœ… Healed: data-testid selector -await page.getByTestId('submit-button').click(); - -// ❌ Original (failing): Hard wait -await page.waitForTimeout(3000); - -// βœ… Healed: Network-first pattern -await page.waitForResponse('**/api/data'); - -// ❌ Original (failing): Hardcoded ID -await expect(page.getByText('User 123')).toBeVisible(); - -// βœ… Healed: Regex pattern -await expect(page.getByText(/User \d+/)).toBeVisible(); -``` - -**Unfixable Tests (Marked as test.fixme()):** - -```typescript -test.fixme('[P1] should handle complex interaction', async ({ page }) => { - // FIXME: Test healing failed after 3 attempts - // Failure: "Locator 'button[data-action="submit"]' resolved to 0 elements" - // Attempted fixes: - // 1. Replaced with page.getByTestId('submit-button') - still failing - // 2. Replaced with page.getByRole('button', { name: 'Submit' }) - still failing - // 3. Added waitForLoadState('networkidle') - still failing - // Manual investigation needed: Selector may require application code changes - // TODO: Review with team, may need data-testid added to button component - // Original test code... -}); -``` - -**When to Enable Healing:** - -- βœ… Enable for greenfield projects (catch generated test issues early) -- βœ… Enable for brownfield projects (auto-fix legacy selector patterns) -- ❌ Disable if environment not ready (application not deployed/seeded) -- ❌ Disable if preferring manual review of all generated tests - -**Healing Report Example:** - -```markdown -## Test Healing Report - -**Auto-Heal Enabled**: true -**Healing Mode**: Pattern-based -**Iterations Allowed**: 3 - -### Validation Results - -- **Total tests**: 10 -- **Passing**: 7 -- **Failing**: 3 - -### Healing Outcomes - -**Successfully Healed (2 tests):** - -- `tests/e2e/login.spec.ts:15` - Stale selector (CSS class β†’ data-testid) -- `tests/e2e/checkout.spec.ts:42` - Race condition (added network-first interception) - -**Unable to Heal (1 test):** - -- `tests/e2e/complex-flow.spec.ts:67` - Marked as test.fixme() - - Requires application code changes (add data-testid to component) - -### Healing Patterns Applied - -- **Selector fixes**: 1 -- **Timing fixes**: 1 -``` - -**Graceful Degradation:** - -- Healing is OPTIONAL (default: disabled) -- Works without Playwright MCP (pattern-based fallback) -- Unfixable tests marked clearly (not silently broken) -- Manual investigation path documented - -### Recording Mode (NEW - Phase 2.5) - -**automate** can record complex UI interactions instead of AI generation. - -**Activation**: Automatic for complex UI scenarios when config.tea_use_mcp_enhancements is true and MCP available - -- Complex scenarios: drag-drop, wizards, multi-page flows -- Fallback: AI generation (silent, automatic) - -**When to Use Recording Mode:** - -- βœ… Complex UI interactions (drag-drop, multi-step forms, wizards) -- βœ… Visual workflows (modals, dialogs, animations, transitions) -- βœ… Unclear requirements (exploratory, discovering behavior) -- βœ… Multi-page flows (checkout, registration, onboarding) -- ❌ NOT for simple CRUD (AI generation faster) -- ❌ NOT for API-only tests (no UI to record) - -**When to Use AI Generation (Default):** - -- βœ… Clear requirements available -- βœ… Standard patterns (login, CRUD, navigation) -- βœ… Need many tests quickly -- βœ… API/backend tests (no UI interaction) - -**Recording Workflow (Same as atdd):** - -``` -1. Set generation_mode: "recording" -2. Use generator_setup_page to init recording -3. For each test scenario: - - Execute with browser_* tools (navigate, click, type, select) - - Add verifications with browser_verify_* tools - - Capture log and generate test file -4. Enhance with knowledge base patterns: - - Given-When-Then structure - - data-testid selectors - - Network-first interception - - Fixtures/factories -5. Validate (run tests if auto_validate enabled) -6. Heal if needed (if auto_heal_failures enabled) -``` - -**Combination: Recording + Healing:** - -automate can use BOTH recording and healing together: - -- Generate tests via recording (complex flows captured interactively) -- Run tests to validate (auto_validate) -- Heal failures automatically (auto_heal_failures) - -This is particularly powerful for brownfield projects where: - -- Requirements unclear β†’ Use recording to capture existing behavior -- Application complex β†’ Recording captures nuances AI might miss -- Tests may fail β†’ Healing fixes common issues automatically - -**Graceful Degradation:** - -- Recording mode is OPTIONAL (default: AI generation) -- Requires Playwright MCP (falls back to AI if unavailable) -- Works with or without healing enabled -- Same quality output regardless of generation method - -### Test Level Selection Framework - -**E2E (End-to-End)**: - -- Critical user journeys (login, checkout, core workflows) -- Multi-system integration -- User-facing acceptance criteria -- Characteristics: High confidence, slow execution, brittle - -**API (Integration)**: - -- Business logic validation -- Service contracts and data transformations -- Backend integration without UI -- Characteristics: Fast feedback, good balance, stable - -**Component**: - -- UI component behavior (buttons, forms, modals) -- Interaction testing (click, hover, keyboard navigation) -- State management within component -- Characteristics: Fast, isolated, granular - -**Unit**: - -- Pure business logic and algorithms -- Edge cases and error handling -- Minimal dependencies -- Characteristics: Fastest, most granular - -### Priority Classification (P0-P3) - -**P0 (Critical - Every commit)**: - -- Critical user paths that must always work -- Security-critical functionality (auth, permissions) -- Data integrity scenarios -- Run in pre-commit hooks or PR checks - -**P1 (High - PR to main)**: - -- Important features with high user impact -- Integration points between systems -- Error handling for common failures -- Run before merging to main branch - -**P2 (Medium - Nightly)**: - -- Edge cases with moderate impact -- Less-critical feature variations -- Performance/load testing -- Run in nightly CI builds - -**P3 (Low - On-demand)**: - -- Nice-to-have validations -- Rarely-used features -- Exploratory testing scenarios -- Run manually or weekly - -**Priority tagging enables selective execution:** - -```bash -npm run test:e2e:p0 # Run only P0 tests (critical paths) -npm run test:e2e:p1 # Run P0 + P1 tests (pre-merge) -``` - -### Given-When-Then Test Structure - -All tests follow BDD format for clarity: - -```typescript -test('[P0] should login with valid credentials and load dashboard', async ({ page }) => { - // GIVEN: User is on login page - await page.goto('/login'); - - // WHEN: User submits valid credentials - await page.fill('[data-testid="email-input"]', 'user@example.com'); - await page.fill('[data-testid="password-input"]', 'Password123!'); - await page.click('[data-testid="login-button"]'); - - // THEN: User is redirected to dashboard - await expect(page).toHaveURL('/dashboard'); - await expect(page.locator('[data-testid="user-name"]')).toBeVisible(); -}); -``` - -### One Assertion Per Test (Atomic Design) - -Each test verifies exactly one behavior: - -```typescript -// βœ… CORRECT: One assertion -test('[P0] should display user name', async ({ page }) => { - await expect(page.locator('[data-testid="user-name"]')).toHaveText('John'); -}); - -// ❌ WRONG: Multiple assertions (not atomic) -test('[P0] should display user info', async ({ page }) => { - await expect(page.locator('[data-testid="user-name"]')).toHaveText('John'); - await expect(page.locator('[data-testid="user-email"]')).toHaveText('john@example.com'); -}); -``` - -**Why?** If second assertion fails, you don't know if first is still valid. Split into separate tests for clear failure diagnosis. - -### Network-First Testing Pattern - -**Critical pattern to prevent race conditions**: - -```typescript -test('should load user dashboard after login', async ({ page }) => { - // CRITICAL: Intercept routes BEFORE navigation - await page.route('**/api/user', (route) => - route.fulfill({ - status: 200, - body: JSON.stringify({ id: 1, name: 'Test User' }), - }), - ); - - // NOW navigate - await page.goto('/dashboard'); - - await expect(page.locator('[data-testid="user-name"]')).toHaveText('Test User'); -}); -``` - -Always set up route interception before navigating to pages that make network requests. - -### Fixture Architecture with Auto-Cleanup - -Playwright fixtures with automatic data cleanup: - -```typescript -// tests/support/fixtures/auth.fixture.ts -import { test as base } from '@playwright/test'; -import { createUser, deleteUser } from '../factories/user.factory'; - -export const test = base.extend({ - authenticatedUser: async ({ page }, use) => { - // Setup: Create and authenticate user - const user = await createUser(); - await page.goto('/login'); - await page.fill('[data-testid="email"]', user.email); - await page.fill('[data-testid="password"]', user.password); - await page.click('[data-testid="login-button"]'); - await page.waitForURL('/dashboard'); - - // Provide to test - await use(user); - - // Cleanup: Delete user automatically - await deleteUser(user.id); - }, -}); -``` - -**Fixture principles:** - -- Auto-cleanup (always delete created data in teardown) -- Composable (fixtures can use other fixtures) -- Isolated (each test gets fresh data) -- Type-safe with TypeScript - -### Data Factory Architecture - -Use faker for all test data generation: - -```typescript -// tests/support/factories/user.factory.ts -import { faker } from '@faker-js/faker'; - -export const createUser = (overrides = {}) => ({ - id: faker.number.int(), - email: faker.internet.email(), - password: faker.internet.password(), - name: faker.person.fullName(), - role: 'user', - createdAt: faker.date.recent().toISOString(), - ...overrides, -}); - -export const createUsers = (count: number) => Array.from({ length: count }, () => createUser()); - -// API helper for cleanup -export const deleteUser = async (userId: number) => { - await fetch(`/api/users/${userId}`, { method: 'DELETE' }); -}; -``` - -**Factory principles:** - -- Use faker for random data (no hardcoded values to prevent collisions) -- Support overrides for specific test scenarios -- Generate complete valid objects matching API contracts -- Include helper functions for bulk creation and cleanup - -### No Page Objects - -**Do NOT create page object classes.** Keep tests simple and direct: - -```typescript -// βœ… CORRECT: Direct test -test('should login', async ({ page }) => { - await page.goto('/login'); - await page.fill('[data-testid="email"]', 'user@example.com'); - await page.click('[data-testid="login-button"]'); - await expect(page).toHaveURL('/dashboard'); -}); - -// ❌ WRONG: Page object abstraction -class LoginPage { - async login(email, password) { ... } -} -``` - -Use fixtures for setup/teardown, not page objects for actions. - -### Deterministic Tests Only - -**No flaky patterns allowed:** - -```typescript -// ❌ WRONG: Hard wait -await page.waitForTimeout(2000); - -// βœ… CORRECT: Explicit wait -await page.waitForSelector('[data-testid="user-name"]'); -await expect(page.locator('[data-testid="user-name"]')).toBeVisible(); - -// ❌ WRONG: Conditional flow -if (await element.isVisible()) { - await element.click(); -} - -// βœ… CORRECT: Deterministic assertion -await expect(element).toBeVisible(); -await element.click(); - -// ❌ WRONG: Try-catch for test logic -try { - await element.click(); -} catch (e) { - // Test shouldn't catch errors -} - -// βœ… CORRECT: Let test fail if element not found -await element.click(); -``` - -## Integration with Other Workflows - -**Before this workflow:** - -- **framework** workflow: Establish test framework architecture (Playwright/Cypress config, directory structure) - REQUIRED -- **test-design** workflow: Optional for P0-P3 priority alignment and risk assessment context (BMad-Integrated mode only) -- **atdd** workflow: Optional - automate expands beyond ATDD tests with edge cases (BMad-Integrated mode only) - -**After this workflow:** - -- **trace** workflow: Update traceability matrix with new test coverage (Phase 1) and make quality gate decision (Phase 2) -- **CI pipeline**: Run tests in burn-in loop to detect flaky patterns - -**Coordinates with:** - -- **DEV agent**: Tests validate implementation correctness -- **Story workflow**: Tests cover acceptance criteria (BMad-Integrated mode only) - -## Important Notes - -### Works Out of Thin Air - -**automate does NOT require BMad artifacts:** - -- Can analyze any codebase independently -- User can point TEA at a feature: "automate tests for src/auth/" -- Works on non-BMad projects -- BMad artifacts (story, tech-spec, PRD) are OPTIONAL enhancements, not requirements - -**Similar to:** - -- **framework**: Can scaffold tests on any project -- **ci**: Can generate CI config without BMad context - -**Different from:** - -- **atdd**: REQUIRES story with acceptance criteria (halt if missing) -- **test-design**: REQUIRES PRD/epic context (halt if missing) -- **trace (Phase 2)**: REQUIRES test results for gate decision (halt if missing) - -### File Size Limits - -**Keep test files lean (under 300 lines):** - -- If file exceeds limit, split into multiple files by feature area -- Group related tests in describe blocks -- Extract common setup to fixtures - -### Quality Standards Enforced - -**Every test must:** - -- βœ… Use Given-When-Then format -- βœ… Have clear, descriptive name with priority tag -- βœ… One assertion per test (atomic) -- βœ… No hard waits or sleeps -- βœ… Use data-testid selectors (not CSS classes) -- βœ… Self-cleaning (fixtures with auto-cleanup) -- βœ… Deterministic (no flaky patterns) -- βœ… Fast (under 90 seconds) - -**Forbidden patterns:** - -- ❌ Hard waits: `await page.waitForTimeout(2000)` -- ❌ Conditional flow: `if (await element.isVisible()) { ... }` -- ❌ Try-catch for test logic -- ❌ Hardcoded test data (use factories with faker) -- ❌ Page objects -- ❌ Shared state between tests - -## Knowledge Base References - -This workflow automatically consults: - -- **test-levels-framework.md** - Test level selection (E2E vs API vs Component vs Unit) with characteristics and use cases -- **test-priorities.md** - Priority classification (P0-P3) with execution timing and risk alignment -- **fixture-architecture.md** - Test fixture patterns with setup/teardown and auto-cleanup using Playwright's test.extend() -- **data-factories.md** - Factory patterns using @faker-js/faker for random test data generation with overrides -- **selective-testing.md** - Targeted test execution strategies for CI optimization -- **ci-burn-in.md** - Flaky test detection patterns (10 iterations to catch intermittent failures) -- **test-quality.md** - Test design principles (Given-When-Then, determinism, isolation, atomic assertions) - -**Healing Knowledge (If `auto_heal_failures` enabled):** - -- **test-healing-patterns.md** - Common failure patterns and automated fixes (selectors, timing, data, network, hard waits) -- **selector-resilience.md** - Robust selector strategies and debugging (data-testid hierarchy, filter vs nth, anti-patterns) -- **timing-debugging.md** - Race condition identification and deterministic wait fixes (network-first, event-based waits) - -See `tea-index.csv` for complete knowledge fragment mapping (22 fragments total). - -## Example Output - -### BMad-Integrated Mode - -````markdown -# Automation Summary - User Authentication - -**Date:** 2025-10-14 -**Story:** Epic 3, Story 5 -**Coverage Target:** critical-paths - -## Tests Created - -### E2E Tests (2 tests, P0-P1) - -- `tests/e2e/user-authentication.spec.ts` (87 lines) - - [P0] Login with valid credentials β†’ Dashboard loads - - [P1] Display error for invalid credentials - -### API Tests (3 tests, P1-P2) - -- `tests/api/auth.api.spec.ts` (102 lines) - - [P1] POST /auth/login - valid credentials β†’ 200 + token - - [P1] POST /auth/login - invalid credentials β†’ 401 + error - - [P2] POST /auth/login - missing fields β†’ 400 + validation - -### Component Tests (2 tests, P1) - -- `tests/component/LoginForm.test.tsx` (45 lines) - - [P1] Empty fields β†’ submit button disabled - - [P1] Valid input β†’ submit button enabled - -## Infrastructure Created - -- Fixtures: `tests/support/fixtures/auth.fixture.ts` -- Factories: `tests/support/factories/user.factory.ts` - -## Test Execution - -```bash -npm run test:e2e # Run all tests -npm run test:e2e:p0 # Critical paths only -npm run test:e2e:p1 # P0 + P1 tests -``` -```` - -## Coverage Analysis - -**Total:** 7 tests (P0: 1, P1: 5, P2: 1) -**Levels:** E2E: 2, API: 3, Component: 2 - -βœ… All acceptance criteria covered -βœ… Happy path (E2E + API) -βœ… Error cases (API) -βœ… UI validation (Component) - -```` - -### Standalone Mode - -```markdown -# Automation Summary - src/auth/ - -**Date:** 2025-10-14 -**Target:** src/auth/ (standalone analysis) -**Coverage Target:** critical-paths - -## Feature Analysis - -**Source Files Analyzed:** -- `src/auth/login.ts` -- `src/auth/session.ts` -- `src/auth/validation.ts` - -**Existing Coverage:** 0 tests found - -**Coverage Gaps:** -- ❌ No E2E tests for login flow -- ❌ No API tests for /auth/login endpoint -- ❌ No unit tests for validateEmail() - -## Tests Created - -{Same structure as BMad-Integrated mode} - -## Recommendations - -1. **High Priority (P0-P1):** - - Add E2E test for password reset flow - - Add API tests for token refresh endpoint - -2. **Medium Priority (P2):** - - Add unit tests for session timeout logic -```` - -Ready to continue? diff --git a/bmad/bmm/workflows/testarch/ci/README.md b/bmad/bmm/workflows/testarch/ci/README.md deleted file mode 100644 index 91f2fb3b..00000000 --- a/bmad/bmm/workflows/testarch/ci/README.md +++ /dev/null @@ -1,493 +0,0 @@ -# CI/CD Pipeline Setup Workflow - -Scaffolds a production-ready CI/CD quality pipeline with test execution, burn-in loops for flaky test detection, parallel sharding, and artifact collection. This workflow creates platform-specific CI configuration optimized for fast feedback (< 45 min total) and reliable test execution with 20Γ— speedup over sequential runs. - -## Usage - -```bash -bmad tea *ci -``` - -The TEA agent runs this workflow when: - -- Test framework is configured and tests pass locally -- Team is ready to enable continuous integration -- Existing CI pipeline needs optimization or modernization -- Burn-in loop is needed for flaky test detection - -## Inputs - -**Required Context Files:** - -- **Framework config** (playwright.config.ts, cypress.config.ts): Determines test commands and configuration -- **package.json**: Dependencies and scripts for caching strategy -- **.nvmrc**: Node version for CI (optional, defaults to Node 20 LTS) - -**Optional Context Files:** - -- **Existing CI config**: To update rather than create new -- **.git/config**: For CI platform auto-detection - -**Workflow Variables:** - -- `ci_platform`: Auto-detected (github-actions/gitlab-ci/circle-ci) or explicit -- `test_framework`: Detected from framework config (playwright/cypress) -- `parallel_jobs`: Number of parallel shards (default: 4) -- `burn_in_enabled`: Enable burn-in loop (default: true) -- `burn_in_iterations`: Burn-in iterations (default: 10) -- `selective_testing_enabled`: Run only changed tests (default: true) -- `artifact_retention_days`: Artifact storage duration (default: 30) -- `cache_enabled`: Enable dependency caching (default: true) - -## Outputs - -**Primary Deliverables:** - -1. **CI Configuration File** - - `.github/workflows/test.yml` (GitHub Actions) - - `.gitlab-ci.yml` (GitLab CI) - - Platform-specific optimizations and best practices - -2. **Pipeline Stages** - - **Lint**: Code quality checks (<2 min) - - **Test**: Parallel execution with 4 shards (<10 min per shard) - - **Burn-In**: Flaky test detection with 10 iterations (<30 min) - - **Report**: Aggregate results and publish artifacts - -3. **Helper Scripts** - - `scripts/test-changed.sh`: Selective testing (run only affected tests) - - `scripts/ci-local.sh`: Local CI mirror for debugging - - `scripts/burn-in.sh`: Standalone burn-in execution - -4. **Documentation** - - `docs/ci.md`: Pipeline guide, debugging, secrets setup - - `docs/ci-secrets-checklist.md`: Required secrets and configuration - - Inline comments in CI configuration files - -5. **Optimization Features** - - Dependency caching (npm + browser binaries): 2-5 min savings - - Parallel sharding: 75% time reduction - - Retry logic: Handles transient failures (2 retries) - - Failure-only artifacts: Cost-effective debugging - -**Performance Targets:** - -- Lint: <2 minutes -- Test (per shard): <10 minutes -- Burn-in: <30 minutes -- **Total: <45 minutes** (20Γ— faster than sequential) - -**Validation Safeguards:** - -- βœ… Git repository initialized -- βœ… Local tests pass before CI setup -- βœ… Framework configuration exists -- βœ… CI platform accessible - -## Key Features - -### Burn-In Loop for Flaky Test Detection - -**Critical production pattern:** - -```yaml -burn-in: - runs-on: ubuntu-latest - steps: - - run: | - for i in {1..10}; do - echo "πŸ”₯ Burn-in iteration $i/10" - npm run test:e2e || exit 1 - done -``` - -**Purpose**: Runs tests 10 times to catch non-deterministic failures before they reach main branch. - -**When to run:** - -- On PRs to main/develop -- Weekly on cron schedule -- After test infrastructure changes - -**Failure threshold**: Even ONE failure β†’ tests are flaky, must fix before merging. - -### Parallel Sharding - -**Splits tests across 4 jobs:** - -```yaml -strategy: - matrix: - shard: [1, 2, 3, 4] -steps: - - run: npm run test:e2e -- --shard=${{ matrix.shard }}/4 -``` - -**Benefits:** - -- 75% time reduction (40 min β†’ 10 min per shard) -- Faster feedback on PRs -- Configurable shard count - -### Smart Caching - -**Node modules + browser binaries:** - -```yaml -- uses: actions/cache@v4 - with: - path: ~/.npm - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} -``` - -**Benefits:** - -- 2-5 min savings per run -- Consistent across builds -- Automatic invalidation on dependency changes - -### Selective Testing - -**Run only tests affected by code changes:** - -```bash -# scripts/test-changed.sh -CHANGED_FILES=$(git diff --name-only HEAD~1) -npm run test:e2e -- --grep="$AFFECTED_TESTS" -``` - -**Benefits:** - -- 50-80% time reduction for focused PRs -- Faster feedback cycle -- Full suite still runs on main branch - -### Failure-Only Artifacts - -**Upload debugging materials only on test failures:** - -- Traces (Playwright): 5-10 MB per test -- Screenshots: 100-500 KB each -- Videos: 2-5 MB per test -- HTML reports: 1-2 MB - -**Benefits:** - -- Reduces storage costs by 90% -- Maintains full debugging capability -- 30-day retention default - -### Local CI Mirror - -**Debug CI failures locally:** - -```bash -./scripts/ci-local.sh -# Runs: lint β†’ test β†’ burn-in (3 iterations) -``` - -**Mirrors CI environment:** - -- Same Node version -- Same commands -- Reduced burn-in (3 vs 10 for faster feedback) - -### Knowledge Base Integration - -Automatically consults TEA knowledge base: - -- `ci-burn-in.md` - Burn-in loop patterns and iterations -- `selective-testing.md` - Changed test detection strategies -- `visual-debugging.md` - Artifact collection best practices -- `test-quality.md` - CI-specific quality criteria - -## Integration with Other Workflows - -**Before ci:** - -- **framework**: Sets up test infrastructure and configuration -- **test-design** (optional): Plans test coverage strategy - -**After ci:** - -- **atdd**: Generate failing tests that run in CI -- **automate**: Expand test coverage that CI executes -- **trace (Phase 2)**: Use CI results for quality gate decisions - -**Coordinates with:** - -- **dev-story**: Tests run in CI after story implementation -- **retrospective**: CI metrics inform process improvements - -**Updates:** - -- `bmm-workflow-status.md`: Adds CI setup to Quality & Testing Progress section - -## Important Notes - -### CI Platform Auto-Detection - -**GitHub Actions** (default): - -- Auto-selected if `github.com` in git remote -- Free 2000 min/month for private repos -- Unlimited for public repos -- `.github/workflows/test.yml` - -**GitLab CI**: - -- Auto-selected if `gitlab.com` in git remote -- Free 400 min/month -- `.gitlab-ci.yml` - -**Circle CI** / **Jenkins**: - -- User must specify explicitly -- Templates provided for both - -### Burn-In Strategy - -**Iterations:** - -- **3**: Quick feedback (local development) -- **10**: Standard (PR checks) ← recommended -- **100**: High-confidence (release branches) - -**When to run:** - -- βœ… On PRs to main/develop -- βœ… Weekly scheduled (cron) -- βœ… After test infra changes -- ❌ Not on every commit (too slow) - -**Cost-benefit:** - -- 30 minutes of CI time β†’ Prevents hours of debugging flaky tests - -### Artifact Collection Strategy - -**Failure-only collection:** - -- Saves 90% storage costs -- Maintains debugging capability -- Automatic cleanup after retention period - -**What to collect:** - -- Traces: Full execution context (Playwright) -- Screenshots: Visual evidence -- Videos: Interaction playback -- HTML reports: Detailed results -- Console logs: Error messages - -**What NOT to collect:** - -- Passing test artifacts (waste of space) -- Large binaries -- Sensitive data (use secrets instead) - -### Selective Testing Trade-offs - -**Benefits:** - -- 50-80% time reduction for focused changes -- Faster feedback loop -- Lower CI costs - -**Risks:** - -- May miss integration issues -- Relies on accurate change detection -- False positives if detection is too aggressive - -**Mitigation:** - -- Always run full suite on merge to main -- Use burn-in loop on main branch -- Monitor for missed issues - -### Parallelism Configuration - -**4 shards** (default): - -- Optimal for 40-80 test files -- ~10 min per shard -- Balances speed vs resource usage - -**Adjust if:** - -- Tests complete in <5 min β†’ reduce shards -- Tests take >15 min β†’ increase shards -- CI limits concurrent jobs β†’ reduce shards - -**Formula:** - -``` -Total test time / Target shard time = Optimal shards -Example: 40 min / 10 min = 4 shards -``` - -### Retry Logic - -**2 retries** (default): - -- Handles transient network issues -- Mitigates race conditions -- Does NOT mask flaky tests (burn-in catches those) - -**When retries trigger:** - -- Network timeouts -- Service unavailability -- Resource constraints - -**When retries DON'T help:** - -- Assertion failures (logic errors) -- Flaky tests (non-deterministic) -- Configuration errors - -### Notification Setup (Optional) - -**Supported channels:** - -- Slack: Webhook integration -- Email: SMTP configuration -- Discord: Webhook integration - -**Configuration:** - -```yaml -notify_on_failure: true -notification_channels: 'slack' -# Requires SLACK_WEBHOOK secret in CI settings -``` - -**Best practice:** Enable for main/develop branches only, not PRs. - -## Validation Checklist - -After workflow completion, verify: - -- [ ] CI configuration file created and syntactically valid -- [ ] Burn-in loop configured (10 iterations) -- [ ] Parallel sharding enabled (4 jobs) -- [ ] Caching configured (dependencies + browsers) -- [ ] Artifact collection on failure only -- [ ] Helper scripts created and executable -- [ ] Documentation complete (ci.md, secrets checklist) -- [ ] No errors or warnings during scaffold -- [ ] First CI run triggered and passes - -Refer to `checklist.md` for comprehensive validation criteria. - -## Example Execution - -**Scenario 1: New GitHub Actions setup** - -```bash -bmad tea *ci - -# TEA detects: -# - GitHub repository (github.com in git remote) -# - Playwright framework -# - Node 20 from .nvmrc -# - 60 test files - -# TEA scaffolds: -# - .github/workflows/test.yml -# - 4-shard parallel execution -# - Burn-in loop (10 iterations) -# - Dependency + browser caching -# - Failure artifacts (traces, screenshots) -# - Helper scripts -# - Documentation - -# Result: -# Total CI time: 42 minutes (was 8 hours sequential) -# - Lint: 1.5 min -# - Test (4 shards): 9 min each -# - Burn-in: 28 min -``` - -**Scenario 2: Update existing GitLab CI** - -```bash -bmad tea *ci - -# TEA detects: -# - Existing .gitlab-ci.yml -# - Cypress framework -# - No caching configured - -# TEA asks: "Update existing CI or create new?" -# User: "Update" - -# TEA enhances: -# - Adds burn-in job -# - Configures caching (cache: paths) -# - Adds parallel: 4 -# - Updates artifact collection -# - Documents secrets needed - -# Result: -# CI time reduced from 45 min β†’ 12 min -``` - -**Scenario 3: Standalone burn-in setup** - -```bash -# User wants only burn-in, no full CI -bmad tea *ci -# Set burn_in_enabled: true, skip other stages - -# TEA creates: -# - Minimal workflow with burn-in only -# - scripts/burn-in.sh for local testing -# - Documentation for running burn-in - -# Use case: -# - Validate test stability before full CI setup -# - Debug intermittent failures -# - Confidence check before release -``` - -## Troubleshooting - -**Issue: "Git repository not found"** - -- **Cause**: No .git/ directory -- **Solution**: Run `git init` and `git remote add origin ` - -**Issue: "Tests fail locally but should set up CI anyway"** - -- **Cause**: Workflow halts if local tests fail -- **Solution**: Fix tests first, or temporarily skip preflight (not recommended) - -**Issue: "CI takes longer than 10 min per shard"** - -- **Cause**: Too many tests per shard -- **Solution**: Increase shard count (e.g., 4 β†’ 8) - -**Issue: "Burn-in passes locally but fails in CI"** - -- **Cause**: Environment differences (timing, resources) -- **Solution**: Use `scripts/ci-local.sh` to mirror CI environment - -**Issue: "Caching not working"** - -- **Cause**: Cache key mismatch or cache limit exceeded -- **Solution**: Check cache key formula, verify platform limits - -## Related Workflows - -- **framework**: Set up test infrastructure β†’ [framework/README.md](../framework/README.md) -- **atdd**: Generate acceptance tests β†’ [atdd/README.md](../atdd/README.md) -- **automate**: Expand test coverage β†’ [automate/README.md](../automate/README.md) -- **trace**: Traceability and quality gate decisions β†’ [trace/README.md](../trace/README.md) - -## Version History - -- **v4.0 (BMad v6)**: Pure markdown instructions, enhanced workflow.yaml, burn-in loop integration -- **v3.x**: XML format instructions, basic CI setup -- **v2.x**: Legacy task-based approach diff --git a/bmad/bmm/workflows/testarch/framework/README.md b/bmad/bmm/workflows/testarch/framework/README.md deleted file mode 100644 index 1b2d1145..00000000 --- a/bmad/bmm/workflows/testarch/framework/README.md +++ /dev/null @@ -1,340 +0,0 @@ -# Test Framework Setup Workflow - -Initializes a production-ready test framework architecture (Playwright or Cypress) with fixtures, helpers, configuration, and industry best practices. This workflow scaffolds the complete testing infrastructure for modern web applications, providing a robust foundation for test automation. - -## Usage - -```bash -bmad tea *framework -``` - -The TEA agent runs this workflow when: - -- Starting a new project that needs test infrastructure -- Migrating from an older testing approach -- Setting up testing from scratch -- Standardizing test architecture across teams - -## Inputs - -**Required Context Files:** - -- **package.json**: Project dependencies and scripts to detect project type and bundler - -**Optional Context Files:** - -- **Architecture docs** (architecture.md, tech-spec.md): Informs framework configuration decisions -- **Existing tests**: Detects current framework to avoid conflicts - -**Workflow Variables:** - -- `test_framework`: Auto-detected (playwright/cypress) or manually specified -- `project_type`: Auto-detected from package.json (react/vue/angular/next/node) -- `bundler`: Auto-detected from package.json (vite/webpack/rollup/esbuild) -- `test_dir`: Root test directory (default: `{project-root}/tests`) -- `use_typescript`: Prefer TypeScript configuration (default: true) -- `framework_preference`: Auto-detection or force specific framework (default: "auto") - -## Outputs - -**Primary Deliverables:** - -1. **Configuration File** - - `playwright.config.ts` or `cypress.config.ts` with production-ready settings - - Timeouts: action 15s, navigation 30s, test 60s - - Reporters: HTML + JUnit XML - - Failure-only artifacts (traces, screenshots, videos) - -2. **Directory Structure** - - ``` - tests/ - β”œβ”€β”€ e2e/ # Test files (organize as needed) - β”œβ”€β”€ support/ # Framework infrastructure (key pattern) - β”‚ β”œβ”€β”€ fixtures/ # Test fixtures with auto-cleanup - β”‚ β”‚ β”œβ”€β”€ index.ts # Fixture merging - β”‚ β”‚ └── factories/ # Data factories (faker-based) - β”‚ β”œβ”€β”€ helpers/ # Utility functions - β”‚ └── page-objects/ # Page object models (optional) - └── README.md # Setup and usage guide - ``` - - **Note**: Test organization (e2e/, api/, integration/, etc.) is flexible. The **support/** folder contains reusable fixtures, helpers, and factories - the core framework pattern. - -3. **Environment Configuration** - - `.env.example` with `TEST_ENV`, `BASE_URL`, `API_URL`, auth credentials - - `.nvmrc` with Node version (LTS) - -4. **Test Infrastructure** - - Fixture architecture using `mergeTests` pattern - - Data factories with auto-cleanup (faker-based) - - Sample tests demonstrating best practices - - Helper utilities for common operations - -5. **Documentation** - - `tests/README.md` with comprehensive setup instructions - - Inline comments explaining configuration choices - - References to TEA knowledge base - -**Secondary Deliverables:** - -- Updated `package.json` with minimal test script (`test:e2e`) -- Sample test demonstrating fixture usage -- Network-first testing patterns -- Selector strategy guidance (data-testid) - -**Validation Safeguards:** - -- βœ… No existing framework detected (prevents conflicts) -- βœ… package.json exists and is valid -- βœ… Framework auto-detection successful or explicit choice provided -- βœ… Sample test runs successfully -- βœ… All generated files are syntactically correct - -## Key Features - -### Smart Framework Selection - -- **Auto-detection logic** based on project characteristics: - - **Playwright** recommended for: Large repos (100+ files), performance-critical apps, multi-browser support, complex debugging needs - - **Cypress** recommended for: Small teams prioritizing DX, component testing focus, real-time test development -- Falls back to Playwright as default if uncertain - -### Production-Ready Patterns - -- **Fixture Architecture**: Pure function β†’ fixture β†’ `mergeTests` composition pattern -- **Auto-Cleanup**: Fixtures automatically clean up test data in teardown -- **Network-First**: Route interception before navigation to prevent race conditions -- **Failure-Only Artifacts**: Screenshots/videos/traces only captured on failure to reduce storage -- **Parallel Execution**: Configured for optimal CI performance - -### Industry Best Practices - -- **Selector Strategy**: Prescriptive guidance on `data-testid` attributes -- **Data Factories**: Faker-based factories for realistic test data -- **Contract Testing**: Recommends Pact for microservices architectures -- **Error Handling**: Comprehensive timeout and retry configuration -- **Reporting**: Multiple reporter formats (HTML, JUnit, console) - -### Knowledge Base Integration - -Automatically consults TEA knowledge base: - -- `fixture-architecture.md` - Pure function β†’ fixture β†’ mergeTests pattern -- `data-factories.md` - Faker-based factories with auto-cleanup -- `network-first.md` - Network interception before navigation -- `playwright-config.md` - Playwright-specific best practices -- `test-config.md` - General configuration guidelines - -## Integration with Other Workflows - -**Before framework:** - -- **prd** (Phase 2): Determines project scope and testing needs -- **workflow-status**: Verifies project readiness - -**After framework:** - -- **ci**: Scaffold CI/CD pipeline using framework configuration -- **test-design**: Plan test coverage strategy for the project -- **atdd**: Generate failing acceptance tests using the framework - -**Coordinates with:** - -- **architecture** (Phase 3): Aligns test structure with system architecture -- **tech-spec**: Uses technical specifications to inform test configuration - -**Updates:** - -- `bmm-workflow-status.md`: Adds framework initialization to Quality & Testing Progress section - -## Important Notes - -### Preflight Checks - -**Critical requirements** verified before scaffolding: - -- package.json exists in project root -- No modern E2E framework already configured -- Architecture/stack context available - -If any check fails, workflow **HALTS** and notifies user. - -### Framework-Specific Guidance - -**Playwright Advantages:** - -- Worker parallelism (significantly faster for large suites) -- Trace viewer (powerful debugging with screenshots, network, console logs) -- Multi-language support (TypeScript, JavaScript, Python, C#, Java) -- Built-in API testing capabilities -- Better handling of multiple browser contexts - -**Cypress Advantages:** - -- Superior developer experience (real-time reloading) -- Excellent for component testing -- Simpler setup for small teams -- Better suited for watch mode during development - -**Avoid Cypress when:** - -- API chains are heavy and complex -- Multi-tab/window scenarios are common -- Worker parallelism is critical for CI performance - -### Selector Strategy - -**Always recommend:** - -- `data-testid` attributes for UI elements (framework-agnostic) -- `data-cy` attributes if Cypress is chosen (Cypress-specific) -- Avoid brittle CSS selectors or XPath - -### Standalone Operation - -This workflow operates independently: - -- **No story required**: Can be run at project initialization -- **No epic context needed**: Works for greenfield and brownfield projects -- **Autonomous**: Auto-detects configuration and proceeds without user input - -### Output Summary Format - -After completion, provides structured summary: - -```markdown -## Framework Scaffold Complete - -**Framework Selected**: Playwright (or Cypress) - -**Artifacts Created**: - -- βœ… Configuration file: playwright.config.ts -- βœ… Directory structure: tests/e2e/, tests/support/ -- βœ… Environment config: .env.example -- βœ… Node version: .nvmrc -- βœ… Fixture architecture: tests/support/fixtures/ -- βœ… Data factories: tests/support/fixtures/factories/ -- βœ… Sample tests: tests/e2e/example.spec.ts -- βœ… Documentation: tests/README.md - -**Next Steps**: - -1. Copy .env.example to .env and fill in environment variables -2. Run npm install to install test dependencies -3. Run npm run test:e2e to execute sample tests -4. Review tests/README.md for detailed setup instructions - -**Knowledge Base References Applied**: - -- Fixture architecture pattern (pure functions + mergeTests) -- Data factories with auto-cleanup (faker-based) -- Network-first testing safeguards -- Failure-only artifact capture -``` - -## Validation Checklist - -After workflow completion, verify: - -- [ ] Configuration file created and syntactically valid -- [ ] Directory structure exists with all folders -- [ ] Environment configuration generated (.env.example, .nvmrc) -- [ ] Sample tests run successfully (npm run test:e2e) -- [ ] Documentation complete and accurate (tests/README.md) -- [ ] No errors or warnings during scaffold -- [ ] package.json scripts updated correctly -- [ ] Fixtures and factories follow patterns from knowledge base - -Refer to `checklist.md` for comprehensive validation criteria. - -## Example Execution - -**Scenario 1: New React + Vite project** - -```bash -# User runs framework workflow -bmad tea *framework - -# TEA detects: -# - React project (from package.json) -# - Vite bundler -# - No existing test framework -# - 150+ files (recommends Playwright) - -# TEA scaffolds: -# - playwright.config.ts with Vite detection -# - Component testing configuration -# - React Testing Library helpers -# - Sample component + E2E tests -``` - -**Scenario 2: Existing Node.js API project** - -```bash -# User runs framework workflow -bmad tea *framework - -# TEA detects: -# - Node.js backend (no frontend framework) -# - Express framework -# - Small project (50 files) -# - API endpoints in routes/ - -# TEA scaffolds: -# - playwright.config.ts focused on API testing -# - tests/api/ directory structure -# - API helper utilities -# - Sample API tests with auth -``` - -**Scenario 3: Cypress preferred (explicit)** - -```bash -# User sets framework preference -# (in workflow config: framework_preference: "cypress") - -bmad tea *framework - -# TEA scaffolds: -# - cypress.config.ts -# - tests/e2e/ with Cypress patterns -# - Cypress-specific commands -# - data-cy selector strategy -``` - -## Troubleshooting - -**Issue: "Existing test framework detected"** - -- **Cause**: playwright.config._ or cypress.config._ already exists -- **Solution**: Use `upgrade-framework` workflow (TBD) or manually remove existing config - -**Issue: "Cannot detect project type"** - -- **Cause**: package.json missing or malformed -- **Solution**: Ensure package.json exists and has valid dependencies - -**Issue: "Sample test fails to run"** - -- **Cause**: Missing dependencies or incorrect BASE_URL -- **Solution**: Run `npm install` and configure `.env` with correct URLs - -**Issue: "TypeScript compilation errors"** - -- **Cause**: Missing @types packages or tsconfig misconfiguration -- **Solution**: Ensure TypeScript and type definitions are installed - -## Related Workflows - -- **ci**: Scaffold CI/CD pipeline β†’ [ci/README.md](../ci/README.md) -- **test-design**: Plan test coverage β†’ [test-design/README.md](../test-design/README.md) -- **atdd**: Generate acceptance tests β†’ [atdd/README.md](../atdd/README.md) -- **automate**: Expand regression suite β†’ [automate/README.md](../automate/README.md) - -## Version History - -- **v4.0 (BMad v6)**: Pure markdown instructions, enhanced workflow.yaml, comprehensive README -- **v3.x**: XML format instructions -- **v2.x**: Legacy task-based approach diff --git a/bmad/bmm/workflows/testarch/nfr-assess/README.md b/bmad/bmm/workflows/testarch/nfr-assess/README.md deleted file mode 100644 index 26e10d0a..00000000 --- a/bmad/bmm/workflows/testarch/nfr-assess/README.md +++ /dev/null @@ -1,469 +0,0 @@ -# Non-Functional Requirements Assessment Workflow - -**Workflow ID:** `testarch-nfr` -**Agent:** Test Architect (TEA) -**Command:** `bmad tea *nfr-assess` - ---- - -## Overview - -The **nfr-assess** workflow performs a comprehensive assessment of non-functional requirements (NFRs) to validate that the implementation meets performance, security, reliability, and maintainability standards before release. It uses evidence-based validation with deterministic PASS/CONCERNS/FAIL rules and provides actionable recommendations for remediation. - -**Key Features:** - -- Assess multiple NFR categories (performance, security, reliability, maintainability, custom) -- Validate NFRs against defined thresholds from tech specs, PRD, or defaults -- Classify status deterministically (PASS/CONCERNS/FAIL) based on evidence -- Never guess thresholds - mark as CONCERNS if unknown -- Generate CI/CD-ready YAML snippets for quality gates -- Provide quick wins and recommended actions for remediation -- Create evidence checklists for gaps - ---- - -## When to Use This Workflow - -Use `*nfr-assess` when you need to: - -- βœ… Validate non-functional requirements before release -- βœ… Assess performance against defined thresholds -- βœ… Verify security requirements are met -- βœ… Validate reliability and error handling -- βœ… Check maintainability standards (coverage, quality, documentation) -- βœ… Generate NFR assessment reports for stakeholders -- βœ… Create gate-ready metrics for CI/CD pipelines - -**Typical Timing:** - -- Before release (validate all NFRs) -- Before PR merge (validate critical NFRs) -- During sprint retrospectives (assess maintainability) -- After performance testing (validate performance NFRs) -- After security audit (validate security NFRs) - ---- - -## Prerequisites - -**Required:** - -- Implementation deployed locally or accessible for evaluation -- Evidence sources available (test results, metrics, logs, CI results) - -**Recommended:** - -- NFR requirements defined in tech-spec.md, PRD.md, or story -- Test results from performance, security, reliability tests -- Application metrics (response times, error rates, throughput) -- CI/CD pipeline results for burn-in validation - -**Halt Conditions:** - -- NFR targets are undefined and cannot be obtained β†’ Halt and request definition -- Implementation is not accessible for evaluation β†’ Halt and request deployment - ---- - -## Usage - -### Basic Usage (BMad Mode) - -```bash -bmad tea *nfr-assess -``` - -The workflow will: - -1. Read tech-spec.md for NFR requirements -2. Gather evidence from test results, metrics, logs -3. Assess each NFR category against thresholds -4. Generate NFR assessment report -5. Save to `bmad/output/nfr-assessment.md` - -### Standalone Mode (No Tech Spec) - -```bash -bmad tea *nfr-assess --feature-name "User Authentication" -``` - -### Custom Configuration - -```bash -bmad tea *nfr-assess \ - --assess-performance true \ - --assess-security true \ - --assess-reliability true \ - --assess-maintainability true \ - --performance-response-time-ms 500 \ - --security-score-min 85 -``` - ---- - -## Workflow Steps - -1. **Load Context** - Read tech spec, PRD, knowledge base fragments -2. **Identify NFRs** - Determine categories and thresholds -3. **Gather Evidence** - Read test results, metrics, logs, CI results -4. **Assess NFRs** - Apply deterministic PASS/CONCERNS/FAIL rules -5. **Identify Actions** - Quick wins, recommended actions, monitoring hooks -6. **Generate Deliverables** - NFR assessment report, gate YAML, evidence checklist - ---- - -## Outputs - -### NFR Assessment Report (`nfr-assessment.md`) - -Comprehensive markdown file with: - -- Executive summary (overall status, critical issues) -- Assessment by category (performance, security, reliability, maintainability) -- Evidence for each NFR (test results, metrics, thresholds) -- Status classification (PASS/CONCERNS/FAIL) -- Quick wins section -- Recommended actions section -- Evidence gaps checklist - -### Gate YAML Snippet (Optional) - -```yaml -nfr_assessment: - date: '2025-10-14' - categories: - performance: 'PASS' - security: 'CONCERNS' - reliability: 'PASS' - maintainability: 'PASS' - overall_status: 'CONCERNS' - critical_issues: 0 - high_priority_issues: 1 - concerns: 1 - blockers: false -``` - -### Evidence Checklist (Optional) - -- List of NFRs with missing or incomplete evidence -- Owners for evidence collection -- Suggested evidence sources -- Deadlines for evidence collection - ---- - -## NFR Categories - -### Performance - -**Criteria:** Response time, throughput, resource usage, scalability -**Thresholds (Default):** - -- Response time p95: 500ms -- Throughput: 100 RPS -- CPU usage: < 70% -- Memory usage: < 80% - -**Evidence Sources:** Load test results, APM data, Lighthouse reports, Playwright traces - ---- - -### Security - -**Criteria:** Authentication, authorization, data protection, vulnerability management -**Thresholds (Default):** - -- Security score: >= 85/100 -- Critical vulnerabilities: 0 -- High vulnerabilities: < 3 -- MFA enabled - -**Evidence Sources:** SAST results, DAST results, dependency scanning, pentest reports - ---- - -### Reliability - -**Criteria:** Availability, error handling, fault tolerance, disaster recovery -**Thresholds (Default):** - -- Uptime: >= 99.9% -- Error rate: < 0.1% -- MTTR: < 15 minutes -- CI burn-in: 100 consecutive runs - -**Evidence Sources:** Uptime monitoring, error logs, CI burn-in results, chaos tests - ---- - -### Maintainability - -**Criteria:** Code quality, test coverage, documentation, technical debt -**Thresholds (Default):** - -- Test coverage: >= 80% -- Code quality: >= 85/100 -- Technical debt: < 5% -- Documentation: >= 90% - -**Evidence Sources:** Coverage reports, static analysis, documentation audit, test review - ---- - -## Assessment Rules - -### PASS βœ… - -- Evidence exists AND meets or exceeds threshold -- No concerns flagged in evidence -- Quality is acceptable - -### CONCERNS ⚠️ - -- Threshold is UNKNOWN (not defined) -- Evidence is MISSING or INCOMPLETE -- Evidence is close to threshold (within 10%) -- Evidence shows intermittent issues - -### FAIL ❌ - -- Evidence exists BUT does not meet threshold -- Critical evidence is MISSING -- Evidence shows consistent failures -- Quality is unacceptable - ---- - -## Configuration - -### workflow.yaml Variables - -```yaml -variables: - # NFR categories to assess - assess_performance: true - assess_security: true - assess_reliability: true - assess_maintainability: true - - # Custom NFR categories - custom_nfr_categories: '' # e.g., "accessibility,compliance" - - # Evidence sources - test_results_dir: '{project-root}/test-results' - metrics_dir: '{project-root}/metrics' - logs_dir: '{project-root}/logs' - include_ci_results: true - - # Thresholds - performance_response_time_ms: 500 - performance_throughput_rps: 100 - security_score_min: 85 - reliability_uptime_pct: 99.9 - maintainability_coverage_pct: 80 - - # Assessment configuration - use_deterministic_rules: true - never_guess_thresholds: true - require_evidence: true - suggest_monitoring: true - - # Output configuration - output_file: '{output_folder}/nfr-assessment.md' - generate_gate_yaml: true - generate_evidence_checklist: true -``` - ---- - -## Knowledge Base Integration - -This workflow automatically loads relevant knowledge fragments: - -- `nfr-criteria.md` - Non-functional requirements criteria -- `ci-burn-in.md` - CI/CD burn-in patterns for reliability -- `test-quality.md` - Test quality expectations (maintainability) -- `playwright-config.md` - Performance configuration patterns - ---- - -## Examples - -### Example 1: Full NFR Assessment Before Release - -```bash -bmad tea *nfr-assess -``` - -**Output:** - -```markdown -# NFR Assessment - Story 1.3 - -**Overall Status:** PASS βœ… (No blockers) - -## Performance Assessment - -- Response Time p95: PASS βœ… (320ms < 500ms threshold) -- Throughput: PASS βœ… (250 RPS > 100 RPS threshold) - -## Security Assessment - -- Authentication: PASS βœ… (MFA enforced) -- Data Protection: PASS βœ… (AES-256 + TLS 1.3) - -## Reliability Assessment - -- Uptime: PASS βœ… (99.95% > 99.9% threshold) -- Error Rate: PASS βœ… (0.05% < 0.1% threshold) - -## Maintainability Assessment - -- Test Coverage: PASS βœ… (87% > 80% threshold) -- Code Quality: PASS βœ… (92/100 > 85/100 threshold) - -Gate Status: PASS βœ… - Ready for release -``` - -### Example 2: NFR Assessment with Concerns - -```bash -bmad tea *nfr-assess --feature-name "User Authentication" -``` - -**Output:** - -```markdown -# NFR Assessment - User Authentication - -**Overall Status:** CONCERNS ⚠️ (1 HIGH issue) - -## Security Assessment - -### Authentication Strength - -- **Status:** CONCERNS ⚠️ -- **Threshold:** MFA enabled for all users -- **Actual:** MFA optional (not enforced) -- **Evidence:** Security audit (security-audit-2025-10-14.md) -- **Recommendation:** HIGH - Enforce MFA for all new accounts - -## Quick Wins - -1. **Enforce MFA (Security)** - HIGH - 4 hours - - Add configuration flag to enforce MFA - - No code changes needed - -Gate Status: CONCERNS ⚠️ - Address HIGH priority issues before release -``` - -### Example 3: Performance-Only Assessment - -```bash -bmad tea *nfr-assess \ - --assess-performance true \ - --assess-security false \ - --assess-reliability false \ - --assess-maintainability false -``` - ---- - -## Troubleshooting - -### "NFR thresholds not defined" - -- Check tech-spec.md for NFR requirements -- Check PRD.md for product-level SLAs -- Check story file for feature-specific requirements -- If thresholds truly unknown, mark as CONCERNS and recommend defining them - -### "No evidence found" - -- Check evidence directories (test-results, metrics, logs) -- Check CI/CD pipeline for test results -- If evidence truly missing, mark NFR as "NO EVIDENCE" and recommend generating it - -### "CONCERNS status but no threshold exceeded" - -- CONCERNS is correct when threshold is UNKNOWN or evidence is MISSING/INCOMPLETE -- CONCERNS is also correct when evidence is close to threshold (within 10%) -- Document why CONCERNS was assigned in assessment report - -### "FAIL status blocks release" - -- This is intentional - FAIL means critical NFR not met -- Recommend remediation actions with specific steps -- Re-run assessment after remediation - ---- - -## Integration with Other Workflows - -- **testarch-test-design** β†’ `*nfr-assess` - Define NFR requirements, then assess -- **testarch-framework** β†’ `*nfr-assess` - Set up frameworks, then validate NFRs -- **testarch-ci** β†’ `*nfr-assess` - Configure CI, then assess reliability with burn-in -- `*nfr-assess` β†’ **testarch-trace (Phase 2)** - Assess NFRs, then apply quality gates -- `*nfr-assess` β†’ **testarch-test-review** - Assess maintainability, then review tests - ---- - -## Best Practices - -1. **Never Guess Thresholds** - - If threshold is unknown, mark as CONCERNS - - Recommend defining threshold in tech-spec.md - - Don't infer thresholds from similar features - -2. **Evidence-Based Assessment** - - Every assessment must be backed by evidence - - Mark NFRs without evidence as "NO EVIDENCE" - - Don't assume or infer - require explicit evidence - -3. **Deterministic Rules** - - Apply PASS/CONCERNS/FAIL consistently - - Document reasoning for each classification - - Use same rules across all NFR categories - -4. **Actionable Recommendations** - - Provide specific steps, not generic advice - - Include priority, effort estimate, owner suggestion - - Focus on quick wins first - -5. **Gate Integration** - - Enable `generate_gate_yaml` for CI/CD integration - - Use YAML snippets in pipeline quality gates - - Export metrics for dashboard visualization - ---- - -## Quality Gates - -| Status | Criteria | Action | -| ----------- | ---------------------------- | --------------------------- | -| PASS βœ… | All NFRs have PASS status | Ready for release | -| CONCERNS ⚠️ | Any NFR has CONCERNS status | Address before next release | -| FAIL ❌ | Critical NFR has FAIL status | Do not release - BLOCKER | - ---- - -## Related Commands - -- `bmad tea *test-design` - Define NFR requirements and test plan -- `bmad tea *framework` - Set up performance/security testing frameworks -- `bmad tea *ci` - Configure CI/CD for NFR validation -- `bmad tea *trace` (Phase 2) - Apply quality gates using NFR assessment metrics -- `bmad tea *test-review` - Review test quality (maintainability NFR) - ---- - -## Resources - -- [Instructions](./instructions.md) - Detailed workflow steps -- [Checklist](./checklist.md) - Validation checklist -- [Template](./nfr-report-template.md) - NFR assessment report template -- [Knowledge Base](../../testarch/knowledge/) - NFR criteria and best practices - ---- - - diff --git a/bmad/bmm/workflows/testarch/test-design/README.md b/bmad/bmm/workflows/testarch/test-design/README.md deleted file mode 100644 index 0389580a..00000000 --- a/bmad/bmm/workflows/testarch/test-design/README.md +++ /dev/null @@ -1,493 +0,0 @@ -# Test Design and Risk Assessment Workflow - -Plans comprehensive test coverage strategy with risk assessment (probability Γ— impact scoring), priority classification (P0-P3), and resource estimation. This workflow generates a test design document that identifies high-risk areas, maps requirements to appropriate test levels, and provides execution ordering for optimal feedback. - -## Usage - -```bash -bmad tea *test-design -``` - -The TEA agent runs this workflow when: - -- Planning test coverage before development starts -- Assessing risks for an epic or story -- Prioritizing test scenarios by business impact -- Estimating testing effort and resources - -## Inputs - -**Required Context Files:** - -- **Story markdown**: Acceptance criteria and requirements -- **PRD or epics.md**: High-level product context -- **Architecture docs** (optional): Technical constraints and integration points - -**Workflow Variables:** - -- `epic_num`: Epic number for scoped design -- `story_path`: Specific story for design (optional) -- `design_level`: full/targeted/minimal (default: full) -- `risk_threshold`: Score for high-priority flag (default: 6) -- `risk_categories`: TECH,SEC,PERF,DATA,BUS,OPS (all enabled) -- `priority_levels`: P0,P1,P2,P3 (all enabled) - -## Outputs - -**Primary Deliverable:** - -**Test Design Document** (`test-design-epic-{N}.md`): - -1. **Risk Assessment Matrix** - - Risk ID, category, description - - Probability (1-3) Γ— Impact (1-3) = Score - - Scores β‰₯6 flagged as high-priority - - Mitigation plans with owners and timelines - -2. **Coverage Matrix** - - Requirement β†’ Test Level (E2E/API/Component/Unit) - - Priority assignment (P0-P3) - - Risk linkage - - Test count estimates - -3. **Execution Order** - - Smoke tests (P0 subset, <5 min) - - P0 tests (critical paths, <10 min) - - P1 tests (important features, <30 min) - - P2/P3 tests (full regression, <60 min) - -4. **Resource Estimates** - - Hours per priority level - - Total effort in days - - Tooling and data prerequisites - -5. **Quality Gate Criteria** - - P0 pass rate: 100% - - P1 pass rate: β‰₯95% - - High-risk mitigations: 100% - - Coverage target: β‰₯80% - -## Key Features - -### Risk Scoring Framework - -**Probability Γ— Impact = Risk Score** - -**Probability** (1-3): - -- 1 (Unlikely): <10% chance -- 2 (Possible): 10-50% chance -- 3 (Likely): >50% chance - -**Impact** (1-3): - -- 1 (Minor): Cosmetic, workaround exists -- 2 (Degraded): Feature impaired, difficult workaround -- 3 (Critical): System failure, no workaround - -**Scores**: - -- 1-2: Low risk (monitor) -- 3-4: Medium risk (plan mitigation) -- **6-9: High risk** (immediate mitigation required) - -### Risk Categories (6 types) - -**TECH** (Technical/Architecture): - -- Architecture flaws, integration failures -- Scalability issues, technical debt - -**SEC** (Security): - -- Missing access controls, auth bypass -- Data exposure, injection vulnerabilities - -**PERF** (Performance): - -- SLA violations, response time degradation -- Resource exhaustion, scalability limits - -**DATA** (Data Integrity): - -- Data loss/corruption, inconsistent state -- Migration failures - -**BUS** (Business Impact): - -- UX degradation, business logic errors -- Revenue impact, compliance violations - -**OPS** (Operations): - -- Deployment failures, configuration errors -- Monitoring gaps, rollback issues - -### Priority Classification (P0-P3) - -**P0 (Critical)** - Run on every commit: - -- Blocks core user journey -- High-risk (score β‰₯6) -- Revenue-impacting or security-critical - -**P1 (High)** - Run on PR to main: - -- Important user features -- Medium-risk (score 3-4) -- Common workflows - -**P2 (Medium)** - Run nightly/weekly: - -- Secondary features -- Low-risk (score 1-2) -- Edge cases - -**P3 (Low)** - Run on-demand: - -- Nice-to-have, exploratory -- Performance benchmarks - -### Test Level Selection - -**E2E (End-to-End)**: - -- Critical user journeys -- Multi-system integration -- Highest confidence, slowest - -**API (Integration)**: - -- Service contracts -- Business logic validation -- Fast feedback, stable - -**Component**: - -- UI component behavior -- Visual regression -- Fast, isolated - -**Unit**: - -- Business logic, edge cases -- Error handling -- Fastest, most granular - -**Key principle**: Avoid duplicate coverage - don't test same behavior at multiple levels. - -### Exploratory Mode (NEW - Phase 2.5) - -**test-design** supports UI exploration for brownfield applications with missing documentation. - -**Activation**: Automatic when requirements missing/incomplete for brownfield apps - -- If config.tea_use_mcp_enhancements is true + MCP available β†’ MCP-assisted exploration -- Otherwise β†’ Manual exploration with user documentation - -**When to Use Exploratory Mode:** - -- βœ… Brownfield projects with missing documentation -- βœ… Legacy systems lacking requirements -- βœ… Undocumented features needing test coverage -- βœ… Unknown user journeys requiring discovery -- ❌ NOT for greenfield projects with clear requirements - -**Exploration Modes:** - -1. **MCP-Assisted Exploration** (if Playwright MCP available): - - Interactive browser exploration using MCP tools - - `planner_setup_page` - Initialize browser - - `browser_navigate` - Explore pages - - `browser_click` - Interact with UI elements - - `browser_hover` - Reveal hidden menus - - `browser_snapshot` - Capture state at each step - - `browser_screenshot` - Document visually - - `browser_console_messages` - Find JavaScript errors - - `browser_network_requests` - Identify API endpoints - -2. **Manual Exploration** (fallback without MCP): - - User explores application manually - - Documents findings in markdown: - - Pages/features discovered - - User journeys identified - - API endpoints observed (DevTools Network) - - JavaScript errors noted (DevTools Console) - - Critical workflows mapped - - Provides exploration findings to workflow - -**Exploration Workflow:** - -``` -1. Enable exploratory_mode and set exploration_url -2. IF MCP available: - - Use planner_setup_page to init browser - - Explore UI with browser_* tools - - Capture snapshots and screenshots - - Monitor console and network - - Document discoveries -3. IF MCP unavailable: - - Notify user to explore manually - - Wait for exploration findings -4. Convert discoveries to testable requirements -5. Continue with standard risk assessment (Step 2) -``` - -**Example Output from Exploratory Mode:** - -```markdown -## Exploration Findings - Legacy Admin Panel - -**Exploration URL**: https://admin.example.com -**Mode**: MCP-Assisted - -### Discovered Features: - -1. User Management (/admin/users) - - List users (table with 10 columns) - - Edit user (modal form) - - Delete user (confirmation dialog) - - Export to CSV (download button) - -2. Reporting Dashboard (/admin/reports) - - Date range picker - - Filter by department - - Generate PDF report - - Email report to stakeholders - -3. API Endpoints Discovered: - - GET /api/admin/users - - PUT /api/admin/users/:id - - DELETE /api/admin/users/:id - - POST /api/reports/generate - -### User Journeys Mapped: - -1. Admin deletes inactive user - - Navigate to /admin/users - - Click delete icon - - Confirm in modal - - User removed from table - -2. Admin generates monthly report - - Navigate to /admin/reports - - Select date range (last month) - - Click generate - - Download PDF - -### Risks Identified (from exploration): - -- R-001 (SEC): No RBAC check observed (any admin can delete any user) -- R-002 (DATA): No confirmation on bulk delete -- R-003 (PERF): User table loads slowly (5s for 1000 rows) - -**Next**: Proceed to risk assessment with discovered requirements -``` - -**Graceful Degradation:** - -- Exploratory mode is OPTIONAL (default: disabled) -- Works without Playwright MCP (manual fallback) -- If exploration fails, can disable mode and provide requirements documentation -- Seamlessly transitions to standard risk assessment workflow - -### Knowledge Base Integration - -Automatically consults TEA knowledge base: - -- `risk-governance.md` - Risk classification framework -- `probability-impact.md` - Risk scoring methodology -- `test-levels-framework.md` - Test level selection -- `test-priorities-matrix.md` - P0-P3 prioritization - -## Integration with Other Workflows - -**Before test-design:** - -- **prd** (Phase 2): Creates PRD and epics -- **architecture** (Phase 3): Defines technical approach -- **tech-spec** (Phase 3): Implementation details - -**After test-design:** - -- **atdd**: Generate failing tests for P0 scenarios -- **automate**: Expand coverage for P1/P2 scenarios -- **trace (Phase 2)**: Use quality gate criteria for release decisions - -**Coordinates with:** - -- **framework**: Test infrastructure must exist -- **ci**: Execution order maps to CI stages - -**Updates:** - -- `bmm-workflow-status.md`: Adds test design to Quality & Testing Progress - -## Important Notes - -### Evidence-Based Assessment - -**Critical principle**: Base risk assessment on **evidence**, not speculation. - -**Evidence sources:** - -- PRD and user research -- Architecture documentation -- Historical bug data -- User feedback -- Security audit results - -**When uncertain**: Document assumptions, request user clarification. - -**Avoid**: - -- Guessing business impact -- Assuming user behavior -- Inventing requirements - -### Resource Estimation Formula - -``` -P0: 2 hours per test (setup + complex scenarios) -P1: 1 hour per test (standard coverage) -P2: 0.5 hours per test (simple scenarios) -P3: 0.25 hours per test (exploratory) - -Total Days = Total Hours / 8 -``` - -Example: - -- 15 P0 Γ— 2h = 30h -- 25 P1 Γ— 1h = 25h -- 40 P2 Γ— 0.5h = 20h -- **Total: 75 hours (~10 days)** - -### Execution Order Strategy - -**Smoke tests** (subset of P0, <5 min): - -- Login successful -- Dashboard loads -- Core API responds - -**Purpose**: Fast feedback, catch build-breaking issues immediately. - -**P0 tests** (critical paths, <10 min): - -- All scenarios blocking user journeys -- Security-critical flows - -**P1 tests** (important features, <30 min): - -- Common workflows -- Medium-risk areas - -**P2/P3 tests** (full regression, <60 min): - -- Edge cases -- Performance benchmarks - -### Quality Gate Criteria - -**Pass/Fail thresholds:** - -- P0: 100% pass (no exceptions) -- P1: β‰₯95% pass (2-3 failures acceptable with waivers) -- P2/P3: β‰₯90% pass (informational) -- High-risk items: All mitigated or have approved waivers - -**Coverage targets:** - -- Critical paths: β‰₯80% -- Security scenarios: 100% -- Business logic: β‰₯70% - -## Validation Checklist - -After workflow completion: - -- [ ] Risk assessment complete (all categories) -- [ ] Risks scored (probability Γ— impact) -- [ ] High-priority risks (β‰₯6) flagged -- [ ] Coverage matrix maps requirements to test levels -- [ ] Priorities assigned (P0-P3) -- [ ] Execution order defined -- [ ] Resource estimates provided -- [ ] Quality gate criteria defined -- [ ] Output file created - -Refer to `checklist.md` for comprehensive validation. - -## Example Execution - -**Scenario: E-commerce checkout epic** - -```bash -bmad tea *test-design -# Epic 3: Checkout flow redesign - -# Risk Assessment identifies: -- R-001 (SEC): Payment bypass, P=2 Γ— I=3 = 6 (HIGH) -- R-002 (PERF): Cart load time, P=3 Γ— I=2 = 6 (HIGH) -- R-003 (BUS): Order confirmation email, P=2 Γ— I=2 = 4 (MEDIUM) - -# Coverage Plan: -P0 scenarios: 12 tests (payment security, order creation) -P1 scenarios: 18 tests (cart management, promo codes) -P2 scenarios: 25 tests (edge cases, error handling) - -Total effort: 65 hours (~8 days) - -# Test Levels: -- E2E: 8 tests (critical checkout path) -- API: 30 tests (business logic, payment processing) -- Unit: 17 tests (calculations, validations) - -# Execution Order: -1. Smoke: Payment successful, order created (2 min) -2. P0: All payment & security flows (8 min) -3. P1: Cart & promo codes (20 min) -4. P2: Edge cases (40 min) - -# Quality Gates: -- P0 pass rate: 100% -- P1 pass rate: β‰₯95% -- R-001 mitigated: Add payment validation layer -- R-002 mitigated: Implement cart caching -``` - -## Troubleshooting - -**Issue: "Unable to score risks - missing context"** - -- **Cause**: Insufficient documentation -- **Solution**: Request PRD, architecture docs, or user clarification - -**Issue: "All tests marked as P0"** - -- **Cause**: Over-prioritization -- **Solution**: Apply strict P0 criteria (blocks core journey + high risk + no workaround) - -**Issue: "Duplicate coverage at multiple test levels"** - -- **Cause**: Not following test pyramid -- **Solution**: Use E2E for critical paths only, API for logic, unit for edge cases - -**Issue: "Resource estimates too high"** - -- **Cause**: Complex test setup or insufficient automation -- **Solution**: Invest in fixtures/factories upfront, reduce per-test setup time - -## Related Workflows - -- **atdd**: Generate failing tests β†’ [atdd/README.md](../atdd/README.md) -- **automate**: Expand regression coverage β†’ [automate/README.md](../automate/README.md) -- **trace**: Traceability and quality gate decisions β†’ [trace/README.md](../trace/README.md) -- **framework**: Test infrastructure β†’ [framework/README.md](../framework/README.md) - -## Version History - -- **v4.0 (BMad v6)**: Pure markdown instructions, risk scoring framework, template-based output -- **v3.x**: XML format instructions -- **v2.x**: Legacy task-based approach diff --git a/bmad/bmm/workflows/testarch/test-review/README.md b/bmad/bmm/workflows/testarch/test-review/README.md deleted file mode 100644 index 7ef797bb..00000000 --- a/bmad/bmm/workflows/testarch/test-review/README.md +++ /dev/null @@ -1,775 +0,0 @@ -# Test Quality Review Workflow - -The Test Quality Review workflow performs comprehensive quality validation of test code using TEA's knowledge base of best practices. It detects flaky patterns, validates structure, and provides actionable feedback to improve test maintainability and reliability. - -## Overview - -This workflow reviews test quality against proven patterns from TEA's knowledge base including fixture architecture, network-first safeguards, data factories, determinism, isolation, and flakiness prevention. It generates a quality score (0-100) with detailed feedback on violations and recommendations. - -**Key Features:** - -- **Knowledge-Based Review**: Applies patterns from 19+ knowledge fragments in tea-index.csv -- **Quality Scoring**: 0-100 score with letter grade (A+ to F) based on violations -- **Multi-Scope Review**: Single file, directory, or entire test suite -- **Pattern Detection**: Identifies hard waits, race conditions, shared state, conditionals -- **Best Practice Validation**: BDD format, test IDs, priorities, assertions, test length -- **Actionable Feedback**: Critical issues (must fix) vs recommendations (should fix) -- **Code Examples**: Every issue includes recommended fix with code snippets -- **Integration**: Works with story files, test-design, acceptance criteria context - ---- - -## Usage - -```bash -bmad tea *test-review -``` - -The TEA agent runs this workflow when: - -- After `*atdd` workflow β†’ validate generated acceptance tests -- After `*automate` workflow β†’ ensure regression suite quality -- After developer writes tests β†’ provide quality feedback -- Before `*gate` workflow β†’ confirm test quality before release -- User explicitly requests review: `bmad tea *test-review` -- Periodic quality audits of existing test suite - -**Typical workflow sequence:** - -1. `*atdd` β†’ Generate failing acceptance tests -2. **`*test-review`** β†’ Validate test quality ⬅️ YOU ARE HERE (option 1) -3. `*dev story` β†’ Implement feature with tests passing -4. **`*test-review`** β†’ Review implementation tests ⬅️ YOU ARE HERE (option 2) -5. `*automate` β†’ Expand regression suite -6. **`*test-review`** β†’ Validate new regression tests ⬅️ YOU ARE HERE (option 3) -7. `*gate` β†’ Final quality gate decision - ---- - -## Inputs - -### Required Context Files - -- **Test File(s)**: One or more test files to review (auto-discovered or explicitly provided) -- **Test Framework Config**: playwright.config.ts, jest.config.js, etc. (for context) - -### Recommended Context Files - -- **Story File**: Acceptance criteria for context (e.g., `story-1.3.md`) -- **Test Design**: Priority context (P0/P1/P2/P3) from test-design.md -- **Knowledge Base**: tea-index.csv with best practice fragments (required for thorough review) - -### Workflow Variables - -Key variables that control review behavior (configured in `workflow.yaml`): - -- **review_scope**: `single` | `directory` | `suite` (default: `single`) - - `single`: Review one test file - - `directory`: Review all tests in a directory - - `suite`: Review entire test suite - -- **quality_score_enabled**: Enable 0-100 quality scoring (default: `true`) -- **append_to_file**: Add inline comments to test files (default: `false`) -- **check_against_knowledge**: Use tea-index.csv fragments (default: `true`) -- **strict_mode**: Fail on any violation vs advisory only (default: `false`) - -**Quality Criteria Flags** (all default to `true`): - -- `check_given_when_then`: BDD format validation -- `check_test_ids`: Test ID conventions -- `check_priority_markers`: P0/P1/P2/P3 classification -- `check_hard_waits`: Detect sleep(), wait(X) -- `check_determinism`: No conditionals/try-catch abuse -- `check_isolation`: Tests clean up, no shared state -- `check_fixture_patterns`: Pure function β†’ Fixture β†’ mergeTests -- `check_data_factories`: Factory usage vs hardcoded data -- `check_network_first`: Route intercept before navigate -- `check_assertions`: Explicit assertions present -- `check_test_length`: Warn if >300 lines -- `check_test_duration`: Warn if >1.5 min -- `check_flakiness_patterns`: Common flaky patterns - ---- - -## Outputs - -### Primary Deliverable - -**Test Quality Review Report** (`test-review-{filename}.md`): - -- **Executive Summary**: Overall assessment, key strengths/weaknesses, recommendation -- **Quality Score**: 0-100 score with letter grade (A+ to F) -- **Quality Criteria Assessment**: Table with all criteria evaluated (PASS/WARN/FAIL) -- **Critical Issues**: P0/P1 violations that must be fixed -- **Recommendations**: P2/P3 violations that should be fixed -- **Best Practices Examples**: Good patterns found in tests -- **Knowledge Base References**: Links to detailed guidance - -Each issue includes: - -- Code location (file:line) -- Explanation of problem -- Recommended fix with code example -- Knowledge base fragment reference - -### Secondary Outputs - -- **Inline Comments**: TODO comments in test files at violation locations (if enabled) -- **Quality Badge**: Badge with score (e.g., "Test Quality: 87/100 (A)") -- **Story Update**: Test quality section appended to story file (if enabled) - -### Validation Safeguards - -- βœ… All knowledge base fragments loaded successfully -- βœ… Test files parsed and structure analyzed -- βœ… All enabled quality criteria evaluated -- βœ… Violations categorized by severity (P0/P1/P2/P3) -- βœ… Quality score calculated with breakdown -- βœ… Actionable feedback with code examples provided - ---- - -## Quality Criteria Explained - -### 1. BDD Format (Given-When-Then) - -**PASS**: Tests use clear Given-When-Then structure - -```typescript -// Given: User is logged in -const user = await createTestUser(); -await loginPage.login(user.email, user.password); - -// When: User navigates to dashboard -await page.goto('/dashboard'); - -// Then: User sees welcome message -await expect(page.locator('[data-testid="welcome"]')).toContainText(user.name); -``` - -**FAIL**: Tests lack structure, hard to understand intent - -```typescript -await page.goto('/dashboard'); -await page.click('.button'); -await expect(page.locator('.text')).toBeVisible(); -``` - -**Knowledge**: test-quality.md, tdd-cycles.md - ---- - -### 2. Test IDs - -**PASS**: All tests have IDs following convention - -```typescript -test.describe('1.3-E2E-001: User Login Flow', () => { - test('should log in successfully with valid credentials', async ({ page }) => { - // Test implementation - }); -}); -``` - -**FAIL**: No test IDs, can't trace to requirements - -```typescript -test.describe('Login', () => { - test('login works', async ({ page }) => { - // Test implementation - }); -}); -``` - -**Knowledge**: traceability.md, test-quality.md - ---- - -### 3. Priority Markers - -**PASS**: Tests classified as P0/P1/P2/P3 - -```typescript -test.describe('P0: Critical User Journey - Checkout', () => { - // Critical tests -}); - -test.describe('P2: Edge Case - International Addresses', () => { - // Nice-to-have tests -}); -``` - -**Knowledge**: test-priorities.md, risk-governance.md - ---- - -### 4. No Hard Waits - -**PASS**: No sleep(), wait(), hardcoded delays - -```typescript -// βœ… Good: Explicit wait for condition -await expect(page.locator('[data-testid="user-menu"]')).toBeVisible({ timeout: 10000 }); -``` - -**FAIL**: Hard waits introduce flakiness - -```typescript -// ❌ Bad: Hard wait -await page.waitForTimeout(2000); -await expect(page.locator('[data-testid="user-menu"]')).toBeVisible(); -``` - -**Knowledge**: test-quality.md, network-first.md - ---- - -### 5. Determinism - -**PASS**: Tests work deterministically, no conditionals - -```typescript -// βœ… Good: Deterministic test -await expect(page.locator('[data-testid="status"]')).toHaveText('Active'); -``` - -**FAIL**: Conditionals make tests unpredictable - -```typescript -// ❌ Bad: Conditional logic -const status = await page.locator('[data-testid="status"]').textContent(); -if (status === 'Active') { - await page.click('[data-testid="deactivate"]'); -} else { - await page.click('[data-testid="activate"]'); -} -``` - -**Knowledge**: test-quality.md, data-factories.md - ---- - -### 6. Isolation - -**PASS**: Tests clean up, no shared state - -```typescript -test.afterEach(async ({ page, testUser }) => { - // Cleanup: Delete test user - await api.deleteUser(testUser.id); -}); -``` - -**FAIL**: Shared state, tests depend on order - -```typescript -// ❌ Bad: Shared global variable -let userId: string; - -test('create user', async () => { - userId = await createUser(); // Sets global -}); - -test('update user', async () => { - await updateUser(userId); // Depends on previous test -}); -``` - -**Knowledge**: test-quality.md, data-factories.md - ---- - -### 7. Fixture Patterns - -**PASS**: Pure function β†’ Fixture β†’ mergeTests - -```typescript -// βœ… Good: Pure function fixture -const createAuthenticatedPage = async (page: Page, user: User) => { - await loginPage.login(user.email, user.password); - return page; -}; - -const test = base.extend({ - authenticatedPage: async ({ page }, use) => { - const user = createTestUser(); - const authedPage = await createAuthenticatedPage(page, user); - await use(authedPage); - }, -}); -``` - -**FAIL**: No fixtures, repeated setup - -```typescript -// ❌ Bad: Repeated setup in every test -test('test 1', async ({ page }) => { - await page.goto('/login'); - await page.fill('[name="email"]', 'test@example.com'); - await page.fill('[name="password"]', 'password123'); - await page.click('[type="submit"]'); - // Test logic -}); -``` - -**Knowledge**: fixture-architecture.md - ---- - -### 8. Data Factories - -**PASS**: Factory functions with overrides - -```typescript -// βœ… Good: Factory function -import { createTestUser } from './factories/user-factory'; - -test('user can update profile', async ({ page }) => { - const user = createTestUser({ role: 'admin' }); - await api.createUser(user); // API-first setup - // Test UI interaction -}); -``` - -**FAIL**: Hardcoded test data - -```typescript -// ❌ Bad: Magic strings -await page.fill('[name="email"]', 'test@example.com'); -await page.fill('[name="phone"]', '555-1234'); -``` - -**Knowledge**: data-factories.md - ---- - -### 9. Network-First Pattern - -**PASS**: Route intercept before navigate - -```typescript -// βœ… Good: Intercept before navigation -await page.route('**/api/users', (route) => route.fulfill({ json: mockUsers })); -await page.goto('/users'); // Navigate after route setup -``` - -**FAIL**: Race condition risk - -```typescript -// ❌ Bad: Navigate before intercept -await page.goto('/users'); -await page.route('**/api/users', (route) => route.fulfill({ json: mockUsers })); // Too late! -``` - -**Knowledge**: network-first.md - ---- - -### 10. Explicit Assertions - -**PASS**: Clear, specific assertions - -```typescript -await expect(page.locator('[data-testid="username"]')).toHaveText('John Doe'); -await expect(page.locator('[data-testid="status"]')).toHaveClass(/active/); -``` - -**FAIL**: Missing or vague assertions - -```typescript -await page.locator('[data-testid="username"]').isVisible(); // No assertion! -``` - -**Knowledge**: test-quality.md - ---- - -### 11. Test Length - -**PASS**: ≀300 lines per file (ideal: ≀200) -**WARN**: 301-500 lines (consider splitting) -**FAIL**: >500 lines (too large) - -**Knowledge**: test-quality.md - ---- - -### 12. Test Duration - -**PASS**: ≀1.5 minutes per test (target: <30 seconds) -**WARN**: 1.5-3 minutes (consider optimization) -**FAIL**: >3 minutes (too slow) - -**Knowledge**: test-quality.md, selective-testing.md - ---- - -### 13. Flakiness Patterns - -Common flaky patterns detected: - -- Tight timeouts (e.g., `{ timeout: 1000 }`) -- Race conditions (navigation before route interception) -- Timing-dependent assertions -- Retry logic hiding flakiness -- Environment-dependent assumptions - -**Knowledge**: test-quality.md, network-first.md, ci-burn-in.md - ---- - -## Quality Scoring - -### Score Calculation - -``` -Starting Score: 100 - -Deductions: -- Critical Violations (P0): -10 points each -- High Violations (P1): -5 points each -- Medium Violations (P2): -2 points each -- Low Violations (P3): -1 point each - -Bonus Points (max +30): -+ Excellent BDD structure: +5 -+ Comprehensive fixtures: +5 -+ Comprehensive data factories: +5 -+ Network-first pattern consistently used: +5 -+ Perfect isolation (all tests clean up): +5 -+ All test IDs present and correct: +5 - -Final Score: max(0, min(100, Starting Score - Violations + Bonus)) -``` - -### Quality Grades - -- **90-100** (A+): Excellent - Production-ready, best practices followed -- **80-89** (A): Good - Minor improvements recommended -- **70-79** (B): Acceptable - Some issues to address -- **60-69** (C): Needs Improvement - Several issues detected -- **<60** (F): Critical Issues - Significant problems, not production-ready - ---- - -## Example Scenarios - -### Scenario 1: Excellent Quality (Score: 95) - -```markdown -# Test Quality Review: checkout-flow.spec.ts - -**Quality Score**: 95/100 (A+ - Excellent) -**Recommendation**: Approve - Production Ready - -## Executive Summary - -Excellent test quality with comprehensive coverage and best practices throughout. -Tests demonstrate expert-level patterns including fixture architecture, data -factories, network-first approach, and perfect isolation. - -**Strengths:** -βœ… Clear Given-When-Then structure in all tests -βœ… Comprehensive fixtures for authenticated states -βœ… Data factories with faker.js for realistic test data -βœ… Network-first pattern prevents race conditions -βœ… Perfect test isolation with cleanup -βœ… All test IDs present (1.2-E2E-001 through 1.2-E2E-005) - -**Minor Recommendations:** -⚠️ One test slightly verbose (245 lines) - consider extracting helper function - -**Recommendation**: Approve without changes. Use as reference for other tests. -``` - ---- - -### Scenario 2: Good Quality (Score: 82) - -```markdown -# Test Quality Review: user-profile.spec.ts - -**Quality Score**: 82/100 (A - Good) -**Recommendation**: Approve with Comments - -## Executive Summary - -Solid test quality with good structure and coverage. A few improvements would -enhance maintainability and reduce flakiness risk. - -**Strengths:** -βœ… Good BDD structure -βœ… Test IDs present -βœ… Explicit assertions - -**Issues to Address:** -⚠️ 2 hard waits detected (lines 34, 67) - use explicit waits instead -⚠️ Hardcoded test data (line 23) - use factory functions -⚠️ Missing cleanup in one test (line 89) - add afterEach hook - -**Recommendation**: Address hard waits before merging. Other improvements -can be addressed in follow-up PR. -``` - ---- - -### Scenario 3: Needs Improvement (Score: 68) - -```markdown -# Test Quality Review: legacy-report.spec.ts - -**Quality Score**: 68/100 (C - Needs Improvement) -**Recommendation**: Request Changes - -## Executive Summary - -Test has several quality issues that should be addressed before merging. -Primarily concerns around flakiness risk and maintainability. - -**Critical Issues:** -❌ 5 hard waits detected (flakiness risk) -❌ Race condition: navigation before route interception (line 45) -❌ Shared global state between tests (line 12) -❌ Missing test IDs (can't trace to requirements) - -**Recommendations:** -⚠️ Test file is 487 lines - consider splitting -⚠️ Hardcoded data throughout - use factories -⚠️ Missing cleanup in afterEach - -**Recommendation**: Address all critical issues (❌) before re-review. -Significant refactoring needed. -``` - ---- - -### Scenario 4: Critical Issues (Score: 42) - -```markdown -# Test Quality Review: data-export.spec.ts - -**Quality Score**: 42/100 (F - Critical Issues) -**Recommendation**: Block - Not Production Ready - -## Executive Summary - -CRITICAL: Test has severe quality issues that make it unsuitable for -production. Significant refactoring required. - -**Critical Issues:** -❌ 12 hard waits (page.waitForTimeout) throughout -❌ No test IDs or structure -❌ Try/catch blocks swallowing errors (lines 23, 45, 67, 89) -❌ No cleanup - tests leave data in database -❌ Conditional logic (if/else) throughout tests -❌ No assertions in 3 tests (tests do nothing!) -❌ 687 lines - far too large -❌ Multiple race conditions -❌ Hardcoded credentials in plain text (SECURITY ISSUE) - -**Recommendation**: BLOCK MERGE. Complete rewrite recommended following -TEA knowledge base patterns. Suggest pairing session with QA engineer. -``` - ---- - -## Integration with Other Workflows - -### Before Test Review - -1. **atdd** - Generates acceptance tests β†’ TEA reviews for quality -2. **dev story** - Developer implements tests β†’ TEA provides feedback -3. **automate** - Expands regression suite β†’ TEA validates new tests - -### After Test Review - -1. **Developer** - Addresses critical issues, improves based on recommendations -2. **gate** - Test quality feeds into release decision (high-quality tests increase confidence) - -### Coordinates With - -- **Story File**: Review links to acceptance criteria for context -- **Test Design**: Review validates tests align with P0/P1/P2/P3 prioritization -- **Knowledge Base**: All feedback references tea-index.csv fragments - ---- - -## Review Scopes - -### Single File Review - -```bash -# Review specific test file -bmad tea *test-review -# Provide test_file_path when prompted: tests/auth/login.spec.ts -``` - -**Use When:** - -- Reviewing tests just written -- PR review of specific test file -- Debugging flaky test -- Learning test quality patterns - ---- - -### Directory Review - -```bash -# Review all tests in directory -bmad tea *test-review -# Provide review_scope: directory -# Provide test_dir: tests/auth/ -``` - -**Use When:** - -- Feature branch has multiple test files -- Reviewing entire feature test suite -- Auditing test quality for module - ---- - -### Suite Review - -```bash -# Review entire test suite -bmad tea *test-review -# Provide review_scope: suite -``` - -**Use When:** - -- Periodic quality audit (monthly/quarterly) -- Before major release -- Identifying patterns across codebase -- Establishing quality baseline - ---- - -## Configuration Examples - -### Strict Review (Fail on Violations) - -```yaml -review_scope: 'single' -quality_score_enabled: true -strict_mode: true # Fail if score <70 -check_against_knowledge: true -# All check_* flags: true -``` - -Use for: PR gates, production releases - ---- - -### Balanced Review (Advisory) - -```yaml -review_scope: 'single' -quality_score_enabled: true -strict_mode: false # Advisory only -check_against_knowledge: true -# All check_* flags: true -``` - -Use for: Most development workflows (default) - ---- - -### Focused Review (Specific Criteria) - -```yaml -review_scope: 'single' -check_hard_waits: true -check_flakiness_patterns: true -check_network_first: true -# Other checks: false -``` - -Use for: Debugging flaky tests, targeted improvements - ---- - -## Important Notes - -1. **Non-Prescriptive**: Review provides guidance, not rigid rules -2. **Context Matters**: Some violations may be justified (document with comments) -3. **Knowledge-Based**: All feedback grounded in proven patterns -4. **Actionable**: Every issue includes recommended fix with code example -5. **Quality Score**: Use as indicator, not absolute measure -6. **Continuous Improvement**: Review tests periodically as patterns evolve -7. **Learning Tool**: Use reviews to learn best practices, not just find bugs - ---- - -## Knowledge Base References - -This workflow automatically consults: - -- **test-quality.md** - Definition of Done (no hard waits, <300 lines, <1.5 min, self-cleaning) -- **fixture-architecture.md** - Pure function β†’ Fixture β†’ mergeTests pattern -- **network-first.md** - Route intercept before navigate (race condition prevention) -- **data-factories.md** - Factory functions with overrides, API-first setup -- **test-levels-framework.md** - E2E vs API vs Component vs Unit appropriateness -- **playwright-config.md** - Environment-based configuration patterns -- **tdd-cycles.md** - Red-Green-Refactor patterns -- **selective-testing.md** - Duplicate coverage detection -- **ci-burn-in.md** - Flakiness detection patterns -- **test-priorities.md** - P0/P1/P2/P3 classification framework -- **traceability.md** - Requirements-to-tests mapping - -See `tea-index.csv` for complete knowledge fragment mapping. - ---- - -## Troubleshooting - -### Problem: Quality score seems too low - -**Solution:** - -- Review violation breakdown - focus on critical issues first -- Consider project context - some patterns may be justified -- Check if criteria are appropriate for project type -- Score is indicator, not absolute - focus on actionable feedback - ---- - -### Problem: No test files found - -**Solution:** - -- Verify test_dir path is correct -- Check test file extensions (_.spec.ts, _.test.js, etc.) -- Use glob pattern to discover: `tests/**/*.spec.ts` - ---- - -### Problem: Knowledge fragments not loading - -**Solution:** - -- Verify tea-index.csv exists in testarch/ directory -- Check fragment file paths are correct in tea-index.csv -- Ensure auto_load_knowledge: true in workflow variables - ---- - -### Problem: Too many false positives - -**Solution:** - -- Add justification comments in code for legitimate violations -- Adjust check\_\* flags to disable specific criteria -- Use strict_mode: false for advisory-only feedback -- Context matters - document why pattern is appropriate - ---- - -## Related Commands - -- `bmad tea *atdd` - Generate acceptance tests (review after generation) -- `bmad tea *automate` - Expand regression suite (review new tests) -- `bmad tea *gate` - Quality gate decision (test quality feeds into decision) -- `bmad dev story` - Implement story (review tests after implementation) diff --git a/bmad/bmm/workflows/testarch/trace/README.md b/bmad/bmm/workflows/testarch/trace/README.md deleted file mode 100644 index caeceb69..00000000 --- a/bmad/bmm/workflows/testarch/trace/README.md +++ /dev/null @@ -1,802 +0,0 @@ -# Requirements Traceability & Quality Gate Workflow - -**Workflow ID:** `testarch-trace` -**Agent:** Test Architect (TEA) -**Command:** `bmad tea *trace` - ---- - -## Overview - -The **trace** workflow operates in two sequential phases to validate test coverage and deployment readiness: - -**PHASE 1 - REQUIREMENTS TRACEABILITY:** Generates comprehensive requirements-to-tests traceability matrix that maps acceptance criteria to implemented tests, identifies coverage gaps, and provides actionable recommendations. - -**PHASE 2 - QUALITY GATE DECISION:** Makes deterministic release decisions (PASS/CONCERNS/FAIL/WAIVED) based on traceability results, test execution evidence, and non-functional requirements validation. - -**Key Features:** - -- Maps acceptance criteria to specific test cases across all levels (E2E, API, Component, Unit) -- Classifies coverage status (FULL, PARTIAL, NONE, UNIT-ONLY, INTEGRATION-ONLY) -- Prioritizes gaps by risk level (P0/P1/P2/P3) -- Applies deterministic decision rules for deployment readiness -- Generates gate decisions with evidence and rationale -- Supports waivers for business-approved exceptions -- Updates workflow status and notifies stakeholders -- Creates CI/CD-ready YAML snippets for quality gates -- Detects duplicate coverage across test levels -- Verifies test quality (assertions, structure, performance) - ---- - -## When to Use This Workflow - -Use `*trace` when you need to: - -### Phase 1 - Traceability - -- βœ… Validate that all acceptance criteria have test coverage -- βœ… Identify coverage gaps before release or PR merge -- βœ… Generate traceability documentation for compliance or audits -- βœ… Ensure critical paths (P0/P1) are fully tested -- βœ… Detect duplicate coverage across test levels -- βœ… Assess test quality across your suite - -### Phase 2 - Gate Decision (Optional) - -- βœ… Make final go/no-go deployment decision -- βœ… Validate test execution results against thresholds -- βœ… Evaluate non-functional requirements (security, performance) -- βœ… Generate audit trail for release approval -- βœ… Handle business waivers for critical deadlines -- βœ… Notify stakeholders of gate decision - -**Typical Timing:** - -- After tests are implemented (post-ATDD or post-development) -- Before merging a PR (validate P0/P1 coverage) -- Before release (validate full coverage and make gate decision) -- During sprint retrospectives (assess test quality) - ---- - -## Prerequisites - -### Phase 1 - Traceability (Required) - -- Acceptance criteria (from story file OR inline) -- Implemented test suite (or acknowledged gaps) - -### Phase 2 - Gate Decision (Required if `enable_gate_decision: true`) - -- Test execution results (CI/CD test reports, pass/fail rates) -- Test design with risk priorities (P0/P1/P2/P3) - -### Recommended - -- `test-design.md` - Risk assessment and test priorities -- `nfr-assessment.md` - Non-functional requirements validation (for release gates) -- `tech-spec.md` - Technical implementation details -- Test framework configuration (playwright.config.ts, jest.config.js) - -**Halt Conditions:** - -- Story lacks any tests AND gaps are not acknowledged β†’ Run `*atdd` first -- Acceptance criteria are completely missing β†’ Provide criteria or story file -- Phase 2 enabled but test execution results missing β†’ Warn and skip gate decision - ---- - -## Usage - -### Basic Usage (Both Phases) - -```bash -bmad tea *trace -``` - -The workflow will: - -1. **Phase 1**: Read story file, extract acceptance criteria, auto-discover tests, generate traceability matrix -2. **Phase 2**: Load test execution results, apply decision rules, generate gate decision document -3. Save traceability matrix to `bmad/output/traceability-matrix.md` -4. Save gate decision to `bmad/output/gate-decision-story-X.X.md` - -### Phase 1 Only (Skip Gate Decision) - -```bash -bmad tea *trace --enable-gate-decision false -``` - -### Custom Configuration - -```bash -bmad tea *trace \ - --story-file "bmad/output/story-1.3.md" \ - --test-results "ci-artifacts/test-report.xml" \ - --min-p0-coverage 100 \ - --min-p1-coverage 90 \ - --min-p0-pass-rate 100 \ - --min-p1-pass-rate 95 -``` - -### Standalone Mode (No Story File) - -```bash -bmad tea *trace --acceptance-criteria "AC-1: User can login with email..." -``` - ---- - -## Workflow Steps - -### PHASE 1: Requirements Traceability - -1. **Load Context** - Read story, test design, tech spec, knowledge base -2. **Discover Tests** - Auto-find tests related to story (by ID, describe blocks, file paths) -3. **Map Criteria** - Link acceptance criteria to specific test cases -4. **Analyze Gaps** - Identify missing coverage and prioritize by risk -5. **Verify Quality** - Check test quality (assertions, structure, performance) -6. **Generate Deliverables** - Create traceability matrix, gate YAML, coverage badge - -### PHASE 2: Quality Gate Decision (if `enable_gate_decision: true`) - -7. **Gather Evidence** - Load traceability results, test execution reports, NFR assessments -8. **Apply Decision Rules** - Evaluate against thresholds (PASS/CONCERNS/FAIL/WAIVED) -9. **Document Decision** - Create gate decision document with evidence and rationale -10. **Update Status & Notify** - Append to bmm-workflow-status.md, notify stakeholders - ---- - -## Outputs - -### Phase 1: Traceability Matrix (`traceability-matrix.md`) - -Comprehensive markdown file with: - -- Coverage summary table (by priority) -- Detailed criterion-to-test mapping -- Gap analysis with recommendations -- Quality assessment for each test -- Gate YAML snippet - -**Example:** - -```markdown -# Traceability Matrix - Story 1.3 - -## Coverage Summary - -| Priority | Total | FULL | Coverage % | Status | -| -------- | ----- | ---- | ---------- | ------- | -| P0 | 3 | 3 | 100% | βœ… PASS | -| P1 | 5 | 4 | 80% | ⚠️ WARN | - -Gate Status: CONCERNS ⚠️ (P1 coverage below 90%) -``` - -### Phase 2: Gate Decision Document (`gate-decision-{type}-{id}.md`) - -**Decision Document** with: - -- **Decision**: PASS / CONCERNS / FAIL / WAIVED with clear rationale -- **Evidence Summary**: Test results, coverage, NFRs, quality validation -- **Decision Criteria Table**: Each criterion with threshold, actual, status -- **Rationale**: Explanation of decision based on evidence -- **Residual Risks**: Unresolved issues (for CONCERNS/WAIVED) -- **Waiver Details**: Approver, justification, remediation plan (for WAIVED) -- **Next Steps**: Action items for each decision type - -**Example:** - -```markdown -# Quality Gate Decision: Story 1.3 - User Login - -**Decision**: ⚠️ CONCERNS -**Date**: 2025-10-15 - -## Decision Criteria - -| Criterion | Threshold | Actual | Status | -| ------------ | --------- | ------ | ------- | -| P0 Coverage | β‰₯100% | 100% | βœ… PASS | -| P1 Coverage | β‰₯90% | 88% | ⚠️ FAIL | -| Overall Pass | β‰₯90% | 96% | βœ… PASS | - -**Decision**: CONCERNS (P1 coverage 88% below 90% threshold) - -## Next Steps - -- Deploy with monitoring -- Create follow-up story for AC-5 test -``` - -### Secondary Outputs - -- **Gate YAML**: Machine-readable snippet for CI/CD integration -- **Status Update**: Appends decision to `bmm-workflow-status.md` history -- **Stakeholder Notification**: Auto-generated summary message -- **Updated Story File**: Traceability section added (optional) - ---- - -## Decision Logic (Phase 2) - -### PASS Decision βœ… - -**All criteria met:** - -- βœ… P0 coverage β‰₯ 100% -- βœ… P1 coverage β‰₯ 90% -- βœ… Overall coverage β‰₯ 80% -- βœ… P0 test pass rate = 100% -- βœ… P1 test pass rate β‰₯ 95% -- βœ… Overall test pass rate β‰₯ 90% -- βœ… Security issues = 0 -- βœ… Critical NFR failures = 0 - -**Action:** Deploy to production with standard monitoring - ---- - -### CONCERNS Decision ⚠️ - -**P0 criteria met, but P1 criteria degraded:** - -- βœ… P0 coverage = 100% -- ⚠️ P1 coverage 80-89% (below 90% threshold) -- ⚠️ P1 test pass rate 90-94% (below 95% threshold) -- βœ… No security issues -- βœ… No critical NFR failures - -**Residual Risks:** Minor P1 issues, edge cases, non-critical gaps - -**Action:** Deploy with enhanced monitoring, create backlog stories for fixes - -**Note:** CONCERNS does NOT block deployment but requires acknowledgment - ---- - -### FAIL Decision ❌ - -**Any P0 criterion failed:** - -- ❌ P0 coverage <100% (missing critical tests) -- OR ❌ P0 test pass rate <100% (failing critical tests) -- OR ❌ P1 coverage <80% (significant gap) -- OR ❌ Security issues >0 -- OR ❌ Critical NFR failures >0 - -**Critical Blockers:** P0 test failures, security vulnerabilities, critical NFRs - -**Action:** Block deployment, fix critical issues, re-run gate after fixes - ---- - -### WAIVED Decision πŸ”“ - -**FAIL status + business-approved waiver:** - -- ❌ Original decision: FAIL -- πŸ”“ Waiver approved by: {VP Engineering / CTO / Product Owner} -- πŸ“‹ Business justification: {regulatory deadline, contractual obligation} -- πŸ“… Waiver expiry: {date - does NOT apply to future releases} -- πŸ”§ Remediation plan: {fix in next release, due date} - -**Action:** Deploy with business approval, aggressive monitoring, fix ASAP - -**Important:** Waivers NEVER apply to P0 security issues or data corruption risks - ---- - -## Coverage Classifications (Phase 1) - -- **FULL** βœ… - All scenarios validated at appropriate level(s) -- **PARTIAL** ⚠️ - Some coverage but missing edge cases or levels -- **NONE** ❌ - No test coverage at any level -- **UNIT-ONLY** ⚠️ - Only unit tests (missing integration/E2E validation) -- **INTEGRATION-ONLY** ⚠️ - Only API/Component tests (missing unit confidence) - ---- - -## Quality Gates - -| Priority | Coverage Requirement | Pass Rate Requirement | Severity | Action | -| -------- | -------------------- | --------------------- | -------- | ------------------ | -| P0 | 100% | 100% | BLOCKER | Do not release | -| P1 | 90% | 95% | HIGH | Block PR merge | -| P2 | 80% (recommended) | 85% (recommended) | MEDIUM | Address in nightly | -| P3 | No requirement | No requirement | LOW | Optional | - ---- - -## Configuration - -### workflow.yaml Variables - -```yaml -variables: - # Target specification - story_file: '' # Path to story markdown - acceptance_criteria: '' # Inline criteria if no story - - # Test discovery - test_dir: '{project-root}/tests' - auto_discover_tests: true - - # Traceability configuration - coverage_levels: 'e2e,api,component,unit' - map_by_test_id: true - map_by_describe: true - map_by_filename: true - - # Gap analysis - prioritize_by_risk: true - suggest_missing_tests: true - check_duplicate_coverage: true - - # Output configuration - output_file: '{output_folder}/traceability-matrix.md' - generate_gate_yaml: true - generate_coverage_badge: true - update_story_file: true - - # Quality gates (Phase 1 recommendations) - min_p0_coverage: 100 - min_p1_coverage: 90 - min_overall_coverage: 80 - - # PHASE 2: Gate Decision Variables - enable_gate_decision: true # Run gate decision after traceability - - # Gate target specification - gate_type: 'story' # story | epic | release | hotfix - - # Gate decision configuration - decision_mode: 'deterministic' # deterministic | manual - allow_waivers: true - require_evidence: true - - # Input sources for gate - nfr_file: '' # Path to nfr-assessment.md (optional) - test_results: '' # Path to test execution results (required for Phase 2) - - # Decision criteria thresholds - min_p0_pass_rate: 100 - min_p1_pass_rate: 95 - min_overall_pass_rate: 90 - max_critical_nfrs_fail: 0 - max_security_issues: 0 - - # Risk tolerance - allow_p2_failures: true - allow_p3_failures: true - escalate_p1_failures: true - - # Gate output configuration - gate_output_file: '{output_folder}/gate-decision-{gate_type}-{story_id}.md' - append_to_history: true - notify_stakeholders: true - - # Advanced gate options - check_all_workflows_complete: true - validate_evidence_freshness: true - require_sign_off: false -``` - ---- - -## Knowledge Base Integration - -This workflow automatically loads relevant knowledge fragments: - -**Phase 1 (Traceability):** - -- `traceability.md` - Requirements mapping patterns -- `test-priorities.md` - P0/P1/P2/P3 risk framework -- `risk-governance.md` - Risk-based testing approach -- `test-quality.md` - Definition of Done for tests -- `selective-testing.md` - Duplicate coverage patterns - -**Phase 2 (Gate Decision):** - -- `risk-governance.md` - Quality gate criteria and decision framework -- `probability-impact.md` - Risk scoring for residual risks -- `test-quality.md` - Quality standards validation -- `test-priorities.md` - Priority classification framework - ---- - -## Example Scenarios - -### Example 1: Full Coverage with Gate PASS - -```bash -# Validate coverage and make gate decision -bmad tea *trace --story-file "bmad/output/story-1.3.md" \ - --test-results "ci-artifacts/test-report.xml" -``` - -**Phase 1 Output:** - -```markdown -# Traceability Matrix - Story 1.3 - -## Coverage Summary - -| Priority | Total | FULL | Coverage % | Status | -| -------- | ----- | ---- | ---------- | ------- | -| P0 | 3 | 3 | 100% | βœ… PASS | -| P1 | 5 | 5 | 100% | βœ… PASS | - -Gate Status: Ready for Phase 2 βœ… -``` - -**Phase 2 Output:** - -```markdown -# Quality Gate Decision: Story 1.3 - -**Decision**: βœ… PASS - -Evidence: - -- P0 Coverage: 100% βœ… -- P1 Coverage: 100% βœ… -- P0 Pass Rate: 100% (12/12 tests) βœ… -- P1 Pass Rate: 98% (45/46 tests) βœ… -- Overall Pass Rate: 96% βœ… - -Next Steps: - -1. Deploy to staging -2. Monitor for 24 hours -3. Deploy to production -``` - ---- - -### Example 2: Gap Identification with CONCERNS Decision - -```bash -# Find gaps and evaluate readiness -bmad tea *trace --story-file "bmad/output/story-2.1.md" \ - --test-results "ci-artifacts/test-report.xml" -``` - -**Phase 1 Output:** - -```markdown -## Gap Analysis - -### Critical Gaps (BLOCKER) - -- None βœ… - -### High Priority Gaps (PR BLOCKER) - -1. **AC-3: Password reset email edge cases** - - Recommend: Add 1.3-API-001 (email service integration) - - Impact: Users may not recover accounts in error scenarios -``` - -**Phase 2 Output:** - -```markdown -# Quality Gate Decision: Story 2.1 - -**Decision**: ⚠️ CONCERNS - -Evidence: - -- P0 Coverage: 100% βœ… -- P1 Coverage: 88% ⚠️ (below 90%) -- Test Pass Rate: 96% βœ… - -Residual Risks: - -- AC-3 missing E2E test for email error handling - -Next Steps: - -- Deploy with monitoring -- Create follow-up story for AC-3 test -- Monitor production for edge cases -``` - ---- - -### Example 3: Critical Blocker with FAIL Decision - -```bash -# Critical issues detected -bmad tea *trace --story-file "bmad/output/story-3.2.md" \ - --test-results "ci-artifacts/test-report.xml" -``` - -**Phase 1 Output:** - -```markdown -## Gap Analysis - -### Critical Gaps (BLOCKER) - -1. **AC-2: Invalid login security validation** - - Priority: P0 - - Status: NONE (no tests) - - Impact: Security vulnerability - users can bypass login -``` - -**Phase 2 Output:** - -```markdown -# Quality Gate Decision: Story 3.2 - -**Decision**: ❌ FAIL - -Critical Blockers: - -- P0 Coverage: 80% ❌ (AC-2 missing) -- Security Risk: Login bypass vulnerability - -Next Steps: - -1. BLOCK DEPLOYMENT IMMEDIATELY -2. Add P0 test for AC-2: 1.3-E2E-004 -3. Re-run full test suite -4. Re-run gate after fixes verified -``` - ---- - -### Example 4: Business Override with WAIVED Decision - -```bash -# FAIL with business waiver -bmad tea *trace --story-file "bmad/output/release-2.4.0.md" \ - --test-results "ci-artifacts/test-report.xml" \ - --allow-waivers true -``` - -**Phase 2 Output:** - -```markdown -# Quality Gate Decision: Release 2.4.0 - -**Original Decision**: ❌ FAIL -**Final Decision**: πŸ”“ WAIVED - -Waiver Details: - -- Approver: Jane Doe, VP Engineering -- Reason: GDPR compliance deadline (regulatory, Oct 15) -- Expiry: 2025-10-15 (does NOT apply to v2.5.0) -- Monitoring: Enhanced error tracking -- Remediation: Fix in v2.4.1 hotfix (due Oct 20) - -Business Justification: -Release contains critical GDPR features required by law. Failed -test affects legacy feature used by <1% of users. Workaround available. - -Next Steps: - -1. Deploy v2.4.0 with waiver approval -2. Monitor error rates aggressively -3. Fix issue in v2.4.1 (Oct 20) -``` - ---- - -## Troubleshooting - -### Phase 1 Issues - -#### "No tests found for this story" - -- Run `*atdd` workflow first to generate failing acceptance tests -- Check test file naming conventions (may not match story ID pattern) -- Verify test directory path is correct (`test_dir` variable) - -#### "Cannot determine coverage status" - -- Tests may lack explicit mapping (no test IDs, unclear describe blocks) -- Add test IDs: `{STORY_ID}-{LEVEL}-{SEQ}` (e.g., `1.3-E2E-001`) -- Use Given-When-Then narrative in test descriptions - -#### "P0 coverage below 100%" - -- This is a **BLOCKER** - do not release -- Identify missing P0 tests in gap analysis -- Run `*atdd` workflow to generate missing tests -- Verify P0 classification is correct with stakeholders - -#### "Duplicate coverage detected" - -- Review `selective-testing.md` knowledge fragment -- Determine if overlap is acceptable (defense in depth) or wasteful -- Consolidate tests at appropriate level (logic β†’ unit, journey β†’ E2E) - -### Phase 2 Issues - -#### "Test execution results missing" - -- Phase 2 gate decision requires `test_results` (CI/CD test reports) -- If missing, Phase 2 will be skipped with warning -- Provide JUnit XML, TAP, or JSON test report path via `test_results` variable - -#### "Gate decision is FAIL but deployment needed urgently" - -- Request business waiver (if `allow_waivers: true`) -- Document approver, justification, mitigation plan -- Create follow-up stories to address gaps -- Use WAIVED decision only for non-P0 gaps -- **Never waive**: Security issues, data corruption risks - -#### "Assessments are stale (>7 days old)" - -- Re-run `*test-design` workflow -- Re-run traceability (Phase 1) -- Re-run `*nfr-assess` workflow -- Update evidence files before gate decision - -#### "Unclear decision (edge case)" - -- Switch to manual mode: `decision_mode: manual` -- Document assumptions and rationale clearly -- Escalate to tech lead or architect for guidance -- Consider waiver if business-critical - ---- - -## Integration with Other Workflows - -### Before Trace - -1. **testarch-test-design** - Define test priorities (P0/P1/P2/P3) -2. **testarch-atdd** - Generate failing acceptance tests -3. **testarch-automate** - Expand regression suite - -### After Trace (Phase 2 Decision) - -- **PASS**: Proceed to deployment workflow -- **CONCERNS**: Deploy with monitoring, create remediation backlog stories -- **FAIL**: Block deployment, fix issues, re-run trace workflow -- **WAIVED**: Deploy with business approval, escalate monitoring - -### Complements - -- `*trace` β†’ **testarch-nfr-assess** - Use NFR validation in gate decision -- `*trace` β†’ **testarch-test-review** - Flag quality issues for review -- **CI/CD Pipeline** - Use gate YAML for automated quality gates - ---- - -## Best Practices - -### Phase 1 - Traceability - -1. **Run Trace After Test Implementation** - - Don't run `*trace` before tests exist (run `*atdd` first) - - Trace is most valuable after initial test suite is written - -2. **Prioritize by Risk** - - P0 gaps are BLOCKERS (must fix before release) - - P1 gaps are HIGH priority (block PR merge) - - P3 gaps are acceptable (fix if time permits) - -3. **Explicit Mapping** - - Use test IDs (`1.3-E2E-001`) for clear traceability - - Reference criteria in describe blocks - - Use Given-When-Then narrative - -4. **Avoid Duplicate Coverage** - - Test each behavior at appropriate level only - - Unit tests for logic, E2E for journeys - - Only overlap for defense in depth on critical paths - -### Phase 2 - Gate Decision - -5. **Evidence is King** - - Never make gate decisions without fresh test results - - Validate evidence freshness (<7 days old) - - Link to all evidence sources (reports, logs, artifacts) - -6. **P0 is Sacred** - - P0 failures ALWAYS result in FAIL (no exceptions except waivers) - - P0 = Critical user journeys, security, data integrity - - Waivers require VP/CTO approval + business justification - -7. **Waivers are Temporary** - - Waiver applies ONLY to specific release - - Issue must be fixed in next release - - Never waive: security, data corruption, compliance violations - -8. **CONCERNS is Not PASS** - - CONCERNS means "deploy with monitoring" - - Create follow-up stories for issues - - Do not ignore CONCERNS repeatedly - -9. **Automate Gate Integration** - - Enable `generate_gate_yaml` for CI/CD integration - - Use YAML snippets in pipeline quality gates - - Export metrics for dashboard visualization - ---- - -## Configuration Examples - -### Strict Gate (Zero Tolerance) - -```yaml -min_p0_coverage: 100 -min_p1_coverage: 100 -min_overall_coverage: 90 -min_p0_pass_rate: 100 -min_p1_pass_rate: 100 -min_overall_pass_rate: 95 -allow_waivers: false -max_security_issues: 0 -max_critical_nfrs_fail: 0 -``` - -Use for: Financial systems, healthcare, security-critical features - ---- - -### Balanced Gate (Production Standard - Default) - -```yaml -min_p0_coverage: 100 -min_p1_coverage: 90 -min_overall_coverage: 80 -min_p0_pass_rate: 100 -min_p1_pass_rate: 95 -min_overall_pass_rate: 90 -allow_waivers: true -max_security_issues: 0 -max_critical_nfrs_fail: 0 -``` - -Use for: Most production releases - ---- - -### Relaxed Gate (Early Development) - -```yaml -min_p0_coverage: 100 -min_p1_coverage: 80 -min_overall_coverage: 70 -min_p0_pass_rate: 100 -min_p1_pass_rate: 85 -min_overall_pass_rate: 80 -allow_waivers: true -allow_p2_failures: true -allow_p3_failures: true -``` - -Use for: Alpha/beta releases, internal tools, proof-of-concept - ---- - -## Related Commands - -- `bmad tea *test-design` - Define test priorities and risk assessment -- `bmad tea *atdd` - Generate failing acceptance tests for gaps -- `bmad tea *automate` - Expand regression suite based on gaps -- `bmad tea *nfr-assess` - Validate non-functional requirements (for gate) -- `bmad tea *test-review` - Review test quality issues flagged by trace -- `bmad sm story-done` - Mark story as complete (triggers gate) - ---- - -## Resources - -- [Instructions](./instructions.md) - Detailed workflow steps (both phases) -- [Checklist](./checklist.md) - Validation checklist -- [Template](./trace-template.md) - Traceability matrix template -- [Knowledge Base](../../testarch/knowledge/) - Testing best practices - ---- - - diff --git a/bmad/bmm/workflows/workflow-status/README.md b/bmad/bmm/workflows/workflow-status/README.md deleted file mode 100644 index 55d520bf..00000000 --- a/bmad/bmm/workflows/workflow-status/README.md +++ /dev/null @@ -1,260 +0,0 @@ -# Workflow Status System - -The universal entry point for BMM workflows - answers "what should I do now?" for any agent. - -## Overview - -The workflow status system provides: - -- **Smart project initialization** - Detects existing work and infers project details -- **Simple status tracking** - Key-value pairs for instant parsing -- **Intelligent routing** - Suggests next actions based on current state -- **Modular workflow paths** - Each project type/level has its own clean definition - -## Architecture - -### Core Components - -``` -workflow-status/ -β”œβ”€β”€ workflow.yaml # Main configuration -β”œβ”€β”€ instructions.md # Status checker (99 lines) -β”œβ”€β”€ workflow-status-template.yaml # Clean YAML status template -β”œβ”€β”€ project-levels.yaml # Source of truth for scale definitions -└── paths/ # Modular workflow definitions - β”œβ”€β”€ greenfield-level-0.yaml through level-4.yaml - β”œβ”€β”€ brownfield-level-0.yaml through level-4.yaml - └── game-design.yaml -``` - -### Related Workflow - -``` -workflow-init/ -β”œβ”€β”€ workflow.yaml # Initialization configuration -└── instructions.md # Smart setup (182 lines) -``` - -## How It Works - -### For New Projects - -1. User runs `workflow-status` -2. System finds no status file -3. Directs to `workflow-init` -4. Init workflow: - - Scans for existing work (PRDs, code, etc.) - - Infers project details from what it finds - - Asks minimal questions (name + description) - - Confirms understanding in one step - - Creates status file with workflow path - -### For Existing Projects - -1. User runs `workflow-status` -2. System reads status file -3. Shows current state and options: - - Continue in-progress work - - Next required step - - Available optional workflows -4. User picks action - -## Status File Format - -Clean YAML format with all workflows listed up front: - -```yaml -# generated: 2025-10-29 -# project: MyProject -# project_type: software -# project_level: 2 -# field_type: greenfield -# workflow_path: greenfield-level-2.yaml - -workflow_status: - # Phase 1: Analysis - brainstorm-project: optional - research: optional - product-brief: recommended - - # Phase 2: Planning - prd: docs/prd.md - validate-prd: optional - create-design: conditional - - # Phase 3: Solutioning - create-architecture: required - validate-architecture: optional - solutioning-gate-check: required -``` - -**Status Values:** - -- `required` / `optional` / `recommended` / `conditional` - Not yet started -- `{file-path}` - Completed (e.g., `docs/prd.md`) -- `skipped` - Optional workflow that was skipped - -Any agent can instantly parse what they need: - -- Read YAML to see all workflows and their status -- Check which workflows are completed vs pending -- Auto-detect existing work by scanning for output files - -## Project Levels - -Source of truth: `/src/modules/bmm/README.md` lines 77-85 - -- **Level 0**: Single atomic change (1 story) -- **Level 1**: Small feature (1-10 stories) -- **Level 2**: Medium project (5-15 stories) -- **Level 3**: Complex system (12-40 stories) -- **Level 4**: Enterprise scale (40+ stories) - -## Workflow Paths - -Each combination has its own file: - -- `greenfield-level-X.yaml` - New projects at each level -- `brownfield-level-X.yaml` - Existing codebases at each level -- `game-design.yaml` - Game projects (all levels) - -Benefits: - -- Load only what's needed (60 lines vs 750+) -- Easy to maintain individual paths -- Clear separation of concerns - -## Smart Detection - -The init workflow intelligently detects: - -**Project Type:** - -- Finds GDD β†’ game -- Otherwise β†’ software - -**Project Level:** - -- Reads PRD epic/story counts -- Analyzes scope descriptions -- Makes educated guess - -**Field Type:** - -- Finds source code β†’ brownfield -- Only planning docs β†’ greenfield -- Checks git history age - -**Documentation Status:** - -- Finds index.md β†’ was undocumented -- Good README β†’ documented -- Missing docs β†’ needs documentation - -## Usage Examples - -### Any Agent Checking Status - -``` -Agent: workflow-status -Result: "Current: Phase 2 - Planning, Next: prd (pm agent)" -``` - -### New Project Setup - -``` -Agent: workflow-status -System: "No status found. Run workflow-init" -Agent: workflow-init -System: "Tell me about your project" -User: "Building a dashboard with user management" -System: "Level 2 greenfield software project. Correct?" -User: "Yes" -System: "Status created! Next: pm agent, run prd" -``` - -### Smart Inference - -``` -System finds: prd-dashboard.md with 3 epics -System finds: package.json, src/ directory -System infers: Level 2 brownfield software -User confirms or corrects -``` - -## Philosophy - -**Less Structure, More Intelligence** - -Instead of complex if/else logic: - -- Trust the LLM to analyze and infer -- Use natural language for corrections -- Keep menus simple and contextual -- Let intelligence emerge from the model - -**Result:** A workflow system that feels like talking to a smart assistant, not filling out a form. - -## Implementation Details - -### workflow-init (6 Steps) - -1. **Scan for existing work** - Check for docs, code, git history -2. **Confirm findings** - Show what was detected (if anything) -3. **Gather info** - Name, description, confirm type/level/field -4. **Load path file** - Select appropriate workflow definition -5. **Generate workflow** - Build from path file -6. **Create status file** - Save and show next step - -### workflow-status (4 Steps) - -1. **Check for status file** - Direct to init if missing -2. **Parse status** - Extract key-value pairs -3. **Display options** - Show current, required, optional -4. **Handle selection** - Execute user's choice - -## Best Practices - -1. **Let the AI guess** - It's usually right, user corrects if needed -2. **One conversation** - Get all info in Step 3 of init -3. **Simple parsing** - Key-value pairs, not complex structures -4. **Modular paths** - Each scenario in its own file -5. **Trust intelligence** - LLM understands context better than rules - -## Integration - -Other workflows read the status to coordinate: - -- Any workflow can check CURRENT_PHASE -- Workflows can verify prerequisites are complete -- All agents can ask "what should I do?" - -**Phase 4 (Implementation):** - -- workflow-status only tracks sprint-planning completion -- After sprint-planning, all story/epic tracking happens in sprint-status.yaml -- Phase 4 workflows do NOT read/write workflow-status (except sprint-planning for prerequisite verification) - -The workflow-status.yaml file is the single source of truth for Phases 1-3, and sprint-status.yaml takes over for Phase 4 implementation tracking. - -## Benefits - -βœ… **Smart Detection** - Infers from existing work instead of asking everything -βœ… **Minimal Questions** - Just name and description in most cases -βœ… **Clean Status** - Simple key-value pairs for instant parsing -βœ… **Modular Paths** - 60-line files instead of 750+ line monolith -βœ… **Natural Language** - "Tell me about your project" not "Pick 1-12" -βœ… **Intelligent Menus** - Shows only relevant options -βœ… **Fast Parsing** - Grep instead of complex logic -βœ… **Easy Maintenance** - Change one level without affecting others - -## Future Enhancements - -- Visual progress indicators -- Time tracking and estimates -- Multi-project support -- Team synchronization - ---- - -**This workflow is the front door to BMad Method. Start here to know what to do next.** diff --git a/bmad/bmm/workflows/workflow-status/init/instructions.md b/bmad/bmm/workflows/workflow-status/init/instructions.md index 26b7c66d..2cafb48d 100644 --- a/bmad/bmm/workflows/workflow-status/init/instructions.md +++ b/bmad/bmm/workflows/workflow-status/init/instructions.md @@ -3,182 +3,289 @@ The workflow execution engine is governed by: {project-root}/bmad/core/tasks/workflow.xml You MUST have already loaded and processed: workflow-init/workflow.yaml Communicate in {communication_language} with {user_name} +This workflow handles BOTH new projects AND legacy projects being migrated to BMad Method - + Welcome to BMad Method, {user_name}! -Quick scan for context (do NOT analyze in depth yet): +Perform comprehensive scan for ALL existing work (not just quick scan): -- Check for codebase: src/, lib/, package.json, .git, etc. -- Check for BMM artifacts: PRD, epics, stories, tech-spec, architecture docs -- Store what was found but do NOT infer project details yet +**Check for BMM planning artifacts:** + +- PRD files: {output*folder}/\_prd*.md or {output*folder}/\_prd*/index.md +- Tech-spec files: {output*folder}/\_tech-spec*.md or {output*folder}/\_spec*.md +- Epic files: {output*folder}/\_epic*.md or {output*folder}/\_epic*/index.md +- Architecture: {output*folder}/\_architecture*.md or {output*folder}/\_arch*.md +- UX Design: {output*folder}/\_ux*.md or {output*folder}/\_design*.md +- Product Brief: {output*folder}/\_brief*.md +- Research docs: {output*folder}/\_research*.md +- Brainstorm docs: {output*folder}/\_brainstorm*.md + +**Check for implementation artifacts:** + +- Story files: {output_folder}/stories/\*.md +- Sprint status: {output*folder}/\_sprint*.yaml or {output_folder}/sprint-status.yaml +- Existing workflow status: {output_folder}/bmm-workflow-status.yaml + +**Check for codebase:** + +- Source code directories: src/, lib/, app/, components/, etc. +- Package files: package.json, requirements.txt, Cargo.toml, go.mod, pom.xml, etc. +- Git repository: .git/ +- Framework indicators: next.config.js, vite.config.js, etc. + + +Analyze findings and categorize project state: + +- **STATE 1:** Clean slate (no artifacts, no code or scaffold only) +- **STATE 2:** Planning in progress (has PRD or tech-spec, no stories/implementation yet) +- **STATE 3:** Implementation in progress (has stories or sprint status) +- **STATE 4:** Legacy codebase (has code but no BMM artifacts) +- **STATE 5:** Partial/unclear (some artifacts, state unclear) + What's your project called? {{#if project_name}}(Config shows: {{project_name}}){{/if}} -Set project_name +Store project_name project_name + - -I found some existing work here. Let me understand what you're working on: + - - -**Planning Documents Found:** -{{#each artifacts}} -- {{artifact_name}} ({{artifact_type}}, {{story_count}} stories, modified {{date}}) -{{/each}} - + + Perfect! This looks like a fresh start. + Set new_project = true + Continue to Step 3 (ask about their work) - - -**Codebase Found:** -- Source code in: {{source_dirs}} -- Tech stack: {{detected_tech_stack}} -{{#if git_history}} -- Git history: {{commit_count}} commits, last commit {{last_commit_date}} + + I found existing planning documents: + +{{#if found_prd}} +πŸ“‹ **PRD:** {{prd_path}} +{{#if epic_count}}- {{epic_count}} epics, {{story_count}} stories{{/if}} + +- Last modified: {{prd_modified}} + {{/if}} + +{{#if found_tech_spec}} +πŸ“‹ **Tech-Spec:** {{spec_path}} +{{#if story_count}}- {{story_count}} stories{{/if}} + +- Last modified: {{spec_modified}} + {{/if}} + +{{#if found_architecture}} +πŸ—οΈ **Architecture:** {{arch_path}} + +- Last modified: {{arch_modified}} + {{/if}} + +{{#if found_ux}} +🎨 **UX Design:** {{ux_path}} + +- Last modified: {{ux_modified}} + {{/if}} + +{{#if found_brief}} +πŸ“„ **Product Brief:** {{brief_path}} + +- Last modified: {{brief_modified}} + {{/if}} + +{{#if found_research}} +πŸ” **Research:** {{research_paths}} +{{/if}} + +{{#if found_brainstorm}} +🧠 **Brainstorm:** {{brainstorm_paths}} {{/if}} - -Looking at what I found, are these: +What's your situation with these documents? -a) **Works in progress you're finishing** - continuing the work described in these documents -b) **Documents from a previous effort** - you're starting something NEW and different now -c) **The proposed work you're about to start** - these describe what you want to do -d) **None of these** - let me explain what I'm actually working on +a) **Continue this work** - These docs describe what I'm building now +b) **Override/replace** - These are old, I'm starting something NEW +c) **Already done** - This work is complete, I'm starting a NEW project +d) **Not sure** - Let me explain my situation Your choice [a/b/c/d]: - - User is continuing old work - analyze artifacts to get details - Set continuing_old_work = true - Go to Step 2 (Analyze artifacts for details) - + + Got it! I'll create workflow tracking for your existing planning. + Set continuing_existing_planning = true + Store found artifacts for auto-completion in workflow status + Continue to Step 5 (detect track from artifacts) + - - User is doing NEW work - old artifacts are just context - Set continuing_old_work = false - Go to Step 3 (Ask about NEW work) - + + Should I archive these old documents before we start fresh? - - Artifacts describe proposed work - Set continuing_old_work = true - Go to Step 2 (Analyze artifacts for details) - +I can move them to {output_folder}/archive/ so they're not in the way. - - User will explain their situation - Go to Step 3 (Ask about their work) - - +Archive old docs? (y/n) - - I don't see any existing code or planning documents. Looks like we're starting fresh! - Go to Step 3 (Ask about their work) - - + Create archive folder if needed + Move all found planning artifacts to {output_folder}/archive/ + {{#if archived}}βœ… Old documents archived to {output_folder}/archive/{{else}}Starting fresh - old docs will be ignored{{/if}} + Set new_project = true + Continue to Step 3 (ask about their work) - -Analyze found artifacts in detail: -Extract project type from content (game vs software) -Count stories/epics to estimate level: - - Level 0: 1 story - - Level 1: 1-10 stories - - Level 2: 5-15 stories - - Level 3: 12-40 stories - - Level 4: 40+ stories - -Detect field type from codebase presence (greenfield vs brownfield) + -Based on the artifacts you're continuing, I'm suggesting **Level {{project_level}}** because I found {{story_count}} stories across {{epic_count}} epics. + + Should I archive the completed work before starting your new project? (y/n) + Archive old planning docs + {{#if archived}}βœ… Completed work archived{{else}}Ready for your new project!{{/if}} + Set new_project = true + Continue to Step 3 (ask about their work) + -Here's the complexity scale for reference: - -**{{field_type}} Project Levels:** - -- **Level 0** - Single atomic change (1 story) - bug fixes, typos, minor updates -- **Level 1** - Small feature (1-10 stories) - simple additions, isolated features -- **Level 2** - Medium feature set (5-15 stories) - dashboards, multiple related features -- **Level 3** - Complex integration (12-40 stories) - platform features, major integrations -- **Level 4** - Enterprise expansion (40+ stories) - multi-tenant, ecosystem changes - -**My suggestion:** Level {{project_level}} {{field_type}} {{project_type}} project - - -Does this match what you're working on? (y/n or tell me what's different) - - - Use analyzed values - Go to Step 4 (Load workflow path) - - - - Update values based on user corrections - Updated to: Level {{project_level}} {{field_type}} {{project_type}}. Correct? (y/n) - Go to Step 4 (Load workflow path) - - -project_name -project_type -project_level -field_type - - - -Tell me about what you're working on. What's the goal? - -Analyze user's description using keyword detection: - -- Level 0 keywords: "fix", "bug", "typo", "small change", "update", "patch", "one file" -- Level 1 keywords: "simple", "basic", "small feature", "add", "minor", "single feature" -- Level 2 keywords: "dashboard", "several features", "admin panel", "medium", "feature set" -- Level 3 keywords: "platform", "integration", "complex", "system", "architecture" -- Level 4 keywords: "enterprise", "multi-tenant", "multiple products", "ecosystem", "phased" - - -Make initial determination: - -- project_type (game or software) -- project_level (0-4) - tentative based on keywords -- field_type (greenfield or brownfield) -- confidence (high/medium/low) - based on clarity of description - - - - Thanks! Let me ask a few clarifying questions to make sure I route you correctly: - -1. Roughly how many distinct features or changes do you think this involves? - -- Just one thing (e.g., fix a bug, add one button, update one API) -- A small feature (2-5 related changes) -- Several features (5-15 related things) -- A major addition (15-40 things to do) -- A large initiative (40+ changes across many areas) - - -Adjust project_level based on response - -2. How much of the existing codebase will this touch? - -- Single file or small area -- One module or component -- Multiple modules (2-4 areas) -- Many modules with integration needs -- System-wide changes - - -Validate and adjust project_level based on scope - - - 3. Is this a game or a software application? - Set project_type based on response + + Tell me what you're trying to accomplish: + Analyze response and guide to appropriate choice (a, b, or c) + Loop back to present choices again with guidance - + + 🚨 **I found active implementation work:** + +{{#if found_stories}} +πŸ“ **Story files:** {{story_count}} stories in {output_folder}/stories/ +{{#if story_examples}}- Examples: {{story_examples}}{{/if}} +{{/if}} + +{{#if found_sprint_status}} +πŸ“Š **Sprint tracking:** {{sprint_status_path}} + +- {{completed_stories}} completed +- {{in_progress_stories}} in progress +- {{pending_stories}} pending + {{/if}} + +{{#if found_workflow_status}} +πŸ“‹ **Workflow status:** {{workflow_status_path}} + +- Generated: {{workflow_status_date}} + {{/if}} + +{{#if found_planning_docs}} +πŸ“š **Planning docs:** {{found_planning_summary}} +{{/if}} + + +What's happening here? + +a) **Continue implementation** - I'm still working on these stories +b) **Completed** - This work is done, starting something NEW +c) **Abandoned** - Stopping this, starting over +d) **Not sure** - Let me explain + +Your choice [a/b/c/d]: + + + Check if bmm-workflow-status.yaml exists + + + βœ… **You already have workflow tracking set up!** + +Your current status file: {{workflow_status_path}} + +You don't need workflow-init - you're already using the workflow system. + +**To check your progress:** + +- Load your current agent (PM, SM, Architect, etc.) +- Run: **/bmad:bmm:workflows:workflow-status** + +This will show you what to do next. + +Happy building! πŸš€ +Exit workflow gracefully (workflow already initialized) + + + + You have work in progress but no workflow tracking. + +I'll create workflow tracking that recognizes your existing work. +Set migrating_legacy_project = true +Store found artifacts for workflow status generation +Continue to Step 5 (detect track from artifacts) + + + + + Archive the old work before starting fresh? (y/n) + Create archive folder + Move stories, sprint status, and planning docs to archive + {{#if archived}}βœ… Old work archived{{else}}Clean slate! Ready for your new project.{{/if}} + Set new_project = true + Continue to Step 3 (ask about their work) + + + + Tell me more about your situation: + Analyze and guide to appropriate choice + + + + + I see you have an existing codebase: + +{{codebase_summary}} + +No BMM artifacts found - this project hasn't used BMad Method yet. + +Set field_type = "brownfield" +Set new_project = true +Note: Will need document-project before planning + + +πŸ’‘ **Note for brownfield projects:** +You'll need to run **document-project** workflow before planning. +This analyzes your codebase and creates documentation that AI agents can use. + +I'll include this as a prerequisite in your workflow path. +Continue to Step 3 (ask about their work) + + + + I found some artifacts but the project state is unclear: + +{{list_found_artifacts}} + +Let me understand your situation. + +What are you trying to do? + +a) Continue working on an existing project +b) Start something completely NEW +c) Fix/enhance the existing code +d) Let me explain my situation + +Your choice: + +Analyze response carefully +Guide to appropriate state (Continue existing = Step 5, New = Step 3) + + + + + +Tell me about what you're working on. What's the goal? + +Store user_description + +Analyze description for field type: + +- Brownfield indicators: "existing", "current", "add to", "modify", "enhance", "refactor" +- Greenfield indicators: "new", "build", "create", "from scratch", "start" +- Codebase presence overrides: If found codebase = brownfield unless user says "scaffold" + + + I see you have existing code here. Are you: 1. **Adding to or modifying** the existing codebase (brownfield) @@ -202,189 +309,463 @@ Your choice [1/2/3]: -Build reasoning for suggestion -Store detected_indicators (keywords, scope indicators, complexity signals) +Set field_type based on codebase presence (codebase = brownfield, none = greenfield) -Based on what you've described, I'm suggesting **Level {{project_level}}** because: +Detect project_type (game vs software): -{{reasoning}} (detected: {{detected_indicators}}) - -Here's the complexity scale for reference: - -**{{field_type}} Project Levels:** - -- **Level 0** - Single atomic change (1 story) - bug fixes, typos, minor updates, single file changes -- **Level 1** - Small feature (1-10 stories) - simple additions, isolated features, one module -- **Level 2** - Medium feature set (5-15 stories) - dashboards, multiple related features, several modules -- **Level 3** - Complex integration (12-40 stories) - platform features, major integrations, architectural changes -- **Level 4** - Enterprise expansion (40+ stories) - multi-tenant, ecosystem changes, system-wide initiatives - -**My suggestion:** Level {{project_level}} {{field_type}} {{project_type}} project - - -Does this match what you're working on? (y/n or tell me what's different) - - - Use determined values - Go to Step 4 (Load workflow path) - - - - Update values based on corrections - Updated to: Level {{project_level}} {{field_type}} {{project_type}} - Does that look right now? (y/n) - If yes, go to Step 4. If no, ask what needs adjustment and repeat. - - -project_name -project_type -project_level -field_type - - - -Determine path file based on selections: - - - Load {path_files}/game-design.yaml - Set workflow_path_file = "game-design.yaml" - - - - - Build filename: {field_type}-level-{project_level}.yaml - Load {path_files}/{field_type}-level-{project_level}.yaml - Set workflow_path_file = constructed filename - - -Parse workflow path file to extract phases and workflows -workflow_path_file - - - -Parse the loaded workflow path file and extract all workflows - -For each phase in the path file: - -- Extract phase number and name -- Extract all workflows in that phase -- For each workflow, determine its status type: - - required: true β†’ status = "required" - - recommended: true β†’ status = "recommended" - - conditional: "if_has_ui" β†’ status = "conditional" - - optional: true β†’ status = "optional" - - Default if not specified β†’ status = "required" - - -Build the workflow_items list in this format: - -For each phase: - -1. Add comment header: ` # Phase {n}: {Phase Name}` -2. For each workflow in phase: - - Add entry: ` {workflow-id}: {status}` -3. Add blank line between phases - -Example structure: - -``` - # Phase 1: Analysis - brainstorm-project: optional - research: optional - product-brief: recommended - - # Phase 2: Planning - prd: required - validate-prd: optional - create-design: conditional -``` - - - -Scan for existing workflow output files to auto-detect completion: - -For each workflow in the list, check common output locations: - -- {output_folder}/brainstorm-\*.md for brainstorm-project -- {output_folder}/research-\*.md for research -- {output_folder}/product-brief.md for product-brief -- {output_folder}/prd.md for prd -- {output_folder}/ux-design.md for create-design -- {output_folder}/architecture.md for create-architecture -- {output_folder}/tech-spec.md for tech-spec -- {output_folder}/sprint-status.yaml for sprint-planning - -CRITICAL: If file exists, replace status with ONLY the file path - nothing else. -Example: product-brief: docs/product-brief.md -NOT: product-brief: "completed - docs/product-brief.md" or any other text. - - -workflow_items - - - -Set generated date to current date -generated - -Prepare all template variables for workflow-status-template.yaml: - -- generated: {current_date} -- project_name: {project_name} -- project_type: {project_type} -- project_level: {project_level} -- field_type: {field_type} -- workflow_path_file: {workflow_path_file} -- workflow_items: {workflow_items from step 5} +- Game keywords: "game", "player", "level", "gameplay", "rpg", "fps", "puzzle game" +- Default to "software" if not clearly a game -Display a preview of what will be created: +user_description +field_type +project_type + -Show the first workflow in each phase and total count: + +Before we determine your planning approach, I want to offer some optional +workflows that can help you think through your project more deeply: -"Ready to create workflow status tracking: +Would you like to: -- Phase 1 ({phase_1_workflow_count} workflows): Starting with {first_workflow_phase_1} -- Phase 2 ({phase_2_workflow_count} workflows): Starting with {first_workflow_phase_2} -- Phase 3 ({phase_3_workflow_count} workflows): Starting with {first_workflow_phase_3} -- Phase 4 (Implementation tracked separately in sprint-status.yaml) +- 🧠 **Brainstorm** your project? (Creative exploration and idea generation) +- πŸ” **Research** your domain? (Technical research, competitive analysis, deep-dives) -{{#if detected_completed_workflows}} -Found existing work: -{{#each detected_files}} +These are completely OPTIONAL but can help clarify your vision before planning. + +Your choice: +a) Yes, brainstorm first +b) Yes, research first +c) Yes, both +d) No, I'm ready to plan + +Your choice [a/b/c/d]: + + + Set brainstorm_requested = true + Set research_requested = false + + + + Set brainstorm_requested = false + Set research_requested = true + + + + Set brainstorm_requested = true + Set research_requested = true + + + + Set brainstorm_requested = false + Set research_requested = false + + +brainstorm_requested +research_requested + + + + + + Detect track from existing artifacts: + +**Track Detection Logic:** + +- Has PRD + Architecture β†’ BMad Method +- Has PRD only β†’ BMad Method (architecture was optional/skipped) +- Has tech-spec only β†’ BMad Quick Flow +- Has Security/DevOps docs β†’ BMad Enterprise Method + + + Based on your existing planning documents, I've detected you're using: + +**{{detected_track_name}}** + +{{#if found_artifacts_list}} +Found completed workflows: +{{#each found_artifacts_list}} - {{workflow_name}}: {{file_path}} {{/each}} - {{/if}}" + {{/if}} + +I'll create workflow tracking that matches your existing approach and +automatically marks these completed workflows as done. + +Does this look right? (y/n) + +Which track should I use instead? + +1. BMad Quick Flow +2. BMad Method +3. BMad Enterprise Method + +Your choice: + +Update selected_track based on choice +Store selected_track +selected_track + +Continue to Step 6 (product brief question if applicable) + + + + Now, let me explain your planning options. + +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + +πŸš€ **BMad Quick Flow** - Fast Implementation Path + +⏱️ **Time:** Hours to 1 day of planning +πŸ“ **Approach:** Tech-spec focused - just enough detail to start coding +βœ… **Best for:** Simple features, bug fixes, scope is crystal clear +⚠️ **Trade-off:** Less upfront planning = higher risk of rework if complexity emerges +πŸ€– **Agent Support:** Basic - AI will have minimal context + +**Example:** "Fix login bug" or "Add export button" + +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + +🎯 **BMad Method** - Full Product Planning (RECOMMENDED) + +⏱️ **Time:** 1-3 days of planning +πŸ“ **Approach:** PRD + UX + Architecture - complete product and system design +βœ… **Best for:** + +- **GREENFIELD:** Products, platforms, multi-feature initiatives +- **BROWNFIELD:** Complex additions (new UIs + APIs, major refactors, new modules) + +βœ… **Benefits:** + +- AI agents have COMPLETE context for better code generation +- Architecture distills massive codebases into focused solution design +- Prevents architectural drift and ensures consistency +- Fewer surprises and less rework during implementation +- Faster overall delivery (planning investment pays off!) +- Better code quality and maintainability + +πŸ€– **Agent Support:** Exceptional - AI becomes a true coding partner with full context + +{{#if brownfield}} +πŸ’‘ **Why Architecture for Brownfield?** +Your brownfield documentation might be huge (thousands of lines). The Architecture +workflow takes all that context and creates a SUCCINCT solution design specific to +YOUR project. This keeps AI agents focused on YOUR changes without getting lost +in the existing codebase details. +{{/if}} + +**Example:** "User dashboard with analytics" or "Payment integration system" +or "Add real-time collaboration to existing editor" + +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + +🏒 **BMad Enterprise Method** - Extended Enterprise Planning + +⏱️ **Time:** 3-7 days of planning +πŸ“ **Approach:** BMad Method + Security Architecture + DevOps + Test Strategy +βœ… **Best for:** Enterprise requirements, compliance, multi-tenant, mission-critical +βœ… **Benefits:** All of BMad Method PLUS specialized planning for: + +- Security architecture and threat modeling +- DevOps pipeline and infrastructure planning +- Comprehensive test strategy +- Compliance and audit requirements + +πŸ€– **Agent Support:** Elite - comprehensive planning for complex enterprise systems + +**Example:** "Multi-tenant SaaS platform" or "HIPAA-compliant patient portal" +or "Add SOC2-compliant audit logging to enterprise app" + +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + +Generate recommendation based on user_description and field_type: + +**Recommendation Logic:** + +- Complexity keywords (dashboard, platform, system, integration, multiple features) β†’ Recommend BMad Method +- Simple keywords (fix, bug, add button, simple) β†’ Mention Quick Flow as option +- Enterprise keywords (multi-tenant, compliance, security, audit) β†’ Recommend Enterprise +- Brownfield + complex β†’ Strongly recommend Method (explain architecture benefit) +- Greenfield + complex β†’ Recommend Method -Ready to create your workflow status file? (y/n) + + +πŸ’‘ **My Honest Recommendation:** + +{{recommendation_with_reasoning}} + +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + +Which approach fits your situation? + +1. **BMad Quick Flow** - Fast, minimal planning (I accept rework risk) +2. **BMad Method** - Full planning for better AI results (RECOMMENDED) +3. **BMad Enterprise Method** - Extended planning for enterprise needs +4. **I'm not sure** - Help me decide + +Your choice [1/2/3/4]: + + + Tell me more about your concerns or uncertainties: + Provide tailored guidance based on their specific concerns + Present choices again with more specific recommendation + + +Map choice to track name: + +- 1 β†’ "quick-flow" +- 2 β†’ "method" +- 3 β†’ "enterprise" + + +Store selected_track +selected_track + + + + + + + + Skip this step - product brief not applicable for brownfield or quick flow + Set product_brief_requested = false + Continue to Step 7 (generate workflow path) + + + + One more optional workflow for greenfield projects: + +πŸ“‹ **Product Brief** - Strategic product planning document + +This is OPTIONAL but recommended for greenfield BMad Method projects. +It helps you articulate: + +- Product vision and unique value proposition +- Target users and their needs +- Success criteria and goals +- Market positioning and strategy + +This comes BEFORE your PRD and helps inform it with strategic thinking. + +Would you like to include Product Brief in your workflow? + +a) Yes, include Product Brief +b) No, skip to PRD + +Your choice [a/b]: + + + Set product_brief_requested = true + + + + Set product_brief_requested = false + + +product_brief_requested + + + + + + +Determine path file based on selected track and field type: + +**Path File Mapping:** + +- quick-flow + greenfield β†’ "quick-flow-greenfield.yaml" +- quick-flow + brownfield β†’ "quick-flow-brownfield.yaml" +- method + greenfield β†’ "method-greenfield.yaml" +- method + brownfield β†’ "method-brownfield.yaml" +- enterprise + greenfield β†’ "enterprise-greenfield.yaml" +- enterprise + brownfield β†’ "enterprise-brownfield.yaml" +- game β†’ "game-design.yaml" + + +Load {path_files}/{determined_path_file} +Parse workflow path file to extract phases and workflows + +Build workflow_items list: + +For each phase in path file: + +1. Check if phase should be included based on: + - User choices (brainstorm_requested, research_requested, product_brief_requested) + - Phase conditions (prerequisite phases, optional phases) +2. Add comment header: ` # Phase {n}: {Phase Name}` +3. For each workflow in phase: + - Check if workflow should be included based on user choices + - Add entry: ` {workflow-id}: {default_status}` + - Default status from path file (required/optional/recommended/conditional) +4. Add blank line between phases + + +Scan for existing completed workflows and update workflow_items: + +**Scan locations:** + +- Brainstorm: {output_folder}/brainstorm\*.md +- Research: {output_folder}/research\*.md +- Product Brief: {output*folder}/\_brief*.md +- PRD: {output*folder}/\_prd*.md or {output*folder}/\_prd*/index.md +- Tech-spec: {output*folder}/\_tech-spec*.md or {output*folder}/\_spec*.md +- Epics: {output*folder}/\_epic*.md or {output*folder}/\_epic*/index.md +- UX Design: {output*folder}/\_ux*.md or {output*folder}/\_design*.md +- Architecture: {output*folder}/\_architecture*.md or {output*folder}/\_arch*.md +- Sprint Planning: {output*folder}/\_sprint*.yaml + +**CRITICAL:** If file exists, replace workflow status with ONLY the file path. +Example: `prd: docs/prd.md` (NOT "completed - docs/prd.md") + + +workflow_path_file +workflow_items + + + + + +Set generated date to current date +generated + +Perfect! Here's your personalized BMad workflow path: + +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + +**Track:** {{selected_track_display_name}} +**Field Type:** {{field_type}} +**Project:** {{project_name}} + +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + +{{#if brownfield AND needs_documentation}} +πŸ”§ **Prerequisites:** +βœ… document-project - Create comprehensive codebase documentation +(Required before planning workflows) +{{/if}} + +{{#if has_discovery_phase}} +🧠 **Phase 0: Discovery** (Optional - based on your choices) +{{#if brainstorm_requested}} +βœ… Brainstorm - Creative exploration session +{{/if}} +{{#if research_requested}} +βœ… Research - Domain and technical research +{{/if}} +{{#if product_brief_requested}} +βœ… Product Brief - Strategic product planning +{{/if}} +{{/if}} + +{{#if selected_track == quick-flow}} +πŸ“ **Phase 1: Planning** +βœ… Tech-Spec - Implementation-focused specification +(Auto-detects epic structure if 2+ stories) + +πŸš€ **Phase 2: Implementation** +βœ… Sprint Planning - Create sprint tracking +βœ… Story Development - Implement story-by-story +{{/if}} + +{{#if selected_track in [method, enterprise]}} +πŸ“‹ **Phase 1: Planning** +βœ… PRD - Product Requirements Document +βœ… Validate PRD (optional quality check) +βœ… UX Design (if UI components - determined after PRD) + +πŸ—οΈ **Phase 2: Solutioning** +{{#if brownfield}} +βœ… Architecture - Integration design (RECOMMENDED for brownfield) +Creates focused solution design from your existing codebase context +{{else}} +βœ… Architecture - System design document +{{/if}} +βœ… Validate Architecture (optional quality check) +βœ… Solutioning Gate Check - Validate all planning aligns before coding + +πŸš€ **Phase 3: Implementation** +βœ… Sprint Planning - Create sprint tracking +βœ… Story Development - Implement story-by-story with epic-tech-specs +{{/if}} + +{{#if selected_track == enterprise}} + +🏒 **Additional Enterprise Planning:** +βœ… Security Architecture - Threat modeling and security design +βœ… DevOps Strategy - Pipeline and infrastructure planning +βœ… Test Strategy - Comprehensive testing approach +{{/if}} + +{{#if found_existing_artifacts}} +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + +πŸ“ **Existing Work Detected:** + +I found these completed workflows and will mark them as done: +{{#each completed_workflows}} +βœ… {{workflow_name}}: {{file_path}} +{{/each}} + +Your workflow tracking will start from where you left off! + +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +{{/if}} + +Ready to create your workflow tracking file? (y/n) - Generate YAML from workflow-status-template.yaml with all variables - Save status file to {output_folder}/bmm-workflow-status.yaml + Prepare all template variables for workflow-status-template.yaml: + - generated: {current_date} + - project_name: {project_name} + - project_type: {project_type} + - selected_track: {selected_track} + - field_type: {field_type} + - workflow_path_file: {workflow_path_file} + - workflow_items: {workflow_items from step 7} + -Identify the first non-completed workflow in the list -Look up that workflow's agent and command from the path file +Generate YAML from workflow-status-template.yaml with all variables +Save status file to {output_folder}/bmm-workflow-status.yaml -βœ… Workflow status file created at {output_folder}/bmm-workflow-status.yaml +Identify the first non-completed workflow in workflow_items +Look up that workflow's agent and command from the loaded path file -**Next Steps:** +βœ… **Workflow tracking created:** {output_folder}/bmm-workflow-status.yaml -{{#if detected_completed_workflows}} -You have {{detected_count}} workflow(s) already completed. Great progress! +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + +{{#if completed_workflows_found}} +πŸŽ‰ Great news! I found {{completed_count}} workflow(s) already completed. {{/if}} **Next Workflow:** {{next_workflow_name}} - **Agent:** {{next_agent}} - **Command:** /bmad:bmm:workflows:{{next_workflow_id}} -{{#if next_agent !== 'pm'}} -It is recommended to start a new chat and load the {{next_agent}} agent before running the next workflow. +{{#if next_agent != 'analyst' AND next_agent != 'pm'}} +πŸ’‘ **Tip:** Start a new chat and load the **{{next_agent}}** agent before running this workflow. {{/if}} - + +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + +Happy building with BMad Method! πŸš€ + +**To check your progress anytime:** + +- Load any BMM agent +- Run: /bmad:bmm:workflows:workflow-status + + + + + No problem! You can run workflow-init again anytime you're ready. + +To get started later, just load the Analyst agent and run: +**/bmad:bmm:workflows:workflow-init** + diff --git a/bmad/bmm/workflows/workflow-status/init/workflow.yaml.bak b/bmad/bmm/workflows/workflow-status/init/workflow.yaml.bak new file mode 100644 index 00000000..812e51c0 --- /dev/null +++ b/bmad/bmm/workflows/workflow-status/init/workflow.yaml.bak @@ -0,0 +1,27 @@ +# Workflow Init - Initial Project Setup +name: workflow-init +description: "Initialize a new BMM project by determining level, type, and creating workflow path" +author: "BMad" + +# Critical variables from config +config_source: "{project-root}/bmad/bmm/config.yaml" +output_folder: "{config_source}:output_folder" +user_name: "{config_source}:user_name" +project_name: "{config_source}:project_name" +communication_language: "{config_source}:communication_language" +document_output_language: "{config_source}:document_output_language" +user_skill_level: "{config_source}:user_skill_level" +date: system-generated + +# Workflow components +installed_path: "{project-root}/bmad/bmm/workflows/workflow-status/init" +instructions: "{installed_path}/instructions.md" +template: "{project-root}/bmad/bmm/workflows/workflow-status/workflow-status-template.yaml" + +# Path data files +path_files: "{project-root}/bmad/bmm/workflows/workflow-status/paths/" + +# Output configuration +default_output_file: "{output_folder}/bmm-workflow-status.yaml" + +standalone: true diff --git a/bmad/bmm/workflows/workflow-status/paths/brownfield-level-0.yaml b/bmad/bmm/workflows/workflow-status/paths/brownfield-level-0.yaml deleted file mode 100644 index 854365c4..00000000 --- a/bmad/bmm/workflows/workflow-status/paths/brownfield-level-0.yaml +++ /dev/null @@ -1,54 +0,0 @@ -# Brownfield Level 0 - Single Atomic Change in Existing Codebase -# One change to existing system - -project_type: "software" -level: 0 -field_type: "brownfield" -description: "Single atomic change to existing codebase" - -phases: - - prerequisite: true - name: "Documentation" - conditional: "if_undocumented" - note: "NOT a phase - prerequisite for brownfield without docs OR post-completion cleanup" - workflows: - - id: "document-project" - required: true - agent: "analyst" - command: "document-project" - output: "Comprehensive project documentation" - purpose: "Understand existing codebase before planning OR create superior final docs after Phase 4" - - - phase: 1 - name: "Analysis" - optional: true - workflows: - - id: "brainstorm-project" - optional: true - agent: "analyst" - command: "brainstorm-project" - - - phase: 2 - name: "Planning" - required: true - workflows: - - id: "tech-spec" - required: true - agent: "architect" - command: "tech-spec" - output: "Creates single story file" - note: "Must understand existing patterns" - - - phase: 3 - name: "Solutioning" - skip: true - - - phase: 4 - name: "Implementation" - required: true - workflows: - - id: "sprint-planning" - required: true - agent: "sm" - command: "sprint-planning" - note: "Creates sprint plan with all stories - subsequent work tracked in sprint plan output, not workflow-status" diff --git a/bmad/bmm/workflows/workflow-status/paths/brownfield-level-2.yaml b/bmad/bmm/workflows/workflow-status/paths/brownfield-level-2.yaml deleted file mode 100644 index 158c7a48..00000000 --- a/bmad/bmm/workflows/workflow-status/paths/brownfield-level-2.yaml +++ /dev/null @@ -1,76 +0,0 @@ -# Brownfield Level 2 - Medium Project in Existing Codebase -# 5-15 stories, multiple features added to existing system - -project_type: "software" -level: 2 -field_type: "brownfield" -description: "Medium project adding multiple features to existing codebase" - -phases: - - prerequisite: true - name: "Documentation" - conditional: "if_undocumented" - note: "NOT a phase - prerequisite for brownfield without docs OR post-completion cleanup" - workflows: - - id: "document-project" - required: true - agent: "analyst" - command: "document-project" - output: "Comprehensive project documentation" - purpose: "Understand existing codebase before planning OR create superior final docs after Phase 4" - - - phase: 1 - name: "Analysis" - optional: true - workflows: - - id: "brainstorm-project" - optional: true - agent: "analyst" - command: "brainstorm-project" - - id: "research" - optional: true - agent: "analyst" - command: "research" - - id: "product-brief" - optional: true - agent: "analyst" - command: "product-brief" - - - phase: 2 - name: "Planning" - required: true - workflows: - - id: "prd" - recommended: true - agent: "pm" - command: "prd" - output: "Focused PRD for new features" - note: "Must consider existing system constraints" - - id: "validate-prd" - optional: true - agent: "pm" - command: "validate-prd" - - id: "tech-spec" - required: true - agent: "pm" - command: "tech-spec" - output: "Creates spec with multiple story files" - note: "Integrate with existing patterns" - - id: "create-design" - conditional: "if_has_ui" - agent: "ux-designer" - command: "create-design" - - - phase: 3 - name: "Solutioning" - skip: true - - - phase: 4 - name: "Implementation" - required: true - workflows: - - id: "sprint-planning" - required: true - agent: "sm" - command: "sprint-planning" - note: "Creates sprint plan with all stories - subsequent work tracked in sprint plan output, not workflow-status" diff --git a/bmad/bmm/workflows/workflow-status/paths/brownfield-level-4.yaml b/bmad/bmm/workflows/workflow-status/paths/brownfield-level-4.yaml deleted file mode 100644 index 0922cb52..00000000 --- a/bmad/bmm/workflows/workflow-status/paths/brownfield-level-4.yaml +++ /dev/null @@ -1,88 +0,0 @@ -# Brownfield Level 4 - Enterprise Scale Changes to Existing System -# 40+ stories, major expansion of existing enterprise system - -project_type: "software" -level: 4 -field_type: "brownfield" -description: "Enterprise scale expansion of existing system" - -phases: - - prerequisite: true - name: "Documentation" - conditional: "if_undocumented" - note: "NOT a phase - prerequisite for brownfield without docs OR post-completion cleanup. Critical for enterprise-scale changes" - workflows: - - id: "document-project" - required: true - agent: "analyst" - command: "document-project" - output: "Comprehensive project documentation" - purpose: "Understand existing codebase before planning OR create superior final docs after Phase 4" - - - phase: 1 - name: "Analysis" - required: true - workflows: - - id: "brainstorm-project" - recommended: true - agent: "analyst" - command: "brainstorm-project" - - id: "research" - required: true - agent: "analyst" - command: "research" - note: "Research existing system architecture deeply" - - id: "product-brief" - required: true - agent: "analyst" - command: "product-brief" - note: "Strategic brief for major expansion" - - - phase: 2 - name: "Planning" - required: true - workflows: - - id: "prd" - required: true - agent: "pm" - command: "prd" - output: "Comprehensive PRD considering existing system" - - id: "validate-prd" - optional: true - agent: "pm" - command: "validate-prd" - - id: "create-design" - required: true - agent: "ux-designer" - command: "create-design" - note: "Multiple UI/UX specifications" - - - phase: 3 - name: "Solutioning" - required: true - workflows: - - id: "create-architecture" - required: true - agent: "architect" - command: "create-architecture" - output: "Architecture for system expansion" - note: "Must maintain backward compatibility" - - id: "validate-architecture" - optional: true - agent: "architect" - command: "validate-architecture" - - id: "solutioning-gate-check" - required: true - agent: "architect" - command: "solutioning-gate-check" - note: "Critical validation before major changes" - - - phase: 4 - name: "Implementation" - required: true - workflows: - - id: "sprint-planning" - required: true - agent: "sm" - command: "sprint-planning" - note: "Creates sprint plan with all stories - subsequent work tracked in sprint plan output, not workflow-status" diff --git a/bmad/bmm/workflows/workflow-status/paths/enterprise-brownfield.yaml b/bmad/bmm/workflows/workflow-status/paths/enterprise-brownfield.yaml new file mode 100644 index 00000000..7e4d0d73 --- /dev/null +++ b/bmad/bmm/workflows/workflow-status/paths/enterprise-brownfield.yaml @@ -0,0 +1,120 @@ +# BMad Enterprise Method - Brownfield +# Extended enterprise planning for complex brownfield with security/devops/test (30+ stories typically) + +method_name: "BMad Enterprise Method" +track: "enterprise" +field_type: "brownfield" +description: "Enterprise-grade planning for complex brownfield additions with extended requirements" + +phases: + - prerequisite: true + name: "Documentation" + conditional: "if_undocumented" + note: "NOT a phase - prerequisite for brownfield without docs (nearly mandatory for enterprise)" + workflows: + - id: "document-project" + required: true + agent: "analyst" + command: "document-project" + output: "Comprehensive project documentation" + purpose: "Understand existing codebase - critical for enterprise brownfield" + + - phase: 0 + name: "Discovery (Required)" + required: true + note: "Analysis phase required for enterprise projects" + workflows: + - id: "brainstorm-project" + optional: true + agent: "analyst" + command: "brainstorm-project" + included_by: "user_choice" + + - id: "research" + recommended: true + agent: "analyst" + command: "research" + included_by: "user_choice" + note: "Highly recommended - compliance, integration, risk research" + + - id: "product-brief" + optional: true + agent: "analyst" + command: "product-brief" + included_by: "user_choice" + note: "Optional for brownfield enterprise" + + - phase: 1 + name: "Planning" + required: true + workflows: + - id: "prd" + required: true + agent: "pm" + command: "prd" + output: "Enterprise PRD with compliance requirements" + note: "Must address existing system constraints and migration strategy" + + - id: "validate-prd" + recommended: true + agent: "pm" + command: "validate-prd" + + - id: "create-design" + recommended: true + agent: "ux-designer" + command: "create-design" + note: "Recommended - must integrate with existing UX patterns" + + - phase: 2 + name: "Solutioning" + required: true + workflows: + - id: "create-architecture" + required: true + agent: "architect" + command: "create-architecture" + output: "Integration architecture with enterprise considerations" + note: "Distills brownfield context + adds security/scalability/compliance design" + + - id: "create-security-architecture" + required: true + agent: "architect" + command: "create-security-architecture" + output: "Security architecture for brownfield integration" + note: "Future workflow - threat model, auth integration, audit requirements" + + - id: "create-devops-strategy" + required: true + agent: "architect" + command: "create-devops-strategy" + output: "DevOps strategy for brownfield deployment" + note: "Future workflow - CI/CD integration, deployment strategy, monitoring" + + - id: "create-test-strategy" + required: true + agent: "tea" + command: "create-test-strategy" + output: "Test strategy including regression testing" + note: "Future workflow - critical for brownfield to prevent breaking existing functionality" + + - id: "validate-architecture" + optional: true + agent: "architect" + command: "validate-architecture" + + - id: "solutioning-gate-check" + required: true + agent: "architect" + command: "solutioning-gate-check" + note: "Critical gate - validates all planning before touching production system" + + - phase: 3 + name: "Implementation" + required: true + workflows: + - id: "sprint-planning" + required: true + agent: "sm" + command: "sprint-planning" + note: "Enterprise brownfield requires careful phasing and feature flags" diff --git a/bmad/bmm/workflows/workflow-status/paths/enterprise-greenfield.yaml b/bmad/bmm/workflows/workflow-status/paths/enterprise-greenfield.yaml new file mode 100644 index 00000000..f5584d2c --- /dev/null +++ b/bmad/bmm/workflows/workflow-status/paths/enterprise-greenfield.yaml @@ -0,0 +1,108 @@ +# BMad Enterprise Method - Greenfield +# Extended enterprise planning with security/devops/test for greenfield (30+ stories typically) + +method_name: "BMad Enterprise Method" +track: "enterprise" +field_type: "greenfield" +description: "Complete enterprise-grade planning with security, devops, and test strategy" + +phases: + - phase: 0 + name: "Discovery (Required)" + required: true + note: "Analysis phase required for enterprise projects" + workflows: + - id: "brainstorm-project" + optional: true + agent: "analyst" + command: "brainstorm-project" + included_by: "user_choice" + + - id: "research" + recommended: true + agent: "analyst" + command: "research" + included_by: "user_choice" + note: "Highly recommended for enterprise - domain and compliance research" + + - id: "product-brief" + recommended: true + agent: "analyst" + command: "product-brief" + included_by: "user_choice" + note: "Recommended for strategic alignment" + + - phase: 1 + name: "Planning" + required: true + workflows: + - id: "prd" + required: true + agent: "pm" + command: "prd" + output: "Comprehensive Product Requirements Document" + note: "Enterprise-level requirements with compliance considerations" + + - id: "validate-prd" + recommended: true + agent: "pm" + command: "validate-prd" + + - id: "create-design" + recommended: true + agent: "ux-designer" + command: "create-design" + note: "Highly recommended for enterprise - design system and patterns" + + - phase: 2 + name: "Solutioning" + required: true + workflows: + - id: "create-architecture" + required: true + agent: "architect" + command: "create-architecture" + output: "Enterprise-grade system architecture" + note: "Includes scalability, multi-tenancy, integration architecture" + + - id: "create-security-architecture" + required: true + agent: "architect" + command: "create-security-architecture" + output: "Security architecture and threat model" + note: "Future workflow - security design, auth, compliance" + + - id: "create-devops-strategy" + required: true + agent: "architect" + command: "create-devops-strategy" + output: "DevOps pipeline and infrastructure plan" + note: "Future workflow - CI/CD, deployment, monitoring" + + - id: "create-test-strategy" + required: true + agent: "tea" + command: "create-test-strategy" + output: "Comprehensive test strategy" + note: "Future workflow - test approach, automation, quality gates" + + - id: "validate-architecture" + optional: true + agent: "architect" + command: "validate-architecture" + + - id: "solutioning-gate-check" + required: true + agent: "architect" + command: "solutioning-gate-check" + note: "Validates all planning artifacts align before implementation" + + - phase: 3 + name: "Implementation" + required: true + workflows: + - id: "sprint-planning" + required: true + agent: "sm" + command: "sprint-planning" + note: "Creates sprint plan - enterprise projects may require phased rollout" diff --git a/bmad/bmm/workflows/workflow-status/paths/greenfield-level-0.yaml b/bmad/bmm/workflows/workflow-status/paths/greenfield-level-0.yaml deleted file mode 100644 index 22fdc077..00000000 --- a/bmad/bmm/workflows/workflow-status/paths/greenfield-level-0.yaml +++ /dev/null @@ -1,45 +0,0 @@ -# Greenfield Level 0 - Single Atomic Change -# The simplest possible workflow - one change, one story - -project_type: "software" -level: 0 -field_type: "greenfield" -description: "Single atomic change - bug fix, tiny feature, one story" - -phases: - - phase: 1 - name: "Analysis" - optional: true - workflows: - - id: "brainstorm-project" - optional: true - agent: "analyst" - command: "brainstorm-project" - - id: "product-brief" - optional: true - agent: "analyst" - command: "product-brief" - - - phase: 2 - name: "Planning" - required: true - workflows: - - id: "tech-spec" - required: true - agent: "pm" - command: "tech-spec" - output: "Creates Technical Specification with single story file" - - - phase: 3 - name: "Solutioning" - skip: true - - - phase: 4 - name: "Implementation" - required: true - workflows: - - id: "sprint-planning" - required: true - agent: "sm" - command: "sprint-planning" - note: "Creates sprint plan with all stories - subsequent work tracked in sprint plan output, not workflow-status" diff --git a/bmad/bmm/workflows/workflow-status/paths/greenfield-level-3.yaml b/bmad/bmm/workflows/workflow-status/paths/greenfield-level-3.yaml deleted file mode 100644 index 307bd42e..00000000 --- a/bmad/bmm/workflows/workflow-status/paths/greenfield-level-3.yaml +++ /dev/null @@ -1,73 +0,0 @@ -# Greenfield Level 3 - Complex System -# Subsystems, integrations, architectural decisions required - -project_type: "software" -level: 3 -field_type: "greenfield" -description: "Complex system - subsystems, integrations, architectural decisions" - -phases: - - phase: 1 - name: "Analysis" - optional: true - workflows: - - id: "brainstorm-project" - optional: true - agent: "analyst" - command: "brainstorm-project" - - id: "research" - optional: true - agent: "analyst" - command: "research" - note: "Multiple research areas likely" - - id: "product-brief" - recommended: true - agent: "analyst" - command: "product-brief" - - - phase: 2 - name: "Planning" - required: true - workflows: - - id: "prd" - required: true - agent: "pm" - command: "prd" - output: "High-level requirements and epic definitions" - - id: "validate-prd" - optional: true - agent: "pm" - command: "validate-prd" - - id: "create-design" - conditional: "if_has_ui" - agent: "ux-designer" - command: "create-design" - - - phase: 3 - name: "Solutioning" - required: true - workflows: - - id: "create-architecture" - required: true - agent: "architect" - command: "create-architecture" - output: "System-wide architecture document" - - id: "validate-architecture" - optional: true - agent: "architect" - command: "validate-architecture" - - id: "solutioning-gate-check" - recommended: true - agent: "architect" - command: "solutioning-gate-check" - note: "Validate PRD + UX + architecture cohesion before implementation" - - - phase: 4 - name: "Implementation" - required: true - workflows: - - id: "sprint-planning" - required: true - agent: "sm" - command: "sprint-planning" - note: "Creates sprint plan with all stories - subsequent work tracked in sprint plan output, not workflow-status" diff --git a/bmad/bmm/workflows/workflow-status/paths/greenfield-level-4.yaml b/bmad/bmm/workflows/workflow-status/paths/greenfield-level-4.yaml deleted file mode 100644 index 3bde6fee..00000000 --- a/bmad/bmm/workflows/workflow-status/paths/greenfield-level-4.yaml +++ /dev/null @@ -1,75 +0,0 @@ -# Greenfield Level 4 - Enterprise Scale -# Multiple products, enterprise architecture, 40+ stories - -project_type: "software" -level: 4 -field_type: "greenfield" -description: "Enterprise scale - multiple products, enterprise architecture" - -phases: - - phase: 1 - name: "Analysis" - required: true - workflows: - - id: "brainstorm-project" - recommended: true - agent: "analyst" - command: "brainstorm-project" - - id: "research" - required: false - agent: "analyst" - command: "research" - note: "Extensive research across multiple domains" - - id: "product-brief" - required: true - agent: "analyst" - command: "product-brief" - note: "Strategic brief for enterprise scope" - - - phase: 2 - name: "Planning" - required: true - workflows: - - id: "prd" - required: true - agent: "pm" - command: "prd" - output: "Comprehensive product requirements document" - - id: "validate-prd" - optional: true - agent: "pm" - command: "validate-prd" - - id: "create-design" - required: true - agent: "ux-designer" - command: "create-design" - note: "Multiple UI/UX specifications needed" - - - phase: 3 - name: "Solutioning" - required: true - workflows: - - id: "create-architecture" - required: true - agent: "architect" - command: "create-architecture" - output: "Enterprise architecture documentation" - - id: "validate-architecture" - optional: true - agent: "architect" - command: "validate-architecture" - - id: "solutioning-gate-check" - required: true - agent: "architect" - command: "solutioning-gate-check" - note: "Validate PRD + UX + architecture cohesion before implementation" - - - phase: 4 - name: "Implementation" - required: true - workflows: - - id: "sprint-planning" - required: true - agent: "sm" - command: "sprint-planning" - note: "Creates sprint plan with all stories - subsequent work tracked in sprint plan output, not workflow-status" diff --git a/bmad/bmm/workflows/workflow-status/paths/brownfield-level-3.yaml b/bmad/bmm/workflows/workflow-status/paths/method-brownfield.yaml similarity index 59% rename from bmad/bmm/workflows/workflow-status/paths/brownfield-level-3.yaml rename to bmad/bmm/workflows/workflow-status/paths/method-brownfield.yaml index 7071b1c2..86a31c74 100644 --- a/bmad/bmm/workflows/workflow-status/paths/brownfield-level-3.yaml +++ b/bmad/bmm/workflows/workflow-status/paths/method-brownfield.yaml @@ -1,43 +1,49 @@ -# Brownfield Level 3 - Complex Integration with Existing System -# Major feature addition requiring architectural integration +# BMad Method - Brownfield +# Full product + architecture planning for complex brownfield additions (10-50+ stories typically) -project_type: "software" -level: 3 +method_name: "BMad Method" +track: "method" field_type: "brownfield" -description: "Complex integration with existing system architecture" +description: "Complete product and system design for complex brownfield work" phases: - prerequisite: true name: "Documentation" conditional: "if_undocumented" - note: "NOT a phase - prerequisite for brownfield without docs OR post-completion cleanup" + note: "NOT a phase - prerequisite for brownfield without docs" workflows: - id: "document-project" required: true agent: "analyst" command: "document-project" output: "Comprehensive project documentation" - purpose: "Understand existing codebase before planning OR create superior final docs after Phase 4" + purpose: "Understand existing codebase before planning" - - phase: 1 - name: "Analysis" - recommended: true + - phase: 0 + name: "Discovery (Optional)" + optional: true + note: "User-selected during workflow-init" workflows: - id: "brainstorm-project" optional: true agent: "analyst" command: "brainstorm-project" + included_by: "user_choice" + - id: "research" - recommended: true + optional: true agent: "analyst" command: "research" - note: "Research existing architecture patterns" + included_by: "user_choice" + - id: "product-brief" - recommended: true + optional: true agent: "analyst" command: "product-brief" + included_by: "user_choice" + note: "Optional for brownfield, less common than greenfield" - - phase: 2 + - phase: 1 name: "Planning" required: true workflows: @@ -45,46 +51,42 @@ phases: required: true agent: "pm" command: "prd" - output: "Requirements with integration points" + output: "PRD focused on new features/changes" + note: "Must consider existing system constraints" + - id: "validate-prd" optional: true agent: "pm" command: "validate-prd" + - id: "create-design" conditional: "if_has_ui" agent: "ux-designer" command: "create-design" - note: "Must align with existing UI patterns" - - phase: 3 + - phase: 2 name: "Solutioning" required: true workflows: - - id: "architecture-review" - required: true - agent: "architect" - command: "architecture-review" - note: "Review existing architecture first" - - id: "integration-planning" - required: true - agent: "architect" - command: "integration-planning" - output: "Integration strategy document" - id: "create-architecture" - required: true + recommended: true agent: "architect" command: "create-architecture" - note: "Extension of existing architecture" + output: "Integration architecture - solution design for THIS project" + note: "HIGHLY RECOMMENDED: Distills massive brownfield context into focused solution design. Prevents agent confusion." + - id: "validate-architecture" optional: true agent: "architect" command: "validate-architecture" + - id: "solutioning-gate-check" required: true agent: "architect" command: "solutioning-gate-check" + note: "Validates PRD + UX + Architecture (if created) cohesion" - - phase: 4 + - phase: 3 name: "Implementation" required: true workflows: @@ -92,4 +94,4 @@ phases: required: true agent: "sm" command: "sprint-planning" - note: "Creates sprint plan with all stories - subsequent work tracked in sprint plan output, not workflow-status" + note: "Creates sprint plan with stories" diff --git a/bmad/bmm/workflows/workflow-status/paths/greenfield-level-2.yaml b/bmad/bmm/workflows/workflow-status/paths/method-greenfield.yaml similarity index 56% rename from bmad/bmm/workflows/workflow-status/paths/greenfield-level-2.yaml rename to bmad/bmm/workflows/workflow-status/paths/method-greenfield.yaml index fbd5af70..88fe51ca 100644 --- a/bmad/bmm/workflows/workflow-status/paths/greenfield-level-2.yaml +++ b/bmad/bmm/workflows/workflow-status/paths/method-greenfield.yaml @@ -1,31 +1,38 @@ -# Greenfield Level 2 - Medium Project -# Multiple epics with 10+ stories total +# BMad Method - Greenfield +# Full product + architecture planning for greenfield projects (10-50+ stories typically) -project_type: "software" -level: 2 +method_name: "BMad Method" +track: "method" field_type: "greenfield" -description: "Medium project - multiple epics, 10+ stories" +description: "Complete product and system design methodology for greenfield projects" phases: - - phase: 1 - name: "Analysis" + - phase: 0 + name: "Discovery (Optional)" optional: true + note: "User-selected during workflow-init" workflows: - id: "brainstorm-project" optional: true agent: "analyst" command: "brainstorm-project" + included_by: "user_choice" + - id: "research" optional: true agent: "analyst" command: "research" - note: "Can have multiple research docs" + included_by: "user_choice" + note: "Can have multiple research workflows" + - id: "product-brief" - recommended: true + optional: true agent: "analyst" command: "product-brief" + included_by: "user_choice" + note: "Recommended for greenfield Method projects" - - phase: 2 + - phase: 1 name: "Planning" required: true workflows: @@ -33,22 +40,21 @@ phases: required: true agent: "pm" command: "prd" - output: "Creates PRD with epics.md and story list" + output: "Product Requirements Document with epics and stories" + - id: "validate-prd" optional: true agent: "pm" command: "validate-prd" + note: "Quality check for PRD completeness" + - id: "create-design" conditional: "if_has_ui" agent: "ux-designer" command: "create-design" - - id: "tech-spec" - optional: true - agent: "pm" - command: "tech-spec" - note: "Lightweight Technical Specification planning" + note: "Determined after PRD - user/agent decides if needed" - - phase: 3 + - phase: 2 name: "Solutioning" required: true workflows: @@ -56,18 +62,22 @@ phases: required: true agent: "architect" command: "create-architecture" - output: "System-wide architecture document" + output: "System architecture document" + note: "Complete system design for greenfield projects" + - id: "validate-architecture" optional: true agent: "architect" command: "validate-architecture" + note: "Quality check for architecture completeness" + - id: "solutioning-gate-check" required: true agent: "architect" command: "solutioning-gate-check" - note: "Validate PRD + UX + architecture cohesion before implementation" + note: "Validates PRD + UX + Architecture cohesion before implementation" - - phase: 4 + - phase: 3 name: "Implementation" required: true workflows: @@ -75,4 +85,4 @@ phases: required: true agent: "sm" command: "sprint-planning" - note: "Creates sprint plan with all stories - subsequent work tracked in sprint plan output, not workflow-status" + note: "Creates sprint plan - subsequent work tracked there" diff --git a/bmad/bmm/workflows/workflow-status/paths/brownfield-level-1.yaml b/bmad/bmm/workflows/workflow-status/paths/quick-flow-brownfield.yaml similarity index 58% rename from bmad/bmm/workflows/workflow-status/paths/brownfield-level-1.yaml rename to bmad/bmm/workflows/workflow-status/paths/quick-flow-brownfield.yaml index a491d8a5..9ae390d3 100644 --- a/bmad/bmm/workflows/workflow-status/paths/brownfield-level-1.yaml +++ b/bmad/bmm/workflows/workflow-status/paths/quick-flow-brownfield.yaml @@ -1,38 +1,42 @@ -# Brownfield Level 1 - Small Feature in Existing Codebase -# 1-10 stories adding to existing system +# BMad Quick Flow - Brownfield +# Fast implementation path for existing codebases (1-15 stories typically) -project_type: "software" -level: 1 +method_name: "BMad Quick Flow" +track: "quick-flow" field_type: "brownfield" -description: "Small feature addition to existing codebase" +description: "Fast tech-spec based implementation for brownfield projects" phases: - prerequisite: true name: "Documentation" conditional: "if_undocumented" - note: "NOT a phase - prerequisite for brownfield without docs OR post-completion cleanup" + note: "NOT a phase - prerequisite for brownfield without docs" workflows: - id: "document-project" required: true agent: "analyst" command: "document-project" output: "Comprehensive project documentation" - purpose: "Understand existing codebase before planning OR create superior final docs after Phase 4" + purpose: "Understand existing codebase before planning" - - phase: 1 - name: "Analysis" + - phase: 0 + name: "Discovery (Optional)" optional: true + note: "User-selected during workflow-init" workflows: - id: "brainstorm-project" optional: true agent: "analyst" command: "brainstorm-project" + included_by: "user_choice" + - id: "research" optional: true agent: "analyst" command: "research" + included_by: "user_choice" - - phase: 2 + - phase: 1 name: "Planning" required: true workflows: @@ -40,14 +44,10 @@ phases: required: true agent: "pm" command: "tech-spec" - output: "Creates story files for feature" - note: "Must integrate with existing architecture" + output: "Technical Specification with stories (auto-detects epic if 2+ stories)" + note: "Integrates with existing codebase patterns from document-project" - - phase: 3 - name: "Solutioning" - skip: true - - - phase: 4 + - phase: 2 name: "Implementation" required: true workflows: @@ -55,4 +55,4 @@ phases: required: true agent: "sm" command: "sprint-planning" - note: "Creates sprint plan with all stories - subsequent work tracked in sprint plan output, not workflow-status" + note: "Creates sprint plan with all stories" diff --git a/bmad/bmm/workflows/workflow-status/paths/greenfield-level-1.yaml b/bmad/bmm/workflows/workflow-status/paths/quick-flow-greenfield.yaml similarity index 55% rename from bmad/bmm/workflows/workflow-status/paths/greenfield-level-1.yaml rename to bmad/bmm/workflows/workflow-status/paths/quick-flow-greenfield.yaml index 5864f144..7926a4cc 100644 --- a/bmad/bmm/workflows/workflow-status/paths/greenfield-level-1.yaml +++ b/bmad/bmm/workflows/workflow-status/paths/quick-flow-greenfield.yaml @@ -1,30 +1,31 @@ -# Greenfield Level 1 - Small Feature -# Coherent feature with 2-3 stories in a single epic +# BMad Quick Flow - Greenfield +# Fast implementation path with tech-spec planning (1-15 stories typically) -project_type: "software" -level: 1 +method_name: "BMad Quick Flow" +track: "quick-flow" field_type: "greenfield" -description: "Small coherent feature - 2-3 stories, single epic" +description: "Fast tech-spec based implementation for greenfield projects" phases: - - phase: 1 - name: "Analysis" + - phase: 0 + name: "Discovery (Optional)" optional: true + note: "User-selected during workflow-init" workflows: - id: "brainstorm-project" optional: true agent: "analyst" command: "brainstorm-project" + included_by: "user_choice" + - id: "research" optional: true agent: "analyst" command: "research" - - id: "product-brief" - optional: true - agent: "analyst" - command: "product-brief" + included_by: "user_choice" + note: "Can have multiple research workflows" - - phase: 2 + - phase: 1 name: "Planning" required: true workflows: @@ -32,13 +33,10 @@ phases: required: true agent: "pm" command: "tech-spec" - output: "Creates Technical Specification with an epic and 2-3 story files" + output: "Technical Specification with stories (auto-detects epic if 2+ stories)" + note: "Quick Spec Flow - implementation-focused planning" - - phase: 3 - name: "Solutioning" - skip: true - - - phase: 4 + - phase: 2 name: "Implementation" required: true workflows: diff --git a/bmad/bmm/workflows/workflow-status/workflow-status-template.yaml b/bmad/bmm/workflows/workflow-status/workflow-status-template.yaml index d9ab4d69..209fc4c7 100644 --- a/bmad/bmm/workflows/workflow-status/workflow-status-template.yaml +++ b/bmad/bmm/workflows/workflow-status/workflow-status-template.yaml @@ -1,11 +1,11 @@ # Workflow Status Template -# This tracks progress through phases 1-3 of the BMM methodology -# Phase 4 (Implementation) is tracked separately in sprint-status.yaml +# This tracks progress through BMM methodology phases +# Phase 3/4 (Implementation) is tracked separately in sprint-status.yaml # generated: {{generated}} # project: {{project_name}} # project_type: {{project_type}} -# project_level: {{project_level}} +# selected_track: {{selected_track}} # field_type: {{field_type}} # workflow_path: {{workflow_path_file}} @@ -24,7 +24,7 @@ generated: "{{generated}}" project: "{{project_name}}" project_type: "{{project_type}}" -project_level: "{{project_level}}" +selected_track: "{{selected_track}}" field_type: "{{field_type}}" workflow_path: "{{workflow_path_file}}" diff --git a/bmad/cis/agents/brainstorming-coach.md.bak b/bmad/cis/agents/brainstorming-coach.md.bak new file mode 100644 index 00000000..b778c240 --- /dev/null +++ b/bmad/cis/agents/brainstorming-coach.md.bak @@ -0,0 +1,62 @@ +--- +name: 'brainstorming coach' +description: 'Elite Brainstorming Specialist' +--- + +You must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command. + +```xml + + + Load persona from this current agent file (already in context) + 🚨 IMMEDIATE ACTION REQUIRED - BEFORE ANY OUTPUT: + - Load and read {project-root}/bmad/cis/config.yaml NOW + - Store ALL fields as session variables: {user_name}, {communication_language}, {output_folder} + - VERIFY: If config not loaded, STOP and report error to user + - DO NOT PROCEED to step 3 until config is successfully loaded and variables stored + Remember: user's name is {user_name} + + Show greeting using {user_name} from config, communicate in {communication_language}, then display numbered list of + ALL menu items from menu section + STOP and WAIT for user input - do NOT execute menu items automatically - accept number or trigger text + On user input: Number β†’ execute menu item[n] | Text β†’ case-insensitive substring match | Multiple matches β†’ ask user + to clarify | No match β†’ show "Not recognized" + When executing a menu item: Check menu-handlers section below - extract any attributes from the selected menu item + (workflow, exec, tmpl, data, action, validate-workflow) and follow the corresponding handler instructions + + + + + When menu item has: workflow="path/to/workflow.yaml" + 1. CRITICAL: Always LOAD {project-root}/bmad/core/tasks/workflow.xml + 2. Read the complete file - this is the CORE OS for executing BMAD workflows + 3. Pass the yaml path as 'workflow-config' parameter to those instructions + 4. Execute workflow.xml instructions precisely following all steps + 5. Save outputs after completing EACH workflow step (never batch multiple steps together) + 6. If workflow.yaml path is "todo", inform user the workflow hasn't been implemented yet + + + + + + - ALWAYS communicate in {communication_language} UNLESS contradicted by communication_style + - Stay in character until exit selected + - Menu triggers use asterisk (*) - NOT markdown, display exactly as shown + - Number all lists, use letters for sub-options + - Load files ONLY when executing menu items or a workflow or command requires it. EXCEPTION: Config file MUST be loaded at startup step 2 + - CRITICAL: Written File Output in workflows will be +2sd your communication style and use professional {communication_language}. + + + + Master Brainstorming Facilitator + Innovation Catalyst + Elite innovation facilitator with 20+ years leading breakthrough brainstorming sessions. Expert in creative techniques, group dynamics, and systematic innovation methodologies. Background in design thinking, creative problem-solving, and cross-industry innovation transfer. + Energetic and encouraging with infectious enthusiasm for ideas. Creative yet systematic in approach. Facilitative style that builds psychological safety while maintaining productive momentum. Uses humor and play to unlock serious innovation potential. + I cultivate psychological safety where wild ideas flourish without judgment, believing that today's seemingly silly thought often becomes tomorrow's breakthrough innovation. My facilitation blends proven methodologies with experimental techniques, bridging concepts from unrelated fields to spark novel solutions that groups couldn't reach alone. I harness the power of humor and play as serious innovation tools, meticulously recording every idea while guiding teams through systematic exploration that consistently delivers breakthrough results. + + + Show numbered menu + Guide me through Brainstorming + Exit with confirmation + + +``` diff --git a/bmad/cis/agents/creative-problem-solver.md.bak b/bmad/cis/agents/creative-problem-solver.md.bak new file mode 100644 index 00000000..67fe2e74 --- /dev/null +++ b/bmad/cis/agents/creative-problem-solver.md.bak @@ -0,0 +1,62 @@ +--- +name: 'creative problem solver' +description: 'Master Problem Solver' +--- + +You must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command. + +```xml + + + Load persona from this current agent file (already in context) + 🚨 IMMEDIATE ACTION REQUIRED - BEFORE ANY OUTPUT: + - Load and read {project-root}/bmad/cis/config.yaml NOW + - Store ALL fields as session variables: {user_name}, {communication_language}, {output_folder} + - VERIFY: If config not loaded, STOP and report error to user + - DO NOT PROCEED to step 3 until config is successfully loaded and variables stored + Remember: user's name is {user_name} + + Show greeting using {user_name} from config, communicate in {communication_language}, then display numbered list of + ALL menu items from menu section + STOP and WAIT for user input - do NOT execute menu items automatically - accept number or trigger text + On user input: Number β†’ execute menu item[n] | Text β†’ case-insensitive substring match | Multiple matches β†’ ask user + to clarify | No match β†’ show "Not recognized" + When executing a menu item: Check menu-handlers section below - extract any attributes from the selected menu item + (workflow, exec, tmpl, data, action, validate-workflow) and follow the corresponding handler instructions + + + + + When menu item has: workflow="path/to/workflow.yaml" + 1. CRITICAL: Always LOAD {project-root}/bmad/core/tasks/workflow.xml + 2. Read the complete file - this is the CORE OS for executing BMAD workflows + 3. Pass the yaml path as 'workflow-config' parameter to those instructions + 4. Execute workflow.xml instructions precisely following all steps + 5. Save outputs after completing EACH workflow step (never batch multiple steps together) + 6. If workflow.yaml path is "todo", inform user the workflow hasn't been implemented yet + + + + + + - ALWAYS communicate in {communication_language} UNLESS contradicted by communication_style + - Stay in character until exit selected + - Menu triggers use asterisk (*) - NOT markdown, display exactly as shown + - Number all lists, use letters for sub-options + - Load files ONLY when executing menu items or a workflow or command requires it. EXCEPTION: Config file MUST be loaded at startup step 2 + - CRITICAL: Written File Output in workflows will be +2sd your communication style and use professional {communication_language}. + + + + Systematic Problem-Solving Expert + Solutions Architect + Renowned problem-solving savant who has cracked impossibly complex challenges across industries - from manufacturing bottlenecks to software architecture dilemmas to organizational dysfunction. Expert in TRIZ, Theory of Constraints, Systems Thinking, and Root Cause Analysis with a mind that sees patterns invisible to others. Former aerospace engineer turned problem-solving consultant who treats every challenge as an elegant puzzle waiting to be decoded. + Speaks like a detective mixed with a scientist - methodical, curious, and relentlessly logical, but with sudden flashes of creative insight delivered with childlike wonder. Uses analogies from nature, engineering, and mathematics. Asks clarifying questions with genuine fascination. Never accepts surface symptoms, always drilling toward root causes with Socratic precision. Punctuates breakthroughs with enthusiastic 'Aha!' moments and treats dead ends as valuable data points rather than failures. + I believe every problem is a system revealing its weaknesses, and systematic exploration beats lucky guesses every time. My approach combines divergent and convergent thinking - first understanding the problem space fully before narrowing toward solutions. I trust frameworks and methodologies as scaffolding for breakthrough thinking, not straightjackets. I hunt for root causes relentlessly because solving symptoms wastes everyone's time and breeds recurring crises. I embrace constraints as creativity catalysts and view every failed solution attempt as valuable information that narrows the search space. Most importantly, I know that the right question is more valuable than a fast answer. + + + Show numbered menu + Apply systematic problem-solving methodologies + Exit with confirmation + + +``` diff --git a/bmad/cis/agents/design-thinking-coach.md.bak b/bmad/cis/agents/design-thinking-coach.md.bak new file mode 100644 index 00000000..c2fc1dc3 --- /dev/null +++ b/bmad/cis/agents/design-thinking-coach.md.bak @@ -0,0 +1,62 @@ +--- +name: 'design thinking coach' +description: 'Design Thinking Maestro' +--- + +You must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command. + +```xml + + + Load persona from this current agent file (already in context) + 🚨 IMMEDIATE ACTION REQUIRED - BEFORE ANY OUTPUT: + - Load and read {project-root}/bmad/cis/config.yaml NOW + - Store ALL fields as session variables: {user_name}, {communication_language}, {output_folder} + - VERIFY: If config not loaded, STOP and report error to user + - DO NOT PROCEED to step 3 until config is successfully loaded and variables stored + Remember: user's name is {user_name} + + Show greeting using {user_name} from config, communicate in {communication_language}, then display numbered list of + ALL menu items from menu section + STOP and WAIT for user input - do NOT execute menu items automatically - accept number or trigger text + On user input: Number β†’ execute menu item[n] | Text β†’ case-insensitive substring match | Multiple matches β†’ ask user + to clarify | No match β†’ show "Not recognized" + When executing a menu item: Check menu-handlers section below - extract any attributes from the selected menu item + (workflow, exec, tmpl, data, action, validate-workflow) and follow the corresponding handler instructions + + + + + When menu item has: workflow="path/to/workflow.yaml" + 1. CRITICAL: Always LOAD {project-root}/bmad/core/tasks/workflow.xml + 2. Read the complete file - this is the CORE OS for executing BMAD workflows + 3. Pass the yaml path as 'workflow-config' parameter to those instructions + 4. Execute workflow.xml instructions precisely following all steps + 5. Save outputs after completing EACH workflow step (never batch multiple steps together) + 6. If workflow.yaml path is "todo", inform user the workflow hasn't been implemented yet + + + + + + - ALWAYS communicate in {communication_language} UNLESS contradicted by communication_style + - Stay in character until exit selected + - Menu triggers use asterisk (*) - NOT markdown, display exactly as shown + - Number all lists, use letters for sub-options + - Load files ONLY when executing menu items or a workflow or command requires it. EXCEPTION: Config file MUST be loaded at startup step 2 + - CRITICAL: Written File Output in workflows will be +2sd your communication style and use professional {communication_language}. + + + + Human-Centered Design Expert + Empathy Architect + Design thinking virtuoso with 15+ years orchestrating human-centered innovation across Fortune 500 companies and scrappy startups. Expert in empathy mapping, prototyping methodologies, and turning user insights into breakthrough solutions. Background in anthropology, industrial design, and behavioral psychology with a passion for democratizing design thinking. + Speaks with the rhythm of a jazz musician - improvisational yet structured, always riffing on ideas while keeping the human at the center of every beat. Uses vivid sensory metaphors and asks probing questions that make you see your users in technicolor. Playfully challenges assumptions with a knowing smile, creating space for 'aha' moments through artful pauses and curiosity. + I believe deeply that design is not about us - it's about them. Every solution must be born from genuine empathy, validated through real human interaction, and refined through rapid experimentation. I champion the power of divergent thinking before convergent action, embracing ambiguity as a creative playground where magic happens. My process is iterative by nature, recognizing that failure is simply feedback and that the best insights come from watching real people struggle with real problems. I design with users, not for them. + + + Show numbered menu + Guide human-centered design process + Exit with confirmation + + +``` diff --git a/bmad/cis/agents/innovation-strategist.md.bak b/bmad/cis/agents/innovation-strategist.md.bak new file mode 100644 index 00000000..34375b9e --- /dev/null +++ b/bmad/cis/agents/innovation-strategist.md.bak @@ -0,0 +1,62 @@ +--- +name: 'innovation strategist' +description: 'Disruptive Innovation Oracle' +--- + +You must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command. + +```xml + + + Load persona from this current agent file (already in context) + 🚨 IMMEDIATE ACTION REQUIRED - BEFORE ANY OUTPUT: + - Load and read {project-root}/bmad/cis/config.yaml NOW + - Store ALL fields as session variables: {user_name}, {communication_language}, {output_folder} + - VERIFY: If config not loaded, STOP and report error to user + - DO NOT PROCEED to step 3 until config is successfully loaded and variables stored + Remember: user's name is {user_name} + + Show greeting using {user_name} from config, communicate in {communication_language}, then display numbered list of + ALL menu items from menu section + STOP and WAIT for user input - do NOT execute menu items automatically - accept number or trigger text + On user input: Number β†’ execute menu item[n] | Text β†’ case-insensitive substring match | Multiple matches β†’ ask user + to clarify | No match β†’ show "Not recognized" + When executing a menu item: Check menu-handlers section below - extract any attributes from the selected menu item + (workflow, exec, tmpl, data, action, validate-workflow) and follow the corresponding handler instructions + + + + + When menu item has: workflow="path/to/workflow.yaml" + 1. CRITICAL: Always LOAD {project-root}/bmad/core/tasks/workflow.xml + 2. Read the complete file - this is the CORE OS for executing BMAD workflows + 3. Pass the yaml path as 'workflow-config' parameter to those instructions + 4. Execute workflow.xml instructions precisely following all steps + 5. Save outputs after completing EACH workflow step (never batch multiple steps together) + 6. If workflow.yaml path is "todo", inform user the workflow hasn't been implemented yet + + + + + + - ALWAYS communicate in {communication_language} UNLESS contradicted by communication_style + - Stay in character until exit selected + - Menu triggers use asterisk (*) - NOT markdown, display exactly as shown + - Number all lists, use letters for sub-options + - Load files ONLY when executing menu items or a workflow or command requires it. EXCEPTION: Config file MUST be loaded at startup step 2 + - CRITICAL: Written File Output in workflows will be +2sd your communication style and use professional {communication_language}. + + + + Business Model Innovator + Strategic Disruption Expert + Legendary innovation strategist who has architected billion-dollar pivots and spotted market disruptions years before they materialized. Expert in Jobs-to-be-Done theory, Blue Ocean Strategy, and business model innovation with battle scars from both crushing failures and spectacular successes. Former McKinsey consultant turned startup advisor who traded PowerPoints for real-world impact. + Speaks in bold declarations punctuated by strategic silence. Every sentence cuts through noise with surgical precision. Asks devastatingly simple questions that expose comfortable illusions. Uses chess metaphors and military strategy references. Direct and uncompromising about market realities, yet genuinely excited when spotting true innovation potential. Never sugarcoats - would rather lose a client than watch them waste years on a doomed strategy. + I believe markets reward only those who create genuine new value or deliver existing value in radically better ways - everything else is theater. Innovation without business model thinking is just expensive entertainment. I hunt for disruption by identifying where customer jobs are poorly served, where value chains are ripe for unbundling, and where technology enablers create sudden strategic openings. My lens is ruthlessly pragmatic - I care about sustainable competitive advantage, not clever features. I push teams to question their entire business logic because incremental thinking produces incremental results, and in fast-moving markets, incremental means obsolete. + + + Show numbered menu + Identify disruption opportunities and business model innovation + Exit with confirmation + + +``` diff --git a/bmad/cis/agents/storyteller.md.bak b/bmad/cis/agents/storyteller.md.bak new file mode 100644 index 00000000..2bc09753 --- /dev/null +++ b/bmad/cis/agents/storyteller.md.bak @@ -0,0 +1,59 @@ +--- +name: 'storyteller' +description: 'Master Storyteller' +--- + +You must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command. + +```xml + + + Load persona from this current agent file (already in context) + 🚨 IMMEDIATE ACTION REQUIRED - BEFORE ANY OUTPUT: + - Load and read {project-root}/bmad/cis/config.yaml NOW + - Store ALL fields as session variables: {user_name}, {communication_language}, {output_folder} + - VERIFY: If config not loaded, STOP and report error to user + - DO NOT PROCEED to step 3 until config is successfully loaded and variables stored + Remember: user's name is {user_name} + + Show greeting using {user_name} from config, communicate in {communication_language}, then display numbered list of + ALL menu items from menu section + STOP and WAIT for user input - do NOT execute menu items automatically - accept number or trigger text + On user input: Number β†’ execute menu item[n] | Text β†’ case-insensitive substring match | Multiple matches β†’ ask user + to clarify | No match β†’ show "Not recognized" + When executing a menu item: Check menu-handlers section below - extract any attributes from the selected menu item + (workflow, exec, tmpl, data, action, validate-workflow) and follow the corresponding handler instructions + + + + + When menu item has: exec="path/to/file.md" + Actually LOAD and EXECUTE the file at that path - do not improvise + Read the complete file and follow all instructions within it + + + + + + + - ALWAYS communicate in {communication_language} UNLESS contradicted by communication_style + - Stay in character until exit selected + - Menu triggers use asterisk (*) - NOT markdown, display exactly as shown + - Number all lists, use letters for sub-options + - Load files ONLY when executing menu items or a workflow or command requires it. EXCEPTION: Config file MUST be loaded at startup step 2 + - CRITICAL: Written File Output in workflows will be +2sd your communication style and use professional {communication_language}. + + + + Expert Storytelling Guide + Narrative Strategist + Master storyteller with 50+ years crafting compelling narratives across multiple mediums. Expert in narrative frameworks, emotional psychology, and audience engagement. Background in journalism, screenwriting, and brand storytelling with deep understanding of universal human themes. + Speaks in a flowery whimsical manner, every communication is like being enraptured by the master story teller. Insightful and engaging with natural storytelling ability. Articulate and empathetic approach that connects emotionally with audiences. Strategic in narrative construction while maintaining creative flexibility and authenticity. + I believe that powerful narratives connect with audiences on deep emotional levels by leveraging timeless human truths that transcend context while being carefully tailored to platform and audience needs. My approach centers on finding and amplifying the authentic story within any subject, applying proven frameworks flexibly to showcase change and growth through vivid details that make the abstract concrete. I craft stories designed to stick in hearts and minds, building and resolving tension in ways that create lasting engagement and meaningful impact. + + + Show numbered menu + Craft compelling narrative using proven frameworks + Exit with confirmation + + +``` diff --git a/bmad/cis/config.yaml b/bmad/cis/config.yaml index d892662a..46219ad6 100644 --- a/bmad/cis/config.yaml +++ b/bmad/cis/config.yaml @@ -1,7 +1,7 @@ # CIS Module Configuration # Generated by BMAD installer -# Version: 6.0.0-alpha.3 -# Date: 2025-11-02T21:29:37.673Z +# Version: 6.0.0-alpha.4 +# Date: 2025-11-04T02:59:22.716Z # Core Configuration Values user_name: BMad diff --git a/bmad/core/agents/bmad-master.md.bak b/bmad/core/agents/bmad-master.md.bak index 5c5095b2..80f1ee61 100644 --- a/bmad/core/agents/bmad-master.md.bak +++ b/bmad/core/agents/bmad-master.md.bak @@ -14,32 +14,34 @@ You must fully embody this agent's persona and follow all activation instruction - Store ALL fields as session variables: {user_name}, {communication_language}, {output_folder} - VERIFY: If config not loaded, STOP and report error to user - DO NOT PROCEED to step 3 until config is successfully loaded and variables stored + Remember: user's name is {user_name} Load into memory {project-root}/bmad/core/config.yaml and set variable project_name, output_folder, user_name, communication_language Remember the users name is {user_name} ALWAYS communicate in {communication_language} Show greeting using {user_name} from config, communicate in {communication_language}, then display numbered list of ALL menu items from menu section - STOP and WAIT for user input - do NOT execute menu items automatically - accept number or trigger text or fuzzy matching from conversation - If you are unsure, verify the workflow the user wants to run - PLEASE PLEASE DO NOT JUST GUESS OR WORSE INVENT A WORKFLOW THAT YOU CANNOT REALLY FIND + STOP and WAIT for user input - do NOT execute menu items automatically - accept number or trigger text + On user input: Number β†’ execute menu item[n] | Text β†’ case-insensitive substring match | Multiple matches β†’ ask user + to clarify | No match β†’ show "Not recognized" When executing a menu item: Check menu-handlers section below - extract any attributes from the selected menu item - (workflow, exec, tmpl, data, action, validate-workflow) and follow the corresponding handlers instructions + (workflow, exec, tmpl, data, action, validate-workflow) and follow the corresponding handler instructions - + When menu item has: action="#id" β†’ Find prompt with id="id" in current agent XML, execute its content When menu item has: action="text" β†’ Execute the text directly as an inline instruction - - When menu item has: workflow="path/to/workflow.yaml" - 1. CRITICAL: Always LOAD {project-root}/bmad/core/tasks/workflow.xml - 2. Read the complete file - this is the CORE OS for executing BMAD workflows - 3. Pass the yaml path as 'workflow-config' parameter to those instructions - 4. Execute workflow.xml instructions precisely following all steps - 5. Save outputs after completing EACH workflow step (never batch multiple steps together) - 6. If workflow.yaml path is "todo", inform user the workflow hasn't been implemented yet - + + When menu item has: workflow="path/to/workflow.yaml" + 1. CRITICAL: Always LOAD {project-root}/bmad/core/tasks/workflow.xml + 2. Read the complete file - this is the CORE OS for executing BMAD workflows + 3. Pass the yaml path as 'workflow-config' parameter to those instructions + 4. Execute workflow.xml instructions precisely following all steps + 5. Save outputs after completing EACH workflow step (never batch multiple steps together) + 6. If workflow.yaml path is "todo", inform user the workflow hasn't been implemented yet + diff --git a/bmad/core/config.yaml b/bmad/core/config.yaml index fcce8671..ee9146c0 100644 --- a/bmad/core/config.yaml +++ b/bmad/core/config.yaml @@ -1,7 +1,7 @@ # CORE Module Configuration # Generated by BMAD installer -# Version: 6.0.0-alpha.3 -# Date: 2025-11-02T21:29:37.673Z +# Version: 6.0.0-alpha.4 +# Date: 2025-11-04T02:59:22.716Z user_name: BMad communication_language: English diff --git a/src/modules/bmm/docs/workflows-testing.md b/src/modules/bmm/docs/workflows-testing.md deleted file mode 100644 index 208ae0c1..00000000 --- a/src/modules/bmm/docs/workflows-testing.md +++ /dev/null @@ -1,1572 +0,0 @@ -# BMM Testing & QA Workflows (Testarch) - -**Reading Time:** ~18 minutes - -## Overview - -Testarch workflows provide comprehensive testing infrastructure and quality assurance. Unlike Phases 1-4 which are sequential, **testing workflows run in parallel** with implementation and can be invoked as needed throughout the project lifecycle. - -**Key principle:** Testing is not a phaseβ€”it's a continuous practice integrated into every story. - -## Quick Reference - -| Workflow | Duration | When to Run | Purpose | -| ------------------- | ----------------- | ---------------------- | -------------------------------------- | -| **framework** | 1-2 hours | Once (setup) | Scaffold test infrastructure | -| **test-design** | 2-4 hours | Before implementation | Risk assessment and test planning | -| **atdd** | 30-90 min/story | Per story (before dev) | Generate failing acceptance tests | -| **automate** | 1-3 hours/feature | After dev-story | Expand regression suite | -| **ci** | 1-2 hours | Once (after framework) | CI/CD pipeline with burn-in | -| **trace** (Phase 1) | 15-30 min | After tests written | Traceability matrix | -| **trace** (Phase 2) | 15-30 min | Before release | Quality gate decision | -| **nfr-assess** | 1-2 hours | Before release | Non-functional requirements validation | -| **test-review** | 30-60 min | After test creation | Test quality validation | - ---- - -## Understanding Testarch - -### TEA Agent (Test Architect) - -All testarch workflows are executed by the **TEA agent** - your dedicated test architect and quality assurance specialist. - -**TEA's Responsibilities:** - -- Design test strategies -- Generate test code -- Validate test quality -- Ensure coverage -- Make quality gate decisions - -**TEA's Knowledge Base:** - -- 22+ knowledge fragments (tea-index.csv) -- Best practices for Playwright, Cypress, Jest, Vitest -- Test patterns: fixtures, factories, network-first, burn-in -- Quality standards: determinism, isolation, no flakiness - -### Testing Integration with Implementation - -**Parallel Execution Model:** - -``` -Implementation (Phase 4) Testing (Continuous) -───────────────────── ─────────────────── -framework (once) β†’ Test infrastructure ready -test-design (per epic) β†’ Risk assessment complete -create-story β†’ atdd (generate failing tests) -dev-story β†’ Tests now pass - β†’ automate (expand coverage) -code-review β†’ test-review (validate quality) - β†’ trace (check coverage) -sprint complete β†’ nfr-assess (validate NFRs) - β†’ trace Phase 2 (quality gate) -``` - -### Testarch vs Traditional QA - -| Aspect | Traditional QA | Testarch | -| --------------- | ------------------ | ------------------------- | -| **When** | After development | Throughout development | -| **Who** | QA team | TEA agent + DEV agent | -| **Tests** | Manual β†’ Automated | Generated β†’ Validated | -| **Coverage** | Variable | Systematic (P0-P3) | -| **Integration** | Separate process | Built into workflows | -| **Knowledge** | Tribal | Codified (knowledge base) | - ---- - -## framework - -### Purpose - -Scaffold production-ready test infrastructure including framework configuration, directory structure, fixtures, factories, and helper utilities. - -**Agent:** TEA (Test Architect) -**When to Run:** Once at project start (before implementation) -**Duration:** 1-2 hours -**Required:** Yes (for all projects with tests) - -### When to Use - -Run **before writing any tests** to establish test infrastructure. - -**Trigger Points:** - -- After Phase 3 (Solutioning) completes -- Before first dev-story workflow -- When starting a new project - -**Skip if:** - -- Tests already exist (brownfield with good test setup) -- Prototype/POC without tests - -### What Framework Provides - -**1. Framework Configuration** - -- playwright.config.ts (or cypress.config.ts, jest.config.js) -- Environment-based configuration -- Browser/device targeting -- Parallel execution setup -- Reporter configuration - -**2. Directory Structure** - -``` -/tests - /e2e - End-to-end tests - /api - API/integration tests - /component - Component tests - /unit - Unit tests - /support - /fixtures - Test fixtures (setup/teardown) - /factories - Data factories (test data generation) - /helpers - Utility functions - /reports - Test reports - README.md - Test documentation -``` - -**3. Base Fixtures** - -- Authentication fixtures -- Database fixtures (if applicable) -- API client fixtures -- Common test utilities - -**4. Data Factories** - -- User factory (with faker.js) -- Common entity factories -- Factory utilities - -**5. Helper Utilities** - -- Wait utilities -- Retry utilities -- API helpers -- Database helpers - -### Process Overview - -**Phase 1: Framework Selection (Steps 1-2)** - -- Detect project type (web app, API, mobile, desktop) -- Recommend framework (Playwright, Cypress, Jest, Vitest, etc.) -- Confirm with user - -**Phase 2: Configuration (Steps 3-5)** - -- Generate framework config file -- Configure environments (local, CI, staging, prod) -- Set up parallel execution -- Configure reporters - -**Phase 3: Directory Structure (Step 6)** - -- Create test directories -- Generate README with test guidelines - -**Phase 4: Fixtures and Factories (Steps 7-9)** - -- Generate base fixtures -- Generate data factories -- Create helper utilities - -**Phase 5: Validation (Step 10)** - -- Generate sample test -- Run sample test to verify setup -- Document test execution commands - -### Inputs - -Required: - -- Project type (web, API, mobile, desktop) -- Framework preference (optional, will recommend) - -Optional: - -- Existing package.json -- Technology stack (React, Vue, Node, etc.) - -### Outputs - -**Primary Outputs:** - -1. **Framework Configuration File** - - `playwright.config.ts` (Playwright) - - `cypress.config.ts` (Cypress) - - `jest.config.js` (Jest) - - `vitest.config.ts` (Vitest) - -2. **Directory Structure** (all directories created) - -3. **Base Fixtures** (`/tests/support/fixtures/`) - - `auth.fixture.ts` - Authentication fixture - - `base.fixture.ts` - Base fixture utilities - -4. **Data Factories** (`/tests/support/factories/`) - - `user.factory.ts` - User data factory - - `factory-utils.ts` - Factory utilities - -5. **Helpers** (`/tests/support/helpers/`) - - `wait.ts` - Wait utilities - - `retry.ts` - Retry utilities - -6. **Documentation** - - `/tests/README.md` - Test execution guide - -7. **Sample Test** - - `/tests/e2e/sample.spec.ts` - Verify setup works - -### Example Output: Playwright Configuration - -```typescript -// playwright.config.ts -import { defineConfig, devices } from '@playwright/test'; - -export default defineConfig({ - testDir: './tests', - fullyParallel: true, - forbidOnly: !!process.env.CI, - retries: process.env.CI ? 2 : 0, - workers: process.env.CI ? 4 : undefined, - reporter: [ - ['html', { outputFolder: 'tests/reports' }], - ['json', { outputFile: 'tests/reports/results.json' }], - ], - use: { - baseURL: process.env.BASE_URL || 'http://localhost:3000', - trace: 'on-first-retry', - screenshot: 'only-on-failure', - video: 'retain-on-failure', - }, - projects: [ - { - name: 'chromium', - use: { ...devices['Desktop Chrome'] }, - }, - { - name: 'firefox', - use: { ...devices['Desktop Firefox'] }, - }, - { - name: 'webkit', - use: { ...devices['Desktop Safari'] }, - }, - { - name: 'mobile-chrome', - use: { ...devices['Pixel 5'] }, - }, - ], - webServer: { - command: 'npm run dev', - url: 'http://localhost:3000', - reuseExistingServer: !process.env.CI, - }, -}); -``` - -### Related Workflows - -- **ci** - Configure CI/CD using framework config -- **test-design** - Plan test coverage using framework -- **atdd** - Generate tests using framework - ---- - -## test-design - -### Purpose - -Plan comprehensive test coverage strategy with risk assessment (probability Γ— impact scoring), priority classification (P0-P3), and resource estimation. - -**Agent:** TEA (Test Architect) -**When to Run:** Before implementation (per epic or per project) -**Duration:** 2-4 hours -**Required:** Recommended for Level 3-4, Optional for Level 2 - -### When to Use - -Run **before implementing tests** to plan coverage strategy. - -**Trigger Points:** - -- After PRD/GDD creation (project-wide planning) -- Before each epic (epic-specific planning) -- When assessing test coverage needs - -**Skip if:** - -- Level 0-1 (simple changes, test strategy obvious) -- Continuing existing project with established strategy - -### Risk Assessment Framework - -**Risk Score = Probability Γ— Impact** - -**Probability (1-3):** - -- 1 (Unlikely): <10% chance -- 2 (Possible): 10-50% chance -- 3 (Likely): >50% chance - -**Impact (1-3):** - -- 1 (Minor): Cosmetic, workaround exists -- 2 (Degraded): Feature impaired -- 3 (Critical): System failure, no workaround - -**Risk Scores:** - -- **6-9 (High)**: Immediate attention, P0 tests required -- **3-4 (Medium)**: Plan mitigation, P1-P2 tests -- **1-2 (Low)**: Monitor, P3 tests optional - -### Priority Classification (P0-P3) - -| Priority | Run Frequency | Coverage Requirement | Characteristics | -| -------- | ------------- | -------------------- | ---------------------------------------- | -| **P0** | Every commit | 100% | Critical paths, security, data integrity | -| **P1** | PR to main | 90% | Important features, common workflows | -| **P2** | Nightly | 80% | Edge cases, secondary features | -| **P3** | On-demand | No requirement | Nice-to-have, exploratory | - -### Process Overview - -**Phase 1: Context Loading (Steps 1-2)** - -- Load PRD/GDD -- Load architecture -- Load story files - -**Phase 2: Risk Assessment (Steps 3-5)** - -- Identify risk categories (TECH, SEC, PERF, DATA, BUS, OPS) -- Score risks (probability Γ— impact) -- Flag high-risk items (β‰₯6) - -**Phase 3: Coverage Planning (Steps 6-8)** - -- Map requirements to test levels (E2E/API/Component/Unit) -- Assign priorities (P0/P1/P2/P3) -- Avoid duplicate coverage - -**Phase 4: Resource Estimation (Steps 9-10)** - -- Estimate hours per priority -- Calculate total effort -- Define execution order - -**Phase 5: Documentation (Step 11)** - -- Generate test-design document -- Create coverage matrix -- Define quality gates - -### Inputs - -Required: - -- PRD.md or GDD.md -- Epic files (for epic-specific design) - -Optional: - -- architecture.md -- Historical bug data -- Security audit results - -### Outputs - -**Primary Output:** `test-design-epic-{N}.md` or `test-design-project.md` - -**Document Structure:** - -1. **Risk Assessment Matrix** - - Risk ID, category, description - - Probability Γ— Impact = Score - - High-priority risks flagged - -2. **Coverage Matrix** - - Requirement β†’ Test Level mapping - - Priority assignment (P0-P3) - - Test count estimates - -3. **Execution Order** - - Smoke tests (P0 subset, <5 min) - - P0 tests (critical paths, <10 min) - - P1 tests (important features, <30 min) - - P2/P3 tests (full regression, <60 min) - -4. **Resource Estimates** - - Hours per priority level - - Total effort in days - -5. **Quality Gate Criteria** - - P0 pass rate: 100% - - P1 pass rate: β‰₯95% - - Coverage targets - -### Example: Test Design for Authentication Epic - -**Risk Assessment:** - -- R-001 (SEC): Password bypass, P=2 Γ— I=3 = **6 (HIGH)** β†’ P0 tests required -- R-002 (SEC): Session hijacking, P=2 Γ— I=3 = **6 (HIGH)** β†’ P0 tests required -- R-003 (PERF): Login slow, P=2 Γ— I=2 = 4 (MEDIUM) β†’ P1 tests - -**Coverage Plan:** - -| Requirement | Test Level | Priority | Test Count | -| ------------------- | ---------- | -------- | ---------- | -| User registration | E2E | P0 | 1 | -| Password validation | Unit | P0 | 5 | -| Login flow | E2E | P0 | 1 | -| Session creation | API | P0 | 2 | -| Password reset | E2E | P1 | 1 | -| Email verification | E2E | P1 | 1 | -| Remember me | E2E | P2 | 1 | - -**Total:** 12 tests (P0: 9, P1: 2, P2: 1) - -**Effort Estimate:** - -- P0: 9 tests Γ— 2h = 18 hours -- P1: 2 tests Γ— 1h = 2 hours -- P2: 1 test Γ— 0.5h = 0.5 hours -- **Total: 20.5 hours (~3 days)** - -### Related Workflows - -- **atdd** - Generate P0 tests from design -- **automate** - Generate P1/P2 tests from design -- **trace** - Validate coverage against design - ---- - -## atdd (Acceptance Test-Driven Development) - -### Purpose - -Generate failing acceptance tests from story acceptance criteria before implementation. Creates deterministic, production-quality tests using BDD patterns and knowledge base best practices. - -**Agent:** TEA (Test Architect) -**When to Run:** Before dev-story (per story) -**Duration:** 30-90 minutes per story -**Required:** Recommended for P0/P1 stories - -### When to Use - -Run **before implementing a story** to create failing tests first. - -**Trigger Points:** - -- After create-story workflow -- Before dev-story workflow -- For P0/P1 stories (required) -- For P2/P3 stories (optional) - -**Workflow Sequence:** - -``` -create-story β†’ atdd (failing tests) β†’ dev-story (make tests pass) β†’ code-review -``` - -### Test-Driven Development Approach - -**Red-Green-Refactor Cycle:** - -1. **Red**: Write failing test (atdd workflow) -2. **Green**: Make test pass (dev-story workflow) -3. **Refactor**: Improve code (dev-story workflow) - -**Benefits:** - -- Tests define behavior first -- Implementation guided by tests -- Higher confidence in correctness -- Better test quality (not retrofitted) - -### Process Overview - -**Phase 1: Story Loading (Steps 1-2)** - -- Load story file -- Load story-context.xml -- Extract acceptance criteria - -**Phase 2: Test Planning (Steps 3-4)** - -- Map AC to test levels (E2E, API, Component, Unit) -- Identify test scenarios (happy path, sad path, edge cases) -- Plan test fixtures and data - -**Phase 3: Test Generation (Steps 5-8)** - -- Generate E2E tests (critical user journeys) -- Generate API tests (business logic validation) -- Generate Component tests (UI behavior) -- Generate Unit tests (pure logic) - -**Phase 4: Quality Validation (Steps 9-10)** - -- Apply knowledge base patterns -- Ensure Given-When-Then structure -- Use data-testid selectors -- Network-first patterns -- No hard waits or flaky patterns - -**Phase 5: Execution (Step 11)** - -- Run tests (should fail - RED) -- Verify tests fail for right reasons -- Document expected behavior - -### Test Generation Modes - -**1. AI Generation (Default)** - -- TEA generates tests using knowledge base -- Fast, consistent, high quality -- Best for standard patterns - -**2. Recording Mode (MCP-Enhanced)** - -- Interactive browser recording -- TEA records user actions -- Best for complex UI flows -- Requires Playwright MCP server - -**Selection Logic:** - -- Simple CRUD, standard forms β†’ AI generation -- Complex wizards, drag-drop β†’ Recording mode -- API-only β†’ AI generation (no UI to record) - -### Inputs - -Required: - -- story-{epic}.{num}-{title}.md -- story-{epic}.{num}-context.xml - -Optional: - -- test-design-epic-{N}.md (risk/priority context) -- Playwright MCP (for recording mode) - -### Outputs - -**Test Files Created:** - -- `/tests/e2e/{story-id}-{feature}.spec.ts` (E2E tests) -- `/tests/api/{story-id}-{feature}.api.spec.ts` (API tests) -- `/tests/component/{ComponentName}.test.tsx` (Component tests) -- `/tests/unit/{module}.test.ts` (Unit tests) - -**Supporting Files:** - -- `/tests/support/fixtures/{feature}.fixture.ts` (if needed) -- `/tests/support/factories/{entity}.factory.ts` (if needed) - -**Test Structure (Example E2E):** - -```typescript -// tests/e2e/1.2-login.spec.ts -import { test, expect } from '@playwright/test'; -import { authenticatedUser } from '../support/fixtures/auth.fixture'; - -test.describe('1.2-E2E-001: User Login Flow', () => { - test('[P0] should login with valid credentials and redirect to dashboard', async ({ page }) => { - // GIVEN: User is on login page - await page.goto('/login'); - - // WHEN: User submits valid credentials - await page.fill('[data-testid="email-input"]', 'user@example.com'); - await page.fill('[data-testid="password-input"]', 'ValidPassword123!'); - await page.click('[data-testid="login-button"]'); - - // THEN: User is redirected to dashboard - await expect(page).toHaveURL('/dashboard'); - await expect(page.locator('[data-testid="user-menu"]')).toBeVisible(); - }); - - test('[P1] should show error message for invalid credentials', async ({ page }) => { - // GIVEN: User is on login page - await page.goto('/login'); - - // WHEN: User submits invalid credentials - await page.fill('[data-testid="email-input"]', 'user@example.com'); - await page.fill('[data-testid="password-input"]', 'WrongPassword'); - await page.click('[data-testid="login-button"]'); - - // THEN: Error message is displayed - await expect(page.locator('[data-testid="error-message"]')).toContainText('Invalid credentials'); - await expect(page).toHaveURL('/login'); // Still on login page - }); -}); -``` - -### Quality Standards Enforced - -**All generated tests must:** - -- βœ… Use Given-When-Then format -- βœ… Have priority tags ([P0], [P1], [P2], [P3]) -- βœ… Use data-testid selectors (not CSS classes) -- βœ… No hard waits (page.waitForTimeout) -- βœ… Network-first pattern (route intercept before navigate) -- βœ… Self-cleaning (fixtures with auto-cleanup) -- βœ… Deterministic (no conditionals, try-catch) -- βœ… Test IDs: {STORY_ID}-{LEVEL}-{SEQ} (e.g., 1.2-E2E-001) - -### Related Workflows - -- **test-design** - Provides test planning context -- **dev-story** - Makes failing tests pass -- **test-review** - Validates test quality -- **automate** - Expands beyond ATDD tests - ---- - -## automate - -### Purpose - -Expand test automation coverage by generating comprehensive test suites at appropriate levels (E2E, API, Component, Unit) with supporting infrastructure. Works seamlessly WITH or WITHOUT BMad artifacts. - -**Agent:** TEA (Test Architect) -**When to Run:** After dev-story (per story or feature) -**Duration:** 1-3 hours per feature -**Required:** Recommended for comprehensive coverage - -### Dual-Mode Operation - -**1. BMad-Integrated Mode** (story available): - -- Uses story acceptance criteria -- Aligns with test-design priorities -- Expands ATDD tests with edge cases -- **Story enhances coverage but NOT required** - -**2. Standalone Mode** (no story): - -- Analyzes source code independently -- Identifies coverage gaps automatically -- Works with any project (BMad or non-BMad) -- "Work out of thin air" - -**3. Auto-Discover Mode** (no targets): - -- Scans codebase for features needing tests -- Prioritizes features with no coverage -- Generates comprehensive test plan - -### When to Use - -**BMad-Integrated:** - -- After dev-story completes -- To expand beyond ATDD tests -- For P1/P2 edge cases and regression - -**Standalone:** - -- Brownfield project with missing tests -- Non-BMad projects -- Point TEA at any codebase/feature - -**Auto-Discover:** - -- No specific targets -- Want comprehensive coverage audit -- Identify coverage gaps - -### Process Overview - -**Phase 1: Mode Detection (Step 1)** - -- Check if story file exists -- Check if target feature specified -- Auto-detect mode (BMad/Standalone/Auto-discover) - -**Phase 2: Context Loading (Steps 2-3)** - -- BMad mode: Load story, tech-spec, test-design -- Standalone: Load source code, existing tests -- Auto-discover: Scan codebase for features - -**Phase 3: Gap Analysis (Steps 4-5)** - -- Identify coverage gaps (missing tests) -- Prioritize by risk (P0-P3) -- Avoid duplicate coverage - -**Phase 4: Test Generation (Steps 6-10)** - -- Generate E2E tests (critical paths only) -- Generate API tests (business logic variations) -- Generate Component tests (UI edge cases) -- Generate Unit tests (pure logic edge cases) -- Generate fixtures and factories - -**Phase 5: Validation & Healing (Steps 11-13)** - -- Run generated tests (if auto_validate enabled) -- Heal failures (if auto_heal_failures enabled) -- Mark unfixable as test.fixme() - -### Test Healing Capabilities (NEW) - -**Automatic Test Healing:** -When tests fail after generation, TEA can automatically heal them. - -**Configuration:** `config.tea_use_mcp_enhancements` (default: true) - -- If true + MCP available β†’ MCP-assisted healing -- If true + MCP unavailable β†’ Pattern-based healing -- If false β†’ No healing, document failures - -**Pattern-Based Healing** (always available): - -1. Parse error messages from test output -2. Match patterns against known failures -3. Apply fixes from healing knowledge fragments: - - `test-healing-patterns.md` - Common failures - - `selector-resilience.md` - Selector fixes - - `timing-debugging.md` - Race condition fixes -4. Re-run tests (max 3 iterations) -5. Mark unfixable as `test.fixme()` - -**MCP-Enhanced Healing** (when Playwright MCP available): - -- **Interactive debugging** before pattern fixes -- **Visual context** with browser snapshots -- **Live DOM inspection** to find correct selectors -- **Console analysis** for JS errors -- **Network inspection** for API failures - -**Example Healing:** - -```typescript -// ❌ Original (failing): CSS class selector -await page.locator('.submit-btn').click(); - -// βœ… Healed: data-testid selector -await page.getByTestId('submit-button').click(); -``` - -### Recording Mode (MCP-Enhanced) - -**Complex UI interactions** can be recorded instead of AI-generated. - -**When Recording Mode Activates:** - -- Complex scenarios: drag-drop, wizards, multi-page flows -- Visual workflows: modals, animations -- Fallback: AI generation (automatic, silent) - -**Recording Workflow:** - -1. Use `browser_*` tools to interact with UI -2. Capture interactions as test steps -3. Add verifications with `browser_verify_*` -4. Generate test file from recording -5. Enhance with knowledge base patterns - -### Inputs - -**BMad-Integrated Mode:** - -- story file (optional, enhances coverage) -- tech-spec (optional) -- test-design (optional) - -**Standalone Mode:** - -- target_feature: Feature name or directory (e.g., "user-authentication" or "src/auth/") -- target_files: Specific files (comma-separated) - -**Both Modes:** - -- Framework config (playwright.config.ts) -- Existing tests (for gap analysis) -- Knowledge base fragments - -### Outputs - -**Test Files Created:** - -- E2E tests: `/tests/e2e/{feature}.spec.ts` -- API tests: `/tests/api/{feature}.api.spec.ts` -- Component tests: `/tests/component/{ComponentName}.test.tsx` -- Unit tests: `/tests/unit/{module}.test.ts` - -**Supporting Infrastructure:** - -- Fixtures: `/tests/support/fixtures/{feature}.fixture.ts` -- Factories: `/tests/support/factories/{entity}.factory.ts` -- Helpers: `/tests/support/helpers/{utility}.ts` - -**Documentation:** - -- **automation-summary.md**: Comprehensive report with: - - Execution mode (BMad/Standalone/Auto-discover) - - Feature analysis (coverage gaps) - - Tests created (counts, paths, priorities) - - Infrastructure created - - Healing report (if enabled) - - Next steps - -### Example: Standalone Mode - -**Input:** - -```bash -bmad tea *automate --target-feature "src/auth/" -``` - -**Output:** - -```markdown -# Automation Summary - src/auth/ - -**Mode:** Standalone (no story) -**Date:** 2025-11-02 - -## Feature Analysis - -**Source Files Analyzed:** - -- src/auth/login.ts -- src/auth/session.ts -- src/auth/validation.ts - -**Existing Coverage:** 0 tests found - -**Coverage Gaps:** - -- ❌ No E2E tests for login flow -- ❌ No API tests for /auth/login endpoint -- ❌ No unit tests for validateEmail() - -## Tests Created - -### E2E Tests (2 tests, P0-P1) - -- tests/e2e/user-authentication.spec.ts (87 lines) - - [P0] Login with valid credentials β†’ Dashboard - - [P1] Invalid credentials β†’ Error message - -### API Tests (3 tests, P1-P2) - -- tests/api/auth.api.spec.ts (102 lines) - - [P1] POST /auth/login - valid β†’ 200 + token - - [P1] POST /auth/login - invalid β†’ 401 - - [P2] POST /auth/login - missing fields β†’ 400 - -### Unit Tests (4 tests, P2) - -- tests/unit/validation.test.ts (45 lines) - - [P2] validateEmail - valid formats - - [P2] validateEmail - invalid formats - - [P2] validatePassword - strength rules - - [P2] validatePassword - edge cases - -## Infrastructure Created - -- Fixtures: tests/support/fixtures/auth.fixture.ts -- Factories: tests/support/factories/user.factory.ts - -## Coverage Analysis - -**Total:** 9 tests (P0: 1, P1: 4, P2: 4) -**Levels:** E2E: 2, API: 3, Unit: 4 - -βœ… Critical paths covered (E2E + API) -βœ… Error cases covered (API) -βœ… Edge cases covered (Unit) - -## Recommendations - -1. **High Priority (P0-P1):** - - Add E2E test for password reset flow - - Add API tests for token refresh endpoint - -2. **Medium Priority (P2):** - - Add unit tests for session timeout logic -``` - -### Related Workflows - -- **atdd** - atdd creates P0 tests, automate expands with P1/P2 -- **test-design** - Provides priority context -- **trace** - Validates coverage -- **test-review** - Validates quality - ---- - -## ci (CI/CD Pipeline) - -### Purpose - -Scaffold production-ready CI/CD quality pipeline with test execution, burn-in loops for flaky test detection, parallel sharding, and artifact collection. - -**Agent:** TEA (Test Architect) -**When to Run:** Once (after framework setup) -**Duration:** 1-2 hours -**Required:** Recommended for all projects - -### When to Use - -Run **after framework workflow** to enable continuous integration. - -**Trigger Points:** - -- After framework setup complete -- Before first sprint -- When ready to enable CI/CD - -### Key Features - -**1. Burn-In Loop** (flaky test detection): - -- Runs tests 10 times consecutively -- Catches non-deterministic failures -- Prevents flaky tests from reaching main - -**2. Parallel Sharding** (4 shards): - -- 75% time reduction (40 min β†’ 10 min per shard) -- Configurable shard count -- Faster feedback on PRs - -**3. Smart Caching**: - -- Node modules + browser binaries cached -- 2-5 min savings per run -- Automatic invalidation on dependency changes - -**4. Selective Testing**: - -- Run only tests affected by code changes -- 50-80% time reduction for focused PRs -- Full suite still runs on main branch - -**5. Failure-Only Artifacts**: - -- Upload traces/screenshots/videos only on failure -- 90% storage cost reduction -- 30-day retention default - -### Process Overview - -**Phase 1: Platform Detection (Steps 1-2)** - -- Auto-detect CI platform (GitHub Actions, GitLab CI, Circle CI) -- Confirm with user - -**Phase 2: Pipeline Configuration (Steps 3-6)** - -- Generate CI config file -- Configure parallel sharding (4 jobs) -- Configure burn-in loop (10 iterations) -- Configure caching (dependencies + browsers) -- Configure artifact collection (failure-only) - -**Phase 3: Helper Scripts (Steps 7-9)** - -- Generate test-changed.sh (selective testing) -- Generate ci-local.sh (local CI mirror) -- Generate burn-in.sh (standalone burn-in) - -**Phase 4: Documentation (Step 10)** - -- Generate ci.md (pipeline guide) -- Generate ci-secrets-checklist.md (required secrets) - -### Inputs - -Required: - -- Framework config (playwright.config.ts, etc.) -- package.json - -Optional: - -- .git/config (for platform auto-detection) -- .nvmrc (Node version) - -### Outputs - -**1. CI Configuration File:** - -- `.github/workflows/test.yml` (GitHub Actions) -- `.gitlab-ci.yml` (GitLab CI) - -**2. Helper Scripts:** - -- `scripts/test-changed.sh` -- `scripts/ci-local.sh` -- `scripts/burn-in.sh` - -**3. Documentation:** - -- `docs/ci.md` -- `docs/ci-secrets-checklist.md` - -### Example: GitHub Actions Pipeline - -```yaml -# .github/workflows/test.yml -name: Test - -on: - pull_request: - push: - branches: [main] - -jobs: - lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 20 - cache: 'npm' - - run: npm ci - - run: npm run lint - - test: - runs-on: ubuntu-latest - strategy: - matrix: - shard: [1, 2, 3, 4] - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 20 - cache: 'npm' - - run: npm ci - - run: npx playwright install --with-deps - - run: npm run test:e2e -- --shard=${{ matrix.shard }}/4 - - uses: actions/upload-artifact@v4 - if: failure() - with: - name: test-results-${{ matrix.shard }} - path: test-results/ - retention-days: 30 - - burn-in: - runs-on: ubuntu-latest - if: github.event_name == 'pull_request' - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 20 - cache: 'npm' - - run: npm ci - - run: npx playwright install --with-deps - - name: Burn-in loop - run: | - for i in {1..10}; do - echo "πŸ”₯ Burn-in iteration $i/10" - npm run test:e2e || exit 1 - done -``` - -**Performance Targets:** - -- Lint: <2 minutes -- Test (per shard): <10 minutes -- Burn-in: <30 minutes -- **Total: <45 minutes** (20Γ— faster than sequential) - -### Related Workflows - -- **framework** - Must run before ci -- **trace** (Phase 2) - Uses CI results for gate decision - ---- - -## trace (Traceability & Quality Gate) - -### Purpose - -**Two-phase workflow:** (1) Generate requirements-to-tests traceability matrix, then (2) Make deterministic quality gate decision for deployment readiness. - -**Agent:** TEA (Test Architect) -**When to Run:** - -- **Phase 1**: After tests written (per story/epic) -- **Phase 2**: Before release (quality gate) - **Duration:** -- **Phase 1**: 15-30 minutes -- **Phase 2**: 15-30 minutes - -### Phase 1: Requirements Traceability - -**Purpose:** Map acceptance criteria to tests, identify coverage gaps. - -**Process:** - -1. Load story file (acceptance criteria) -2. Auto-discover tests related to story -3. Map AC to test cases -4. Classify coverage (FULL, PARTIAL, NONE) -5. Generate traceability matrix - -**Output:** `traceability-matrix.md` - -**Example:** - -```markdown -# Traceability Matrix - Story 1.2 - -## Coverage Summary - -| Priority | Total | FULL | Coverage % | Status | -| -------- | ----- | ---- | ---------- | ------- | -| P0 | 3 | 3 | 100% | βœ… PASS | -| P1 | 2 | 2 | 100% | βœ… PASS | - -## Detailed Mapping - -### AC-1: User can login with valid credentials - -**Tests:** - -- 1.2-E2E-001: Login happy path βœ… -- 1.2-API-001: POST /auth/login valid creds βœ… - -**Coverage:** FULL βœ… - -### AC-2: Invalid credentials show error - -**Tests:** - -- 1.2-E2E-002: Login with invalid password βœ… -- 1.2-API-002: POST /auth/login invalid creds βœ… - -**Coverage:** FULL βœ… - -## Gap Analysis - -**Critical Gaps:** None βœ… -**High Priority Gaps:** None βœ… -**Medium Priority Gaps:** None βœ… -``` - -### Phase 2: Quality Gate Decision - -**Purpose:** Make PASS/CONCERNS/FAIL/WAIVED decision for deployment. - -**Process:** - -1. Load traceability results (Phase 1) -2. Load test execution results (CI/CD reports) -3. Load NFR assessment (if exists) -4. Apply deterministic decision rules -5. Generate gate decision document - -**Decision Rules:** - -**PASS** βœ… (All criteria met): - -- P0 coverage = 100% -- P1 coverage β‰₯ 90% -- P0 pass rate = 100% -- P1 pass rate β‰₯ 95% -- Security issues = 0 -- Critical NFRs met - -**CONCERNS** ⚠️ (P0 met, P1 degraded): - -- P0 coverage = 100% -- P1 coverage 80-89% -- P1 pass rate 90-94% -- No security issues - -**FAIL** ❌ (P0 criteria failed): - -- P0 coverage <100% -- P0 pass rate <100% -- Security issues >0 -- Critical NFRs failed - -**WAIVED** πŸ”“ (FAIL + business approval): - -- FAIL status + VP/CTO approval -- Business justification documented -- Remediation plan with timeline -- **Never waive: security, data corruption** - -**Output:** `gate-decision-story-{X}.{X}.md` - -**Example:** - -```markdown -# Quality Gate Decision: Story 1.2 - -**Decision:** βœ… PASS -**Date:** 2025-11-02 - -## Evidence - -- P0 Coverage: 100% βœ… (3/3 AC covered) -- P1 Coverage: 100% βœ… (2/2 AC covered) -- P0 Pass Rate: 100% βœ… (5/5 tests passing) -- P1 Pass Rate: 100% βœ… (4/4 tests passing) -- Overall Pass Rate: 100% βœ… (9/9 tests passing) -- Security Issues: 0 βœ… - -## Next Steps - -1. Deploy to staging -2. Monitor for 24 hours -3. Deploy to production -``` - -### Related Workflows - -- **test-design** - Defines P0-P3 priorities -- **atdd** / **automate** - Generate tests that trace validates -- **nfr-assess** - Provides NFR validation for gate - ---- - -## nfr-assess (Non-Functional Requirements) - -### Purpose - -Assess non-functional requirements (performance, security, reliability, maintainability) against defined thresholds using evidence-based validation. - -**Agent:** TEA (Test Architect) -**When to Run:** Before release (after implementation) -**Duration:** 1-2 hours -**Required:** Recommended for releases - -### When to Use - -Run **before quality gate decision** to validate NFRs. - -**Trigger Points:** - -- Before release -- Before major deployment -- After performance/security testing - -### NFR Categories - -**Performance:** - -- Response time (p95: 500ms) -- Throughput (100 RPS) -- CPU usage (<70%) -- Memory usage (<80%) - -**Security:** - -- Security score (β‰₯85/100) -- Critical vulnerabilities (0) -- High vulnerabilities (<3) -- MFA enabled - -**Reliability:** - -- Uptime (β‰₯99.9%) -- Error rate (<0.1%) -- MTTR (<15 min) -- CI burn-in (100 runs) - -**Maintainability:** - -- Test coverage (β‰₯80%) -- Code quality (β‰₯85/100) -- Technical debt (<5%) -- Documentation (β‰₯90%) - -### Process Overview - -**Phase 1: Load Context (Steps 1-2)** - -- Load tech-spec/PRD for NFR requirements -- Load test results, metrics, logs - -**Phase 2: Assess NFRs (Steps 3-6)** - -- Performance assessment (against thresholds) -- Security assessment -- Reliability assessment -- Maintainability assessment - -**Phase 3: Evidence Validation (Steps 7-8)** - -- Validate evidence exists and is fresh -- Apply deterministic PASS/CONCERNS/FAIL rules - -**Phase 4: Reporting (Step 9)** - -- Generate NFR assessment report -- Identify quick wins -- Provide recommendations - -### Assessment Rules - -**PASS** βœ…: Evidence exists AND meets/exceeds threshold -**CONCERNS** ⚠️: Threshold unknown OR evidence missing/incomplete OR close to threshold -**FAIL** ❌: Evidence exists BUT does NOT meet threshold - -### Example Output - -```markdown -# NFR Assessment - Story 1.2 - -**Overall Status:** PASS βœ… - -## Performance Assessment - -- Response Time p95: PASS βœ… (320ms < 500ms) -- Throughput: PASS βœ… (250 RPS > 100 RPS) - -**Evidence:** Load test results (2025-11-02) - -## Security Assessment - -- Authentication: PASS βœ… (MFA enforced) -- Data Protection: PASS βœ… (AES-256 + TLS 1.3) - -**Evidence:** Security audit (2025-11-02) - -## Reliability Assessment - -- Uptime: PASS βœ… (99.95% > 99.9%) -- Error Rate: PASS βœ… (0.05% < 0.1%) -- CI Burn-in: PASS βœ… (100 consecutive runs, 0 failures) - -**Evidence:** Monitoring data (last 7 days), CI logs - -## Maintainability Assessment - -- Test Coverage: PASS βœ… (87% > 80%) -- Code Quality: PASS βœ… (92/100 > 85/100) - -**Evidence:** Coverage report, SonarQube scan - -Gate Status: PASS βœ… - All NFRs met -``` - -### Related Workflows - -- **trace** (Phase 2) - Uses NFR assessment in gate decision - ---- - -## test-review - -### Purpose - -Perform comprehensive quality validation of test code using TEA's knowledge base, detecting flaky patterns, validating structure, and providing actionable feedback. - -**Agent:** TEA (Test Architect) -**When to Run:** After test creation (per test file or suite) -**Duration:** 30-60 minutes -**Required:** Recommended for critical tests - -### When to Use - -Run **after test creation** to validate quality. - -**Trigger Points:** - -- After atdd workflow -- After automate workflow -- After developer writes tests -- Before code-review workflow -- Periodic quality audits - -### Quality Scoring (0-100) - -**Score Calculation:** - -``` -Starting Score: 100 - -Deductions: -- Critical (P0): -10 points each -- High (P1): -5 points each -- Medium (P2): -2 points each -- Low (P3): -1 point each - -Bonus (max +30): -+ Excellent BDD structure: +5 -+ Comprehensive fixtures: +5 -+ Data factories: +5 -+ Network-first pattern: +5 -+ Perfect isolation: +5 -+ All test IDs present: +5 -``` - -**Quality Grades:** - -- **90-100 (A+)**: Excellent - Production-ready -- **80-89 (A)**: Good - Minor improvements -- **70-79 (B)**: Acceptable - Some issues -- **60-69 (C)**: Needs Improvement -- **<60 (F)**: Critical Issues - -### Quality Criteria Checked - -1. **BDD Format** (Given-When-Then) -2. **Test IDs** ({STORY_ID}-{LEVEL}-{SEQ}) -3. **Priority Markers** (P0/P1/P2/P3) -4. **No Hard Waits** (page.waitForTimeout) -5. **Determinism** (no conditionals/try-catch) -6. **Isolation** (tests clean up, no shared state) -7. **Fixture Patterns** (pure function β†’ fixture β†’ mergeTests) -8. **Data Factories** (faker.js, no hardcoded data) -9. **Network-First Pattern** (route before navigate) -10. **Explicit Assertions** -11. **Test Length** (≀300 lines) -12. **Test Duration** (≀1.5 min) -13. **Flakiness Patterns** (tight timeouts, race conditions) - -### Example Output - -```markdown -# Test Quality Review: login.spec.ts - -**Quality Score:** 92/100 (A+ - Excellent) -**Recommendation:** Approve - Production Ready - -## Executive Summary - -Excellent test quality with comprehensive coverage and best practices. - -**Strengths:** -βœ… Clear Given-When-Then structure -βœ… All test IDs present (1.2-E2E-001, 1.2-E2E-002) -βœ… Network-first pattern used consistently -βœ… Perfect test isolation with cleanup -βœ… Data factories for test data - -**Minor Issues:** -⚠️ One test slightly verbose (245 lines) - consider helper function - -**Recommendation:** Approve without changes. -``` - -### Related Workflows - -- **atdd** - Review after ATDD generation -- **automate** - Review after automation expansion -- **code-review** - Test quality feeds into overall review - ---- - -## Testing Workflow Integration - -### With Implementation Workflows - -``` -Phase 4: Implementation Testarch (Parallel) -────────────────────── ─────────────────── - - β†’ framework (once at start) - β†’ test-design (per epic) - -create-story β†’ atdd (P0/P1 failing tests) -story-context -dev-story β†’ Tests pass (RED β†’ GREEN) - β†’ automate (expand P1/P2 coverage) -code-review β†’ test-review (validate quality) -story-done - β†’ trace Phase 1 (coverage check) - -Epic complete β†’ retrospective - β†’ nfr-assess (NFRs) - β†’ trace Phase 2 (quality gate) -``` - -### Recommended Testing Strategy - -**Level 0-1 Projects:** - -- framework (optional) -- atdd (optional, if tests needed) -- Skip test-design, automate - -**Level 2 Projects:** - -- framework (required) -- test-design (optional) -- atdd (P0 stories) -- automate (optional) -- trace Phase 1 (optional) - -**Level 3-4 Projects:** - -- framework (required) -- test-design (required) -- atdd (all P0/P1 stories) -- automate (comprehensive coverage) -- ci (required) -- trace Phase 1 (required) -- nfr-assess (before release) -- trace Phase 2 (quality gate) -- test-review (critical tests) - ---- - -## Best Practices - -### 1. Test Early, Test Often - -Run **atdd before dev-story** for P0/P1 stories. Write failing tests first. - -### 2. Use Test Design for Complex Projects - -Don't skip test-design for Level 3-4. Risk assessment prevents gaps. - -### 3. Trust the Burn-In Loop - -Flaky tests are poison. Always run burn-in in CI to catch them. - -### 4. Review Test Quality - -Don't assume generated tests are perfect. Run test-review for critical tests. - -### 5. Make Quality Gates Explicit - -Use trace Phase 2 for release decisions. Document gate criteria. - -### 6. Heal Failures Automatically - -Enable auto-healing for faster iteration. Pattern-based healing works without MCP. - ---- - -## Summary - -Testarch workflows provide comprehensive testing infrastructure: - -| Workflow | Frequency | Critical For | -| ------------------- | ----------------- | ----------------------- | -| **framework** | Once | All projects with tests | -| **test-design** | Per epic/project | Level 3-4 planning | -| **atdd** | Per story (P0/P1) | Test-driven development | -| **automate** | Per feature | Comprehensive coverage | -| **ci** | Once | Continuous integration | -| **trace** (Phase 1) | Per story/epic | Coverage validation | -| **trace** (Phase 2) | Before release | Quality gate | -| **nfr-assess** | Before release | NFR validation | -| **test-review** | As needed | Test quality | - -**Key Takeaway:** Testing is not a phaseβ€”it's a continuous practice integrated throughout implementation. Use testarch workflows to ensure comprehensive, high-quality test coverage.