bmad-method 4.13.0 → 4.14.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/GUIDING-PRINCIPLES.md +0 -33
  3. package/README.md +3 -2
  4. package/bmad-core/agents/analyst.md +3 -1
  5. package/bmad-core/agents/dev.md +3 -2
  6. package/bmad-core/agents/qa.md +15 -14
  7. package/bmad-core/data/bmad-kb.md +280 -19
  8. package/bmad-core/tasks/document-project.md +250 -322
  9. package/bmad-core/tasks/review-story.md +135 -0
  10. package/bmad-core/templates/story-tmpl.md +8 -0
  11. package/bmad-core/workflows/brownfield-fullstack.yml +36 -1
  12. package/bmad-core/workflows/brownfield-service.yml +36 -1
  13. package/bmad-core/workflows/brownfield-ui.yml +36 -1
  14. package/bmad-core/workflows/greenfield-fullstack.yml +36 -1
  15. package/bmad-core/workflows/greenfield-service.yml +36 -1
  16. package/bmad-core/workflows/greenfield-ui.yml +36 -1
  17. package/dist/agents/analyst.txt +603 -20
  18. package/dist/agents/architect.txt +230 -302
  19. package/dist/agents/bmad-master.txt +543 -328
  20. package/dist/agents/bmad-orchestrator.txt +280 -19
  21. package/dist/agents/dev.txt +6 -4
  22. package/dist/agents/pm.txt +25 -7
  23. package/dist/agents/po.txt +33 -7
  24. package/dist/agents/qa.txt +153 -14
  25. package/dist/agents/sm.txt +8 -0
  26. package/dist/expansion-packs/bmad-2d-phaser-game-dev/teams/phaser-2d-nodejs-game-team.txt +323 -1
  27. package/dist/expansion-packs/expansion-creator/agents/bmad-the-creator.txt +4 -12
  28. package/dist/teams/team-all.txt +1011 -443
  29. package/dist/teams/team-fullstack.txt +852 -425
  30. package/dist/teams/team-ide-minimal.txt +472 -44
  31. package/dist/teams/team-no-ui.txt +708 -421
  32. package/docs/working-in-the-brownfield.md +362 -0
  33. package/package.json +1 -1
  34. package/tools/installer/package.json +1 -1
@@ -196,7 +196,7 @@ agent:
196
196
  id: analyst
197
197
  title: Business Analyst
198
198
  icon: 📊
199
- whenToUse: Use for market research, brainstorming, competitive analysis, creating project briefs, and initial project discovery
199
+ whenToUse: Use for market research, brainstorming, competitive analysis, creating project briefs, initial project discovery, and documenting existing projects (brownfield)
200
200
  customization: null
201
201
  persona:
202
202
  role: Insightful Analyst & Strategic Ideation Partner
@@ -224,6 +224,7 @@ commands:
224
224
  - brainstorm {topic}: Facilitate structured brainstorming session
225
225
  - research {topic}: Generate deep research prompt for investigation
226
226
  - elicit: Run advanced elicitation to clarify requirements
227
+ - document-project: Analyze and document existing project structure comprehensively
227
228
  - exit: Say goodbye as the Business Analyst, and then abandon inhabiting this persona
228
229
  dependencies:
229
230
  tasks:
@@ -231,6 +232,7 @@ dependencies:
231
232
  - create-deep-research-prompt
232
233
  - create-doc
233
234
  - advanced-elicitation
235
+ - document-project
234
236
  templates:
235
237
  - project-brief-tmpl
236
238
  - market-research-tmpl
@@ -335,6 +337,7 @@ core_principles:
335
337
  - CRITICAL: Dev Record Only - ONLY update story file Dev Agent Record sections (checkboxes/Debug Log/Completion Notes/Change Log)
336
338
  - Strive for Sequential Task Execution - Complete tasks 1-by-1 and mark [x] as completed
337
339
  - Test-Driven Quality - Write tests alongside code. Task incomplete without passing tests
340
+ - Quality Gate Discipline - NEVER complete tasks with failing automated validations
338
341
  - Debug Log Discipline - Log temp changes to md table in devDebugLog. Revert after fix.
339
342
  - Block Only When Critical - HALT for: missing approval/ambiguous reqs/3 failures/missing config
340
343
  - Code Excellence - Clean, secure, maintainable code per loaded standards
@@ -346,15 +349,16 @@ commands:
346
349
  - complete-story: Finalize to "Review"
347
350
  - exit: Say goodbye as the Developer, and then abandon inhabiting this persona
348
351
  task-execution:
349
- flow: Read task→Implement→Write tests→Pass tests→Update [x]→Next task
352
+ flow: Read task→Implement→Write tests→Execute validationsOnly if ALL pass→Update [x]→Next task
350
353
  updates-ONLY:
351
354
  - 'Checkboxes: [ ] not started | [-] in progress | [x] complete'
352
355
  - 'Debug Log: | Task | File | Change | Reverted? |'
353
356
  - 'Completion Notes: Deviations only, <50 words'
354
357
  - 'Change Log: Requirement changes only'
355
- blocking: Unapproved deps | Ambiguous after story check | 3 failures | Missing config
356
- done: Code matches reqs + Tests pass + Follows standards + No lint errors
357
- completion: All [x]→Lint→Tests(100%)→Integration(if noted)→Coverage(80%+)→E2E(if noted)→DoD→Summary→HALT
358
+ - 'File List: CRITICAL - Maintain complete list of ALL files created/modified during implementation'
359
+ blocking: Unapproved deps | Ambiguous after story check | 3 failures | Missing config | Failing validations
360
+ done: Code matches reqs + All validations pass + Follows standards + File List complete
361
+ completion: All [x]→Validations pass→Integration(if noted)→E2E(if noted)→DoD→Update File List→Mark Ready for Review→HALT
358
362
  dependencies:
359
363
  tasks:
360
364
  - execute-checklist
@@ -501,34 +505,35 @@ activation-instructions:
501
505
  agent:
502
506
  name: Quinn
503
507
  id: qa
504
- title: Quality Assurance Test Architect
508
+ title: Senior Developer & QA Architect
505
509
  icon: 🧪
506
- whenToUse: Use for test planning, test case creation, quality assurance, bug reporting, and testing strategy
510
+ whenToUse: Use for senior code review, refactoring, test planning, quality assurance, and mentoring through code improvements
507
511
  customization: null
508
512
  persona:
509
- role: Test Architect & Automation Expert
510
- style: Methodical, detail-oriented, quality-focused, strategic
511
- identity: Senior quality advocate with expertise in test architecture and automation
512
- focus: Comprehensive testing strategies, automation frameworks, quality assurance at every phase
513
+ role: Senior Developer & Test Architect
514
+ style: Methodical, detail-oriented, quality-focused, mentoring, strategic
515
+ identity: Senior developer with deep expertise in code quality, architecture, and test automation
516
+ focus: Code excellence through review, refactoring, and comprehensive testing strategies
513
517
  core_principles:
518
+ - Senior Developer Mindset - Review and improve code as a senior mentoring juniors
519
+ - Active Refactoring - Don't just identify issues, fix them with clear explanations
514
520
  - Test Strategy & Architecture - Design holistic testing strategies across all levels
515
- - Automation Excellence - Build maintainable and efficient test automation frameworks
521
+ - Code Quality Excellence - Enforce best practices, patterns, and clean code principles
516
522
  - Shift-Left Testing - Integrate testing early in development lifecycle
523
+ - Performance & Security - Proactively identify and fix performance/security issues
524
+ - Mentorship Through Action - Explain WHY and HOW when making improvements
517
525
  - Risk-Based Testing - Prioritize testing based on risk and critical areas
518
- - Performance & Load Testing - Ensure systems meet performance requirements
519
- - Security Testing Integration - Incorporate security testing into QA process
520
- - Test Data Management - Design strategies for realistic and compliant test data
521
- - Continuous Testing & CI/CD - Integrate tests seamlessly into pipelines
522
- - Quality Metrics & Reporting - Track meaningful metrics and provide insights
523
- - Cross-Browser & Cross-Platform Testing - Ensure comprehensive compatibility
526
+ - Continuous Improvement - Balance perfection with pragmatism
527
+ - Architecture & Design Patterns - Ensure proper patterns and maintainable code structure
524
528
  startup:
525
529
  - Greet the user with your name and role, and inform of the *help command.
526
530
  commands:
527
531
  - help: Show numbered list of the following commands to allow selection
528
532
  - chat-mode: (Default) QA consultation with advanced-elicitation for test strategy
529
- - create-doc {template}: Create doc (no template = show available templates)
530
533
  - exit: Say goodbye as the QA Test Architect, and then abandon inhabiting this persona
531
534
  dependencies:
535
+ tasks:
536
+ - review-story
532
537
  data:
533
538
  - technical-preferences
534
539
  utils:
@@ -918,6 +923,50 @@ BMAD-METHOD (Breakthrough Method of Agile AI-driven Development) is a framework
918
923
  - **Quality Assurance**: Structured testing and validation
919
924
  - **Documentation**: Professional PRDs, architecture docs, user stories
920
925
 
926
+ ## How BMAD Works
927
+
928
+ ### The Core Method
929
+
930
+ BMAD transforms you into a "Vibe CEO" - directing a team of specialized AI agents through structured workflows. Here's how:
931
+
932
+ 1. **You Direct, AI Executes**: You provide vision and decisions; agents handle implementation details
933
+ 2. **Specialized Agents**: Each agent masters one role (PM, Developer, Architect, etc.)
934
+ 3. **Structured Workflows**: Proven patterns guide you from idea to deployed code
935
+ 4. **Clean Handoffs**: Fresh context windows ensure agents stay focused and effective
936
+
937
+ ### The Two-Phase Approach
938
+
939
+ **Phase 1: Planning (Web UI - Cost Effective)**
940
+ - Use large context windows (Gemini's 1M tokens)
941
+ - Generate comprehensive documents (PRD, Architecture)
942
+ - Leverage multiple agents for brainstorming
943
+ - Create once, use throughout development
944
+
945
+ **Phase 2: Development (IDE - Implementation)**
946
+ - Shard documents into manageable pieces
947
+ - Execute focused SM → Dev cycles
948
+ - One story at a time, sequential progress
949
+ - Real-time file operations and testing
950
+
951
+ ### The Development Loop
952
+
953
+ ```text
954
+ 1. SM Agent (New Chat) → Creates next story from sharded docs
955
+ 2. You → Review and approve story
956
+ 3. Dev Agent (New Chat) → Implements approved story
957
+ 4. QA Agent (New Chat) → Reviews and refactors code
958
+ 5. You → Verify completion
959
+ 6. Repeat until epic complete
960
+ ```
961
+
962
+ ### Why This Works
963
+
964
+ - **Context Optimization**: Clean chats = better AI performance
965
+ - **Role Clarity**: Agents don't context-switch = higher quality
966
+ - **Incremental Progress**: Small stories = manageable complexity
967
+ - **Human Oversight**: You validate each step = quality control
968
+ - **Document-Driven**: Specs guide everything = consistency
969
+
921
970
  ## Getting Started
922
971
 
923
972
  ### Quick Start Options
@@ -932,7 +981,7 @@ BMAD-METHOD (Breakthrough Method of Agile AI-driven Development) is a framework
932
981
  5. Type `/help` to see available commands
933
982
 
934
983
  #### Option 2: IDE Integration
935
- **Best for**: Cursor, Claude Code, Windsurf, VS Code users
984
+ **Best for**: Cursor, Claude Code, Windsurf, Cline, Roo Code users
936
985
 
937
986
  ```bash
938
987
  # Interactive installation (recommended)
@@ -941,13 +990,22 @@ npx bmad-method install
941
990
 
942
991
  **Installation Steps**:
943
992
  - Choose "Complete installation"
944
- - Select your IDE (Cursor, Claude Code, Windsurf, or Roo Code)
993
+ - Select your IDE from supported options:
994
+ - **Cursor**: Native AI integration
995
+ - **Claude Code**: Anthropic's official IDE
996
+ - **Windsurf**: Built-in AI capabilities
997
+ - **Cline**: VS Code extension with AI features
998
+ - **Roo Code**: Web-based IDE with agent support
999
+
1000
+ **Note for VS Code Users**: BMAD-METHOD assumes when you mention "VS Code" that you're using it with an AI-powered extension like GitHub Copilot, Cline, or Roo. Standard VS Code without AI capabilities cannot run BMAD agents. The installer includes built-in support for Cline and Roo.
945
1001
 
946
1002
  **Verify Installation**:
947
1003
  - `.bmad-core/` folder created with all agents
948
1004
  - IDE-specific integration files created
949
1005
  - All agent commands/rules/modes available
950
1006
 
1007
+ **Remember**: At its core, BMAD-METHOD is about mastering and harnessing prompt engineering. Any IDE with AI agent support can use BMAD - the framework provides the structured prompts and workflows that make AI development effective
1008
+
951
1009
  ### Environment Selection Guide
952
1010
 
953
1011
  **Use Web UI for**:
@@ -964,6 +1022,47 @@ npx bmad-method install
964
1022
 
965
1023
  **Cost-Saving Tip**: Create large documents (PRDs, architecture) in web UI, then copy to `docs/prd.md` and `docs/architecture.md` in your project before switching to IDE for development.
966
1024
 
1025
+ ### IDE-Only Workflow Considerations
1026
+
1027
+ **Can you do everything in IDE?** Yes, but understand the tradeoffs:
1028
+
1029
+ **Pros of IDE-Only**:
1030
+ - Single environment workflow
1031
+ - Direct file operations from start
1032
+ - No copy/paste between environments
1033
+ - Immediate project integration
1034
+
1035
+ **Cons of IDE-Only**:
1036
+ - Higher token costs for large document creation
1037
+ - Smaller context windows (varies by IDE/model)
1038
+ - May hit limits during planning phases
1039
+ - Less cost-effective for brainstorming
1040
+
1041
+ **Using Web Agents in IDE**:
1042
+ - **NOT RECOMMENDED**: Web agents (PM, Architect) have rich dependencies designed for large contexts
1043
+ - **Why it matters**: Dev agents are kept lean to maximize coding context
1044
+ - **The principle**: "Dev agents code, planning agents plan" - mixing breaks this optimization
1045
+
1046
+ **About bmad-master and bmad-orchestrator**:
1047
+ - **bmad-master**: CAN do any task without switching agents, BUT...
1048
+ - **Still use specialized agents for planning**: PM, Architect, and UX Expert have tuned personas that produce better results
1049
+ - **Why specialization matters**: Each agent's personality and focus creates higher quality outputs
1050
+ - **If using bmad-master/orchestrator**: Fine for planning phases, but...
1051
+
1052
+ **CRITICAL RULE for Development**:
1053
+ - **ALWAYS use SM agent for story creation** - Never use bmad-master/orchestrator
1054
+ - **ALWAYS use Dev agent for implementation** - Never use bmad-master/orchestrator
1055
+ - **Why this matters**: SM and Dev agents are specifically optimized for the development workflow
1056
+ - **No exceptions**: Even if using bmad-master for everything else, switch to SM → Dev for implementation
1057
+
1058
+ **Best Practice for IDE-Only**:
1059
+ 1. Use PM/Architect/UX agents for planning (better than bmad-master)
1060
+ 2. Create documents directly in project
1061
+ 3. Shard immediately after creation
1062
+ 4. **MUST switch to SM agent** for story creation
1063
+ 5. **MUST switch to Dev agent** for implementation
1064
+ 6. Keep planning and coding in separate chat sessions
1065
+
967
1066
  ## Core Configuration (core-config.yml)
968
1067
 
969
1068
  **New in V4**: The `bmad-core/core-config.yml` file is a critical innovation that enables BMAD to work seamlessly with any project structure, providing maximum flexibility and backwards compatibility.
@@ -1204,10 +1303,16 @@ This architecture enables seamless operation across environments while maintaini
1204
1303
 
1205
1304
  ## Complete Development Workflow
1206
1305
 
1207
- ### Planning Phase (Web UI Recommended)
1306
+ ### Planning Phase (Web UI Recommended - Especially Gemini!)
1307
+
1308
+ **Ideal for cost efficiency with Gemini's massive context:**
1208
1309
 
1209
- **Ideal for cost efficiency, especially with Gemini:**
1310
+ **For Brownfield Projects - Start Here!**:
1311
+ 1. **Upload entire project to Gemini Web** (GitHub URL, files, or zip)
1312
+ 2. **Document existing system**: `/analyst` → `*document-project`
1313
+ 3. **Creates comprehensive docs** from entire codebase analysis
1210
1314
 
1315
+ **For All Projects**:
1211
1316
  1. **Optional Analysis**: `/analyst` - Market research, competitive analysis
1212
1317
  2. **Project Brief**: Create foundation document (Analyst or user)
1213
1318
  3. **PRD Creation**: `/pm create-doc prd` - Comprehensive product requirements
@@ -1241,10 +1346,14 @@ that can handle [specific requirements]."
1241
1346
 
1242
1347
  **Prerequisites**: Planning documents must exist in `docs/` folder
1243
1348
 
1244
- 1. **Document Sharding**:
1245
- - `@bmad-master` or `@po` shard `docs/prd.md` to `docs/prd/` folder
1246
- - If architecture exists, shard to `docs/architecture/` folder
1247
- - Results in multiple manageable documents and epic files
1349
+ 1. **Document Sharding** (CRITICAL STEP):
1350
+ - Documents created by PM/Architect (in Web or IDE) MUST be sharded for development
1351
+ - Two methods to shard:
1352
+ a) **Manual**: Drag `shard-doc` task + document file into chat
1353
+ b) **Agent**: Ask `@bmad-master` or `@po` to shard documents
1354
+ - Shards `docs/prd.md` → `docs/prd/` folder
1355
+ - Shards `docs/architecture.md` → `docs/architecture/` folder
1356
+ - **WARNING**: Do NOT shard in Web UI - copying many small files is painful!
1248
1357
 
1249
1358
  2. **Verify Sharded Content**:
1250
1359
  - At least one `epic-n.md` file in `docs/prd/` with stories in development order
@@ -1258,19 +1367,34 @@ that can handle [specific requirements]."
1258
1367
 
1259
1368
  3. **Development Cycle** (Sequential, one story at a time):
1260
1369
 
1261
- **Step 1 - Story Creation**: New chat window → `@sm` → `*create`
1370
+ **CRITICAL CONTEXT MANAGEMENT**:
1371
+ - **Context windows matter!** Always use fresh, clean context windows
1372
+ - **Model selection matters!** Use most powerful thinking model for SM story creation
1373
+ - **ALWAYS start new chat between SM, Dev, and QA work**
1374
+
1375
+ **Step 1 - Story Creation**:
1376
+ - **NEW CLEAN CHAT** → Select powerful model → `@sm` → `*create`
1262
1377
  - SM executes create-next-story task
1263
1378
  - Review generated story in `docs/stories/`
1264
1379
  - Update status from "Draft" to "Approved"
1265
1380
 
1266
- **Step 2 - Story Implementation**: New chat window → `@dev`
1381
+ **Step 2 - Story Implementation**:
1382
+ - **NEW CLEAN CHAT** → `@dev`
1267
1383
  - Agent asks which story to implement
1268
1384
  - Include story file content to save dev agent lookup time
1269
1385
  - Dev follows tasks/subtasks, marking completion
1270
- - Dev leaves notes for SM about any deviations
1271
- - Update status to "Done"
1386
+ - Dev maintains File List of all changes
1387
+ - Dev marks story as "Review" when complete with all tests passing
1388
+
1389
+ **Step 3 - Senior QA Review**:
1390
+ - **NEW CLEAN CHAT** → `@qa` → execute review-story task
1391
+ - QA performs senior developer code review
1392
+ - QA can refactor and improve code directly
1393
+ - QA appends results to story's QA Results section
1394
+ - If approved: Status → "Done"
1395
+ - If changes needed: Status stays "Review" with unchecked items for dev
1272
1396
 
1273
- **Step 3 - Repeat**: Continue SM → Dev cycle until all epic stories complete
1397
+ **Step 4 - Repeat**: Continue SM → Dev → QA cycle until all epic stories complete
1274
1398
 
1275
1399
  **Important**: Only 1 story in progress at a time, worked sequentially until all epic stories complete.
1276
1400
 
@@ -1290,12 +1414,72 @@ Each status change requires user verification and approval before proceeding.
1290
1414
  - Development execution
1291
1415
  - Testing and deployment
1292
1416
 
1293
- #### Brownfield Enhancement
1294
- - Current system analysis
1295
- - Enhancement planning
1296
- - Impact assessment
1297
- - Incremental development
1298
- - Integration testing
1417
+ #### Brownfield Enhancement (Existing Projects)
1418
+
1419
+ **Key Concept**: Brownfield development requires comprehensive documentation of your existing project for AI agents to understand context, patterns, and constraints.
1420
+
1421
+ **Complete Brownfield Workflow Options**:
1422
+
1423
+ **Option 1: PRD-First (Recommended for Large Codebases/Monorepos)**:
1424
+ 1. **Upload project to Gemini Web** (GitHub URL, files, or zip)
1425
+ 2. **Create PRD first**: `@pm` → `*create-doc brownfield-prd`
1426
+ 3. **Focused documentation**: `@analyst` → `*document-project`
1427
+ - Analyst asks for focus if no PRD provided
1428
+ - Choose "single document" format for Web UI
1429
+ - Uses PRD to document ONLY relevant areas
1430
+ - Creates one comprehensive markdown file
1431
+ - Avoids bloating docs with unused code
1432
+
1433
+ **Option 2: Document-First (Good for Smaller Projects)**:
1434
+ 1. **Upload project to Gemini Web**
1435
+ 2. **Document everything**: `@analyst` → `*document-project`
1436
+ 3. **Then create PRD**: `@pm` → `*create-doc brownfield-prd`
1437
+ - More thorough but can create excessive documentation
1438
+
1439
+ 2. **Requirements Gathering**:
1440
+ - **Brownfield PRD**: Use PM agent with `brownfield-prd-tmpl`
1441
+ - **Analyzes**: Existing system, constraints, integration points
1442
+ - **Defines**: Enhancement scope, compatibility requirements, risk assessment
1443
+ - **Creates**: Epic and story structure for changes
1444
+
1445
+ 3. **Architecture Planning**:
1446
+ - **Brownfield Architecture**: Use Architect agent with `brownfield-architecture-tmpl`
1447
+ - **Integration Strategy**: How new features integrate with existing system
1448
+ - **Migration Planning**: Gradual rollout and backwards compatibility
1449
+ - **Risk Mitigation**: Addressing potential breaking changes
1450
+
1451
+ **Brownfield-Specific Resources**:
1452
+
1453
+ **Templates**:
1454
+ - `brownfield-prd-tmpl.md`: Comprehensive enhancement planning with existing system analysis
1455
+ - `brownfield-architecture-tmpl.md`: Integration-focused architecture for existing systems
1456
+
1457
+ **Tasks**:
1458
+ - `document-project`: Generates comprehensive documentation from existing codebase
1459
+ - `brownfield-create-epic`: Creates single epic for focused enhancements (when full PRD is overkill)
1460
+ - `brownfield-create-story`: Creates individual story for small, isolated changes
1461
+
1462
+ **When to Use Each Approach**:
1463
+
1464
+ **Full Brownfield Workflow** (Recommended for):
1465
+ - Major feature additions
1466
+ - System modernization
1467
+ - Complex integrations
1468
+ - Multiple related changes
1469
+
1470
+ **Quick Epic/Story Creation** (Use when):
1471
+ - Single, focused enhancement
1472
+ - Isolated bug fixes
1473
+ - Small feature additions
1474
+ - Well-documented existing system
1475
+
1476
+ **Critical Success Factors**:
1477
+ 1. **Documentation First**: Always run `document-project` if docs are outdated/missing
1478
+ 2. **Context Matters**: Provide agents access to relevant code sections
1479
+ 3. **Integration Focus**: Emphasize compatibility and non-breaking changes
1480
+ 4. **Incremental Approach**: Plan for gradual rollout and testing
1481
+
1482
+ **For detailed guide**: See `docs/working-in-the-brownfield.md`
1299
1483
 
1300
1484
  ## Document Creation Best Practices
1301
1485
 
@@ -1376,12 +1560,94 @@ Use the `shard-doc` task or `@kayvan/markdown-tree-parser` tool for automatic sh
1376
1560
  - **Keep conversations focused** - One agent, one task per conversation
1377
1561
  - **Review everything** - Always review and approve before marking complete
1378
1562
 
1563
+ ## Contributing to BMAD-METHOD
1564
+
1565
+ ### Quick Contribution Guidelines
1566
+
1567
+ For full details, see `CONTRIBUTING.md`. Key points:
1568
+
1569
+ **Fork Workflow**:
1570
+ 1. Fork the repository
1571
+ 2. Create feature branches
1572
+ 3. Submit PRs to `next` branch (default) or `main` for critical fixes only
1573
+ 4. Keep PRs small: 200-400 lines ideal, 800 lines maximum
1574
+ 5. One feature/fix per PR
1575
+
1576
+ **PR Requirements**:
1577
+ - Clear descriptions (max 200 words) with What/Why/How/Testing
1578
+ - Use conventional commits (feat:, fix:, docs:)
1579
+ - Atomic commits - one logical change per commit
1580
+ - Must align with guiding principles
1581
+
1582
+ **Core Principles** (from GUIDING-PRINCIPLES.md):
1583
+ - **Dev Agents Must Be Lean**: Minimize dependencies, save context for code
1584
+ - **Natural Language First**: Everything in markdown, no code in core
1585
+ - **Core vs Expansion Packs**: Core for universal needs, packs for specialized domains
1586
+ - **Design Philosophy**: "Dev agents code, planning agents plan"
1587
+
1588
+ ## Expansion Packs
1589
+
1590
+ ### What Are Expansion Packs?
1591
+
1592
+ Expansion packs extend BMAD-METHOD beyond traditional software development into ANY domain. They provide specialized agent teams, templates, and workflows while keeping the core framework lean and focused on development.
1593
+
1594
+ ### Why Use Expansion Packs?
1595
+
1596
+ 1. **Keep Core Lean**: Dev agents maintain maximum context for coding
1597
+ 2. **Domain Expertise**: Deep, specialized knowledge without bloating core
1598
+ 3. **Community Innovation**: Anyone can create and share packs
1599
+ 4. **Modular Design**: Install only what you need
1600
+
1601
+ ### Available Expansion Packs
1602
+
1603
+ **Technical Packs**:
1604
+ - **Infrastructure/DevOps**: Cloud architects, SRE experts, security specialists
1605
+ - **Game Development**: Game designers, level designers, narrative writers
1606
+ - **Mobile Development**: iOS/Android specialists, mobile UX experts
1607
+ - **Data Science**: ML engineers, data scientists, visualization experts
1608
+
1609
+ **Non-Technical Packs**:
1610
+ - **Business Strategy**: Consultants, financial analysts, marketing strategists
1611
+ - **Creative Writing**: Plot architects, character developers, world builders
1612
+ - **Health & Wellness**: Fitness trainers, nutritionists, habit engineers
1613
+ - **Education**: Curriculum designers, assessment specialists
1614
+ - **Legal Support**: Contract analysts, compliance checkers
1615
+
1616
+ **Specialty Packs**:
1617
+ - **Expansion Creator**: Tools to build your own expansion packs
1618
+ - **RPG Game Master**: Tabletop gaming assistance
1619
+ - **Life Event Planning**: Wedding planners, event coordinators
1620
+ - **Scientific Research**: Literature reviewers, methodology designers
1621
+
1622
+ ### Using Expansion Packs
1623
+
1624
+ 1. **Browse Available Packs**: Check `expansion-packs/` directory
1625
+ 2. **Get Inspiration**: See `docs/expansion-pack-ideas.md` for detailed examples
1626
+ 3. **Install via CLI**:
1627
+ ```bash
1628
+ npx bmad-method install
1629
+ # Select "Install expansion pack" option
1630
+ ```
1631
+ 4. **Use in Your Workflow**: Installed packs integrate seamlessly with existing agents
1632
+
1633
+ ### Creating Custom Expansion Packs
1634
+
1635
+ Use the **expansion-creator** pack to build your own:
1636
+
1637
+ 1. **Define Domain**: What expertise are you capturing?
1638
+ 2. **Design Agents**: Create specialized roles with clear boundaries
1639
+ 3. **Build Resources**: Tasks, templates, checklists for your domain
1640
+ 4. **Test & Share**: Validate with real use cases, share with community
1641
+
1642
+ **Key Principle**: Expansion packs democratize expertise by making specialized knowledge accessible through AI agents.
1643
+
1379
1644
  ## Getting Help
1380
1645
 
1381
1646
  - **Commands**: Use `/help` in any environment to see available commands
1382
1647
  - **Agent Switching**: Use `/switch agent-name` with orchestrator for role changes
1383
1648
  - **Documentation**: Check `docs/` folder for project-specific context
1384
1649
  - **Community**: Discord and GitHub resources available for support
1650
+ - **Contributing**: See `CONTRIBUTING.md` for full guidelines
1385
1651
  ==================== END: data#bmad-kb ====================
1386
1652
 
1387
1653
  ==================== START: utils#workflow-management ====================
@@ -2184,6 +2450,326 @@ Present these numbered options to the user:
2184
2450
  - Plan for iterative refinement based on initial findings
2185
2451
  ==================== END: tasks#create-deep-research-prompt ====================
2186
2452
 
2453
+ ==================== START: tasks#document-project ====================
2454
+ # Document an Existing Project
2455
+
2456
+ ## Purpose
2457
+
2458
+ Generate comprehensive documentation for existing projects optimized for AI development agents. This task creates structured reference materials that enable AI agents to understand project context, conventions, and patterns for effective contribution to any codebase.
2459
+
2460
+ ## Task Instructions
2461
+
2462
+ ### 1. Initial Project Analysis
2463
+
2464
+ [[LLM: First, check if a PRD or requirements document exists in context. If yes, use it to focus your documentation efforts on relevant areas only.
2465
+
2466
+ **IF PRD EXISTS**:
2467
+
2468
+ - Review the PRD to understand what enhancement/feature is planned
2469
+ - Identify which modules, services, or areas will be affected
2470
+ - Focus documentation ONLY on these relevant areas
2471
+ - Skip unrelated parts of the codebase to keep docs lean
2472
+
2473
+ **IF NO PRD EXISTS**:
2474
+ Ask the user:
2475
+
2476
+ "I notice you haven't provided a PRD or requirements document. To create more focused and useful documentation, I recommend one of these options:
2477
+
2478
+ 1. **Create a PRD first** - Would you like me to help create a brownfield PRD before documenting? This helps focus documentation on relevant areas.
2479
+
2480
+ 2. **Provide existing requirements** - Do you have a requirements document, epic, or feature description you can share?
2481
+
2482
+ 3. **Describe the focus** - Can you briefly describe what enhancement or feature you're planning? For example:
2483
+ - 'Adding payment processing to the user service'
2484
+ - 'Refactoring the authentication module'
2485
+ - 'Integrating with a new third-party API'
2486
+
2487
+ 4. **Document everything** - Or should I proceed with comprehensive documentation of the entire codebase? (Note: This may create excessive documentation for large projects)
2488
+
2489
+ Please let me know your preference, or I can proceed with full documentation if you prefer."
2490
+
2491
+ Based on their response:
2492
+
2493
+ - If they choose option 1-3: Use that context to focus documentation
2494
+ - If they choose option 4 or decline: Proceed with comprehensive analysis below
2495
+
2496
+ Begin by conducting analysis of the existing project. Use available tools to:
2497
+
2498
+ 1. **Project Structure Discovery**: Examine the root directory structure, identify main folders, and understand the overall organization
2499
+ 2. **Technology Stack Identification**: Look for package.json, requirements.txt, Cargo.toml, pom.xml, etc. to identify languages, frameworks, and dependencies
2500
+ 3. **Build System Analysis**: Find build scripts, CI/CD configurations, and development commands
2501
+ 4. **Existing Documentation Review**: Check for README files, docs folders, and any existing documentation
2502
+ 5. **Code Pattern Analysis**: Sample key files to understand coding patterns, naming conventions, and architectural approaches
2503
+
2504
+ Ask the user these elicitation questions to better understand their needs:
2505
+
2506
+ - What is the primary purpose of this project?
2507
+ - Are there any specific areas of the codebase that are particularly complex or important for agents to understand?
2508
+ - What types of tasks do you expect AI agents to perform on this project? (e.g., bug fixes, feature additions, refactoring, testing)
2509
+ - Are there any existing documentation standards or formats you prefer?
2510
+ - What level of technical detail should the documentation target? (junior developers, senior developers, mixed team)
2511
+ - Is there a specific feature or enhancement you're planning? (This helps focus documentation)
2512
+ ]]
2513
+
2514
+ ### 2. Deep Codebase Analysis
2515
+
2516
+ [[LLM: Before generating documentation, conduct extensive analysis of the existing codebase:
2517
+
2518
+ 1. **Explore Key Areas**:
2519
+ - Entry points (main files, index files, app initializers)
2520
+ - Configuration files and environment setup
2521
+ - Package dependencies and versions
2522
+ - Build and deployment configurations
2523
+ - Test suites and coverage
2524
+
2525
+ 2. **Ask Clarifying Questions**:
2526
+ - "I see you're using [technology X]. Are there any custom patterns or conventions I should document?"
2527
+ - "What are the most critical/complex parts of this system that developers struggle with?"
2528
+ - "Are there any undocumented 'tribal knowledge' areas I should capture?"
2529
+ - "What technical debt or known issues should I document?"
2530
+ - "Which parts of the codebase change most frequently?"
2531
+
2532
+ 3. **Map the Reality**:
2533
+ - Identify ACTUAL patterns used (not theoretical best practices)
2534
+ - Find where key business logic lives
2535
+ - Locate integration points and external dependencies
2536
+ - Document workarounds and technical debt
2537
+ - Note areas that differ from standard patterns
2538
+
2539
+ **IF PRD PROVIDED**: Also analyze what would need to change for the enhancement]]
2540
+
2541
+ ### 3. Core Documentation Generation
2542
+
2543
+ [[LLM: Generate a comprehensive BROWNFIELD architecture document that reflects the ACTUAL state of the codebase.
2544
+
2545
+ **CRITICAL**: This is NOT an aspirational architecture document. Document what EXISTS, including:
2546
+ - Technical debt and workarounds
2547
+ - Inconsistent patterns between different parts
2548
+ - Legacy code that can't be changed
2549
+ - Integration constraints
2550
+ - Performance bottlenecks
2551
+
2552
+ **Document Structure**:
2553
+
2554
+ # [Project Name] Brownfield Architecture Document
2555
+
2556
+ ## Introduction
2557
+ This document captures the CURRENT STATE of the [Project Name] codebase, including technical debt, workarounds, and real-world patterns. It serves as a reference for AI agents working on enhancements.
2558
+
2559
+ ### Document Scope
2560
+ [If PRD provided: "Focused on areas relevant to: {enhancement description}"]
2561
+ [If no PRD: "Comprehensive documentation of entire system"]
2562
+
2563
+ ### Change Log
2564
+ | Date | Version | Description | Author |
2565
+ |------|---------|-------------|--------|
2566
+ | [Date] | 1.0 | Initial brownfield analysis | [Analyst] |
2567
+
2568
+ ## Quick Reference - Key Files and Entry Points
2569
+
2570
+ ### Critical Files for Understanding the System
2571
+ - **Main Entry**: `src/index.js` (or actual entry point)
2572
+ - **Configuration**: `config/app.config.js`, `.env.example`
2573
+ - **Core Business Logic**: `src/services/`, `src/domain/`
2574
+ - **API Definitions**: `src/routes/` or link to OpenAPI spec
2575
+ - **Database Models**: `src/models/` or link to schema files
2576
+ - **Key Algorithms**: [List specific files with complex logic]
2577
+
2578
+ ### If PRD Provided - Enhancement Impact Areas
2579
+ [Highlight which files/modules will be affected by the planned enhancement]
2580
+
2581
+ ## High Level Architecture
2582
+
2583
+ ### Technical Summary
2584
+ [Real assessment of architecture - mention if it's well-structured or has issues]
2585
+
2586
+ ### Actual Tech Stack (from package.json/requirements.txt)
2587
+ | Category | Technology | Version | Notes |
2588
+ |----------|------------|---------|--------|
2589
+ | Runtime | Node.js | 16.x | [Any constraints] |
2590
+ | Framework | Express | 4.18.2 | [Custom middleware?] |
2591
+ | Database | PostgreSQL | 13 | [Connection pooling setup] |
2592
+ | [etc...] |
2593
+
2594
+ ### Repository Structure Reality Check
2595
+ - Type: [Monorepo/Polyrepo/Hybrid]
2596
+ - Package Manager: [npm/yarn/pnpm]
2597
+ - Notable: [Any unusual structure decisions]
2598
+
2599
+ ## Source Tree and Module Organization
2600
+
2601
+ ### Project Structure (Actual)
2602
+ ```
2603
+ project-root/
2604
+ ├── src/
2605
+ │ ├── controllers/ # HTTP request handlers
2606
+ │ ├── services/ # Business logic (NOTE: inconsistent patterns between user and payment services)
2607
+ │ ├── models/ # Database models (Sequelize)
2608
+ │ ├── utils/ # Mixed bag - needs refactoring
2609
+ │ └── legacy/ # DO NOT MODIFY - old payment system still in use
2610
+ ├── tests/ # Jest tests (60% coverage)
2611
+ ├── scripts/ # Build and deployment scripts
2612
+ └── config/ # Environment configs
2613
+ ```
2614
+
2615
+ ### Key Modules and Their Purpose
2616
+ - **User Management**: `src/services/userService.js` - Handles all user operations
2617
+ - **Authentication**: `src/middleware/auth.js` - JWT-based, custom implementation
2618
+ - **Payment Processing**: `src/legacy/payment.js` - CRITICAL: Do not refactor, tightly coupled
2619
+ - **[List other key modules with their actual files]**
2620
+
2621
+ ## Data Models and APIs
2622
+
2623
+ ### Data Models
2624
+ Instead of duplicating, reference actual model files:
2625
+ - **User Model**: See `src/models/User.js`
2626
+ - **Order Model**: See `src/models/Order.js`
2627
+ - **Related Types**: TypeScript definitions in `src/types/`
2628
+
2629
+ ### API Specifications
2630
+ - **OpenAPI Spec**: `docs/api/openapi.yaml` (if exists)
2631
+ - **Postman Collection**: `docs/api/postman-collection.json`
2632
+ - **Manual Endpoints**: [List any undocumented endpoints discovered]
2633
+
2634
+ ## Technical Debt and Known Issues
2635
+
2636
+ ### Critical Technical Debt
2637
+ 1. **Payment Service**: Legacy code in `src/legacy/payment.js` - tightly coupled, no tests
2638
+ 2. **User Service**: Different pattern than other services, uses callbacks instead of promises
2639
+ 3. **Database Migrations**: Manually tracked, no proper migration tool
2640
+ 4. **[Other significant debt]**
2641
+
2642
+ ### Workarounds and Gotchas
2643
+ - **Environment Variables**: Must set `NODE_ENV=production` even for staging (historical reason)
2644
+ - **Database Connections**: Connection pool hardcoded to 10, changing breaks payment service
2645
+ - **[Other workarounds developers need to know]**
2646
+
2647
+ ## Integration Points and External Dependencies
2648
+
2649
+ ### External Services
2650
+ | Service | Purpose | Integration Type | Key Files |
2651
+ |---------|---------|------------------|-----------|
2652
+ | Stripe | Payments | REST API | `src/integrations/stripe/` |
2653
+ | SendGrid | Emails | SDK | `src/services/emailService.js` |
2654
+ | [etc...] |
2655
+
2656
+ ### Internal Integration Points
2657
+ - **Frontend Communication**: REST API on port 3000, expects specific headers
2658
+ - **Background Jobs**: Redis queue, see `src/workers/`
2659
+ - **[Other integrations]**
2660
+
2661
+ ## Development and Deployment
2662
+
2663
+ ### Local Development Setup
2664
+ 1. Actual steps that work (not ideal steps)
2665
+ 2. Known issues with setup
2666
+ 3. Required environment variables (see `.env.example`)
2667
+
2668
+ ### Build and Deployment Process
2669
+ - **Build Command**: `npm run build` (webpack config in `webpack.config.js`)
2670
+ - **Deployment**: Manual deployment via `scripts/deploy.sh`
2671
+ - **Environments**: Dev, Staging, Prod (see `config/environments/`)
2672
+
2673
+ ## Testing Reality
2674
+
2675
+ ### Current Test Coverage
2676
+ - Unit Tests: 60% coverage (Jest)
2677
+ - Integration Tests: Minimal, in `tests/integration/`
2678
+ - E2E Tests: None
2679
+ - Manual Testing: Primary QA method
2680
+
2681
+ ### Running Tests
2682
+ ```bash
2683
+ npm test # Runs unit tests
2684
+ npm run test:integration # Runs integration tests (requires local DB)
2685
+ ```
2686
+
2687
+ ## If Enhancement PRD Provided - Impact Analysis
2688
+
2689
+ ### Files That Will Need Modification
2690
+ Based on the enhancement requirements, these files will be affected:
2691
+ - `src/services/userService.js` - Add new user fields
2692
+ - `src/models/User.js` - Update schema
2693
+ - `src/routes/userRoutes.js` - New endpoints
2694
+ - [etc...]
2695
+
2696
+ ### New Files/Modules Needed
2697
+ - `src/services/newFeatureService.js` - New business logic
2698
+ - `src/models/NewFeature.js` - New data model
2699
+ - [etc...]
2700
+
2701
+ ### Integration Considerations
2702
+ - Will need to integrate with existing auth middleware
2703
+ - Must follow existing response format in `src/utils/responseFormatter.js`
2704
+ - [Other integration points]
2705
+
2706
+ ## Appendix - Useful Commands and Scripts
2707
+
2708
+ ### Frequently Used Commands
2709
+ ```bash
2710
+ npm run dev # Start development server
2711
+ npm run build # Production build
2712
+ npm run migrate # Run database migrations
2713
+ npm run seed # Seed test data
2714
+ ```
2715
+
2716
+ ### Debugging and Troubleshooting
2717
+ - **Logs**: Check `logs/app.log` for application logs
2718
+ - **Debug Mode**: Set `DEBUG=app:*` for verbose logging
2719
+ - **Common Issues**: See `docs/troubleshooting.md`]]
2720
+
2721
+ ### 4. Document Delivery
2722
+
2723
+ [[LLM: After generating the complete architecture document:
2724
+
2725
+ 1. **In Web UI (Gemini, ChatGPT, Claude)**:
2726
+ - Present the entire document in one response (or multiple if too long)
2727
+ - Tell user to copy and save as `docs/brownfield-architecture.md` or `docs/project-architecture.md`
2728
+ - Mention it can be sharded later in IDE if needed
2729
+
2730
+ 2. **In IDE Environment**:
2731
+ - Create the document as `docs/brownfield-architecture.md`
2732
+ - Inform user this single document contains all architectural information
2733
+ - Can be sharded later using PO agent if desired
2734
+
2735
+ The document should be comprehensive enough that future agents can understand:
2736
+ - The actual state of the system (not idealized)
2737
+ - Where to find key files and logic
2738
+ - What technical debt exists
2739
+ - What constraints must be respected
2740
+ - If PRD provided: What needs to change for the enhancement]]
2741
+
2742
+ ### 5. Quality Assurance
2743
+
2744
+ [[LLM: Before finalizing the document:
2745
+
2746
+ 1. **Accuracy Check**: Verify all technical details match the actual codebase
2747
+ 2. **Completeness Review**: Ensure all major system components are documented
2748
+ 3. **Focus Validation**: If user provided scope, verify relevant areas are emphasized
2749
+ 4. **Clarity Assessment**: Check that explanations are clear for AI agents
2750
+ 5. **Navigation**: Ensure document has clear section structure for easy reference
2751
+
2752
+ Apply the advanced elicitation task after major sections to refine based on user feedback.]]
2753
+
2754
+ ## Success Criteria
2755
+
2756
+ - Single comprehensive brownfield architecture document created
2757
+ - Document reflects REALITY including technical debt and workarounds
2758
+ - Key files and modules are referenced with actual paths
2759
+ - Models/APIs reference source files rather than duplicating content
2760
+ - If PRD provided: Clear impact analysis showing what needs to change
2761
+ - Document enables AI agents to navigate and understand the actual codebase
2762
+ - Technical constraints and "gotchas" are clearly documented
2763
+
2764
+ ## Notes
2765
+
2766
+ - This task creates ONE document that captures the TRUE state of the system
2767
+ - References actual files rather than duplicating content when possible
2768
+ - Documents technical debt, workarounds, and constraints honestly
2769
+ - For brownfield projects with PRD: Provides clear enhancement impact analysis
2770
+ - The goal is PRACTICAL documentation for AI agents doing real work
2771
+ ==================== END: tasks#document-project ====================
2772
+
2187
2773
  ==================== START: templates#project-brief-tmpl ====================
2188
2774
  # Project Brief: {{Project Name}}
2189
2775
 
@@ -2977,398 +3563,6 @@ These replace the standard elicitation options when working on market research d
2977
3563
  These replace the standard elicitation options when working on competitive analysis documents.]]
2978
3564
  ==================== END: templates#competitor-analysis-tmpl ====================
2979
3565
 
2980
- ==================== START: tasks#document-project ====================
2981
- # Document an Existing Project
2982
-
2983
- ## Purpose
2984
-
2985
- Generate comprehensive documentation for existing projects optimized for AI development agents. This task creates structured reference materials that enable AI agents to understand project context, conventions, and patterns for effective contribution to any codebase.
2986
-
2987
- ## Task Instructions
2988
-
2989
- ### 1. Initial Project Analysis
2990
-
2991
- [[LLM: Begin by conducting a comprehensive analysis of the existing project. Use available tools to:
2992
-
2993
- 1. **Project Structure Discovery**: Examine the root directory structure, identify main folders, and understand the overall organization
2994
- 2. **Technology Stack Identification**: Look for package.json, requirements.txt, Cargo.toml, pom.xml, etc. to identify languages, frameworks, and dependencies
2995
- 3. **Build System Analysis**: Find build scripts, CI/CD configurations, and development commands
2996
- 4. **Existing Documentation Review**: Check for README files, docs folders, and any existing documentation
2997
- 5. **Code Pattern Analysis**: Sample key files to understand coding patterns, naming conventions, and architectural approaches
2998
-
2999
- Ask the user these elicitation questions to better understand their needs:
3000
-
3001
- - What is the primary purpose of this project?
3002
- - Are there any specific areas of the codebase that are particularly complex or important for agents to understand?
3003
- - What types of tasks do you expect AI agents to perform on this project? (e.g., bug fixes, feature additions, refactoring, testing)
3004
- - Are there any existing documentation standards or formats you prefer?
3005
- - What level of technical detail should the documentation target? (junior developers, senior developers, mixed team)
3006
- ]]
3007
-
3008
- ### 2. Core Documentation Generation
3009
-
3010
- [[LLM: Based on your analysis, generate the following core documentation files. Adapt the content and structure to match the specific project type and context you discovered:
3011
-
3012
- **Core Documents (always generate):**
3013
-
3014
- 1. **docs/index.md** - Master documentation index
3015
- 2. **docs/architecture/index.md** - Architecture documentation index
3016
- 3. **docs/architecture/coding-standards.md** - Coding conventions and style guidelines
3017
- 4. **docs/architecture/tech-stack.md** - Technology stack and version constraints
3018
- 5. **docs/architecture/unified-project-structure.md** - Project structure and organization
3019
- 6. **docs/architecture/testing-strategy.md** - Testing approaches and requirements
3020
-
3021
- **Backend Documents (generate for backend/full-stack projects):**
3022
-
3023
- 7. **docs/architecture/backend-architecture.md** - Backend service patterns and structure
3024
- 8. **docs/architecture/rest-api-spec.md** - API endpoint specifications
3025
- 9. **docs/architecture/data-models.md** - Data structures and validation rules
3026
- 10. **docs/architecture/database-schema.md** - Database design and relationships
3027
- 11. **docs/architecture/external-apis.md** - Third-party integrations
3028
-
3029
- **Frontend Documents (generate for frontend/full-stack projects):**
3030
-
3031
- 12. **docs/architecture/frontend-architecture.md** - Frontend patterns and structure
3032
- 13. **docs/architecture/components.md** - UI component specifications
3033
- 14. **docs/architecture/core-workflows.md** - User interaction flows
3034
- 15. **docs/architecture/ui-ux-spec.md** - UI/UX specifications and guidelines
3035
-
3036
- **Additional Documents (generate if applicable):**
3037
-
3038
- 16. **docs/prd.md** - Product requirements document (if not exists)
3039
- 17. **docs/architecture/deployment-guide.md** - Deployment and operations info
3040
- 18. **docs/architecture/security-considerations.md** - Security patterns and requirements
3041
- 19. **docs/architecture/performance-guidelines.md** - Performance optimization patterns
3042
-
3043
- **Optional Enhancement Documents:**
3044
-
3045
- 20. **docs/architecture/troubleshooting-guide.md** - Common issues and solutions
3046
- 21. **docs/architecture/changelog-conventions.md** - Change management practices
3047
- 22. **docs/architecture/code-review-checklist.md** - Review standards and practices
3048
-
3049
- Present each document section by section, using the advanced elicitation task after each major section.]]
3050
-
3051
- ### 3. Document Structure Template
3052
-
3053
- [[LLM: Use this standardized structure for each documentation file, adapting content as needed:
3054
-
3055
- ```markdown
3056
- # {{Document Title}}
3057
-
3058
- ## Overview
3059
-
3060
- {{Brief description of what this document covers and why it's important for AI agents}}
3061
-
3062
- ## Quick Reference
3063
-
3064
- {{Key points, commands, or patterns that agents need most frequently}}
3065
-
3066
- ## Detailed Information
3067
-
3068
- {{Comprehensive information organized into logical sections}}
3069
-
3070
- ## Examples
3071
-
3072
- {{Concrete examples showing proper usage or implementation}}
3073
-
3074
- ## Common Patterns
3075
-
3076
- {{Recurring patterns agents should recognize and follow}}
3077
-
3078
- ## Things to Avoid
3079
-
3080
- {{Anti-patterns, deprecated approaches, or common mistakes}}
3081
-
3082
- ## Related Resources
3083
-
3084
- {{Links to other relevant documentation or external resources}}
3085
- ```
3086
-
3087
- Each document should be:
3088
-
3089
- - **Concrete and actionable** - Focus on what agents need to do, not just concepts
3090
- - **Pattern-focused** - Highlight recurring patterns agents can recognize and replicate
3091
- - **Example-rich** - Include specific code examples and real file references
3092
- - **Context-aware** - Reference actual project files, folders, and conventions
3093
- - **Assumption-free** - Don't assume agents know project history or implicit knowledge
3094
- ]]
3095
-
3096
- ### 4. Content Guidelines for Each Document Type
3097
-
3098
- #### Core Architecture Documents
3099
-
3100
- ##### docs/architecture/index.md
3101
-
3102
- [[LLM: Create a comprehensive index of all architecture documentation:
3103
-
3104
- - List all architecture documents with brief descriptions
3105
- - Group documents by category (backend, frontend, shared)
3106
- - Include quick links to key sections
3107
- - Provide reading order recommendations for different use cases]]
3108
-
3109
- ##### docs/architecture/unified-project-structure.md
3110
-
3111
- [[LLM: Document the complete project structure:
3112
-
3113
- - Root-level directory structure with explanations
3114
- - Where each type of code belongs (backend, frontend, tests, etc.)
3115
- - File naming conventions and patterns
3116
- - Module/package organization
3117
- - Generated vs. source file locations
3118
- - Build output locations]]
3119
-
3120
- ##### docs/architecture/coding-standards.md
3121
-
3122
- [[LLM: Capture project-wide coding conventions:
3123
-
3124
- - Language-specific style guidelines
3125
- - Naming conventions (variables, functions, classes, files)
3126
- - Code organization within files
3127
- - Import/export patterns
3128
- - Comment and documentation standards
3129
- - Linting and formatting tool configurations
3130
- - Git commit message conventions]]
3131
-
3132
- ##### docs/architecture/tech-stack.md
3133
-
3134
- [[LLM: Document all technologies and versions:
3135
-
3136
- - Primary languages and versions
3137
- - Frameworks and major libraries with versions
3138
- - Development tools and their versions
3139
- - Database systems and versions
3140
- - External services and APIs used
3141
- - Browser/runtime requirements]]
3142
-
3143
- ##### docs/architecture/testing-strategy.md
3144
-
3145
- [[LLM: Define testing approaches and requirements:
3146
-
3147
- - Test file locations and naming conventions
3148
- - Unit testing patterns and frameworks
3149
- - Integration testing approaches
3150
- - E2E testing setup (if applicable)
3151
- - Test coverage requirements
3152
- - Mocking strategies
3153
- - Test data management]]
3154
-
3155
- #### Backend Architecture Documents
3156
-
3157
- ##### docs/architecture/backend-architecture.md
3158
-
3159
- [[LLM: Document backend service structure:
3160
-
3161
- - Service layer organization
3162
- - Controller/route patterns
3163
- - Middleware architecture
3164
- - Authentication/authorization patterns
3165
- - Request/response flow
3166
- - Background job processing
3167
- - Service communication patterns]]
3168
-
3169
- ##### docs/architecture/rest-api-spec.md
3170
-
3171
- [[LLM: Specify all API endpoints:
3172
-
3173
- - Base URL and versioning strategy
3174
- - Authentication methods
3175
- - Common headers and parameters
3176
- - Each endpoint with:
3177
- - HTTP method and path
3178
- - Request parameters/body
3179
- - Response format and status codes
3180
- - Error responses
3181
- - Rate limiting and quotas]]
3182
-
3183
- ##### docs/architecture/data-models.md
3184
-
3185
- [[LLM: Define data structures and validation:
3186
-
3187
- - Core business entities
3188
- - Data validation rules
3189
- - Relationships between entities
3190
- - Computed fields and derivations
3191
- - Data transformation patterns
3192
- - Serialization formats]]
3193
-
3194
- ##### docs/architecture/database-schema.md
3195
-
3196
- [[LLM: Document database design:
3197
-
3198
- - Database type and version
3199
- - Table/collection structures
3200
- - Indexes and constraints
3201
- - Relationships and foreign keys
3202
- - Migration patterns
3203
- - Seed data requirements
3204
- - Backup and recovery procedures]]
3205
-
3206
- ##### docs/architecture/external-apis.md
3207
-
3208
- [[LLM: Document third-party integrations:
3209
-
3210
- - List of external services used
3211
- - Authentication methods for each
3212
- - API endpoints and usage patterns
3213
- - Rate limits and quotas
3214
- - Error handling strategies
3215
- - Webhook configurations
3216
- - Data synchronization patterns]]
3217
-
3218
- #### Frontend Architecture Documents
3219
-
3220
- ##### docs/architecture/frontend-architecture.md
3221
-
3222
- [[LLM: Document frontend application structure:
3223
-
3224
- - Component hierarchy and organization
3225
- - State management patterns
3226
- - Routing architecture
3227
- - Data fetching patterns
3228
- - Authentication flow
3229
- - Error boundary strategies
3230
- - Performance optimization patterns]]
3231
-
3232
- ##### docs/architecture/components.md
3233
-
3234
- [[LLM: Specify UI components:
3235
-
3236
- - Component library/design system used
3237
- - Custom component specifications
3238
- - Props and state for each component
3239
- - Component composition patterns
3240
- - Styling approaches
3241
- - Accessibility requirements
3242
- - Component testing patterns]]
3243
-
3244
- ##### docs/architecture/core-workflows.md
3245
-
3246
- [[LLM: Document user interaction flows:
3247
-
3248
- - Major user journeys
3249
- - Screen flow diagrams
3250
- - Form handling patterns
3251
- - Navigation patterns
3252
- - Data flow through workflows
3253
- - Error states and recovery
3254
- - Loading and transition states]]
3255
-
3256
- ##### docs/architecture/ui-ux-spec.md
3257
-
3258
- [[LLM: Define UI/UX guidelines:
3259
-
3260
- - Design system specifications
3261
- - Color palette and typography
3262
- - Spacing and layout grids
3263
- - Responsive breakpoints
3264
- - Animation and transition guidelines
3265
- - Accessibility standards
3266
- - Browser compatibility requirements]]
3267
-
3268
- ### 5. Adaptive Content Strategy
3269
-
3270
- [[LLM: Adapt your documentation approach based on project characteristics:
3271
-
3272
- **For Web Applications:**
3273
-
3274
- - Focus on component patterns, routing, state management
3275
- - Include build processes, asset handling, and deployment
3276
- - Cover API integration patterns and data fetching
3277
-
3278
- **For Backend Services:**
3279
-
3280
- - Emphasize service architecture, data models, and API design
3281
- - Include database interaction patterns and migration strategies
3282
- - Cover authentication, authorization, and security patterns
3283
-
3284
- **For CLI Tools:**
3285
-
3286
- - Focus on command structure, argument parsing, and output formatting
3287
- - Include plugin/extension patterns if applicable
3288
- - Cover configuration file handling and user interaction patterns
3289
-
3290
- **For Libraries/Frameworks:**
3291
-
3292
- - Emphasize public API design and usage patterns
3293
- - Include extension points and customization approaches
3294
- - Cover versioning, compatibility, and migration strategies
3295
-
3296
- **For Mobile Applications:**
3297
-
3298
- - Focus on platform-specific patterns and navigation
3299
- - Include state management and data persistence approaches
3300
- - Cover platform integration and native feature usage
3301
-
3302
- **For Data Science/ML Projects:**
3303
-
3304
- - Emphasize data pipeline patterns and model organization
3305
- - Include experiment tracking and reproducibility approaches
3306
- - Cover data validation and model deployment patterns
3307
- ]]
3308
-
3309
- ### 6. Quality Assurance
3310
-
3311
- [[LLM: Before completing each document:
3312
-
3313
- 1. **Accuracy Check**: Verify all file paths, commands, and code examples work
3314
- 2. **Completeness Review**: Ensure the document covers the most important patterns an agent would encounter
3315
- 3. **Clarity Assessment**: Check that explanations are clear and actionable
3316
- 4. **Consistency Verification**: Ensure terminology and patterns align across all documents
3317
- 5. **Agent Perspective**: Review from the viewpoint of an AI agent that needs to contribute to this project
3318
-
3319
- Ask the user to review each completed document and use the advanced elicitation task to refine based on their feedback.]]
3320
-
3321
- ### 7. Final Integration
3322
-
3323
- [[LLM: After all documents are completed:
3324
-
3325
- 1. Ensure all documents are created in the proper BMAD-expected locations:
3326
-
3327
- - Core docs in `docs/` (index.md, prd.md)
3328
- - Architecture shards in `docs/architecture/` subdirectory
3329
- - Create the `docs/architecture/` directory if it doesn't exist
3330
-
3331
- 2. Create/update the master index documents:
3332
-
3333
- - Update `docs/index.md` to reference all documentation
3334
- - Create `docs/architecture/index.md` listing all architecture shards
3335
-
3336
- 3. Verify document cross-references:
3337
-
3338
- - Ensure all documents link to related documentation
3339
- - Check that file paths match the actual project structure
3340
- - Validate that examples reference real files in the project
3341
-
3342
- 4. Provide maintenance guidance:
3343
-
3344
- - Document update triggers (when to update each doc)
3345
- - Create a simple checklist for keeping docs current
3346
- - Suggest automated validation approaches
3347
-
3348
- 5. Summary report including:
3349
- - List of all documents created with their paths
3350
- - Any gaps or areas needing human review
3351
- - Recommendations for project-specific additions
3352
- - Next steps for maintaining documentation accuracy
3353
-
3354
- Present a summary of what was created and ask if any additional documentation would be helpful for AI agents working on this specific project.]]
3355
-
3356
- ## Success Criteria
3357
-
3358
- - Documentation enables AI agents to understand project context without additional explanation
3359
- - All major architectural patterns and coding conventions are captured
3360
- - Examples reference actual project files and demonstrate real usage
3361
- - Documentation is structured consistently and easy to navigate
3362
- - Content is actionable and focuses on what agents need to do, not just understand
3363
-
3364
- ## Notes
3365
-
3366
- - This task is designed to work with any project type, language, or framework
3367
- - The documentation should reflect the project as it actually is, not as it should be
3368
- - Focus on patterns that agents can recognize and replicate consistently
3369
- - Include both positive examples (what to do) and negative examples (what to avoid)
3370
- ==================== END: tasks#document-project ====================
3371
-
3372
3566
  ==================== START: tasks#execute-checklist ====================
3373
3567
  # Checklist Validation Task
3374
3568
 
@@ -6948,9 +7142,27 @@ The story creation is successful when:
6948
7142
  - Create a folder structure to organize the sharded documents
6949
7143
  - Maintain all content integrity including code blocks, diagrams, and markdown formatting
6950
7144
 
6951
- ## Recommended Method: @kayvan/markdown-tree-parser
7145
+ ## Primary Method: Automatic with markdown-tree
6952
7146
 
6953
- [[LLM: First, suggest the user install and use the @kayvan/markdown-tree-parser tool if the md-tree command is unavailable so we can have the best performance and reliable document sharding. Let the user know this will save cost of having the LLM to the expensive sharding operation. Give instructions for MPV NPX and PNPM global installs.]]
7147
+ [[LLM: First, check if markdownExploder is set to true in bmad-core/core-config.yml. If it is, attempt to run the command: `md-tree explode {input file} {output path}`.
7148
+
7149
+ If the command succeeds, inform the user that the document has been sharded successfully and STOP - do not proceed further.
7150
+
7151
+ If the command fails (especially with an error indicating the command is not found or not available), inform the user: "The markdownExploder setting is enabled but the md-tree command is not available. Please either:
7152
+
7153
+ 1. Install @kayvan/markdown-tree-parser globally with: `npm install -g @kayvan/markdown-tree-parser`
7154
+ 2. Or set markdownExploder to false in bmad-core/core-config.yml
7155
+
7156
+ **IMPORTANT: STOP HERE - do not proceed with manual sharding until one of the above actions is taken.**"
7157
+
7158
+ If markdownExploder is set to false, inform the user: "The markdownExploder setting is currently false. For better performance and reliability, you should:
7159
+
7160
+ 1. Set markdownExploder to true in bmad-core/core-config.yml
7161
+ 2. Install @kayvan/markdown-tree-parser globally with: `npm install -g @kayvan/markdown-tree-parser`
7162
+
7163
+ I will now proceed with the manual sharding process."
7164
+
7165
+ Then proceed with the manual method below ONLY if markdownExploder is false.]]
6954
7166
 
6955
7167
  ### Installation and Usage
6956
7168
 
@@ -6983,19 +7195,19 @@ If the user has @kayvan/markdown-tree-parser installed, use it and skip the manu
6983
7195
 
6984
7196
  ---
6985
7197
 
6986
- ## Manual Method (if @kayvan/markdown-tree-parser is not available)
7198
+ ## Manual Method (if @kayvan/markdown-tree-parser is not available or user indicated manual method)
6987
7199
 
6988
7200
  [[LLM: Only proceed with the manual instructions below if the user cannot or does not want to use @kayvan/markdown-tree-parser.]]
6989
7201
 
6990
7202
  ### Task Instructions
6991
7203
 
6992
- ### 1. Identify Document and Target Location
7204
+ 1. Identify Document and Target Location
6993
7205
 
6994
7206
  - Determine which document to shard (user-provided path)
6995
7207
  - Create a new folder under `docs/` with the same name as the document (without extension)
6996
7208
  - Example: `docs/prd.md` → create folder `docs/prd/`
6997
7209
 
6998
- ### 2. Parse and Extract Sections
7210
+ 2. Parse and Extract Sections
6999
7211
 
7000
7212
  [[LLM: When sharding the document:
7001
7213
 
@@ -7005,7 +7217,7 @@ If the user has @kayvan/markdown-tree-parser installed, use it and skip the manu
7005
7217
  - Extract the section heading and ALL content until the next level 2 section
7006
7218
  - Include all subsections, code blocks, diagrams, lists, tables, etc.
7007
7219
  - Be extremely careful with:
7008
- - Fenced code blocks (```) - ensure you capture the full block including closing backticks
7220
+ - Fenced code blocks (```) - ensure you capture the full block including closing backticks and account for potential misleading level 2's that are actually part of a fenced section example
7009
7221
  - Mermaid diagrams - preserve the complete diagram syntax
7010
7222
  - Nested markdown elements
7011
7223
  - Multi-line content that might contain ## inside code blocks
@@ -7024,7 +7236,7 @@ For each extracted section:
7024
7236
 
7025
7237
  2. **Adjust heading levels**:
7026
7238
 
7027
- - The level 2 heading becomes level 1 (# instead of ##)
7239
+ - The level 2 heading becomes level 1 (# instead of ##) in the sharded new document
7028
7240
  - All subsection levels decrease by 1:
7029
7241
 
7030
7242
  ```txt
@@ -8183,6 +8395,10 @@ Manual Test Steps: [[LLM: Include how if possible the user can manually test the
8183
8395
  [[LLM: (SM Agent) When Drafting Story, leave next prompt in place for dev agent to remove and update - remove this line to the SM]]
8184
8396
  [[LLM: (Dev Agent) Anything the SM needs to know that deviated from the story that might impact drafting the next story.]]
8185
8397
 
8398
+ ### File List
8399
+
8400
+ [[LLM: (Dev Agent) List every new file created, or existing file modified in a bullet list.]]
8401
+
8186
8402
  ### Change Log
8187
8403
 
8188
8404
  [[LLM: (SM Agent) When Drafting Story, leave next prompt in place for dev agent to remove and update- remove this line to the SM]]
@@ -8190,6 +8406,10 @@ Manual Test Steps: [[LLM: Include how if possible the user can manually test the
8190
8406
 
8191
8407
  | Date | Version | Description | Author |
8192
8408
  | :--- | :------ | :---------- | :----- |
8409
+
8410
+ ## QA Results
8411
+
8412
+ [[LLM: QA Agent Results]]
8193
8413
  ==================== END: templates#story-tmpl ====================
8194
8414
 
8195
8415
  ==================== START: checklists#po-master-checklist ====================
@@ -8636,6 +8856,144 @@ After presenting the report, ask if the user wants:
8636
8856
  - **REJECTED**: The plan requires significant revision to address critical deficiencies.
8637
8857
  ==================== END: checklists#po-master-checklist ====================
8638
8858
 
8859
+ ==================== START: tasks#review-story ====================
8860
+ # review-story
8861
+
8862
+ When a developer marks a story as "Ready for Review", perform a comprehensive senior developer code review with the ability to refactor and improve code directly.
8863
+
8864
+ [[LLM: QA Agent executing review-story task as Senior Developer]]
8865
+
8866
+ ## Prerequisites
8867
+
8868
+ - Story status must be "Review"
8869
+ - Developer has completed all tasks and updated the File List
8870
+ - All automated tests are passing
8871
+
8872
+ ## Review Process
8873
+
8874
+ 1. **Read the Complete Story**
8875
+ - Review all acceptance criteria
8876
+ - Understand the dev notes and requirements
8877
+ - Note any completion notes from the developer
8878
+
8879
+ 2. **Focus on the File List**
8880
+ - Verify all files listed were actually created/modified
8881
+ - Check for any missing files that should have been updated
8882
+
8883
+ 3. **Senior Developer Code Review**
8884
+ - Review code with the eye of a senior developer
8885
+ - If changes form a cohesive whole, review them together
8886
+ - If changes are independent, review incrementally file by file
8887
+ - Focus on:
8888
+ - Code architecture and design patterns
8889
+ - Refactoring opportunities
8890
+ - Code duplication or inefficiencies
8891
+ - Performance optimizations
8892
+ - Security concerns
8893
+ - Best practices and patterns
8894
+
8895
+ 4. **Active Refactoring**
8896
+ - As a senior developer, you CAN and SHOULD refactor code where improvements are needed
8897
+ - When refactoring:
8898
+ - Make the changes directly in the files
8899
+ - Explain WHY you're making the change
8900
+ - Describe HOW the change improves the code
8901
+ - Ensure all tests still pass after refactoring
8902
+ - Update the File List if you modify additional files
8903
+
8904
+ 5. **Standards Compliance Check**
8905
+ - Verify adherence to `docs/coding-standards.md`
8906
+ - Check compliance with `docs/unified-project-structure.md`
8907
+ - Validate testing approach against `docs/testing-strategy.md`
8908
+ - Ensure all guidelines mentioned in the story are followed
8909
+
8910
+ 6. **Acceptance Criteria Validation**
8911
+ - Verify each AC is fully implemented
8912
+ - Check for any missing functionality
8913
+ - Validate edge cases are handled
8914
+
8915
+ 7. **Test Coverage Review**
8916
+ - Ensure unit tests cover edge cases
8917
+ - Add missing tests if critical coverage is lacking
8918
+ - Verify integration tests (if required) are comprehensive
8919
+ - Check that test assertions are meaningful
8920
+ - Look for missing test scenarios
8921
+
8922
+ 8. **Documentation and Comments**
8923
+ - Verify code is self-documenting where possible
8924
+ - Add comments for complex logic if missing
8925
+ - Ensure any API changes are documented
8926
+
8927
+ ## Append Results to Story File
8928
+
8929
+ After review and any refactoring, append your results to the story file in the QA Results section:
8930
+
8931
+ ```markdown
8932
+ ## QA Results
8933
+
8934
+ ### Review Date: [Date]
8935
+ ### Reviewed By: Quinn (Senior Developer QA)
8936
+
8937
+ ### Code Quality Assessment
8938
+ [Overall assessment of implementation quality]
8939
+
8940
+ ### Refactoring Performed
8941
+ [List any refactoring you performed with explanations]
8942
+ - **File**: [filename]
8943
+ - **Change**: [what was changed]
8944
+ - **Why**: [reason for change]
8945
+ - **How**: [how it improves the code]
8946
+
8947
+ ### Compliance Check
8948
+ - Coding Standards: [✓/✗] [notes if any]
8949
+ - Project Structure: [✓/✗] [notes if any]
8950
+ - Testing Strategy: [✓/✗] [notes if any]
8951
+ - All ACs Met: [✓/✗] [notes if any]
8952
+
8953
+ ### Improvements Checklist
8954
+ [Check off items you handled yourself, leave unchecked for dev to address]
8955
+
8956
+ - [x] Refactored user service for better error handling (services/user.service.ts)
8957
+ - [x] Added missing edge case tests (services/user.service.test.ts)
8958
+ - [ ] Consider extracting validation logic to separate validator class
8959
+ - [ ] Add integration test for error scenarios
8960
+ - [ ] Update API documentation for new error codes
8961
+
8962
+ ### Security Review
8963
+ [Any security concerns found and whether addressed]
8964
+
8965
+ ### Performance Considerations
8966
+ [Any performance issues found and whether addressed]
8967
+
8968
+ ### Final Status
8969
+ [✓ Approved - Ready for Done] / [✗ Changes Required - See unchecked items above]
8970
+ ```
8971
+
8972
+ ## Key Principles
8973
+
8974
+ - You are a SENIOR developer reviewing junior/mid-level work
8975
+ - You have the authority and responsibility to improve code directly
8976
+ - Always explain your changes for learning purposes
8977
+ - Balance between perfection and pragmatism
8978
+ - Focus on significant improvements, not nitpicks
8979
+
8980
+ ## Blocking Conditions
8981
+
8982
+ Stop the review and request clarification if:
8983
+ - Story file is incomplete or missing critical sections
8984
+ - File List is empty or clearly incomplete
8985
+ - No tests exist when they were required
8986
+ - Code changes don't align with story requirements
8987
+ - Critical architectural issues that require discussion
8988
+
8989
+ ## Completion
8990
+
8991
+ After review:
8992
+ 1. If all items are checked and approved: Update story status to "Done"
8993
+ 2. If unchecked items remain: Keep status as "Review" for dev to address
8994
+ 3. Always provide constructive feedback and explanations for learning
8995
+ ==================== END: tasks#review-story ====================
8996
+
8639
8997
  ==================== START: tasks#create-next-story ====================
8640
8998
  # Create Next Story Task
8641
8999
 
@@ -9565,7 +9923,42 @@ workflow:
9565
9923
 
9566
9924
  - workflow_end:
9567
9925
  action: move_to_ide
9568
- notes: "All planning artifacts complete. Move to IDE environment to begin development. Explain to the user the IDE Development Workflow next steps: data#bmad-kb:IDE Development Workflow"
9926
+ notes: |
9927
+ Planning phase complete! Now transition to IDE Development:
9928
+
9929
+ 1. ENSURE DOCUMENTS ARE IN PROJECT:
9930
+ - Copy final prd.md to project's docs/prd.md
9931
+ - Copy final architecture.md to project's docs/architecture.md
9932
+ - All documents must be in the project before proceeding
9933
+
9934
+ 2. SHARD DOCUMENTS (in IDE):
9935
+ - Option A: Use PO agent to shard: @po then ask to shard docs/prd.md
9936
+ - Option B: Manual: Drag shard-doc task + docs/prd.md into chat
9937
+ - This creates docs/prd/ and docs/architecture/ folders with sharded content
9938
+
9939
+ 3. START DEVELOPMENT CYCLE:
9940
+ a. SM Agent (New Chat): @sm → *create
9941
+ - Creates next story from sharded docs
9942
+ - Review and approve story (Draft → Approved)
9943
+
9944
+ b. Dev Agent (New Chat): @dev
9945
+ - Implements approved story
9946
+ - Updates File List with all changes
9947
+ - Marks story as "Review" when complete
9948
+
9949
+ c. QA Agent (New Chat): @qa → review-story
9950
+ - Senior dev review with refactoring ability
9951
+ - Fixes small issues directly
9952
+ - Leaves checklist for remaining items
9953
+ - Updates story status (Review → Done or stays Review)
9954
+
9955
+ d. If QA left unchecked items:
9956
+ - Dev Agent (New Chat): Address remaining items
9957
+ - Return to QA for final approval
9958
+
9959
+ 4. REPEAT: Continue cycle for all epic stories
9960
+
9961
+ Reference: data#bmad-kb:IDE Development Workflow
9569
9962
 
9570
9963
  flow_diagram: |
9571
9964
  ```mermaid
@@ -9646,7 +10039,42 @@ workflow:
9646
10039
 
9647
10040
  - workflow_end:
9648
10041
  action: move_to_ide
9649
- notes: "All planning artifacts complete. Move to IDE environment to begin development. Explain to the user the IDE Development Workflow next steps: data#bmad-kb:IDE Development Workflow"
10042
+ notes: |
10043
+ Planning phase complete! Now transition to IDE Development:
10044
+
10045
+ 1. ENSURE DOCUMENTS ARE IN PROJECT:
10046
+ - Copy final prd.md to project's docs/prd.md
10047
+ - Copy final architecture.md to project's docs/architecture.md
10048
+ - All documents must be in the project before proceeding
10049
+
10050
+ 2. SHARD DOCUMENTS (in IDE):
10051
+ - Option A: Use PO agent to shard: @po then ask to shard docs/prd.md
10052
+ - Option B: Manual: Drag shard-doc task + docs/prd.md into chat
10053
+ - This creates docs/prd/ and docs/architecture/ folders with sharded content
10054
+
10055
+ 3. START DEVELOPMENT CYCLE:
10056
+ a. SM Agent (New Chat): @sm → *create
10057
+ - Creates next story from sharded docs
10058
+ - Review and approve story (Draft → Approved)
10059
+
10060
+ b. Dev Agent (New Chat): @dev
10061
+ - Implements approved story
10062
+ - Updates File List with all changes
10063
+ - Marks story as "Review" when complete
10064
+
10065
+ c. QA Agent (New Chat): @qa → review-story
10066
+ - Senior dev review with refactoring ability
10067
+ - Fixes small issues directly
10068
+ - Leaves checklist for remaining items
10069
+ - Updates story status (Review → Done or stays Review)
10070
+
10071
+ d. If QA left unchecked items:
10072
+ - Dev Agent (New Chat): Address remaining items
10073
+ - Return to QA for final approval
10074
+
10075
+ 4. REPEAT: Continue cycle for all epic stories
10076
+
10077
+ Reference: data#bmad-kb:IDE Development Workflow
9650
10078
 
9651
10079
  flow_diagram: |
9652
10080
  ```mermaid
@@ -9734,7 +10162,42 @@ workflow:
9734
10162
 
9735
10163
  - workflow_end:
9736
10164
  action: move_to_ide
9737
- notes: "All planning artifacts complete. Move to IDE environment to begin development. Explain to the user the IDE Development Workflow next steps: data#bmad-kb:IDE Development Workflow"
10165
+ notes: |
10166
+ Planning phase complete! Now transition to IDE Development:
10167
+
10168
+ 1. ENSURE DOCUMENTS ARE IN PROJECT:
10169
+ - Copy final prd.md to project's docs/prd.md
10170
+ - Copy final architecture.md to project's docs/architecture.md
10171
+ - All documents must be in the project before proceeding
10172
+
10173
+ 2. SHARD DOCUMENTS (in IDE):
10174
+ - Option A: Use PO agent to shard: @po then ask to shard docs/prd.md
10175
+ - Option B: Manual: Drag shard-doc task + docs/prd.md into chat
10176
+ - This creates docs/prd/ and docs/architecture/ folders with sharded content
10177
+
10178
+ 3. START DEVELOPMENT CYCLE:
10179
+ a. SM Agent (New Chat): @sm → *create
10180
+ - Creates next story from sharded docs
10181
+ - Review and approve story (Draft → Approved)
10182
+
10183
+ b. Dev Agent (New Chat): @dev
10184
+ - Implements approved story
10185
+ - Updates File List with all changes
10186
+ - Marks story as "Review" when complete
10187
+
10188
+ c. QA Agent (New Chat): @qa → review-story
10189
+ - Senior dev review with refactoring ability
10190
+ - Fixes small issues directly
10191
+ - Leaves checklist for remaining items
10192
+ - Updates story status (Review → Done or stays Review)
10193
+
10194
+ d. If QA left unchecked items:
10195
+ - Dev Agent (New Chat): Address remaining items
10196
+ - Return to QA for final approval
10197
+
10198
+ 4. REPEAT: Continue cycle for all epic stories
10199
+
10200
+ Reference: data#bmad-kb:IDE Development Workflow
9738
10201
 
9739
10202
  flow_diagram: |
9740
10203
  ```mermaid
@@ -9850,7 +10313,42 @@ workflow:
9850
10313
 
9851
10314
  - workflow_end:
9852
10315
  action: move_to_ide
9853
- notes: "All planning artifacts complete. Move to IDE environment to begin development. Explain to the user the IDE Development Workflow next steps: data#bmad-kb:IDE Development Workflow"
10316
+ notes: |
10317
+ Planning phase complete! Now transition to IDE Development:
10318
+
10319
+ 1. ENSURE DOCUMENTS ARE IN PROJECT:
10320
+ - Copy final prd.md to project's docs/prd.md
10321
+ - Copy final architecture.md to project's docs/architecture.md
10322
+ - All documents must be in the project before proceeding
10323
+
10324
+ 2. SHARD DOCUMENTS (in IDE):
10325
+ - Option A: Use PO agent to shard: @po then ask to shard docs/prd.md
10326
+ - Option B: Manual: Drag shard-doc task + docs/prd.md into chat
10327
+ - This creates docs/prd/ and docs/architecture/ folders with sharded content
10328
+
10329
+ 3. START DEVELOPMENT CYCLE:
10330
+ a. SM Agent (New Chat): @sm → *create
10331
+ - Creates next story from sharded docs
10332
+ - Review and approve story (Draft → Approved)
10333
+
10334
+ b. Dev Agent (New Chat): @dev
10335
+ - Implements approved story
10336
+ - Updates File List with all changes
10337
+ - Marks story as "Review" when complete
10338
+
10339
+ c. QA Agent (New Chat): @qa → review-story
10340
+ - Senior dev review with refactoring ability
10341
+ - Fixes small issues directly
10342
+ - Leaves checklist for remaining items
10343
+ - Updates story status (Review → Done or stays Review)
10344
+
10345
+ d. If QA left unchecked items:
10346
+ - Dev Agent (New Chat): Address remaining items
10347
+ - Return to QA for final approval
10348
+
10349
+ 4. REPEAT: Continue cycle for all epic stories
10350
+
10351
+ Reference: data#bmad-kb:IDE Development Workflow
9854
10352
 
9855
10353
  flow_diagram: |
9856
10354
  ```mermaid
@@ -9960,7 +10458,42 @@ workflow:
9960
10458
 
9961
10459
  - workflow_end:
9962
10460
  action: move_to_ide
9963
- notes: "All planning artifacts complete. Move to IDE environment to begin development. Explain to the user the IDE Development Workflow next steps: data#bmad-kb:IDE Development Workflow"
10461
+ notes: |
10462
+ Planning phase complete! Now transition to IDE Development:
10463
+
10464
+ 1. ENSURE DOCUMENTS ARE IN PROJECT:
10465
+ - Copy final prd.md to project's docs/prd.md
10466
+ - Copy final architecture.md to project's docs/architecture.md
10467
+ - All documents must be in the project before proceeding
10468
+
10469
+ 2. SHARD DOCUMENTS (in IDE):
10470
+ - Option A: Use PO agent to shard: @po then ask to shard docs/prd.md
10471
+ - Option B: Manual: Drag shard-doc task + docs/prd.md into chat
10472
+ - This creates docs/prd/ and docs/architecture/ folders with sharded content
10473
+
10474
+ 3. START DEVELOPMENT CYCLE:
10475
+ a. SM Agent (New Chat): @sm → *create
10476
+ - Creates next story from sharded docs
10477
+ - Review and approve story (Draft → Approved)
10478
+
10479
+ b. Dev Agent (New Chat): @dev
10480
+ - Implements approved story
10481
+ - Updates File List with all changes
10482
+ - Marks story as "Review" when complete
10483
+
10484
+ c. QA Agent (New Chat): @qa → review-story
10485
+ - Senior dev review with refactoring ability
10486
+ - Fixes small issues directly
10487
+ - Leaves checklist for remaining items
10488
+ - Updates story status (Review → Done or stays Review)
10489
+
10490
+ d. If QA left unchecked items:
10491
+ - Dev Agent (New Chat): Address remaining items
10492
+ - Return to QA for final approval
10493
+
10494
+ 4. REPEAT: Continue cycle for all epic stories
10495
+
10496
+ Reference: data#bmad-kb:IDE Development Workflow
9964
10497
 
9965
10498
  flow_diagram: |
9966
10499
  ```mermaid
@@ -10079,7 +10612,42 @@ workflow:
10079
10612
 
10080
10613
  - workflow_end:
10081
10614
  action: move_to_ide
10082
- notes: "All planning artifacts complete. Move to IDE environment to begin development. Explain to the user the IDE Development Workflow next steps: data#bmad-kb:IDE Development Workflow"
10615
+ notes: |
10616
+ Planning phase complete! Now transition to IDE Development:
10617
+
10618
+ 1. ENSURE DOCUMENTS ARE IN PROJECT:
10619
+ - Copy final prd.md to project's docs/prd.md
10620
+ - Copy final architecture.md to project's docs/architecture.md
10621
+ - All documents must be in the project before proceeding
10622
+
10623
+ 2. SHARD DOCUMENTS (in IDE):
10624
+ - Option A: Use PO agent to shard: @po then ask to shard docs/prd.md
10625
+ - Option B: Manual: Drag shard-doc task + docs/prd.md into chat
10626
+ - This creates docs/prd/ and docs/architecture/ folders with sharded content
10627
+
10628
+ 3. START DEVELOPMENT CYCLE:
10629
+ a. SM Agent (New Chat): @sm → *create
10630
+ - Creates next story from sharded docs
10631
+ - Review and approve story (Draft → Approved)
10632
+
10633
+ b. Dev Agent (New Chat): @dev
10634
+ - Implements approved story
10635
+ - Updates File List with all changes
10636
+ - Marks story as "Review" when complete
10637
+
10638
+ c. QA Agent (New Chat): @qa → review-story
10639
+ - Senior dev review with refactoring ability
10640
+ - Fixes small issues directly
10641
+ - Leaves checklist for remaining items
10642
+ - Updates story status (Review → Done or stays Review)
10643
+
10644
+ d. If QA left unchecked items:
10645
+ - Dev Agent (New Chat): Address remaining items
10646
+ - Return to QA for final approval
10647
+
10648
+ 4. REPEAT: Continue cycle for all epic stories
10649
+
10650
+ Reference: data#bmad-kb:IDE Development Workflow
10083
10651
 
10084
10652
  flow_diagram: |
10085
10653
  ```mermaid