docs: massive documentation overhaul + introduce Paige (Documentation Guide agent)

## 📚 Complete Documentation Restructure

**BMM Documentation Hub Created:**
- New centralized documentation system at `src/modules/bmm/docs/`
- 18 comprehensive guides organized by topic (7000+ lines total)
- Clear learning paths for greenfield, brownfield, and quick spec flows
- Professional technical writing standards throughout

**New Documentation:**
- `README.md` - Complete documentation hub with navigation
- `quick-start.md` - 15-minute getting started guide
- `agents-guide.md` - Comprehensive 12-agent reference (45 min read)
- `party-mode.md` - Multi-agent collaboration guide (20 min read)
- `scale-adaptive-system.md` - Deep dive on Levels 0-4 (42 min read)
- `brownfield-guide.md` - Existing codebase development (53 min read)
- `quick-spec-flow.md` - Rapid Level 0-1 development (26 min read)
- `workflows-analysis.md` - Phase 1 workflows (12 min read)
- `workflows-planning.md` - Phase 2 workflows (19 min read)
- `workflows-solutioning.md` - Phase 3 workflows (13 min read)
- `workflows-implementation.md` - Phase 4 workflows (33 min read)
- `workflows-testing.md` - Testing & QA workflows (29 min read)
- `workflow-architecture-reference.md` - Architecture workflow deep-dive
- `workflow-document-project-reference.md` - Document-project workflow reference
- `enterprise-agentic-development.md` - Team collaboration patterns
- `faq.md` - Comprehensive Q&A covering all topics
- `glossary.md` - Complete terminology reference
- `troubleshooting.md` - Common issues and solutions

**Documentation Improvements:**
- Removed all version/date footers (git handles versioning)
- Agent customization docs now include full rebuild process
- Cross-referenced links between all guides
- Reading time estimates for all major docs
- Consistent professional formatting and structure

**Consolidated & Streamlined:**
- Module README (`src/modules/bmm/README.md`) streamlined to lean signpost
- Root README polished with better hierarchy and clear CTAs
- Moved docs from root `docs/` to module-specific locations
- Better separation of user docs vs. developer reference

## 🤖 New Agent: Paige (Documentation Guide)

**Role:** Technical documentation specialist and information architect

**Expertise:**
- Professional technical writing standards
- Documentation structure and organization
- Information architecture and navigation
- User-focused content design
- Style guide enforcement

**Status:** Work in progress - Paige will evolve as documentation needs grow

**Integration:**
- Listed in agents-guide.md, glossary.md, FAQ
- Available for all phases (documentation is continuous)
- Can be customized like all BMM agents

## 🔧 Additional Changes

- Updated agent manifest with Paige
- Updated workflow manifest with new documentation workflows
- Fixed workflow-to-agent mappings across all guides
- Improved root README with clearer Quick Start section
- Better module structure explanations
- Enhanced community links with Discord channel names

**Total Impact:**
- 18 new/restructured documentation files
- 7000+ lines of professional technical documentation
- Complete navigation system with cross-references
- Clear learning paths for all user types
- Foundation for knowledge base (coming in beta)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Brian Madison
2025-11-02 21:18:33 -06:00
parent 8a00f8ad70
commit cfedecbd53
359 changed files with 72374 additions and 809 deletions

View File

@@ -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)
- The five complexity levels (0-4)
- Automatic level detection
- Documentation requirements per level
- Planning workflow routing
- **[Quick Spec Flow](./quick-spec-flow.md)** - Fast-track workflow for Level 0-1 projects (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
- Level detection 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 levels
**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 project complexity levels**
→ 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
- Level 0-4 planning approach
- Which planning workflow to use
- **[Phase 3: Solutioning Workflows](./workflows-solutioning.md)** - Architecture and validation (638 lines)
- architecture, solutioning-gate-check
- Required for Level 3-4 projects
- 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<br/>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<br/>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)

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,638 @@
# BMad Method Brownfield Development Guide
**Complete guide for working with existing codebases**
**Reading Time:** ~35 minutes
---
## 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:
- **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
**Key Difference from Greenfield:** You must understand and respect existing patterns, architecture, and constraints.
**Core Principle:** AI agents need comprehensive documentation to understand existing code before they can effectively plan or implement changes.
---
## Getting Started
### Understanding Project Levels
For complete level details, see [Scale Adaptive System](./scale-adaptive-system.md).
**Brownfield levels at a glance:**
| Level | Scope | Stories | Key Difference |
| ----- | -------------------- | ------- | ---------------------------------- |
| **0** | Bug fix | 1 | Must understand affected code |
| **1** | Small feature | 1-10 | Respect existing patterns |
| **2** | Feature set | 5-15 | Integrate with architecture |
| **3** | Complex integration | 12-40 | Review existing architecture first |
| **4** | Enterprise expansion | 40+ | Full system documentation required |
### Level Detection for Brownfield
When you run `workflow-init`, it handles brownfield intelligently:
**Step 1: Shows what it found**
- Old planning docs (PRD, epics, stories)
- Existing codebase
**Step 2: Asks about YOUR work**
> "Are these works in progress, previous effort, or proposed work?"
- **(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
**Step 3: Analyzes your description**
- Keywords: "fix" → Level 0, "add feature" → Level 1, "dashboard" → Level 2
- Story count estimation
- Confirms suggested level with you
**Key Principle:** System asks about YOUR current work first, uses old artifacts as context only.
**Example: Old Level 3 PRD, New Level 0 Work**
```
System: "Found PRD.md (Level 3, 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: "Level 0 brownfield. Correct?"
You: "Yes"
✅ Creates Level 0 workflow
```
---
## Phase 0: Documentation (Critical First Step)
🚨 **For brownfield projects: Always ensure adequate documentation before planning**
### Three Scenarios
| Scenario | You Have | Action | Tool | Time |
| -------- | --------------------------- | -------------------- | -------- | ------ |
| **A** | No documentation | Run document-project | Workflow | 10-30m |
| **B** | Docs exist, no index.md | Run index-docs | Task | 2-5m |
| **C** | Complete docs with index.md | Skip Phase 0 | - | 0m |
### Scenario A: No Documentation
**Run document-project workflow:**
1. Load Analyst 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
**Outputs:**
- `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
### Scenario B: Docs Exist, No Index
**Run index-docs task:**
1. Load BMad Master agent (or any agent with task access)
2. Load task: `bmad/core/tasks/index-docs.xml`
3. Specify docs directory (e.g., `./docs`)
4. Task generates `index.md` from existing docs
**Why index.md matters:** Primary entry point for AI agents. Provides structured navigation even when good docs exist.
### Scenario C: Complete Documentation
If `docs/index.md` exists with comprehensive content, skip to Phase 1 or 2.
### Why document-project is Critical
Without it, workflows lack context:
- **tech-spec** (Level 0-1) can't auto-detect stack/patterns
- **PRD** (Level 2-4) can't reference existing code
- **architecture** (Level 3-4) can't build on existing structure
- **story-context** can't inject pattern-specific guidance
---
## Workflow Phases by Level
### Phase 1: Analysis (Optional)
**Workflows:**
- `brainstorm-project` - Solution exploration
- `research` - Technical/market research
- `product-brief` - Strategic planning
**When to use:** Complex features, technical decisions, strategic additions
**When to skip:** Bug fixes, well-understood features, time-sensitive changes
See [Workflows Guide](../workflows/README.md) for details.
### Phase 2: Planning (Required)
**Planning approach adapts by level:**
**Level 0-1:** Use `tech-spec` workflow
- Creates tech-spec.md
- Auto-detects existing stack (brownfield)
- Confirms conventions with you
- Generates implementation-ready stories
**Level 2-4:** Use `prd` workflow
- Creates PRD.md + epics.md
- References existing architecture
- Plans integration points
**Brownfield-specific:** See [Scale Adaptive System](./scale-adaptive-system.md) for complete workflow paths by level.
### Phase 3: Solutioning (Level 2-4 Only)
**Critical for brownfield:**
- Review existing architecture FIRST
- Document integration points explicitly
- Plan backward compatibility
- Consider migration strategy
**Workflows:**
- `architecture-review` - Understand existing (Level 3-4)
- `integration-planning` - Plan integration approach (Level 3-4)
- `create-architecture` - Extend architecture docs (Level 2-4)
- `solutioning-gate-check` - Validate before implementation (Level 3-4)
### Phase 4: Implementation (All Levels)
**Sprint-based development through story iteration:**
```mermaid
flowchart TD
SPRINT[sprint-planning<br/>Initialize tracking]
EPIC[epic-tech-context<br/>Per epic]
CREATE[create-story]
CONTEXT[story-context]
DEV[dev-story]
REVIEW[code-review]
CHECK{More stories?}
RETRO[retrospective<br/>Per epic]
SPRINT --> EPIC
EPIC --> CREATE
CREATE --> CONTEXT
CONTEXT --> DEV
DEV --> REVIEW
REVIEW --> CHECK
CHECK -->|Yes| CREATE
CHECK -->|No| RETRO
style SPRINT fill:#bfb,stroke:#333,stroke-width:2px
style RETRO fill:#fbf,stroke:#333,stroke-width:2px
```
**Status Progression:**
- Epic: `backlog → contexted`
- Story: `backlog → drafted → ready-for-dev → in-progress → review → done`
**Brownfield-Specific Implementation Tips:**
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
---
## Best Practices
### 1. Always Document First
Even if you know the code, AI agents need `document-project` output for context. Run it before planning.
### 2. Be Specific About Current Work
When workflow-init asks about your work:
- ✅ "Update payment method enums to include Apple Pay"
- ❌ "Fix stuff"
### 3. Choose Right Documentation Approach
- **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
Tech-spec and story-context will detect conventions. Follow them unless explicitly modernizing.
### 5. Plan Integration Points Explicitly
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
### 6. Design for Gradual Rollout
- Use feature flags for new functionality
- Plan rollback strategies
- Maintain backward compatibility
- Create migration scripts if needed
### 7. Test Integration Thoroughly
- Regression testing of existing features
- Integration point validation
- Performance impact assessment
- API contract verification
### 8. Use Sprint Planning Effectively
- Run `sprint-planning` at Phase 4 start
- Context epics before drafting stories
- Update `sprint-status.yaml` as work progresses
### 9. Leverage Context Injection
- Run `epic-tech-context` before story drafting
- Always create `story-context` before implementation
- These reference existing patterns for consistency
### 10. Learn Continuously
- Run `retrospective` after each epic
- Incorporate learnings into next stories
- Update discovered patterns
- Share insights across team
---
## Common Scenarios
### Scenario 1: Bug Fix (Level 0)
**Situation:** Authentication token expiration causing logout issues
**Workflow:**
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
---
### Scenario 2: Small Feature (Level 1)
**Situation:** Add "forgot password" to existing auth system
**Workflow:**
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)
**Situation:** Add user dashboard with analytics, preferences, activity
**Workflow:**
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. **Implement:** Sprint-based (10-15 stories)
- Load SM → `sprint-planning`
- Per epic: `epic-tech-context` → stories
- Load DEV → `dev-story` per story
5. **Review:** Per story completion
**Time:** 1-2 weeks
---
### Scenario 4: Complex Integration (Level 3)
**Situation:** Add real-time collaboration to document editor
**Workflow:**
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 → `architecture-review` (understand existing editor)
- Load Architect → `integration-planning` (WebSocket integration strategy)
- 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)
**Situation:** Add multi-tenancy to single-tenant SaaS platform
**Workflow:**
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:**
- `architecture-review` - Full system review
- `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
For complete troubleshooting, see [Troubleshooting Guide](./troubleshooting.md).
### AI Agents Lack Codebase Understanding
**Symptoms:**
- Suggestions don't align with existing patterns
- Ignores available components
- Doesn't reference existing code
**Solution:**
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
### Have Documentation But Agents Can't Find It
**Symptoms:**
- README.md, ARCHITECTURE.md exist
- AI agents ask questions already answered
- No `docs/index.md` file
**Solution:**
- **Quick fix:** Run `index-docs` task (2-5min)
- **Comprehensive:** Run `document-project` workflow (10-30min)
### Integration Points Unclear
**Symptoms:**
- Not sure how to connect new code to existing
- Unsure which files to modify
**Solution:**
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. Run `integration-planning` workflow (Level 3-4)
### Existing Tests Breaking
**Symptoms:**
- Regression test failures
- Previously working functionality broken
**Solution:**
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
### Inconsistent Patterns Being Introduced
**Symptoms:**
- New code style doesn't match existing
- Different architectural approach
**Solution:**
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
---
## Quick Reference
### Commands by Phase
```bash
# Phase 0: Documentation (If Needed)
# Analyst agent:
document-project # Create comprehensive docs (10-30min)
# OR load index-docs task for existing docs (2-5min)
# Phase 1: Analysis (Optional)
# Analyst agent:
brainstorm-project # Explore solutions
research # Gather data
product-brief # Strategic planning
# Phase 2: Planning (Required)
# PM agent:
tech-spec # Level 0-1
prd # Level 2-4
# Phase 3: Solutioning (Level 2-4)
# Architect agent:
architecture-review # Review existing (L3-4)
integration-planning # Plan integration (L3-4)
create-architecture # Extend architecture (L2-4)
solutioning-gate-check # Final approval (L3-4)
# Phase 4: Implementation (All Levels)
# SM agent:
sprint-planning # Initialize tracking
epic-tech-context # Epic context
create-story # Draft story
story-context # Story context
# DEV agent:
dev-story # Implement
code-review # Review
# SM agent:
retrospective # After epic
correct-course # If issues
```
### Key Files
**Phase 0 Output:**
- `docs/index.md` - **Master AI entry point (REQUIRED)**
- `docs/project-overview.md`
- `docs/architecture.md`
- `docs/source-tree-analysis.md`
**Phase 1-3 Tracking:**
- `docs/bmm-workflow-status.md` - Progress tracker
**Phase 2 Planning:**
- `docs/tech-spec.md` (Level 0-1)
- `docs/PRD.md` (Level 2-4)
- `docs/epics.md` (Level 2-4)
**Phase 3 Architecture:**
- `docs/architecture.md` (Level 2-4)
**Phase 4 Implementation:**
- `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`
### Decision Flowchart
```mermaid
flowchart TD
START([Brownfield Project])
CHECK{Has docs/<br/>index.md?}
START --> CHECK
CHECK -->|No| DOC[document-project<br/>Deep scan]
CHECK -->|Yes| LEVEL{What Level?}
DOC --> LEVEL
LEVEL -->|0-1| TS[tech-spec]
LEVEL -->|2| PRD[prd]
LEVEL -->|3-4| PRD2[prd → architecture]
TS --> IMPL[Phase 4<br/>Implementation]
PRD --> IMPL
PRD2 --> IMPL
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
```
---
## Prevention Tips
**Avoid issues before they happen:**
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 smaller level if unsure** - Easy to upgrade (L1 → L2)
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
---
## Related Documentation
- **[Scale Adaptive System](./scale-adaptive-system.md)** - Understanding levels and complexity
- **[Quick Spec Flow](./quick-spec-flow.md)** - Fast-track for Level 0-1
- **[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
---
## 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._

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

589
src/modules/bmm/docs/faq.md Normal file
View File

@@ -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-specs 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-spec?
**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-spec (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-spec 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-specs (detailed implementation per epic, created just-in-time)
### Q: When do I create epic-tech-specs?
**A:** In Phase 4, right before implementing each epic. Don't create all epic-tech-specs 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-specs.
### 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-spec
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. Load BMad Master → `*party-mode`
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!

View File

@@ -0,0 +1,327 @@
# 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 size and complexity (Levels 0-4).
### 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
### Level 0 (Single Atomic Change)
Single-story projects like bug fixes, typos, or small patches. Uses tech-spec only, no architecture needed. Estimated completion: hours.
### Level 1 (Small Feature)
Projects with 1-10 stories, typically 2-3 related changes. Examples: OAuth login, search feature, user profile page. Uses tech-spec with epic breakdown.
### Level 2 (Medium Project)
Projects with 5-15 stories across multiple epics. Examples: admin dashboard, customer portal, reporting system. Uses PRD + optional architecture.
### Level 3 (Complex Integration)
Projects with 12-40 stories involving subsystems and integrations. Examples: e-commerce platform, SaaS product, multi-module system. Requires PRD + comprehensive architecture.
### Level 4 (Enterprise Scale)
Projects with 40+ stories across products. Examples: multi-tenant systems, product ecosystems, platform expansions. Requires full methodology with strategic planning.
### Complexity Level
The scale rating (0-4) assigned to a project based on story count, integration requirements, team size, and architectural complexity.
---
## Planning Documents
### Tech-Spec (Technical Specification)
**Level 0-1 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-Spec (Epic Technical Specification)
**Level 2-4 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 (Level 0-1) is created upfront and is the only planning doc. Epic-tech-spec (Level 2-4) is created per epic during implementation and supplements PRD + Architecture.
### PRD (Product Requirements Document)
**Level 2-4.** 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
**Level 2-4.** System-wide design document defining structure, components, interactions, data models, integration patterns, security, performance, and deployment. Optional for Level 2, required for Level 3-4.
**Scale-Adaptive:** Architecture complexity scales with level - Level 2 is lightweight, Level 4 is enterprise-grade.
### 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 small projects (Level 0-1), recommended for Level 2, required for Level 3-4.
### Phase 2: Planning (Required)
**Always required.** Creates formal requirements and work breakdown. Routes to tech-spec (Level 0-1) or PRD (Level 2-4) based on detected complexity level.
### Phase 3: Solutioning (Conditional)
Architecture design phase. Optional for Level 2, required for Level 3-4. 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 Level 0-1 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-specs are 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.
### SM (Scrum Master)
Agent that manages sprints, creates stories, generates contexts, and coordinates implementation. Primary orchestrator for Phase 4.
### 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.
### Paige (Documentation Guide)
Agent specialized in creating and maintaining high-quality technical documentation. Expert in documentation standards, information architecture, and professional technical writing.
### 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.md
**Phases 0-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 Level 3-4.
### 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.md, detects greenfield vs brownfield, determines complexity level, and sets up appropriate workflow path.
### Level Detection
Automatic analysis by workflow-init that uses keyword analysis, story count estimation, and complexity indicators to suggest appropriate level (0-4). User can override suggested level.
### 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 Level 2+ 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 levels and complexity
- [Brownfield Guide](./brownfield-guide.md) - Working with existing codebases
- [Quick Spec Flow](./quick-spec-flow.md) - Fast-track for Level 0-1
- [FAQ](./faq.md) - Common questions
- [Troubleshooting](./troubleshooting.md) - Problem resolution

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,652 @@
# BMad Quick Spec Flow
**Perfect for:** Bug fixes, small features, rapid prototyping, and quick enhancements
**Time to implementation:** Minutes, not hours
---
## 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.
### When to Use Quick Spec Flow
**Use Quick Spec Flow (Level 0-1) when:**
- Single bug fix or small enhancement (Level 0)
- Small feature with 2-3 related changes (Level 1)
- 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:**
- Building new products or major features (Level 2-4)
- 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!
---
## Quick Spec Flow Overview
```mermaid
flowchart TD
START[Step 1: Run Tech-Spec Workflow]
DETECT[Detects project stack<br/>package.json, requirements.txt, etc.]
ANALYZE[Analyzes brownfield codebase<br/>if exists]
TEST[Detects test frameworks<br/>and conventions]
CONFIRM[Confirms conventions<br/>with you]
GENERATE[Generates context-rich<br/>tech-spec]
STORIES[Creates ready-to-implement<br/>stories]
OPTIONAL[Step 2: Optional<br/>Generate Story Context<br/>SM Agent<br/>For complex scenarios only]
IMPL[Step 3: Implement<br/>DEV Agent<br/>Code, test, commit]
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
**Best for:** Bug fixes, single file changes, isolated improvements
### What You Get
1. **tech-spec.md** - Comprehensive technical specification with:
- Problem statement and solution
- Detected framework versions and dependencies
- Brownfield code patterns (if applicable)
- Existing test patterns to follow
- Specific file paths to modify
- Complete implementation guidance
2. **story-[slug].md** - Single user story ready for development
### Quick Spec Flow Commands
```bash
# Start Quick Spec Flow (no workflow-init needed!)
# Load PM agent and run tech-spec
# When complete, implement directly:
# Load DEV agent and run dev-story
```
### What Makes It Quick
- ✅ No Product Brief needed
- ✅ No PRD needed
- ✅ No Architecture doc needed
- ✅ Auto-detects your stack
- ✅ Auto-analyzes brownfield code
- ✅ Auto-validates quality
- ✅ Story context optional (tech-spec is comprehensive!)
### Example Level 0 Scenarios
- "Fix the login validation bug"
- "Add email field to user registration form"
- "Update API endpoint to return additional field"
- "Improve error handling in payment processing"
---
## Level 1: 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
2. **epics.md** - Epic organization with story breakdown
3. **story-[epic-slug]-1.md** - First story
4. **story-[epic-slug]-2.md** - Second story
5. **story-[epic-slug]-3.md** - Third story (if needed)
### Quick Spec Flow Commands
```bash
# Start Quick Spec Flow
# Load PM agent and run tech-spec
# Optional: Organize stories as a sprint
# Load SM agent and run sprint-planning
# Implement story-by-story:
# Load DEV agent and run dev-story for each story
```
### Story Sequencing
Stories are **automatically validated** to ensure proper sequence:
- ✅ No forward dependencies (Story 2 can't depend on Story 3)
- ✅ Clear dependency documentation
- ✅ Infrastructure → Features → Polish order
- ✅ Backend → Frontend flow
### Example Level 1 Scenarios
- "Add OAuth social login (Google, GitHub, Twitter)"
- "Build user profile page with avatar upload"
- "Implement basic search with filters"
- "Add dark mode toggle to application"
---
## Smart Context Discovery
Quick Spec Flow automatically discovers and uses:
### 1. Existing Documentation
- Product briefs (if they exist)
- Research documents
- `document-project` output (brownfield codebase map)
### 2. Project Stack
- **Node.js:** package.json → frameworks, dependencies, scripts, test framework
- **Python:** requirements.txt, pyproject.toml → packages, tools
- **Ruby:** Gemfile → gems and versions
- **Java:** pom.xml, build.gradle → Maven/Gradle dependencies
- **Go:** go.mod → modules
- **Rust:** Cargo.toml → crates
- **PHP:** composer.json → packages
### 3. Brownfield Code Patterns
- Directory structure and organization
- Existing code patterns (class-based, functional, MVC)
- Naming conventions (camelCase, snake_case, PascalCase)
- Test frameworks and patterns
- Code style (semicolons, quotes, indentation)
- Linter/formatter configs
- Error handling patterns
- Logging conventions
- Documentation style
### 4. Convention Confirmation
**IMPORTANT:** Quick Spec Flow detects your conventions and **asks for confirmation**:
```
I've detected these conventions in your codebase:
Code Style:
- ESLint with Airbnb config
- Prettier with single quotes, 2-space indent
- No semicolons
Test Patterns:
- Jest test framework
- .test.js file naming
- expect() assertion style
Should I follow these existing conventions? (yes/no)
```
**You decide:** Conform to existing patterns or establish new standards!
---
## Modern Best Practices via WebSearch
Quick Spec Flow stays current by using WebSearch when appropriate:
### For Greenfield Projects
- Searches for latest framework versions
- Recommends official starter templates
- Suggests modern best practices
### For Outdated Dependencies
- Detects if your dependencies are >2 years old
- Searches for migration guides
- Notes upgrade complexity
### Starter Template Recommendations
For greenfield projects, Quick Spec Flow recommends:
**React:**
- Vite (modern, fast)
- Next.js (full-stack)
**Python:**
- cookiecutter templates
- FastAPI starter
**Node.js:**
- NestJS CLI
- express-generator
**Benefits:**
- ✅ Modern best practices baked in
- ✅ Proper project structure
- ✅ Build tooling configured
- ✅ Testing framework set up
- ✅ Faster time to first feature
---
## UX/UI Considerations
For user-facing changes, Quick Spec Flow captures:
- UI components affected (create vs modify)
- UX flow changes (current vs new)
- Responsive design needs (mobile, tablet, desktop)
- Accessibility requirements:
- Keyboard navigation
- Screen reader compatibility
- ARIA labels
- Color contrast standards
- User feedback patterns:
- Loading states
- Error messages
- Success confirmations
- Progress indicators
---
## Auto-Validation & Quality Assurance
Quick Spec Flow **automatically validates** everything:
### Tech-Spec Validation (Always Runs)
Checks:
- ✅ Context gathering completeness
- ✅ Definitiveness (no "use X or Y" statements)
- ✅ Brownfield integration quality
- ✅ Stack alignment
- ✅ Implementation readiness
Generates scores:
```
✅ Validation Passed!
- Context Gathering: Comprehensive
- Definitiveness: All definitive
- Brownfield Integration: Excellent
- Stack Alignment: Perfect
- Implementation Readiness: ✅ Ready
```
### Story Validation (Level 1 Only)
Checks:
- ✅ Story sequence (no forward dependencies!)
- ✅ Acceptance criteria quality (specific, testable)
- ✅ Completeness (all tech spec tasks covered)
- ✅ Clear dependency documentation
**Auto-fixes issues if found!**
---
## Complete User Journey
### Scenario 1: Bug Fix (Level 0)
**Goal:** Fix login validation bug
**Steps:**
1. **Start:** Load PM agent, say "I want to fix the login validation bug"
2. **PM runs tech-spec workflow:**
- Asks: "What problem are you solving?"
- You explain the validation issue
- Detects your Node.js stack (Express 4.18.2, Jest for testing)
- Analyzes existing UserService code patterns
- Asks: "Should I follow your existing conventions?" → You say yes
- Generates tech-spec.md with specific file paths and patterns
- Creates story-login-fix.md
3. **Implement:** Load DEV agent, run `dev-story`
- DEV reads tech-spec (has all context!)
- Implements fix following existing patterns
- Runs tests (following existing Jest patterns)
- Done!
**Total time:** 15-30 minutes (mostly implementation)
---
### Scenario 2: Small Feature (Level 1)
**Goal:** Add OAuth social login (Google, GitHub)
**Steps:**
1. **Start:** Load PM agent, say "I want to add OAuth social login"
2. **PM runs tech-spec workflow:**
- Asks about the feature scope
- You specify: Google and GitHub OAuth
- Detects your stack (Next.js 13.4, NextAuth.js already installed!)
- Analyzes existing auth patterns
- Confirms conventions with you
- Generates:
- tech-spec.md (comprehensive implementation guide)
- epics.md (OAuth Integration epic)
- story-oauth-1.md (Backend OAuth setup)
- story-oauth-2.md (Frontend login buttons)
3. **Optional Sprint Planning:** Load SM agent, run `sprint-planning`
4. **Implement Story 1:**
- Load DEV agent, run `dev-story` for story 1
- DEV implements backend OAuth
5. **Implement Story 2:**
- DEV agent, run `dev-story` for story 2
- DEV implements frontend
- Done!
**Total time:** 1-3 hours (mostly implementation)
---
## Integration with Phase 4 Workflows
Quick Spec Flow works seamlessly with all Phase 4 implementation workflows:
### story-context (SM Agent)
- ✅ Recognizes tech-spec.md as authoritative source
- ✅ Extracts context from tech-spec (replaces PRD)
- ✅ Generates XML context for complex scenarios
### create-story (SM Agent)
- ✅ Can work with tech-spec.md instead of PRD
- ✅ Uses epics.md from tech-spec workflow
- ✅ Creates additional stories if needed
### sprint-planning (SM Agent)
- ✅ Works with epics.md from tech-spec
- ✅ Organizes Level 1 stories for coordinated implementation
- ✅ Tracks progress through sprint-status.yaml
### dev-story (DEV Agent)
- ✅ Reads stories generated by tech-spec
- ✅ Uses tech-spec.md as comprehensive context
- ✅ Implements following detected conventions
---
## Comparison: Quick Spec vs Full BMM
| Aspect | Quick Spec Flow (Level 0-1) | Full BMM Flow (Level 2-4) |
| --------------------- | ---------------------------- | ---------------------------------- |
| **Setup** | None (standalone) | workflow-init recommended |
| **Planning Docs** | tech-spec.md only | Product Brief → PRD → Architecture |
| **Time to Code** | Minutes | Hours to days |
| **Best For** | Bug fixes, small features | New products, major features |
| **Context Discovery** | Automatic | Manual + guided |
| **Story Context** | Optional (tech-spec is rich) | Required (generated from PRD) |
| **Validation** | Auto-validates everything | Manual validation steps |
| **Brownfield** | Auto-analyzes and conforms | Manual documentation required |
| **Conventions** | Auto-detects and confirms | Document in PRD/Architecture |
---
## When to Graduate from Quick Spec to Full BMM
Start with Quick Spec, but switch to Full BMM when:
- ❌ Project grows beyond 3-5 stories
- ❌ 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!
---
## Quick Spec Flow - Key Benefits
### 🚀 **Speed**
- No Product Brief
- No PRD
- No Architecture doc
- Straight to implementation
### 🧠 **Intelligence**
- Auto-detects stack
- Auto-analyzes brownfield
- Auto-validates quality
- WebSearch for current info
### 📐 **Respect for Existing Code**
- Detects conventions
- Asks for confirmation
- Follows patterns
- Adapts vs. changes
### ✅ **Quality**
- Auto-validation
- Definitive decisions (no "or" statements)
- Comprehensive context
- Clear acceptance criteria
### 🎯 **Focus**
- Level 0: Single atomic change
- Level 1: Coherent small feature
- No scope creep
- Fast iteration
---
## Getting Started
### Prerequisites
- BMad Method installed (`npx bmad-method install`)
- Project directory with code (or empty for greenfield)
### Quick Start Commands
```bash
# For a quick bug fix or small change:
# 1. Load PM agent
# 2. Say: "I want to [describe your change]"
# 3. PM will ask if you want to run tech-spec
# 4. Answer questions about your change
# 5. Get tech-spec + story
# 6. Load DEV agent and implement!
# For a small feature with multiple stories:
# Same as above, but get epic + 2-3 stories
# Optionally use SM sprint-planning to organize
```
### No workflow-init Required!
Quick Spec Flow is **fully standalone**:
- Detects if you're Level 0 or Level 1
- Asks for greenfield vs brownfield
- Works without status file tracking
- Perfect for rapid prototyping
---
## FAQ
### Q: Can I use Quick Spec Flow on an existing project?
**A:** Yes! It's perfect for brownfield projects. It will analyze your existing code, detect patterns, and ask if you want to follow them.
### Q: What if I don't have a package.json or requirements.txt?
**A:** Quick Spec Flow will work in greenfield mode, recommend starter templates, and use WebSearch for modern best practices.
### Q: Do I need to run workflow-init first?
**A:** No! Quick Spec Flow is standalone. But if you want guidance on which flow to use, workflow-init can help.
### Q: Can I use this for frontend changes?
**A:** Absolutely! Quick Spec Flow captures UX/UI considerations, component changes, and accessibility requirements.
### Q: What if my Level 0 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.
### 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.
### Q: Can I skip validation?
**A:** No, validation always runs automatically. But it's fast and catches issues early!
### Q: Will it work with my team's code style?
**A:** Yes! It detects your conventions and asks for confirmation. You control whether to follow existing patterns or establish new ones.
---
## Tips & Best Practices
### 1. **Be Specific in Discovery**
When describing your change, provide specifics:
- ✅ "Fix email validation in UserService to allow plus-addressing"
- ❌ "Fix validation bug"
### 2. **Trust the Convention Detection**
If it detects your patterns correctly, say yes! It's faster than establishing new conventions.
### 3. **Use WebSearch Recommendations for Greenfield**
Starter templates save hours of setup time. Let Quick Spec Flow find the best ones.
### 4. **Review the Auto-Validation**
When validation runs, read the scores. They tell you if your spec is production-ready.
### 5. **Story Context is Optional**
For Level 0, try going directly to dev-story first. Only add story-context if you hit complexity.
### 6. **Keep Level 0 Truly Atomic**
If your "single change" needs 3+ files, it might be Level 1. Let the workflow guide you.
### 7. **Validate Story Sequence for Level 1**
When you get multiple stories, check the dependency validation output. Proper sequence matters!
---
## Real-World Examples
### Example 1: Adding Logging (Level 0)
**Input:** "Add structured logging to payment processing"
**Tech-Spec Output:**
- Detected: winston 3.8.2 already in package.json
- Analyzed: Existing services use winston with JSON format
- Confirmed: Follow existing logging patterns
- Generated: Specific file paths, log levels, format example
- Story: Ready to implement in 1-2 hours
**Result:** Consistent logging added, following team patterns, no research needed.
---
### Example 2: Search Feature (Level 1)
**Input:** "Add search to product catalog with filters"
**Tech-Spec Output:**
- Detected: React 18.2.0, MUI component library, Express backend
- Analyzed: Existing ProductList component patterns
- Confirmed: Follow existing API and component structure
- Generated:
- Epic: Product Search Functionality
- Story 1: Backend search API with filters
- Story 2: Frontend search UI component
- Auto-validated: Story 1 → Story 2 sequence correct
**Result:** Search feature implemented in 4-6 hours with proper architecture.
---
## Summary
Quick Spec Flow is your **fast path from idea to implementation** for:
- 🐛 Bug fixes
- ✨ Small features
- 🚀 Rapid prototyping
- 🔧 Quick enhancements
**Key Features:**
- Auto-detects your stack
- Auto-analyzes brownfield code
- Auto-validates quality
- Respects existing conventions
- Uses WebSearch for modern practices
- Generates comprehensive tech-specs
- Creates implementation-ready stories
**Time to code:** Minutes, not hours.
**Ready to try it?** Load the PM agent and say what you want to build! 🚀
---
## Next Steps
- **Try it now:** Load PM agent and describe a small change
- **Learn more:** See `src/modules/bmm/workflows/README.md` for full BMM workflow guide
- **Need help deciding?** Run `workflow-init` to get a recommendation
- **Have questions?** Join us on Discord: https://discord.gg/gk8jAdXWmj
---
_Quick Spec Flow - Because not every change needs a Product Brief._

View File

@@ -0,0 +1,366 @@
# BMad Method V6 Quick Start Guide
Get started with BMad Method v6 for your new greenfield project. This guide walks you through building software from scratch using AI-powered workflows.
## TL;DR - The Quick Path
1. **Install**: `npx bmad-method@alpha install`
2. **Initialize**: Load Analyst agent → Run "workflow-init"
3. **Plan**: Load PM agent → Run "prd" (or "tech-spec" for small projects)
4. **Architect**: Load Architect agent → Run "create-architecture" (10+ stories only)
5. **Build**: Load SM agent → Run workflows for each story → Load DEV agent → Implement
6. **Always use fresh chats** for each workflow to avoid hallucinations
---
## What is BMad Method?
BMad Method (BMM) helps you build software through guided workflows with specialized AI agents. The process follows four phases:
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)
4. **Phase 4: Implementation** (Required) - Build your software Epic by Epic, Story by Story
## Installation
```bash
# Install v6 Alpha to your project
npx bmad-method@alpha install
```
The interactive installer will guide you through setup and create a `bmad/` folder with all agents and workflows.
---
## Getting Started
### Step 1: Initialize Your Workflow
1. **Load the Analyst agent** in your IDE - See your IDE-specific instructions in [docs/ide-info](../docs/ide-info/) for how to activate agents:
- [Claude Code](../docs/ide-info/claude-code.md)
- [VS Code/Cursor/Windsurf](../docs/ide-info/) - Check your IDE folder
- Other IDEs also supported
2. **Wait for the agent's menu** to appear
3. **Tell the agent**: "Run workflow-init" or type "\*workflow-init" or select the menu item number
#### What happens during workflow-init?
Workflows are interactive processes in V6 that replaced tasks and templates from prior versions. There are many types of workflows, and you can even create your own with the BMad Builder module. For the BMad Method, you'll be interacting with expert-designed workflows crafted to work with you to get the best out of both you and the LLM.
During workflow-init, you'll describe:
- Your project and its goals
- 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
Based on your description, the workflow will suggest a level and let you choose from:
**Greenfield 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
#### 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.
**Important notes:**
- Every level 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)
### Step 2: Work Through Phases 1-3
After workflow-init completes, you'll work through the planning phases. **Important: Use fresh chats for each workflow to avoid context limitations.**
#### Checking Your Status
If you're unsure what to do next:
1. Load any agent in a new chat
2. Ask for "workflow-status"
3. The agent will tell you the next recommended or required workflow
**Example response:**
```
Phase 1 (Analysis) is entirely optional. All workflows are optional or recommended:
- brainstorm-project - optional
- research - optional
- product-brief - RECOMMENDED (but not required)
The next TRULY REQUIRED step is:
- PRD (Product Requirements Document) in Phase 2 - Planning
- Agent: pm
- Command: /bmad:bmm:workflows:prd
```
#### How to Run Workflows in Phases 1-3
When an agent tells you to run a workflow (like `/bmad:bmm:workflows: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
3. **Tell the agent** to run it using any of these formats:
- Type the shorthand: `*prd`
- Say it naturally: "Let's create a new PRD"
- Select the menu number for "create-prd"
The agents in V6 are very good with fuzzy menu matching!
#### Quick Reference: Agent → Document Mapping
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)
- **UX-Designer** → UX Design Document (if UI-heavy)
- **Architect** → Architecture (10+ stories)
#### Phase 2: Planning - Creating the PRD
**For Level 2+ projects (10+ stories):**
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:
- **PRD.md** - Your Product Requirements Document
- **Epics.md** - High-level epics with stories
**For smaller projects (Levels 0-1):**
- Use **tech-spec** instead of PRD (no architecture needed)
#### Phase 2 (Optional): UX Design
If your project has a user interface:
1. Load the **UX-Designer agent** in a new chat
2. Tell it to run the UX design workflow
3. After completion, run validations to ensure the Epics file stays updated
#### Phase 3: Architecture
**For Level 2+ projects only:**
1. Load the **Architect agent** in a new chat
2. Tell it to run the create-architecture workflow
3. After completion, run validations to ensure the Epics file stays updated
#### Phase 3: Solutioning Gate Check (Highly Recommended)
Once architecture is complete:
1. Load the **Architect agent** in a new chat
2. Tell it to run "solutioning-gate-check"
3. This validates cohesion across all your planning documents (PRD, UX, Architecture, Epics)
4. This was called the "PO Master Checklist" in v4
**Why run this?** It ensures all your planning assets align properly before you start building.
#### Context Management Tips
- **Use 200k+ context models** for best results (Claude Sonnet 4.5, GPT-4, etc.)
- **Fresh chat for each workflow** - Brainstorming, Briefs, Research, and PRD generation are all context-intensive
- **No document sharding needed** - Unlike v4, you don't need to split documents
- **Web Bundles coming soon** - Will help save LLM tokens for users with limited plans
### Step 3: Start Building (Phase 4 - Implementation)
Once planning and architecture are complete, you'll move to Phase 4. **Important: Each workflow below should be run in a fresh chat to avoid context limitations and hallucinations.**
#### 3.1 Initialize Sprint Planning
1. **Start a new chat** with the **SM (Scrum Master) agent**
2. Wait for the menu to appear
3. Tell the agent: "Run sprint-planning"
4. This creates your `sprint-status.yaml` file that tracks all epics and stories
#### 3.2 Create Epic Context (Optional but Recommended)
1. **Start a new chat** with the **SM agent**
2. Wait for the menu
3. Tell the agent: "Run epic-tech-context"
4. This creates technical context for the current epic before drafting stories
#### 3.3 Draft Your First Story
1. **Start a new chat** with the **SM agent**
2. Wait for the menu
3. Tell the agent: "Run create-story"
4. This drafts the story file from the epic
#### 3.4 Add Story Context (Optional but Recommended)
1. **Start a new chat** with the **SM agent**
2. Wait for the menu
3. Tell the agent: "Run story-context"
4. This creates implementation-specific technical context for the story
#### 3.5 Implement the Story
1. **Start a new chat** with the **DEV agent**
2. Wait for the menu
3. Tell the agent: "Run dev-story"
4. The DEV agent will implement the story and update the sprint status
#### 3.6 Review the Code (Optional but Recommended)
1. **Start a new chat** with the **DEV agent**
2. Wait for the menu
3. Tell the agent: "Run code-review"
4. The DEV agent performs quality validation (this was called QA in v4)
### Step 4: Keep Going
For each subsequent story, repeat the cycle using **fresh chats** for each workflow:
1. **New chat** → SM agent → "Run create-story"
2. **New chat** → SM agent → "Run story-context"
3. **New chat** → DEV agent → "Run dev-story"
4. **New chat** → DEV agent → "Run code-review" (optional but recommended)
After completing all stories in an epic:
1. **Start a new chat** with the **SM agent**
2. Tell the agent: "Run retrospective"
**Why fresh chats?** Context-intensive workflows can cause hallucinations if you keep issuing commands in the same chat. Starting fresh ensures the agent has maximum context capacity for each workflow.
---
## Understanding the Agents
Each agent is a specialized AI persona:
- **Analyst** - Initializes workflows and tracks progress
- **PM** - Creates requirements and specifications
- **UX-Designer** - If your project has a front end - this designer will help produce artifacts, come up with mock updates, and design a great look and feel with you giving it guidance.
- **Architect** - Designs system architecture
- **SM (Scrum Master)** - Manages sprints and creates stories
- **DEV** - Implements code and reviews work
## How Workflows Work
1. **Load an agent** - Open the agent file in your IDE to activate it
2. **Wait for the menu** - The agent will present its available workflows
3. **Tell the agent what to run** - Say "Run [workflow-name]"
4. **Follow the prompts** - The agent guides you through each step
The agent creates documents, asks questions, and helps you make decisions throughout the process.
## Project Tracking Files
BMad creates two files to track your progress:
**1. bmm-workflow-status.md**
- Shows which phase you're in and what's next
- Created by workflow-init
- Updated automatically as you progress through phases
**2. sprint-status.yaml** (Phase 4 only)
- Tracks all your epics and stories during implementation
- Critical for SM and DEV agents to know what to work on next
- Created by sprint-planning workflow
- Updated automatically as stories progress
**You don't need to edit these manually** - agents update them as you work.
---
## The Complete Flow Visualized
```mermaid
flowchart LR
subgraph P1["Phase 1 (Optional)<br/>Analysis"]
direction TB
A1[Brainstorm]
A2[Research]
A3[Brief]
A4[Analyst]
A1 ~~~ A2 ~~~ A3 ~~~ A4
end
subgraph P2["Phase 2 (Required)<br/>Planning"]
direction TB
B1[Level 0-1:<br/>tech-spec]
B2[Level 2+:<br/>PRD]
B3[UX opt]
B4[PM, UX]
B1 ~~~ B2 ~~~ B3 ~~~ B4
end
subgraph P3["Phase 3 (Conditional)<br/>Architecture"]
direction TB
C1[Level 2+:<br/>architecture]
C2[gate-check]
C3[Architect]
C1 ~~~ C2 ~~~ C3
end
subgraph P4["Phase 4 (Required)<br/>Implementation"]
direction TB
D1[Per Epic:<br/>epic context]
D2[Per Story:<br/>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.
**Q: Can I change my plan later?**
A: Yes! The SM agent has a "correct-course" workflow for handling scope changes.
**Q: What if I want to brainstorm first?**
A: Load the Analyst agent and tell it to "Run brainstorm-project" before running workflow-init.
**Q: Why do I need fresh chats for each workflow?**
A: Context-intensive workflows can cause hallucinations if run in sequence. Fresh chats ensure maximum context capacity.
**Q: Can I skip workflow-init and workflow-status?**
A: Yes, once you learn the flow. Use the Quick Reference in Step 2 to go directly to the workflows you need.
## Getting Help
- **During workflows**: Agents guide you with questions and explanations
- **Community**: [Discord](https://discord.gg/gk8jAdXWmj) - #general-dev, #bugs-issues
- **Complete guide**: [BMM Workflows README](../src/modules/bmm/workflows/README.md)
- **YouTube tutorials**: [BMad Code Channel](https://www.youtube.com/@BMadCode)
---
## Key Takeaways
**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
**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!

View File

@@ -0,0 +1,749 @@
# BMad Method Scale Adaptive System
**Automatically adapts workflows to project complexity - from bug 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 Problem It Solves
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
### The Solution
BMad Method **adapts workflows to match project scale**:
-**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
**Result:** Right amount of planning for every project - no more, no less.
---
## Quick Reference
### Five Levels at a Glance
| Level | Scope | Stories | Documentation | Timeline |
| ----- | -------------------- | ------- | ------------------- | -------- |
| **0** | Single atomic change | 1 | tech-spec only | Hours |
| **1** | Small feature | 1-10 | tech-spec + epic | Days |
| **2** | Medium project | 5-15 | PRD + optional arch | Weeks |
| **3** | Complex integration | 12-40 | PRD + architecture | Months |
| **4** | Enterprise scale | 40+ | Full methodology | Quarters |
### Level Selection Decision Tree
```mermaid
flowchart TD
START{Describe your project}
START -->|Bug fix, typo, patch| L0[Level 0<br/>tech-spec only]
START -->|Small feature, 2-3 stories| L1[Level 1<br/>tech-spec + epic]
START -->|Dashboard, multiple features| L2[Level 2<br/>PRD + optional arch]
START -->|Platform, complex integration| L3[Level 3<br/>PRD + architecture]
START -->|Enterprise, multi-tenant| L4[Level 4<br/>Full methodology]
style L0 fill:#bfb,stroke:#333,stroke-width:2px
style L1 fill:#bbf,stroke:#333,stroke-width:2px
style L2 fill:#ffb,stroke:#333,stroke-width:2px
style L3 fill:#fbf,stroke:#333,stroke-width:2px
style L4 fill:#f9f,stroke:#333,stroke-width:2px
```
### Quick Keywords
- **Level 0:** fix, bug, typo, small change, patch
- **Level 1:** simple, basic, small feature, add, minor
- **Level 2:** dashboard, several features, admin panel, medium
- **Level 3:** platform, integration, complex, system, architecture
- **Level 4:** enterprise, multi-tenant, multiple products, ecosystem, scale
---
## How Level Detection Works
When you run `workflow-init`, it analyzes your project using three methods:
### 1. Keyword Analysis
Scans your description for level-specific keywords (see Quick Keywords above).
### 2. Story Count Estimation
Asks about expected scope and matches to ranges:
| Stories | Suggested Level |
| ------- | --------------- |
| 1 | Level 0 |
| 2-10 | Level 1 |
| 5-15 | Level 2 |
| 12-40 | Level 3 |
| 40+ | Level 4 |
**Note:** Overlap zones (5-10, 12-15) are intentional - choose based on need for product-level planning.
### 3. Complexity Indicators
Additional factors:
- Multiple teams involved? → Higher level
- External integrations? → Higher level
- Compliance requirements? → Higher level
- Multi-tenant needs? → Level 4
- Existing system modifications? → Consider brownfield path
### Manual Override
**You can always override the suggested level.** workflow-init asks for confirmation - if you disagree, just say so and choose the appropriate level. Trust your judgment.
**Example:**
```
workflow-init: "Based on your description: Level 3 project. Is that correct?"
You: "No, this is simpler - Level 2"
workflow-init: "Got it, creating Level 2 workflow"
```
---
## The Five Levels
### Level 0: Single Atomic Change
**Definition:** Single-story projects like bug fixes, typos, or small patches.
**Story Count:** 1 story
**Timeline:** Hours to 1 day
**Documentation Requirements:**
- **tech-spec.md** - Technical specification with implementation details
- Single story file
**Workflow Path:**
```
(Brownfield: document-project first if needed)
Tech-Spec → Implement
```
**No Architecture:** Skip entirely
**No PRD:** Tech-spec serves as complete planning doc
**Use For:**
- Bug fixes
- Single file changes
- Minor configuration updates
- Small refactors
- Typo corrections
**Example:** "Fix authentication token expiration bug in auth middleware"
**Keywords:** fix, bug, typo, small change, quick update, patch
---
### Level 1: Small Feature
**Definition:** Small coherent features with 2-10 related stories.
**Story Count:** 1-10 stories (typically 2-5)
**Timeline:** 1-3 days
**Documentation Requirements:**
- **tech-spec.md** - Technical specification with epic breakdown
- **Epic organization** - Stories grouped by epic
- 2-10 story files
**Workflow Path:**
```
(Brownfield: document-project first if needed)
Tech-Spec + Epic → (Optional) UX Design → Implement
```
**No Architecture:** Skip entirely
**No PRD:** Tech-spec with epic is sufficient
**Use For:**
- Single module additions
- Small UI enhancements
- Isolated feature additions
- API endpoint additions (OAuth, forgot password, search)
**Example:** "Add OAuth social login (Google, GitHub, Facebook)"
**UX Note:** Tech-spec can include UX considerations inline, or run separate UX Design workflow if UI is complex.
**Keywords:** simple, basic, small feature, add, minor
---
### Level 2: Medium Project
**Definition:** Multiple related features across 1-3 epics.
**Story Count:** 5-15 stories
**Timeline:** 1-2 weeks
**Documentation Requirements:**
- **PRD.md** - Product requirements document
- **epics.md** - Epic breakdown with stories
- **tech-spec.md** (optional) - Or use epic-tech-specs during implementation
- **architecture.md** (optional) - Only if system design needed
**Workflow Path:**
```
(Brownfield: document-project first if needed)
Analysis (recommended) → PRD + Epics → (Optional) UX Design → (Optional) Architecture → Implement
Epic-tech-spec per epic (recommended)
Retrospective after each epic (if >1 epic)
```
**Architecture:** Optional - only if system design needed
**Epic-Tech-Specs:** Recommended during implementation
**Use For:**
- Multiple related features
- Cross-module enhancements
- Admin dashboards
- Customer portals
- Reporting systems
**Example:** "Add user dashboard with analytics, preferences, and activity history"
**Level 2 Decision:** Choose Level 2 over Level 1 when you need product-level planning, have multiple epics, or require stakeholder alignment.
**Keywords:** dashboard, several features, admin panel, medium
---
### Level 3: Complex Integration
**Definition:** Complex systems with multiple subsystems and integrations.
**Story Count:** 12-40 stories
**Timeline:** 3-6 weeks
**Documentation Requirements:**
- **PRD.md** - Comprehensive product requirements
- **epics.md** - Detailed epic breakdown
- **architecture.md** - Required comprehensive system architecture
- **UX design** (recommended for user-facing systems)
**Workflow Path:**
```
(Brownfield: document-project first if needed)
Analysis + Research → PRD + Epics → (Recommended) UX Design → Architecture (required) → Gate Check → Implement
Epic-tech-spec per epic (recommended)
Retrospective after each epic
```
**Architecture:** Required - comprehensive system design
**Gate Check:** Required - validate cohesion before implementation
**Epic-Tech-Specs:** Highly recommended
**Use For:**
- Major feature additions
- Architectural integrations
- Multi-system changes
- E-commerce platforms
- SaaS products
- Multi-module systems
**Example:** "Adding real-time collaboration features to existing document editor"
**Critical for Level 3:**
- Architecture review before planning
- Integration strategy document
- Backward compatibility planning
- Phased rollout consideration
**Keywords:** platform, integration, complex, system, architecture
---
### Level 4: Enterprise Scale
**Definition:** Enterprise-scale projects across multiple products or major platform expansions.
**Story Count:** 40+ stories
**Timeline:** 3-6 months
**Documentation Requirements:**
- **Product brief** - Strategic planning document
- **PRD.md** - Comprehensive product requirements
- **epics.md** - Detailed epic breakdown
- **architecture.md** - Required enterprise-grade architecture
- **UX design** (recommended) - Design system and patterns
**Workflow Path:**
```
(Brownfield: document-project first - nearly mandatory)
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
```
**Architecture:** Required - enterprise-grade system design including:
- Multi-tenancy design
- Security architecture
- Scalability planning
- Integration architecture
- Data architecture
- Deployment architecture
**Gate Checks:** Required - multiple validation gates
**Additional Design Documents:** Created during implementation as needed
**Use For:**
- Platform expansions
- Multi-team initiatives
- System-wide modernization
- Multi-tenant systems
- Product ecosystems
- Enterprise platforms
**Example:** "Adding multi-tenancy to existing single-tenant SaaS platform"
**Critical for Enterprise:**
- Documentation phase nearly mandatory
- Analysis phase (research, product brief) required
- Full architecture review before planning
- Extensive integration testing strategy
- Risk assessment and mitigation planning
- Cross-team coordination
- Feature flag implementation
- Migration strategy for existing data/users
**Keywords:** enterprise, multi-tenant, multiple products, ecosystem, scale
---
## Planning Documents by Level
### Understanding Document Types
```mermaid
flowchart TD
LEVEL{What Level?}
LEVEL -->|0-1| TS[tech-spec<br/>Created upfront<br/>Only planning doc]
LEVEL -->|2-4| PRD[PRD<br/>Created upfront<br/>Product planning]
PRD --> ARCH{Architecture<br/>needed?}
ARCH -->|Yes<br/>Level 3-4| ARCHD[architecture.md<br/>Created upfront<br/>System design]
ARCH -->|Optional<br/>Level 2| MAYBE[Maybe architecture<br/>if system design needed]
TS --> IMPL1[Implementation]
ARCHD --> IMPL2[Implementation]
MAYBE --> IMPL2
IMPL2 --> ETS[epic-tech-spec<br/>Created just-in-time<br/>Per epic during Phase 4]
style TS fill:#bfb,stroke:#333,stroke-width:2px
style PRD fill:#bbf,stroke:#333,stroke-width:2px
style ARCHD fill:#ffb,stroke:#333,stroke-width:2px
style ETS fill:#fbf,stroke:#333,stroke-width:2px
```
### Tech-Spec (Level 0-1)
**Created:** Upfront in Planning Phase (Phase 2)
**Serves as:** Primary and only planning document
**Contains:**
- Problem statement and solution
- Source tree changes (specific files)
- Technical implementation details
- Detected stack and conventions (brownfield)
- UX/UI considerations (if user-facing)
- Testing strategy
- Developer resources
**When Used:** Replaces PRD + Architecture for small projects
### PRD (Level 2-4)
**Created:** Upfront in Planning Phase (Phase 2)
**Serves as:** Product-level planning document
**Contains:**
- Product vision and goals
- Feature requirements
- Epic breakdown with stories
- Success criteria
- User experience considerations
- Business context
**Complements:** Architecture document (system design)
### Architecture Document (Level 2-4)
**Created:** Upfront in Solutioning Phase (Phase 3)
**Serves as:** System-level design document
**Scale-Adaptive Complexity:**
- **Level 2:** Optional, lightweight if needed
- **Level 3:** Required, comprehensive
- **Level 4:** Required, enterprise-grade
**Contains:**
- System components and responsibilities
- Data models and schemas
- Integration patterns
- Security architecture
- Performance considerations
- Deployment architecture
**Note:** Takes the place of tech-spec for system-level planning in Level 2-4 projects.
### Epic-Tech-Spec (Level 2-4)
**Created:** Just-in-time during Implementation Phase (Phase 4)
**Serves as:** Epic-specific implementation guide
**Contains:**
- Epic-specific technical details
- Detailed implementation approach for this epic
- Code-level design decisions
- Epic-scoped testing strategy
- Integration points with other epics
**Key Difference from Tech-Spec:**
- **Tech-spec (0-1):** Created upfront, primary planning doc
- **Epic-tech-spec (2-4):** Created during implementation, supplements PRD + Architecture
**Why Just-In-Time?**
- 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
---
## Workflow Comparison
| Level | Analysis | Planning | Architecture | Epic-Tech-Specs | Stories | Retrospectives |
| ----- | ----------- | ---------------- | ------------ | --------------- | ------- | ----------------------- |
| **0** | Optional | Tech-spec | None | N/A | 1 | N/A |
| **1** | Optional | Tech-spec + Epic | None | N/A | 2-10 | 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 |
---
## Brownfield Projects
### Critical First Step
🚨 **For ALL brownfield projects (Level 0-4): Run document-project BEFORE planning workflows**
### Why document-project is 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
### Brownfield Workflow Pattern
```mermaid
flowchart TD
START([Brownfield Project])
CHECK{Has docs/<br/>index.md?}
START --> CHECK
CHECK -->|No| DOC[document-project workflow<br/>Creates comprehensive docs]
CHECK -->|Yes| PLAN[Continue to Planning]
DOC --> PLAN
PLAN --> IMPL[Implementation]
style START fill:#f9f,stroke:#333,stroke-width:2px
style DOC fill:#ffb,stroke:#333,stroke-width:2px
style PLAN fill:#bfb,stroke:#333,stroke-width:2px
```
**Three Options:**
1. **No documentation:** Run document-project workflow (10-30 min)
2. **Has docs, no index.md:** Run index-docs task (2-5 min)
3. **Complete documentation:** Skip to planning
**For complete brownfield guidance:** See [Brownfield Development Guide](./brownfield-guide.md)
---
## Common Scenarios
### Scenario 1: Bug Fix (Level 0)
**Input:** "Fix email validation bug in login form"
**Detection:**
- Keywords: "fix", "bug"
- Estimated stories: 1
**Result:** Level 0 → Tech-spec only
**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)
**Input:** "Add OAuth social login (Google, GitHub, Facebook)"
**Detection:**
- Keywords: "add", "feature"
- Estimated stories: 2-3
**Result:** Level 1 → Tech-spec with epic
**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
**Time:** 1-3 days
---
### Scenario 3: Customer Portal (Level 2)
**Input:** "Build customer portal with dashboard, tickets, billing"
**Detection:**
- Keywords: "portal", "dashboard"
- Estimated stories: 10-12
**Result:** Level 2 → PRD + optional architecture
**Workflow:**
1. Product Brief (recommended)
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
**Time:** 1-2 weeks
---
### Scenario 4: E-commerce Platform (Level 3)
**Input:** "Build full e-commerce platform with products, cart, checkout, admin, analytics"
**Detection:**
- Keywords: "platform", "full"
- Estimated stories: 30-35
**Result:** Level 3 → PRD + Architecture required
**Workflow:**
1. Research + Product Brief
2. Comprehensive PRD
3. UX Design (recommended)
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 Level 1)
**Input:** "Add search functionality to existing product catalog"
**Detection:**
- Keywords: "add", "existing"
- Estimated stories: 3-4
- Field type: Brownfield
**Result:** Level 1 Brownfield
**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
**Time:** 1-3 days (including documentation)
---
## Best Practices
### 1. Document-Project First for Brownfield
Always run document-project before starting any brownfield workflow. Even if you know the code, AI agents need it.
### 2. Trust the Detection
If workflow-init suggests Level 2, there's probably complexity you haven't considered. Review before overriding.
### 3. Start Small, Upgrade Later
Uncertain between Level 1 and 2? Start with Level 1. You can always run PRD creation later if needed.
### 4. Don't Skip Gate Checks
For Level 3-4, gate checks prevent costly mistakes. Invest the time upfront.
### 5. Create Epic-Tech-Specs Just-Before-Implementation
For Level 2-4, create epic-tech-spec right before implementing each epic. Don't create all upfront.
### 6. Run Retrospectives Between Epics
Capture learnings after each epic. Feed insights into next epic-tech-spec.
### 7. Optional UX for Level 1
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.
---
## Appendix
### A. Terminology Quick Reference
For complete definitions, see [Glossary](./glossary.md).
**Key Terms:**
- **Scale-Adaptive:** System that adjusts workflow based on project complexity
- **Tech-Spec:** Technical specification document (Level 0-1, created upfront)
- **Epic-Tech-Spec:** Epic technical specification (Level 2-4, created just-in-time)
- **PRD:** Product Requirements Document
- **Just-In-Time Design:** Creating epic-tech-specs during implementation, not upfront
- **Context Injection:** Dynamic guidance via epic-tech-context and story-context workflows
- **Greenfield:** New project from scratch
- **Brownfield:** Existing codebase
### B. Workflow Path Configuration
The v6 system uses modular path definitions stored in YAML configuration files.
**Location:** `src/modules/bmm/workflows/workflow-status/paths/`
**Files:**
- `greenfield-level-0.yaml` through `greenfield-level-4.yaml`
- `brownfield-level-0.yaml` through `brownfield-level-4.yaml`
- `game-design.yaml`
- `project-levels.yaml` (source of truth)
Each path file defines:
- Required vs optional workflows for each phase
- Agent assignments
- Expected outputs
- Phase progression rules
### C. FAQ
**Q: What's the difference between tech-spec and epic-tech-spec?**
A: Tech-spec (Level 0-1) is created upfront and serves as the primary planning doc. Epic-tech-spec (Level 2-4) is created during implementation per epic and supplements PRD + Architecture.
**Q: Why no tech-spec at Level 2+?**
A: Level 2+ needs product-level planning (PRD) and system-level design (Architecture), which tech-spec doesn't provide. 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 work with just PRD + epic-tech-specs.
**Q: Can I change levels mid-project?**
A: Yes! If you started at Level 1 but realize it's Level 2, run create-prd to add proper planning docs. The system is flexible.
For more questions, see [FAQ](./faq.md).
---
## Related Documentation
- **[Quick Start Guide](./quick-start.md)** - Get started with BMM
- **[Quick Spec Flow](./quick-spec-flow.md)** - Fast-track for Level 0-1
- **[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._

View File

@@ -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!

View File

@@ -0,0 +1,371 @@
# 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
- Discovers relevant starter templates (create-next-app, create-t3-app, etc.)
- Considers UX requirements when selecting templates (animations, accessibility, etc.)
- Searches for current CLI options and defaults
- Documents decisions made BY the starter template
- Makes remaining architectural decisions around the starter foundation
- First implementation story becomes "initialize with starter command"
### 2. Adaptive Facilitation
- Adjusts conversation style based on user skill level (beginner/intermediate/expert)
- Experts get rapid, technical discussions
- Beginners receive education and protection from complexity
- Everyone produces the same high-quality output
### 3. Dynamic Version Verification
- NEVER trusts hardcoded version numbers
- Uses WebSearch to find current stable versions
- Verifies versions during the conversation
- Documents only verified, current versions
### 4. Intelligent Discovery
- No rigid project type templates
- Analyzes PRD to identify which decisions matter for THIS project
- Uses knowledge base of decisions and patterns
- Scales to infinite project types
### 5. Collaborative Decision Making
- Facilitates discussion for each critical decision
- Presents options with trade-offs
- Integrates advanced elicitation for innovative approaches
- Ensures decisions are coherent and compatible
### 6. Consistent Output
- Structured decision collection during conversation
- Strict document generation from collected decisions
- Validated against hard requirements
- Optimized for AI agent consumption
---
## Workflow Structure
```
Step 0: Validate workflow and extract project configuration
Step 0.5: Validate workflow sequencing
Step 1: Load PRD and understand project context
Step 2: Discover and evaluate starter templates ⭐ NEW
Step 3: Adapt facilitation style and identify remaining decisions
Step 4: Facilitate collaborative decision making (with version verification)
Step 5: Address cross-cutting concerns
Step 6: Define project structure and boundaries
Step 7: Design novel architectural patterns (when needed) ⭐ NEW
Step 8: Define implementation patterns to prevent agent conflicts
Step 9: Validate architectural coherence
Step 10: Generate decision architecture document (with initialization commands)
Step 11: Validate document completeness
Step 12: Final review and update workflow status
```
---
## Files in This Workflow
- **workflow.yaml** - Configuration and metadata
- **instructions.md** - The adaptive facilitation flow
- **decision-catalog.yaml** - Knowledge base of all architectural decisions
- **architecture-patterns.yaml** - Common patterns identified from requirements
- **pattern-categories.csv** - Pattern principles that teach LLM what needs defining
- **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 |
| -------------------- | -------------------------------------------- | ----------------------------------------------- |
| **Approach** | Template-driven | Conversation-driven |
| **Project Types** | 11 rigid types with 22+ files | Infinite flexibility with intelligent discovery |
| **User Interaction** | Output sections with "Continue?" | Collaborative decision facilitation |
| **Skill Adaptation** | One-size-fits-all | Adapts to beginner/intermediate/expert |
| **Decision Making** | Late in process (Step 5) | Upfront and central focus |
| **Output** | Multiple documents including faux tech-specs | Single decision-focused architecture |
| **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:
- Functional Requirements
- Non-Functional Requirements
- Performance and compliance needs
- **Epics** file with:
- User stories
- Acceptance criteria
- Dependencies
- **UX Spec** (Optional but valuable) with:
- Interface designs and interaction patterns
- Accessibility requirements (WCAG levels)
- Animation and transition needs
- Platform-specific UI requirements
- Performance expectations for interactions
---
## Output Document
A single `architecture.md` file containing:
- Executive summary (2-3 sentences)
- Project initialization command (if using starter template)
- Decision summary table with verified versions and epic mapping
- Complete project structure
- 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)
### 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
> "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?"
### 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)
### 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
When the workflow detects a project type that has a starter template:
1. **Discovery**: Searches for relevant starter templates based on PRD
2. **Investigation**: Looks up current CLI options and defaults
3. **Presentation**: Shows user what the starter provides
4. **Integration**: Documents starter decisions as "PROVIDED BY STARTER"
5. **Continuation**: Only asks about decisions NOT made by starter
6. **Documentation**: Includes exact initialization command in architecture
### Example Flow
```
PRD says: "Next.js web application with authentication"
Workflow finds: create-next-app and create-t3-app
User chooses: create-t3-app (includes auth setup)
Starter provides: Next.js, TypeScript, tRPC, Prisma, NextAuth, Tailwind
Workflow only asks about: Database choice, deployment target, additional services
First story becomes: "npx create t3-app@latest my-app --trpc --nextauth --prisma"
```
---
## Usage
```bash
# In your BMAD-enabled project
workflow architecture
```
The AI agent will:
1. Load your PRD and epics
2. Identify critical decisions needed
3. Facilitate discussion on each decision
4. Generate a comprehensive architecture document
5. Validate completeness
---
## Design Principles
1. **Facilitation over Prescription** - Guide users to good decisions rather than imposing templates
2. **Intelligence over Templates** - Use AI understanding rather than rigid structures
3. **Decisions over Details** - Focus on what prevents agent conflicts, not implementation minutiae
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:
- Single developer + AI agents (not teams)
- Speed matters (decisions in minutes, not days)
- 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:
1. Complete any in-progress architecture work
2. Use `architecture` for new projects
3. The old workflow remains available but is deprecated
---
## 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
- Starter template selection now considers UX requirements
- Added UX alignment validation to checklist
- Instructions use variable references for flexible file names
**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)
- Reorganized step numbering for clarity (removed fractional steps)
- Enhanced with intent-based approach throughout
- Improved cohesiveness across all workflow components
**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
- Facilitates design collaboration with sequence diagrams
- Uses elicitation for innovative approaches
- Documents custom patterns for multi-epic 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)
- Core principle: "What could agents decide differently?"
- 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
- 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
---
**Related Documentation:**
- [Solutioning Workflows](./workflows-solutioning.md)
- [Planning Workflows](./workflows-planning.md)
- [Scale Adaptive System](./scale-adaptive-system.md)

View File

@@ -0,0 +1,487 @@
# Document Project Workflow - Technical Reference
**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
- **Multi-Part Detection**: Automatically detects and documents projects with separate client/server or multiple services
- **Three Scan Levels** (NEW v1.2.0): Quick (2-5 min), Deep (10-30 min), Exhaustive (30-120 min)
- **Resumability** (NEW v1.2.0): Interrupt and resume workflows without losing progress
- **Write-as-you-go** (NEW v1.2.0): Documents written immediately to prevent context exhaustion
- **Intelligent Batching** (NEW v1.2.0): Subfolder-based processing for deep/exhaustive scans
- **Data-Driven Analysis**: Uses CSV-based project type detection and documentation requirements
- **Comprehensive Scanning**: Analyzes APIs, data models, UI components, configuration, security patterns, and more
- **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
workflow document-project
```
Or from BMAD CLI:
```bash
/bmad:bmm:workflows:document-project
```
---
## Scan Levels (NEW in v1.2.0)
Choose the right scan depth for your needs:
### 1. Quick Scan (Default)
**Duration:** 2-5 minutes
**What it does:** Pattern-based analysis without reading source files
**Reads:** Config files, package manifests, directory structure, README
**Use when:**
- You need a fast project overview
- Initial understanding of project structure
- Planning next steps before deeper analysis
**Does NOT read:** Source code files (_.js, _.ts, _.py, _.go, etc.)
### 2. Deep Scan
**Duration:** 10-30 minutes
**What it does:** Reads files in critical directories based on project type
**Reads:** Files in critical paths defined by documentation requirements
**Use when:**
- Creating comprehensive documentation for brownfield PRD
- Need detailed analysis of key areas
- Want balance between depth and speed
**Example:** For a web app, reads controllers/, models/, components/, but not every utility file
### 3. Exhaustive Scan
**Duration:** 30-120 minutes
**What it does:** Reads ALL source files in project
**Reads:** Every source file (excludes node_modules, dist, build, .git)
**Use when:**
- Complete project analysis needed
- Migration planning requires full understanding
- Detailed audit of entire codebase
- Deep technical debt assessment
**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:
- **State Tracking:** Progress saved in `project-scan-report.json`
- **Auto-Detection:** Workflow detects incomplete runs (<24 hours old)
- **Resume Prompt:** Choose to resume or start fresh
- **Step-by-Step:** Resume from exact step where interrupted
- **Archiving:** Old state files automatically archived
**Example Resume Flow:**
```
> workflow document-project
I found an in-progress workflow state from 2025-10-11 14:32:15.
Current Progress:
- Mode: initial_scan
- Scan Level: deep
- Completed Steps: 5/12
- Last Step: step_5
Would you like to:
1. Resume from where we left off - Continue from step 6
2. Start fresh - Archive old state and begin new scan
3. Cancel - Exit without changes
Your choice [1/2/3]:
```
---
## What It Does
### Step-by-Step Process
1. **Detects Project Structure** - Identifies if project is single-part or multi-part (client/server/etc.)
2. **Classifies Project Type** - Matches against 12 project types (web, backend, mobile, etc.)
3. **Discovers Documentation** - Finds existing README, CONTRIBUTING, ARCHITECTURE files
4. **Analyzes Tech Stack** - Parses package files, identifies frameworks, versions, dependencies
5. **Conditional Scanning** - Performs targeted analysis based on project type requirements:
- API routes and endpoints
- Database models and schemas
- State management patterns
- UI component libraries
- Configuration and security
- CI/CD and deployment configs
6. **Generates Source Tree** - Creates annotated directory structure with critical paths
7. **Extracts Dev Instructions** - Documents setup, build, run, and test commands
8. **Creates Architecture Docs** - Generates detailed architecture using matched templates
9. **Builds Master Index** - Creates comprehensive index.md as primary AI retrieval source
10. **Validates Output** - Runs 140+ point checklist to ensure completeness
### Output Files
**Single-Part Projects:**
- `index.md` - Master index
- `project-overview.md` - Executive summary
- `architecture.md` - Detailed architecture
- `source-tree-analysis.md` - Annotated directory tree
- `component-inventory.md` - Component catalog (if applicable)
- `development-guide.md` - Local dev instructions
- `api-contracts.md` - API documentation (if applicable)
- `data-models.md` - Database schema (if applicable)
- `deployment-guide.md` - Deployment process (optional)
- `contribution-guide.md` - Contributing guidelines (optional)
- `project-scan-report.json` - State file for resumability (NEW v1.2.0)
**Multi-Part Projects (e.g., client + server):**
- `index.md` - Master index with part navigation
- `project-overview.md` - Multi-part summary
- `architecture-{part_id}.md` - Per-part architecture docs
- `source-tree-analysis.md` - Full tree with part annotations
- `component-inventory-{part_id}.md` - Per-part components
- `development-guide-{part_id}.md` - Per-part dev guides
- `integration-architecture.md` - How parts communicate
- `project-parts.json` - Machine-readable metadata
- `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:
**documentation-requirements.csv** - Complete project analysis guide
- Location: `/bmad/bmm/workflows/document-project/documentation-requirements.csv`
- 12 project types (web, mobile, backend, cli, library, desktop, game, data, extension, infra, embedded)
- 24 columns combining:
- **Detection columns**: `project_type_id`, `key_file_patterns` (identifies project type from codebase)
- **Requirement columns**: `requires_api_scan`, `requires_data_models`, `requires_ui_components`, etc.
- **Pattern columns**: `critical_directories`, `test_file_patterns`, `config_patterns`, etc.
- 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
After running this workflow, use the generated `index.md` as input to brownfield PRD workflows:
```
User: "I want to add a new dashboard feature"
PRD Workflow: Loads docs/index.md
→ Understands existing architecture
→ Identifies reusable components
→ Plans integration with existing APIs
→ Creates contextual PRD with epics and stories
```
### Other Use Cases
- **Onboarding New Developers** - Comprehensive project documentation
- **Architecture Review** - Structured analysis of existing system
- **Technical Debt Assessment** - Identify patterns and anti-patterns
- **Migration Planning** - Understand current state before refactoring
---
## Requirements
### Recommended Inputs (Optional)
- Project root directory (defaults to current directory)
- README.md or similar docs (auto-discovered if present)
- User guidance on key areas to focus (workflow will ask)
### Tools Used
- File system scanning (Glob, Read, Grep)
- Code analysis
- Git repository analysis (optional)
---
## Configuration
### Default Output Location
Files are saved to: `{output_folder}` (from config.yaml)
Default: `/docs/` folder in project root
### Customization
- Modify `documentation-requirements.csv` to adjust scanning patterns for project types
- Add new project types to `project-types.csv`
- Add new architecture templates to `registry.csv`
---
## Example: Multi-Part Web App
**Input:**
```
my-app/
├── client/ # React frontend
├── server/ # Express backend
└── README.md
```
**Detection Result:**
- Repository Type: Monorepo
- Part 1: client (web/React)
- Part 2: server (backend/Express)
**Output (10+ files):**
```
docs/
├── index.md
├── project-overview.md
├── architecture-client.md
├── architecture-server.md
├── source-tree-analysis.md
├── component-inventory-client.md
├── development-guide-client.md
├── development-guide-server.md
├── api-contracts-server.md
├── data-models-server.md
├── integration-architecture.md
└── project-parts.json
```
---
## Example: Simple CLI Tool
**Input:**
```
hello-cli/
├── main.go
├── go.mod
└── README.md
```
**Detection Result:**
- Repository Type: Monolith
- Part 1: main (cli/Go)
**Output (4 files):**
```
docs/
├── index.md
├── project-overview.md
├── architecture.md
└── source-tree-analysis.md
```
---
## Deep-Dive Mode
### What is Deep-Dive Mode?
When you run the workflow on a project that already has documentation, you'll be offered a choice:
1. **Rescan entire project** - Update all documentation with latest changes
2. **Deep-dive into specific area** - Generate EXHAUSTIVE documentation for a particular feature/module/folder
3. **Cancel** - Keep existing documentation
Deep-dive mode performs **comprehensive, file-by-file analysis** of a specific area, reading EVERY file completely and documenting:
- All exports with complete signatures
- All imports and dependencies
- Dependency graphs and data flow
- Code patterns and implementations
- Testing coverage and strategies
- Integration points
- Reuse opportunities
### When to Use Deep-Dive Mode
- **Before implementing a feature** - Deep-dive the area you'll be modifying
- **During architecture review** - Deep-dive complex modules
- **For code understanding** - Deep-dive unfamiliar parts of codebase
- **When creating PRDs** - Deep-dive areas affected by new features
### Deep-Dive Process
1. Workflow detects existing `index.md`
2. Offers deep-dive option
3. Suggests areas based on project structure:
- API route groups
- Feature modules
- UI component areas
- Services/business logic
4. You select area or specify custom path
5. Workflow reads EVERY file in that area
6. Generates `deep-dive-{area-name}.md` with complete analysis
7. Updates `index.md` with link to deep-dive doc
8. Offers to deep-dive another area or finish
### Deep-Dive Output Example
**docs/deep-dive-dashboard-feature.md:**
- Complete file inventory (47 files analyzed)
- Every export with signatures
- Dependency graph
- Data flow analysis
- Integration points
- Testing coverage
- Related code references
- Implementation guidance
- ~3,000 LOC documented in detail
### Incremental Deep-Diving
You can deep-dive multiple areas over time:
- First run: Scan entire project → generates index.md
- Second run: Deep-dive dashboard feature
- Third run: Deep-dive API layer
- Fourth run: Deep-dive authentication system
All deep-dive docs are linked from the master index.
---
## Validation
The workflow includes a comprehensive 160+ point checklist covering:
- Project detection accuracy
- Technology stack completeness
- Codebase scanning thoroughness
- Architecture documentation quality
- Multi-part handling (if applicable)
- Brownfield PRD readiness
- Deep-dive completeness (if applicable)
---
## Next Steps After Completion
1. **Review** `docs/index.md` - Your master documentation index
2. **Validate** - Check generated docs for accuracy
3. **Use for PRD** - Point brownfield PRD workflow to index.md
4. **Maintain** - Re-run workflow when architecture changes significantly
---
## File Structure
```
document-project/
├── workflow.yaml # Workflow configuration
├── instructions.md # Step-by-step workflow logic
├── checklist.md # Validation criteria
├── documentation-requirements.csv # Project type scanning patterns
├── templates/ # Output templates
│ ├── index-template.md
│ ├── project-overview-template.md
│ └── source-tree-template.md
└── README.md # This file
```
---
## Troubleshooting
**Issue: Project type not detected correctly**
- Solution: Workflow will ask for confirmation; manually select correct type
**Issue: Missing critical information**
- Solution: Provide additional context when prompted; re-run specific analysis steps
**Issue: Multi-part detection missed a part**
- Solution: When asked to confirm parts, specify the missing part and its path
**Issue: Architecture template doesn't match well**
- Solution: Check registry.csv; may need to add new template or adjust matching criteria
---
## Architecture Improvements in v1.2.0
### Context-Safe Design
The workflow now uses a write-as-you-go architecture:
- Documents written immediately to disk (not accumulated in memory)
- Detailed findings purged after writing (only summaries kept)
- State tracking enables resumption from any step
- Batching strategy prevents context exhaustion on large projects
### Batching Strategy
For deep/exhaustive scans:
- Process ONE subfolder at a time
- Read files → Extract info → Write output → Validate → Purge context
- Primary concern is file SIZE (not count)
- Track batches in state file for resumability
### State File Format
Optimized JSON (no pretty-printing):
```json
{
"workflow_version": "1.2.0",
"timestamps": {...},
"mode": "initial_scan",
"scan_level": "deep",
"completed_steps": [...],
"current_step": "step_6",
"findings": {"summary": "only"},
"outputs_generated": [...],
"resume_instructions": "..."
}
```
---
**Related Documentation:**
- [Brownfield Development Guide](./brownfield-guide.md)
- [Implementation Workflows](./workflows-implementation.md)
- [Scale Adaptive System](./scale-adaptive-system.md)

View File

@@ -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.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -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-spec
- 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)

File diff suppressed because it is too large Load Diff