bmad-method 4.23.0 → 4.24.0

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 (36) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +1 -1
  3. package/bmad-core/agents/bmad-master.md +14 -1
  4. package/bmad-core/agents/bmad-orchestrator.md +14 -0
  5. package/bmad-core/core-config.yml +5 -0
  6. package/bmad-core/tasks/create-brownfield-story.md +355 -0
  7. package/bmad-core/tasks/create-next-story.md +25 -0
  8. package/bmad-core/tasks/create-workflow-plan.md +289 -0
  9. package/bmad-core/tasks/update-workflow-plan.md +248 -0
  10. package/bmad-core/templates/brownfield-prd-tmpl.md +52 -28
  11. package/bmad-core/utils/plan-management.md +223 -0
  12. package/bmad-core/workflows/brownfield-fullstack.yml +240 -55
  13. package/bmad-core/workflows/brownfield-service.yml +110 -36
  14. package/bmad-core/workflows/brownfield-ui.yml +110 -36
  15. package/bmad-core/workflows/greenfield-fullstack.yml +110 -36
  16. package/bmad-core/workflows/greenfield-service.yml +110 -36
  17. package/bmad-core/workflows/greenfield-ui.yml +110 -36
  18. package/common/tasks/create-doc.md +21 -1
  19. package/dist/agents/analyst.txt +23 -1
  20. package/dist/agents/architect.txt +21 -1
  21. package/dist/agents/bmad-master.txt +883 -30
  22. package/dist/agents/bmad-orchestrator.txt +806 -1
  23. package/dist/agents/pm.txt +73 -29
  24. package/dist/agents/sm.txt +25 -0
  25. package/dist/agents/ux-expert.txt +21 -1
  26. package/dist/expansion-packs/bmad-2d-phaser-game-dev/agents/game-designer.txt +21 -1
  27. package/dist/expansion-packs/bmad-2d-phaser-game-dev/teams/phaser-2d-nodejs-game-team.txt +804 -1
  28. package/dist/expansion-packs/bmad-infrastructure-devops/agents/infra-devops-platform.txt +21 -1
  29. package/dist/teams/team-all.txt +1675 -266
  30. package/dist/teams/team-fullstack.txt +1650 -266
  31. package/dist/teams/team-ide-minimal.txt +831 -1
  32. package/dist/teams/team-no-ui.txt +1079 -102
  33. package/package.json +1 -1
  34. package/tools/installer/lib/installer.js +2 -12
  35. package/tools/installer/package.json +1 -1
  36. package/tools/lib/dependency-resolver.js +2 -2
@@ -90,6 +90,9 @@ startup:
90
90
  - Announce: Introduce yourself as the BMAD Orchestrator, explain you can coordinate agents and workflows
91
91
  - IMPORTANT: Tell users that all commands start with * (e.g., *help, *agent, *workflow)
92
92
  - Mention *help shows all available commands and options
93
+ - Check for active workflow plan using utils#plan-management
94
+ - 'If plan exists: Show 📋 Active plan: {workflow} ({progress}% complete). Use *plan-status for details.'
95
+ - 'If plan exists: Suggest next action based on plan progress'
93
96
  - Assess user goal against available agents and workflows in this bundle
94
97
  - If clear match to an agent's expertise, suggest transformation with *agent command
95
98
  - If project-oriented, suggest *workflow-guidance to explore options
@@ -104,6 +107,9 @@ commands:
104
107
  task: Run a specific task (list if name not specified)
105
108
  workflow: Start a specific workflow (list if name not specified)
106
109
  workflow-guidance: Get personalized help selecting the right workflow
110
+ plan: Create detailed workflow plan before starting
111
+ plan-status: Show current workflow plan progress
112
+ plan-update: Update workflow plan status
107
113
  checklist: Execute a checklist (list if name not specified)
108
114
  yolo: Toggle skip confirmations mode
109
115
  party-mode: Group chat with all agents
@@ -127,6 +133,9 @@ help-display-template: |
127
133
  Workflow Commands:
128
134
  *workflow [name] .... Start specific workflow (list if no name)
129
135
  *workflow-guidance .. Get personalized help selecting the right workflow
136
+ *plan ............... Create detailed workflow plan before starting
137
+ *plan-status ........ Show current workflow plan progress
138
+ *plan-update ........ Update workflow plan status
130
139
 
131
140
  Other Commands:
132
141
  *yolo ............... Toggle skip confirmations mode
@@ -167,6 +176,8 @@ workflow-guidance:
167
176
  - Understand each workflow's purpose, options, and decision points
168
177
  - Ask clarifying questions based on the workflow's structure
169
178
  - Guide users through workflow selection when multiple options exist
179
+ - For complex projects, offer to create a workflow plan using create-workflow-plan task
180
+ - When appropriate, suggest: Would you like me to create a detailed workflow plan before starting?
170
181
  - For workflows with divergent paths, help users choose the right path
171
182
  - Adapt questions to the specific domain (e.g., game dev vs infrastructure vs web dev)
172
183
  - Only recommend workflows that actually exist in the current bundle
@@ -175,10 +186,13 @@ dependencies:
175
186
  tasks:
176
187
  - advanced-elicitation
177
188
  - create-doc
189
+ - create-workflow-plan
178
190
  - kb-mode-interaction
191
+ - update-workflow-plan
179
192
  data:
180
193
  - bmad-kb
181
194
  utils:
195
+ - plan-management
182
196
  - workflow-management
183
197
  - template-format
184
198
  ```
@@ -610,11 +624,22 @@ Generate documents from templates by EXECUTING (not just reading) embedded instr
610
624
 
611
625
  ## Execution Flow
612
626
 
627
+ ### 0. Check Workflow Plan (if configured)
628
+
629
+ [[LLM: Check if plan tracking is enabled in core-config.yml]]
630
+
631
+ - If `workflow.trackProgress: true`, check for active plan using utils#plan-management
632
+ - If plan exists and this document creation is part of the plan:
633
+ - Verify this is the expected next step
634
+ - If out of sequence and `enforceSequence: true`, warn user and halt without user override
635
+ - If out of sequence and `enforceSequence: false`, ask for confirmation
636
+ - Continue with normal execution after plan check
637
+
613
638
  ### 1. Identify Template
614
639
 
615
640
  - Load from `templates#*` or `{root}/templates directory`
616
641
  - Agent-specific templates are listed in agent's dependencies
617
- - If agent has `templates: [prd-tmpl, architecture-tmpl]`, offer to create "PRD" and "Architecture" documents
642
+ - If agent has `templates: [prd-tmpl, architecture-tmpl]` for example, then offer to create "PRD" and "Architecture" documents
618
643
 
619
644
  ### 2. Ask Interaction Mode
620
645
 
@@ -651,6 +676,15 @@ Generate documents from templates by EXECUTING (not just reading) embedded instr
651
676
  - Begin directly with content (no preamble)
652
677
  - Include any handoff prompts from template
653
678
 
679
+ ### 6. Update Workflow Plan (if applicable)
680
+
681
+ [[LLM: After successful document creation]]
682
+
683
+ - If plan tracking is enabled and document was part of plan:
684
+ - Call update-workflow-plan task to mark step complete
685
+ - Parameters: task: create-doc, step_id: {from plan}, status: complete
686
+ - Show next recommended step from plan
687
+
654
688
  ## Common Mistakes to Avoid
655
689
 
656
690
  ❌ Skipping elicitation tasks
@@ -668,6 +702,298 @@ Generate documents from templates by EXECUTING (not just reading) embedded instr
668
702
  Templates contain precise instructions for a reason. Follow them exactly to ensure document quality and completeness.
669
703
  ==================== END: tasks#create-doc ====================
670
704
 
705
+ ==================== START: tasks#create-workflow-plan ====================
706
+ # Create Workflow Plan Task
707
+
708
+ ## Purpose
709
+
710
+ Guide users through workflow selection and create a detailed plan document that outlines the selected workflow steps, decision points, and expected outputs. This task helps users understand what will happen before starting a complex workflow and provides a checklist to track progress.
711
+
712
+ ## Task Instructions
713
+
714
+ ### 1. Understand User's Goal
715
+
716
+ [[LLM: Start with discovery questions to understand what the user wants to accomplish]]
717
+
718
+ Ask the user:
719
+
720
+ 1. **Project Type**:
721
+ - Are you starting a new project (greenfield) or enhancing an existing one (brownfield)?
722
+ - What type of application? (web app, service/API, UI only, full-stack)
723
+
724
+ 2. **For Greenfield**:
725
+ - Do you need a quick prototype or production-ready application?
726
+ - Will this have a UI component?
727
+ - Single service or multiple services?
728
+
729
+ 3. **For Brownfield**:
730
+ - What's the scope of the enhancement?
731
+ - Single bug fix or small feature (few hours)
732
+ - Small enhancement (1-3 stories)
733
+ - Major feature requiring coordination
734
+ - Architectural changes or modernization
735
+ - Do you have existing documentation?
736
+ - Are you following existing patterns or introducing new ones?
737
+
738
+ ### 2. Recommend Appropriate Workflow
739
+
740
+ Based on the answers, recommend:
741
+
742
+ **Greenfield Options:**
743
+
744
+ - `greenfield-fullstack` - Complete web application
745
+ - `greenfield-service` - Backend API/service only
746
+ - `greenfield-ui` - Frontend only
747
+
748
+ **Brownfield Options:**
749
+
750
+ - `brownfield-create-story` - Single small change
751
+ - `brownfield-create-epic` - Small feature (1-3 stories)
752
+ - `brownfield-fullstack` - Major enhancement
753
+
754
+ **Simplified Option:**
755
+
756
+ - For users unsure or wanting flexibility, suggest starting with individual agent tasks
757
+
758
+ ### 3. Explain Selected Workflow
759
+
760
+ [[LLM: Once workflow is selected, provide clear explanation]]
761
+
762
+ For the selected workflow, explain:
763
+
764
+ 1. **Overview**: What this workflow accomplishes
765
+ 2. **Duration**: Estimated time for planning phase
766
+ 3. **Outputs**: What documents will be created
767
+ 4. **Decision Points**: Where user input will be needed
768
+ 5. **Requirements**: What information should be ready
769
+
770
+ ### 4. Create Workflow Plan Document
771
+
772
+ [[LLM: Generate a comprehensive plan document with the following structure]]
773
+
774
+ ```markdown
775
+ # Workflow Plan: {{Workflow Name}}
776
+
777
+ <!-- WORKFLOW-PLAN-META
778
+ workflow-id: {{workflow-id}}
779
+ status: active
780
+ created: {{ISO-8601 timestamp}}
781
+ updated: {{ISO-8601 timestamp}}
782
+ version: 1.0
783
+ -->
784
+
785
+ **Created Date**: {{current date}}
786
+ **Project**: {{project name}}
787
+ **Type**: {{greenfield/brownfield}}
788
+ **Status**: Active
789
+ **Estimated Planning Duration**: {{time estimate}}
790
+
791
+ ## Objective
792
+
793
+ {{Clear description of what will be accomplished}}
794
+
795
+ ## Selected Workflow
796
+
797
+ **Workflow**: `{{workflow-id}}`
798
+ **Reason**: {{Why this workflow fits the user's needs}}
799
+
800
+ ## Workflow Steps
801
+
802
+ ### Planning Phase
803
+
804
+ - [ ] Step 1: {{step name}} <!-- step-id: 1.1, agent: {{agent}}, task: {{task}} -->
805
+ - **Agent**: {{agent name}}
806
+ - **Action**: {{what happens}}
807
+ - **Output**: {{what's created}}
808
+ - **User Input**: {{if any}}
809
+
810
+ - [ ] Step 2: {{step name}} <!-- step-id: 1.2, agent: {{agent}}, task: {{task}} -->
811
+ - **Agent**: {{agent name}}
812
+ - **Action**: {{what happens}}
813
+ - **Output**: {{what's created}}
814
+ - **Decision Point**: {{if any}} <!-- decision-id: D1 -->
815
+
816
+ {{Continue for all planning steps}}
817
+
818
+ ### Development Phase (IDE)
819
+
820
+ - [ ] Document Sharding <!-- step-id: 2.1, agent: po, task: shard-doc -->
821
+ - Prepare documents for story creation
822
+
823
+ - [ ] Story Development Cycle <!-- step-id: 2.2, repeats: true -->
824
+ - [ ] Create story (SM agent) <!-- step-id: 2.2.1, agent: sm, task: create-next-story -->
825
+ - [ ] Review story (optional) <!-- step-id: 2.2.2, agent: analyst, optional: true -->
826
+ - [ ] Implement story (Dev agent) <!-- step-id: 2.2.3, agent: dev -->
827
+ - [ ] QA review (optional) <!-- step-id: 2.2.4, agent: qa, optional: true -->
828
+ - [ ] Repeat for all stories
829
+
830
+ - [ ] Epic Retrospective (optional) <!-- step-id: 2.3, agent: po, optional: true -->
831
+
832
+ ## Key Decision Points
833
+
834
+ 1. **{{Decision Name}}** (Step {{n}}): <!-- decision-id: D1, status: pending -->
835
+ - Trigger: {{what causes this decision}}
836
+ - Options: {{available choices}}
837
+ - Impact: {{how it affects the workflow}}
838
+ - Decision Made: _Pending_
839
+
840
+ {{List all decision points}}
841
+
842
+ ## Expected Outputs
843
+
844
+ ### Planning Documents
845
+ - [ ] {{document 1}} - {{description}}
846
+ - [ ] {{document 2}} - {{description}}
847
+ {{etc...}}
848
+
849
+ ### Development Artifacts
850
+ - [ ] Stories in `docs/stories/`
851
+ - [ ] Implementation code
852
+ - [ ] Tests
853
+ - [ ] Updated documentation
854
+
855
+ ## Prerequisites Checklist
856
+
857
+ Before starting this workflow, ensure you have:
858
+
859
+ - [ ] {{prerequisite 1}}
860
+ - [ ] {{prerequisite 2}}
861
+ - [ ] {{prerequisite 3}}
862
+ {{etc...}}
863
+
864
+ ## Customization Options
865
+
866
+ Based on your project needs, you may:
867
+ - Skip {{optional step}} if {{condition}}
868
+ - Add {{additional step}} if {{condition}}
869
+ - Choose {{alternative}} instead of {{default}}
870
+
871
+ ## Risk Considerations
872
+
873
+ {{For brownfield only}}
874
+ - Integration complexity: {{assessment}}
875
+ - Rollback strategy: {{approach}}
876
+ - Testing requirements: {{special needs}}
877
+
878
+ ## Next Steps
879
+
880
+ 1. Review this plan and confirm it matches your expectations
881
+ 2. Gather any missing prerequisites
882
+ 3. Start workflow with: `*task workflow {{workflow-id}}`
883
+ 4. Or begin with first agent: `@{{first-agent}}`
884
+
885
+ ## Notes
886
+
887
+ {{Any additional context or warnings}}
888
+
889
+ ---
890
+ *This plan can be updated as you progress through the workflow. Check off completed items to track progress.*
891
+ ```
892
+
893
+ ### 5. Save and Present Plan
894
+
895
+ 1. Save the plan as `docs/workflow-plan.md`
896
+ 2. Inform user: "Workflow plan created at docs/workflow-plan.md"
897
+ 3. Offer options:
898
+ - Review the plan together
899
+ - Start the workflow now
900
+ - Gather prerequisites first
901
+ - Modify the plan
902
+
903
+ ### 6. Plan Variations
904
+
905
+ [[LLM: Adjust plan detail based on workflow complexity]]
906
+
907
+ **For Simple Workflows** (create-story, create-epic):
908
+
909
+ - Simpler checklist format
910
+ - Focus on immediate next steps
911
+ - Less detailed explanations
912
+
913
+ **For Complex Workflows** (full greenfield/brownfield):
914
+
915
+ - Detailed step breakdowns
916
+ - All decision points documented
917
+ - Comprehensive output descriptions
918
+ - Risk mitigation sections
919
+
920
+ **For Brownfield Workflows**:
921
+
922
+ - Include existing system impact analysis
923
+ - Document integration checkpoints
924
+ - Add rollback considerations
925
+ - Note documentation dependencies
926
+
927
+ ### 7. Interactive Planning Mode
928
+
929
+ [[LLM: If user wants to customize the workflow]]
930
+
931
+ If user wants to modify the standard workflow:
932
+
933
+ 1. Present workflow steps as options
934
+ 2. Allow skipping optional steps
935
+ 3. Let user reorder certain steps
936
+ 4. Document customizations in plan
937
+ 5. Warn about dependencies if steps are skipped
938
+
939
+ ### 8. Execution Guidance
940
+
941
+ After plan is created, provide clear guidance:
942
+
943
+ ```text
944
+ Your workflow plan is ready! Here's how to proceed:
945
+
946
+ 1. **Review the plan**: Check that all steps align with your goals
947
+ 2. **Gather prerequisites**: Use the checklist to ensure you're ready
948
+ 3. **Start execution**:
949
+ - Full workflow: `*task workflow {{workflow-id}}`
950
+ - Step by step: Start with `@{{first-agent}}`
951
+ 4. **Track progress**: Check off steps in the plan as completed
952
+
953
+ Would you like to:
954
+ a) Review the plan together
955
+ b) Start the workflow now
956
+ c) Gather prerequisites first
957
+ d) Modify the plan
958
+ ```
959
+
960
+ ## Success Criteria
961
+
962
+ The workflow plan is successful when:
963
+
964
+ 1. User clearly understands what will happen
965
+ 2. All decision points are documented
966
+ 3. Prerequisites are identified
967
+ 4. Expected outputs are clear
968
+ 5. User feels confident to proceed
969
+ 6. Plan serves as useful progress tracker
970
+
971
+ ## Integration with BMad Master and Orchestrator
972
+
973
+ When used by BMad Master or BMad Orchestrator, this task should:
974
+
975
+ 1. Be offered when user asks about workflows
976
+ 2. Be suggested before starting complex workflows
977
+ 3. Create a plan that the agent can reference during execution
978
+ 4. Allow the agent to track progress against the plan
979
+
980
+ ## Example Usage
981
+
982
+ ```text
983
+ User: "I need to add a payment system to my existing app"
984
+
985
+ BMad Orchestrator: "Let me help you create a workflow plan for that enhancement. I'll ask a few questions to recommend the best approach..."
986
+
987
+ [Runs through discovery questions]
988
+
989
+ BMad Orchestrator: "Based on your answers, I recommend the brownfield-fullstack workflow. Let me create a detailed plan for you..."
990
+
991
+ [Creates and saves plan]
992
+
993
+ BMad Orchestrator: "I've created a workflow plan at docs/workflow-plan.md. This shows all the steps we'll go through, what documents will be created, and where you'll need to make decisions. Would you like to review it together?"
994
+ ```
995
+ ==================== END: tasks#create-workflow-plan ====================
996
+
671
997
  ==================== START: tasks#kb-mode-interaction ====================
672
998
  # KB Mode Interaction Task
673
999
 
@@ -741,6 +1067,257 @@ Or ask me about anything else related to BMAD-METHOD!
741
1067
  **Assistant**: [Provides focused information about workflows from the KB, then offers to explore specific workflow types or related topics]
742
1068
  ==================== END: tasks#kb-mode-interaction ====================
743
1069
 
1070
+ ==================== START: tasks#update-workflow-plan ====================
1071
+ # Update Workflow Plan Task
1072
+
1073
+ ## Purpose
1074
+
1075
+ Update the status of steps in an active workflow plan, mark completions, add notes about deviations, and maintain an accurate record of workflow progress. This task can be called directly by users or automatically by other tasks upon completion.
1076
+
1077
+ ## Task Instructions
1078
+
1079
+ ### 0. Load Plan Configuration
1080
+
1081
+ [[LLM: First load core-config.yml to get plan settings]]
1082
+
1083
+ Check workflow configuration:
1084
+
1085
+ - `workflow.planFile` - Location of the plan (default: docs/workflow-plan.md)
1086
+ - `workflow.trackProgress` - Whether tracking is enabled
1087
+ - `workflow.updateOnCompletion` - Whether to auto-update on task completion
1088
+
1089
+ If tracking is disabled, inform user and exit.
1090
+
1091
+ ### 1. Verify Plan Exists
1092
+
1093
+ [[LLM: Check if workflow plan exists at configured location]]
1094
+
1095
+ If no plan exists:
1096
+
1097
+ ```
1098
+ No active workflow plan found at {location}.
1099
+ Would you like to create one? Use *plan command.
1100
+ ```
1101
+
1102
+ ### 2. Determine Update Type
1103
+
1104
+ [[LLM: Ask user what type of update they want to make]]
1105
+
1106
+ Present options:
1107
+
1108
+ ```
1109
+ What would you like to update in the workflow plan?
1110
+
1111
+ 1. Mark step as complete
1112
+ 2. Update current step
1113
+ 3. Add deviation note
1114
+ 4. Mark decision point resolution
1115
+ 5. Update overall status
1116
+ 6. View current plan status only
1117
+
1118
+ Please select an option (1-6):
1119
+ ```
1120
+
1121
+ ### 3. Parse Current Plan
1122
+
1123
+ [[LLM: Read and parse the plan to understand current state]]
1124
+
1125
+ Extract:
1126
+
1127
+ - All steps with their checkbox status
1128
+ - Step IDs from comments (if present)
1129
+ - Current completion percentage
1130
+ - Any existing deviation notes
1131
+ - Decision points and their status
1132
+
1133
+ ### 4. Execute Updates
1134
+
1135
+ #### 4.1 Mark Step Complete
1136
+
1137
+ If user selected option 1:
1138
+
1139
+ 1. Show numbered list of incomplete steps
1140
+ 2. Ask which step to mark complete
1141
+ 3. Update the checkbox from `[ ]` to `[x]`
1142
+ 4. Add completion timestamp: `<!-- completed: YYYY-MM-DD HH:MM -->`
1143
+ 5. If this was the current step, identify next step
1144
+
1145
+ #### 4.2 Update Current Step
1146
+
1147
+ If user selected option 2:
1148
+
1149
+ 1. Show all steps with current status
1150
+ 2. Ask which step is now current
1151
+ 3. Add/move `<!-- current-step -->` marker
1152
+ 4. Optionally add note about why sequence changed
1153
+
1154
+ #### 4.3 Add Deviation Note
1155
+
1156
+ If user selected option 3:
1157
+
1158
+ 1. Ask for deviation description
1159
+ 2. Ask which step this relates to (or general)
1160
+ 3. Insert note in appropriate location:
1161
+
1162
+ ```markdown
1163
+ > **Deviation Note** (YYYY-MM-DD): {user_note}
1164
+ > Related to: Step X.Y or General workflow
1165
+ ```
1166
+
1167
+ #### 4.4 Mark Decision Resolution
1168
+
1169
+ If user selected option 4:
1170
+
1171
+ 1. Show pending decision points
1172
+ 2. Ask which decision was made
1173
+ 3. Record the decision and chosen path
1174
+ 4. Update related steps based on decision
1175
+
1176
+ #### 4.5 Update Overall Status
1177
+
1178
+ If user selected option 5:
1179
+
1180
+ 1. Show current overall status
1181
+ 2. Provide options:
1182
+ - Active (continuing with plan)
1183
+ - Paused (temporarily stopped)
1184
+ - Abandoned (no longer following)
1185
+ - Complete (all steps done)
1186
+ 3. Update plan header with new status
1187
+
1188
+ ### 5. Automatic Updates (When Called by Tasks)
1189
+
1190
+ [[LLM: When called automatically by another task]]
1191
+
1192
+ If called with parameters:
1193
+
1194
+ ```
1195
+ task: {task_name}
1196
+ step_id: {step_identifier}
1197
+ status: complete|skipped|failed
1198
+ note: {optional_note}
1199
+ ```
1200
+
1201
+ Automatically:
1202
+
1203
+ 1. Find the corresponding step
1204
+ 2. Update its status
1205
+ 3. Add completion metadata
1206
+ 4. Add note if provided
1207
+ 5. Calculate new progress percentage
1208
+
1209
+ ### 6. Generate Update Summary
1210
+
1211
+ After updates, show summary:
1212
+
1213
+ ```
1214
+ ✅ Workflow Plan Updated
1215
+
1216
+ Changes made:
1217
+ - {change_1}
1218
+ - {change_2}
1219
+
1220
+ New Status:
1221
+ - Progress: {X}% complete ({completed}/{total} steps)
1222
+ - Current Step: {current_step}
1223
+ - Next Recommended: {next_step}
1224
+
1225
+ Plan location: {file_path}
1226
+ ```
1227
+
1228
+ ### 7. Integration with Other Tasks
1229
+
1230
+ [[LLM: How other tasks should call this]]
1231
+
1232
+ Other tasks can integrate by:
1233
+
1234
+ 1. **After Task Completion**:
1235
+
1236
+ ```
1237
+ At end of task execution:
1238
+ - Check if task corresponds to a plan step
1239
+ - If yes, call update-workflow-plan with:
1240
+ - task: {current_task_name}
1241
+ - step_id: {matching_step}
1242
+ - status: complete
1243
+ ```
1244
+
1245
+ 2. **On Task Failure**:
1246
+
1247
+ ```
1248
+ If task fails:
1249
+ - Call update-workflow-plan with:
1250
+ - task: {current_task_name}
1251
+ - status: failed
1252
+ - note: {failure_reason}
1253
+ ```
1254
+
1255
+ ### 8. Plan Status Display
1256
+
1257
+ [[LLM: When user selects view status only]]
1258
+
1259
+ Display comprehensive status:
1260
+
1261
+ ```markdown
1262
+ 📋 Workflow Plan Status
1263
+ ━━━━━━━━━━━━━━━━━━━━
1264
+ Workflow: {workflow_name}
1265
+ Status: {Active|Paused|Complete}
1266
+ Progress: {X}% complete ({completed}/{total} steps)
1267
+ Last Updated: {timestamp}
1268
+
1269
+ ✅ Completed Steps:
1270
+ - [x] Step 1.1: {description} (completed: {date})
1271
+ - [x] Step 1.2: {description} (completed: {date})
1272
+
1273
+ 🔄 Current Step:
1274
+ - [ ] Step 2.1: {description} <!-- current-step -->
1275
+ Agent: {agent_name}
1276
+ Task: {task_name}
1277
+
1278
+ 📌 Upcoming Steps:
1279
+ - [ ] Step 2.2: {description}
1280
+ - [ ] Step 3.1: {description}
1281
+
1282
+ ⚠️ Deviations/Notes:
1283
+ {any_deviation_notes}
1284
+
1285
+ 📊 Decision Points:
1286
+ - Decision 1: {status} - {choice_made}
1287
+ - Decision 2: Pending
1288
+
1289
+ 💡 Next Action:
1290
+ Based on the plan, you should {recommended_action}
1291
+ ```
1292
+
1293
+ ## Success Criteria
1294
+
1295
+ The update is successful when:
1296
+
1297
+ 1. Plan accurately reflects current workflow state
1298
+ 2. All updates are clearly timestamped
1299
+ 3. Deviations are documented with reasons
1300
+ 4. Progress calculation is correct
1301
+ 5. Next steps are clear to user
1302
+ 6. Plan remains readable and well-formatted
1303
+
1304
+ ## Error Handling
1305
+
1306
+ - **Plan file not found**: Offer to create new plan
1307
+ - **Malformed plan**: Attempt basic updates, warn user
1308
+ - **Write permission error**: Show changes that would be made
1309
+ - **Step not found**: Show available steps, ask for clarification
1310
+ - **Concurrent updates**: Implement simple locking or warn about conflicts
1311
+
1312
+ ## Notes
1313
+
1314
+ - Always preserve plan history (don't delete old information)
1315
+ - Keep updates atomic to prevent corruption
1316
+ - Consider creating backup before major updates
1317
+ - Updates should enhance, not complicate, the workflow experience
1318
+ - If plan becomes too cluttered, suggest creating fresh plan for next phase
1319
+ ==================== END: tasks#update-workflow-plan ====================
1320
+
744
1321
  ==================== START: data#bmad-kb ====================
745
1322
  # BMAD Knowledge Base
746
1323
 
@@ -837,6 +1414,7 @@ npx bmad-method install
837
1414
  - **Windsurf**: Built-in AI capabilities
838
1415
  - **Cline**: VS Code extension with AI features
839
1416
  - **Roo Code**: Web-based IDE with agent support
1417
+ - **VS Code Copilot**: AI-powered coding assistant
840
1418
 
841
1419
  **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.
842
1420
 
@@ -1022,6 +1600,7 @@ You are the "Vibe CEO" - thinking like a CEO with unlimited resources and a sing
1022
1600
  - **Cursor**: `@agent-name` (e.g., `@bmad-master`)
1023
1601
  - **Windsurf**: `@agent-name` (e.g., `@bmad-master`)
1024
1602
  - **Roo Code**: Select mode from mode selector (e.g., `bmad-bmad-master`)
1603
+ - **VS Code Copilot**: Open the Chat view (`⌃⌘I` on Mac, `Ctrl+Alt+I` on Windows/Linux) and select **Agent** from the chat mode selector.
1025
1604
 
1026
1605
  **Chat Management Guidelines**:
1027
1606
  - **Claude Code, Cursor, Windsurf**: Start new chats when switching agents
@@ -1491,6 +2070,232 @@ Use the **expansion-creator** pack to build your own:
1491
2070
  - **Contributing**: See `CONTRIBUTING.md` for full guidelines
1492
2071
  ==================== END: data#bmad-kb ====================
1493
2072
 
2073
+ ==================== START: utils#plan-management ====================
2074
+ # Plan Management Utility
2075
+
2076
+ ## Purpose
2077
+
2078
+ Provides utilities for agents and tasks to interact with workflow plans, check progress, update status, and ensure workflow steps are executed in the appropriate sequence.
2079
+
2080
+ ## Core Functions
2081
+
2082
+ ### 1. Check Plan Existence
2083
+
2084
+ [[LLM: When any agent starts or task begins, check if a workflow plan exists]]
2085
+
2086
+ ```
2087
+ Check for workflow plan:
2088
+ 1. Look for docs/workflow-plan.md (default location)
2089
+ 2. Check core-config.yml for custom plan location
2090
+ 3. Return plan status (exists/not exists)
2091
+ ```
2092
+
2093
+ ### 2. Parse Plan Status
2094
+
2095
+ [[LLM: Extract current progress from the plan document]]
2096
+
2097
+ **Plan Parsing Logic:**
2098
+
2099
+ 1. **Identify Step Structure**:
2100
+ - Look for checkbox lines: `- [ ]` or `- [x]`
2101
+ - Extract step IDs from comments: `<!-- step-id: X.Y -->`
2102
+ - Identify agent assignments: `<!-- agent: pm -->`
2103
+
2104
+ 2. **Determine Current State**:
2105
+ - Last completed step (highest numbered `[x]`)
2106
+ - Next expected step (first `[ ]` after completed steps)
2107
+ - Overall progress percentage
2108
+
2109
+ 3. **Extract Metadata**:
2110
+ - Workflow type from plan header
2111
+ - Decision points and their status
2112
+ - Any deviation notes
2113
+
2114
+ ### 3. Sequence Validation
2115
+
2116
+ [[LLM: Check if requested action aligns with plan sequence]]
2117
+
2118
+ **Validation Rules:**
2119
+
2120
+ 1. **Strict Mode** (enforceSequence: true):
2121
+ - Must complete steps in exact order
2122
+ - Warn and block if out of sequence
2123
+ - Require explicit override justification
2124
+
2125
+ 2. **Flexible Mode** (enforceSequence: false):
2126
+ - Warn about sequence deviation
2127
+ - Allow with confirmation
2128
+ - Log deviation reason
2129
+
2130
+ **Warning Templates:**
2131
+
2132
+ ```
2133
+ SEQUENCE WARNING:
2134
+ The workflow plan shows you should complete "{expected_step}" next.
2135
+ You're attempting to: "{requested_action}"
2136
+
2137
+ In strict mode: Block and require plan update
2138
+ In flexible mode: Allow with confirmation
2139
+ ```
2140
+
2141
+ ### 4. Plan Update Operations
2142
+
2143
+ [[LLM: Provide consistent way to update plan progress]]
2144
+
2145
+ **Update Actions:**
2146
+
2147
+ 1. **Mark Step Complete**:
2148
+ - Change `- [ ]` to `- [x]`
2149
+ - Add completion timestamp comment
2150
+ - Update any status metadata
2151
+
2152
+ 2. **Add Deviation Note**:
2153
+ - Insert note explaining why sequence changed
2154
+ - Reference the deviation in plan
2155
+
2156
+ 3. **Update Current Step Pointer**:
2157
+ - Add/move `<!-- current-step -->` marker
2158
+ - Update last-modified timestamp
2159
+
2160
+ ### 5. Integration Instructions
2161
+
2162
+ [[LLM: How agents and tasks should use this utility]]
2163
+
2164
+ **For Agents (startup sequence)**:
2165
+
2166
+ ```
2167
+ 1. Check if plan exists using this utility
2168
+ 2. If exists:
2169
+ - Parse current status
2170
+ - Show user: "Active workflow plan detected. Current step: {X}"
2171
+ - Suggest: "Next recommended action: {next_step}"
2172
+ 3. Continue with normal startup
2173
+ ```
2174
+
2175
+ **For Tasks (pre-execution)**:
2176
+
2177
+ ```
2178
+ 1. Check if plan exists
2179
+ 2. If exists:
2180
+ - Verify this task aligns with plan
2181
+ - If not aligned:
2182
+ - In strict mode: Show warning and stop
2183
+ - In flexible mode: Show warning and ask for confirmation
2184
+ 3. After task completion:
2185
+ - Update plan if task was a planned step
2186
+ - Add note if task was unplanned
2187
+ ```
2188
+
2189
+ ### 6. Plan Status Report Format
2190
+
2191
+ [[LLM: Standard format for showing plan status]]
2192
+
2193
+ ```
2194
+ 📋 Workflow Plan Status
2195
+ ━━━━━━━━━━━━━━━━━━━━
2196
+ Workflow: {workflow_name}
2197
+ Progress: {X}% complete ({completed}/{total} steps)
2198
+
2199
+ ✅ Completed:
2200
+ - {completed_step_1}
2201
+ - {completed_step_2}
2202
+
2203
+ 🔄 Current Step:
2204
+ - {current_step_description}
2205
+
2206
+ 📌 Upcoming:
2207
+ - {next_step_1}
2208
+ - {next_step_2}
2209
+
2210
+ ⚠️ Notes:
2211
+ - {any_deviations_or_notes}
2212
+ ```
2213
+
2214
+ ### 7. Decision Point Handling
2215
+
2216
+ [[LLM: Special handling for workflow decision points]]
2217
+
2218
+ When encountering a decision point in the plan:
2219
+
2220
+ 1. **Identify Decision Marker**: `<!-- decision: {decision_id} -->`
2221
+ 2. **Check Decision Status**: Made/Pending
2222
+ 3. **If Pending**:
2223
+ - Block progress until decision made
2224
+ - Show options to user
2225
+ - Record decision when made
2226
+ 4. **If Made**:
2227
+ - Verify current path aligns with decision
2228
+ - Warn if attempting alternate path
2229
+
2230
+ ### 8. Plan Abandonment
2231
+
2232
+ [[LLM: Graceful handling when user wants to stop following plan]]
2233
+
2234
+ If user wants to abandon plan:
2235
+
2236
+ 1. Confirm abandonment intent
2237
+ 2. Add abandonment note to plan
2238
+ 3. Mark plan as "Abandoned" in header
2239
+ 4. Stop plan checking for remainder of session
2240
+ 5. Suggest creating new plan if needed
2241
+
2242
+ ## Usage Examples
2243
+
2244
+ ### Example 1: Agent Startup Check
2245
+
2246
+ ```
2247
+ BMad Master starting...
2248
+
2249
+ [Check for plan]
2250
+ Found active workflow plan: brownfield-fullstack
2251
+ Progress: 40% complete (4/10 steps)
2252
+ Current step: Create PRD (pm agent)
2253
+
2254
+ Suggestion: Based on your plan, you should work with the PM agent next.
2255
+ Use *agent pm to switch, or *plan-status to see full progress.
2256
+ ```
2257
+
2258
+ ### Example 2: Task Sequence Warning
2259
+
2260
+ ```
2261
+ User: *task create-next-story
2262
+
2263
+ [Plan check triggered]
2264
+ ⚠️ SEQUENCE WARNING:
2265
+ Your workflow plan indicates the PRD hasn't been created yet.
2266
+ Creating stories before the PRD may lead to incomplete requirements.
2267
+
2268
+ Would you like to:
2269
+ 1. Continue anyway (will note deviation in plan)
2270
+ 2. Switch to creating PRD first (*agent pm)
2271
+ 3. View plan status (*plan-status)
2272
+ ```
2273
+
2274
+ ### Example 3: Automatic Plan Update
2275
+
2276
+ ```
2277
+ [After completing create-doc task for PRD]
2278
+
2279
+ ✅ Plan Updated: Marked "Create PRD" as complete
2280
+ 📍 Next step: Create Architecture Document (architect agent)
2281
+ ```
2282
+
2283
+ ## Implementation Notes
2284
+
2285
+ - This utility should be lightweight and fast
2286
+ - Plan parsing should be resilient to format variations
2287
+ - Always preserve user agency - warnings not blocks (unless strict mode)
2288
+ - Plan updates should be atomic to prevent corruption
2289
+ - Consider plan versioning for rollback capability
2290
+
2291
+ ## Error Handling
2292
+
2293
+ - Missing plan: Return null, don't error
2294
+ - Malformed plan: Warn but continue, treat as no plan
2295
+ - Update failures: Log but don't block task completion
2296
+ - Parse errors: Fallback to basic text search
2297
+ ==================== END: utils#plan-management ====================
2298
+
1494
2299
  ==================== START: utils#workflow-management ====================
1495
2300
  # Workflow Management
1496
2301
 
@@ -4159,34 +4964,45 @@ Do not proceed with any recommendations until the user has validated your unders
4159
4964
 
4160
4965
  ### Existing Project Overview
4161
4966
 
4162
- [[LLM: If working in IDE with project loaded, analyze the project structure and existing documentation. If working in web interface, request project upload or detailed project information from user.]]
4967
+ [[LLM: Check if document-project analysis was already performed. If yes, reference that output instead of re-analyzing.]]
4163
4968
 
4164
- **Project Location**: [[LLM: Note if this is IDE-based analysis or user-provided information]]
4969
+ **Analysis Source**: [[LLM: Indicate one of the following:
4970
+ - Document-project output available at: {{path}}
4971
+ - IDE-based fresh analysis
4972
+ - User-provided information
4973
+ ]]
4165
4974
 
4166
- **Current Project State**: [[LLM: Brief description of what the project currently does and its primary purpose]]
4975
+ **Current Project State**: [[LLM:
4976
+ - If document-project output exists: Extract summary from "High Level Architecture" and "Technical Summary" sections
4977
+ - Otherwise: Brief description of what the project currently does and its primary purpose
4978
+ ]]
4167
4979
 
4168
4980
  ### Available Documentation Analysis
4169
4981
 
4170
- [[LLM: Check for existing documentation in docs folder or provided by user. List what documentation is available and assess its completeness. Required documents include:
4982
+ [[LLM:
4983
+ If document-project was run:
4984
+ - Note: "Document-project analysis available - using existing technical documentation"
4985
+ - List key documents created by document-project
4986
+ - Skip the missing documentation check below
4171
4987
 
4172
- - Tech stack documentation
4173
- - Source tree/architecture overview
4174
- - Coding standards
4175
- - API documentation or OpenAPI specs
4176
- - External API integrations
4177
- - UX/UI guidelines or existing patterns]]
4988
+ Otherwise, check for existing documentation:
4989
+ ]]
4178
4990
 
4179
4991
  **Available Documentation**:
4180
4992
 
4181
- - [ ] Tech Stack Documentation
4182
- - [ ] Source Tree/Architecture
4183
- - [ ] Coding Standards
4184
- - [ ] API Documentation
4185
- - [ ] External API Documentation
4186
- - [ ] UX/UI Guidelines
4993
+ - [ ] Tech Stack Documentation [[LLM: If from document-project, check ✓]]
4994
+ - [ ] Source Tree/Architecture [[LLM: If from document-project, check ✓]]
4995
+ - [ ] Coding Standards [[LLM: If from document-project, may be partial]]
4996
+ - [ ] API Documentation [[LLM: If from document-project, check ✓]]
4997
+ - [ ] External API Documentation [[LLM: If from document-project, check ✓]]
4998
+ - [ ] UX/UI Guidelines [[LLM: May not be in document-project]]
4999
+ - [ ] Technical Debt Documentation [[LLM: If from document-project, check ✓]]
4187
5000
  - [ ] Other: \***\*\_\_\_\*\***
4188
5001
 
4189
- [[LLM: If critical documentation is missing, STOP and recommend: "I recommend running the document-project task first to generate baseline documentation including tech-stack, source-tree, coding-standards, APIs, external-APIs, and UX/UI information. This will provide the foundation needed for a comprehensive brownfield PRD."]]
5002
+ [[LLM:
5003
+ - If document-project was already run: "Using existing project analysis from document-project output."
5004
+ - If critical documentation is missing and no document-project: "I recommend running the document-project task first..."
5005
+ ]]
4190
5006
 
4191
5007
  ### Enhancement Scope Definition
4192
5008
 
@@ -4276,13 +5092,19 @@ Do not proceed with any recommendations until the user has validated your unders
4276
5092
 
4277
5093
  ### Existing Technology Stack
4278
5094
 
4279
- [[LLM: Document the current technology stack that must be maintained or integrated with]]
5095
+ [[LLM:
5096
+ If document-project output available:
5097
+ - Extract from "Actual Tech Stack" table in High Level Architecture section
5098
+ - Include version numbers and any noted constraints
5099
+
5100
+ Otherwise, document the current technology stack:
5101
+ ]]
4280
5102
 
4281
- **Languages**: [[LLM: Current programming languages in use]]
4282
- **Frameworks**: [[LLM: Current frameworks and their versions]]
4283
- **Database**: [[LLM: Current database technology and schema considerations]]
4284
- **Infrastructure**: [[LLM: Current deployment and hosting infrastructure]]
4285
- **External Dependencies**: [[LLM: Current third-party services and APIs]]
5103
+ **Languages**: [[LLM: From document-project or fresh analysis]]
5104
+ **Frameworks**: [[LLM: From document-project or fresh analysis]]
5105
+ **Database**: [[LLM: From document-project or fresh analysis]]
5106
+ **Infrastructure**: [[LLM: From document-project or fresh analysis]]
5107
+ **External Dependencies**: [[LLM: From document-project "External Services" section or fresh analysis]]
4286
5108
 
4287
5109
  ### Integration Approach
4288
5110
 
@@ -4313,12 +5135,19 @@ Do not proceed with any recommendations until the user has validated your unders
4313
5135
 
4314
5136
  ### Risk Assessment and Mitigation
4315
5137
 
4316
- [[LLM: Identify risks specific to working with existing codebase]]
5138
+ [[LLM:
5139
+ If document-project output available:
5140
+ - Reference "Technical Debt and Known Issues" section
5141
+ - Include "Workarounds and Gotchas" that might impact enhancement
5142
+ - Note any identified constraints from "Critical Technical Debt"
5143
+
5144
+ Build risk assessment incorporating existing known issues:
5145
+ ]]
4317
5146
 
4318
- **Technical Risks**: [[LLM: Risks related to modifying existing code]]
4319
- **Integration Risks**: [[LLM: Risks in integrating with existing systems]]
4320
- **Deployment Risks**: [[LLM: Risks in deploying alongside existing features]]
4321
- **Mitigation Strategies**: [[LLM: Specific strategies to address identified risks]]
5147
+ **Technical Risks**: [[LLM: Include risks from document-project + new enhancement risks]]
5148
+ **Integration Risks**: [[LLM: Reference integration constraints from document-project]]
5149
+ **Deployment Risks**: [[LLM: Include deployment gotchas from document-project]]
5150
+ **Mitigation Strategies**: [[LLM: Address both existing and new risks]]
4322
5151
 
4323
5152
  ## Epic and Story Structure
4324
5153
 
@@ -8920,23 +9749,76 @@ workflow:
8920
9749
  - integration-enhancement
8921
9750
 
8922
9751
  sequence:
9752
+ - step: enhancement_classification
9753
+ agent: analyst
9754
+ action: classify enhancement scope
9755
+ notes: |
9756
+ Determine enhancement complexity to route to appropriate path:
9757
+ - Single story (< 4 hours) → Use brownfield-create-story task
9758
+ - Small feature (1-3 stories) → Use brownfield-create-epic task
9759
+ - Major enhancement (multiple epics) → Continue with full workflow
9760
+
9761
+ Ask user: "Can you describe the enhancement scope? Is this a small fix, a feature addition, or a major enhancement requiring architectural changes?"
9762
+
9763
+ - step: routing_decision
9764
+ condition: based_on_classification
9765
+ routes:
9766
+ single_story:
9767
+ agent: pm
9768
+ uses: brownfield-create-story
9769
+ notes: "Create single story for immediate implementation. Exit workflow after story creation."
9770
+ small_feature:
9771
+ agent: pm
9772
+ uses: brownfield-create-epic
9773
+ notes: "Create focused epic with 1-3 stories. Exit workflow after epic creation."
9774
+ major_enhancement:
9775
+ continue: to_next_step
9776
+ notes: "Continue with comprehensive planning workflow below."
9777
+
9778
+ - step: documentation_check
9779
+ agent: analyst
9780
+ action: check existing documentation
9781
+ condition: major_enhancement_path
9782
+ notes: |
9783
+ Check if adequate project documentation exists:
9784
+ - Look for existing architecture docs, API specs, coding standards
9785
+ - Assess if documentation is current and comprehensive
9786
+ - If adequate: Skip document-project, proceed to PRD
9787
+ - If inadequate: Run document-project first
9788
+
8923
9789
  - step: project_analysis
8924
9790
  agent: architect
8925
9791
  action: analyze existing project and use task document-project
8926
- creates: multiple documents per the document-project template
8927
- notes: "Review existing documentation, codebase structure, and identify integration points. Document current system understanding before proceeding."
9792
+ creates: brownfield-architecture.md (or multiple documents)
9793
+ condition: documentation_inadequate
9794
+ notes: "Run document-project to capture current system state, technical debt, and constraints. Pass findings to PRD creation."
8928
9795
 
8929
9796
  - agent: pm
8930
9797
  creates: prd.md
8931
9798
  uses: brownfield-prd-tmpl
8932
- requires: existing_project_analysis
8933
- notes: "Creates comprehensive PRD with existing system analysis and enhancement planning. SAVE OUTPUT: Copy final prd.md to your project's docs/ folder."
9799
+ requires: existing_documentation_or_analysis
9800
+ notes: |
9801
+ Creates PRD for major enhancement. If document-project was run, reference its output to avoid re-analysis.
9802
+ If skipped, use existing project documentation.
9803
+ SAVE OUTPUT: Copy final prd.md to your project's docs/ folder.
9804
+
9805
+ - step: architecture_decision
9806
+ agent: pm/architect
9807
+ action: determine if architecture document needed
9808
+ condition: after_prd_creation
9809
+ notes: |
9810
+ Review PRD to determine if architectural planning is needed:
9811
+ - New architectural patterns → Create architecture doc
9812
+ - New libraries/frameworks → Create architecture doc
9813
+ - Platform/infrastructure changes → Create architecture doc
9814
+ - Following existing patterns → Skip to story creation
8934
9815
 
8935
9816
  - agent: architect
8936
9817
  creates: architecture.md
8937
9818
  uses: brownfield-architecture-tmpl
8938
9819
  requires: prd.md
8939
- notes: "Creates architecture with integration strategy and existing system constraints. SAVE OUTPUT: Copy final architecture.md to your project's docs/ folder."
9820
+ condition: architecture_changes_needed
9821
+ notes: "Creates architecture ONLY for significant architectural changes. SAVE OUTPUT: Copy final architecture.md to your project's docs/ folder."
8940
9822
 
8941
9823
  - agent: po
8942
9824
  validates: all_artifacts
@@ -8948,60 +9830,162 @@ workflow:
8948
9830
  condition: po_checklist_issues
8949
9831
  notes: "If PO finds issues, return to relevant agent to fix and re-export updated documents to docs/ folder."
8950
9832
 
9833
+ - agent: po
9834
+ action: shard_documents
9835
+ creates: sharded_docs
9836
+ requires: all_artifacts_in_project
9837
+ notes: |
9838
+ Shard documents for IDE development:
9839
+ - Option A: Use PO agent to shard: @po then ask to shard docs/prd.md
9840
+ - Option B: Manual: Drag shard-doc task + docs/prd.md into chat
9841
+ - Creates docs/prd/ and docs/architecture/ folders with sharded content
9842
+
9843
+ - agent: sm
9844
+ action: create_story
9845
+ creates: story.md
9846
+ requires: sharded_docs_or_brownfield_docs
9847
+ repeats: for_each_epic_or_enhancement
9848
+ notes: |
9849
+ Story creation cycle:
9850
+ - For sharded PRD: @sm → *create (uses create-next-story)
9851
+ - For brownfield docs: @sm → use create-brownfield-story task
9852
+ - Creates story from available documentation
9853
+ - Story starts in "Draft" status
9854
+ - May require additional context gathering for brownfield
9855
+
9856
+ - agent: analyst/pm
9857
+ action: review_draft_story
9858
+ updates: story.md
9859
+ requires: story.md
9860
+ optional: true
9861
+ condition: user_wants_story_review
9862
+ notes: |
9863
+ OPTIONAL: Review and approve draft story
9864
+ - NOTE: story-review task coming soon
9865
+ - Review story completeness and alignment
9866
+ - Update story status: Draft → Approved
9867
+
9868
+ - agent: dev
9869
+ action: implement_story
9870
+ creates: implementation_files
9871
+ requires: story.md
9872
+ notes: |
9873
+ Dev Agent (New Chat): @dev
9874
+ - Implements approved story
9875
+ - Updates File List with all changes
9876
+ - Marks story as "Review" when complete
9877
+
9878
+ - agent: qa
9879
+ action: review_implementation
9880
+ updates: implementation_files
9881
+ requires: implementation_files
9882
+ optional: true
9883
+ notes: |
9884
+ OPTIONAL: QA Agent (New Chat): @qa → review-story
9885
+ - Senior dev review with refactoring ability
9886
+ - Fixes small issues directly
9887
+ - Leaves checklist for remaining items
9888
+ - Updates story status (Review → Done or stays Review)
9889
+
9890
+ - agent: dev
9891
+ action: address_qa_feedback
9892
+ updates: implementation_files
9893
+ condition: qa_left_unchecked_items
9894
+ notes: |
9895
+ If QA left unchecked items:
9896
+ - Dev Agent (New Chat): Address remaining items
9897
+ - Return to QA for final approval
9898
+
9899
+ - repeat_development_cycle:
9900
+ action: continue_for_all_stories
9901
+ notes: |
9902
+ Repeat story cycle (SM → Dev → QA) for all epic stories
9903
+ Continue until all stories in PRD are complete
9904
+
9905
+ - agent: po
9906
+ action: epic_retrospective
9907
+ creates: epic-retrospective.md
9908
+ condition: epic_complete
9909
+ optional: true
9910
+ notes: |
9911
+ OPTIONAL: After epic completion
9912
+ - NOTE: epic-retrospective task coming soon
9913
+ - Validate epic was completed correctly
9914
+ - Document learnings and improvements
9915
+
8951
9916
  - workflow_end:
8952
- action: move_to_ide
9917
+ action: project_complete
8953
9918
  notes: |
8954
- Planning phase complete! Now transition to IDE Development:
8955
-
8956
- 1. ENSURE DOCUMENTS ARE IN PROJECT:
8957
- - Copy final prd.md to project's docs/prd.md
8958
- - Copy final architecture.md to project's docs/architecture.md
8959
- - All documents must be in the project before proceeding
8960
-
8961
- 2. SHARD DOCUMENTS (in IDE):
8962
- - Option A: Use PO agent to shard: @po then ask to shard docs/prd.md
8963
- - Option B: Manual: Drag shard-doc task + docs/prd.md into chat
8964
- - This creates docs/prd/ and docs/architecture/ folders with sharded content
8965
-
8966
- 3. START DEVELOPMENT CYCLE:
8967
- a. SM Agent (New Chat): @sm → *create
8968
- - Creates next story from sharded docs
8969
- - Review and approve story (Draft → Approved)
8970
-
8971
- b. Dev Agent (New Chat): @dev
8972
- - Implements approved story
8973
- - Updates File List with all changes
8974
- - Marks story as "Review" when complete
8975
-
8976
- c. QA Agent (New Chat): @qa → review-story
8977
- - Senior dev review with refactoring ability
8978
- - Fixes small issues directly
8979
- - Leaves checklist for remaining items
8980
- - Updates story status (Review → Done or stays Review)
8981
-
8982
- d. If QA left unchecked items:
8983
- - Dev Agent (New Chat): Address remaining items
8984
- - Return to QA for final approval
8985
-
8986
- 4. REPEAT: Continue cycle for all epic stories
9919
+ All stories implemented and reviewed!
9920
+ Project development phase complete.
8987
9921
 
8988
9922
  Reference: data#bmad-kb:IDE Development Workflow
8989
9923
 
8990
9924
  flow_diagram: |
8991
9925
  ```mermaid
8992
9926
  graph TD
8993
- A[Start: Brownfield Enhancement] --> B[analyst: analyze existing project]
8994
- B --> C[pm: prd.md]
8995
- C --> D[architect: architecture.md]
8996
- D --> E[po: validate with po-master-checklist]
8997
- E --> F{PO finds issues?}
8998
- F -->|Yes| G[Return to relevant agent for fixes]
8999
- F -->|No| H[Move to IDE Environment]
9000
- G --> E
9001
-
9002
- style H fill:#90EE90
9003
- style C fill:#FFE4B5
9004
- style D fill:#FFE4B5
9927
+ A[Start: Brownfield Enhancement] --> B[analyst: classify enhancement scope]
9928
+ B --> C{Enhancement Size?}
9929
+
9930
+ C -->|Single Story| D[pm: brownfield-create-story]
9931
+ C -->|1-3 Stories| E[pm: brownfield-create-epic]
9932
+ C -->|Major Enhancement| F[analyst: check documentation]
9933
+
9934
+ D --> END1[To Dev Implementation]
9935
+ E --> END2[To Story Creation]
9936
+
9937
+ F --> G{Docs Adequate?}
9938
+ G -->|No| H[architect: document-project]
9939
+ G -->|Yes| I[pm: brownfield PRD]
9940
+ H --> I
9941
+
9942
+ I --> J{Architecture Needed?}
9943
+ J -->|Yes| K[architect: architecture.md]
9944
+ J -->|No| L[po: validate artifacts]
9945
+ K --> L
9946
+
9947
+ L --> M{PO finds issues?}
9948
+ M -->|Yes| N[Fix issues]
9949
+ M -->|No| O[po: shard documents]
9950
+ N --> L
9951
+
9952
+ O --> P[sm: create story]
9953
+ P --> Q{Story Type?}
9954
+ Q -->|Sharded PRD| R[create-next-story]
9955
+ Q -->|Brownfield Docs| S[create-brownfield-story]
9956
+
9957
+ R --> T{Review draft?}
9958
+ S --> T
9959
+ T -->|Yes| U[review & approve]
9960
+ T -->|No| V[dev: implement]
9961
+ U --> V
9962
+
9963
+ V --> W{QA review?}
9964
+ W -->|Yes| X[qa: review]
9965
+ W -->|No| Y{More stories?}
9966
+ X --> Z{Issues?}
9967
+ Z -->|Yes| AA[dev: fix]
9968
+ Z -->|No| Y
9969
+ AA --> X
9970
+ Y -->|Yes| P
9971
+ Y -->|No| AB{Retrospective?}
9972
+ AB -->|Yes| AC[po: retrospective]
9973
+ AB -->|No| AD[Complete]
9974
+ AC --> AD
9975
+
9976
+ style AD fill:#90EE90
9977
+ style END1 fill:#90EE90
9978
+ style END2 fill:#90EE90
9979
+ style D fill:#87CEEB
9980
+ style E fill:#87CEEB
9981
+ style I fill:#FFE4B5
9982
+ style K fill:#FFE4B5
9983
+ style O fill:#ADD8E6
9984
+ style P fill:#ADD8E6
9985
+ style V fill:#ADD8E6
9986
+ style U fill:#F0E68C
9987
+ style X fill:#F0E68C
9988
+ style AC fill:#F0E68C
9005
9989
  ```
9006
9990
 
9007
9991
  decision_guidance:
@@ -9013,11 +9997,41 @@ workflow:
9013
9997
  - Multiple team members will work on related changes
9014
9998
 
9015
9999
  handoff_prompts:
9016
- analyst_to_pm: "Existing project analysis complete. Create comprehensive PRD with integration strategy."
9017
- pm_to_architect: "PRD ready. Save it as docs/prd.md, then create the integration architecture."
10000
+ classification_complete: |
10001
+ Enhancement classified as: {{enhancement_type}}
10002
+ {{if single_story}}: Proceeding with brownfield-create-story task for immediate implementation.
10003
+ {{if small_feature}}: Creating focused epic with brownfield-create-epic task.
10004
+ {{if major_enhancement}}: Continuing with comprehensive planning workflow.
10005
+
10006
+ documentation_assessment: |
10007
+ Documentation assessment complete:
10008
+ {{if adequate}}: Existing documentation is sufficient. Proceeding directly to PRD creation.
10009
+ {{if inadequate}}: Running document-project to capture current system state before PRD.
10010
+
10011
+ document_project_to_pm: |
10012
+ Project analysis complete. Key findings documented in:
10013
+ - {{document_list}}
10014
+ Use these findings to inform PRD creation and avoid re-analyzing the same aspects.
10015
+
10016
+ pm_to_architect_decision: |
10017
+ PRD complete and saved as docs/prd.md.
10018
+ Architectural changes identified: {{yes/no}}
10019
+ {{if yes}}: Proceeding to create architecture document for: {{specific_changes}}
10020
+ {{if no}}: No architectural changes needed. Proceeding to validation.
10021
+
9018
10022
  architect_to_po: "Architecture complete. Save it as docs/architecture.md. Please validate all artifacts for integration safety."
9019
- po_issues: "PO found issues with [document]. Please return to [agent] to fix and re-save the updated document."
9020
- complete: "All planning artifacts validated and saved in docs/ folder. Move to IDE environment to begin development."
10023
+
10024
+ po_to_sm: |
10025
+ All artifacts validated.
10026
+ Documentation type available: {{sharded_prd / brownfield_docs}}
10027
+ {{if sharded}}: Use standard create-next-story task.
10028
+ {{if brownfield}}: Use create-brownfield-story task to handle varied documentation formats.
10029
+
10030
+ sm_story_creation: |
10031
+ Creating story from {{documentation_type}}.
10032
+ {{if missing_context}}: May need to gather additional context from user during story creation.
10033
+
10034
+ complete: "All planning artifacts validated and development can begin. Stories will be created based on available documentation format."
9021
10035
  ==================== END: workflows#brownfield-fullstack ====================
9022
10036
 
9023
10037
  ==================== START: workflows#brownfield-service ====================
@@ -9064,42 +10078,92 @@ workflow:
9064
10078
  condition: po_checklist_issues
9065
10079
  notes: "If PO finds issues, return to relevant agent to fix and re-export updated documents to docs/ folder."
9066
10080
 
10081
+ - agent: po
10082
+ action: shard_documents
10083
+ creates: sharded_docs
10084
+ requires: all_artifacts_in_project
10085
+ notes: |
10086
+ Shard documents for IDE development:
10087
+ - Option A: Use PO agent to shard: @po then ask to shard docs/prd.md
10088
+ - Option B: Manual: Drag shard-doc task + docs/prd.md into chat
10089
+ - Creates docs/prd/ and docs/architecture/ folders with sharded content
10090
+
10091
+ - agent: sm
10092
+ action: create_story
10093
+ creates: story.md
10094
+ requires: sharded_docs
10095
+ repeats: for_each_epic
10096
+ notes: |
10097
+ Story creation cycle:
10098
+ - SM Agent (New Chat): @sm → *create
10099
+ - Creates next story from sharded docs
10100
+ - Story starts in "Draft" status
10101
+
10102
+ - agent: analyst/pm
10103
+ action: review_draft_story
10104
+ updates: story.md
10105
+ requires: story.md
10106
+ optional: true
10107
+ condition: user_wants_story_review
10108
+ notes: |
10109
+ OPTIONAL: Review and approve draft story
10110
+ - NOTE: story-review task coming soon
10111
+ - Review story completeness and alignment
10112
+ - Update story status: Draft → Approved
10113
+
10114
+ - agent: dev
10115
+ action: implement_story
10116
+ creates: implementation_files
10117
+ requires: story.md
10118
+ notes: |
10119
+ Dev Agent (New Chat): @dev
10120
+ - Implements approved story
10121
+ - Updates File List with all changes
10122
+ - Marks story as "Review" when complete
10123
+
10124
+ - agent: qa
10125
+ action: review_implementation
10126
+ updates: implementation_files
10127
+ requires: implementation_files
10128
+ optional: true
10129
+ notes: |
10130
+ OPTIONAL: QA Agent (New Chat): @qa → review-story
10131
+ - Senior dev review with refactoring ability
10132
+ - Fixes small issues directly
10133
+ - Leaves checklist for remaining items
10134
+ - Updates story status (Review → Done or stays Review)
10135
+
10136
+ - agent: dev
10137
+ action: address_qa_feedback
10138
+ updates: implementation_files
10139
+ condition: qa_left_unchecked_items
10140
+ notes: |
10141
+ If QA left unchecked items:
10142
+ - Dev Agent (New Chat): Address remaining items
10143
+ - Return to QA for final approval
10144
+
10145
+ - repeat_development_cycle:
10146
+ action: continue_for_all_stories
10147
+ notes: |
10148
+ Repeat story cycle (SM → Dev → QA) for all epic stories
10149
+ Continue until all stories in PRD are complete
10150
+
10151
+ - agent: po
10152
+ action: epic_retrospective
10153
+ creates: epic-retrospective.md
10154
+ condition: epic_complete
10155
+ optional: true
10156
+ notes: |
10157
+ OPTIONAL: After epic completion
10158
+ - NOTE: epic-retrospective task coming soon
10159
+ - Validate epic was completed correctly
10160
+ - Document learnings and improvements
10161
+
9067
10162
  - workflow_end:
9068
- action: move_to_ide
10163
+ action: project_complete
9069
10164
  notes: |
9070
- Planning phase complete! Now transition to IDE Development:
9071
-
9072
- 1. ENSURE DOCUMENTS ARE IN PROJECT:
9073
- - Copy final prd.md to project's docs/prd.md
9074
- - Copy final architecture.md to project's docs/architecture.md
9075
- - All documents must be in the project before proceeding
9076
-
9077
- 2. SHARD DOCUMENTS (in IDE):
9078
- - Option A: Use PO agent to shard: @po then ask to shard docs/prd.md
9079
- - Option B: Manual: Drag shard-doc task + docs/prd.md into chat
9080
- - This creates docs/prd/ and docs/architecture/ folders with sharded content
9081
-
9082
- 3. START DEVELOPMENT CYCLE:
9083
- a. SM Agent (New Chat): @sm → *create
9084
- - Creates next story from sharded docs
9085
- - Review and approve story (Draft → Approved)
9086
-
9087
- b. Dev Agent (New Chat): @dev
9088
- - Implements approved story
9089
- - Updates File List with all changes
9090
- - Marks story as "Review" when complete
9091
-
9092
- c. QA Agent (New Chat): @qa → review-story
9093
- - Senior dev review with refactoring ability
9094
- - Fixes small issues directly
9095
- - Leaves checklist for remaining items
9096
- - Updates story status (Review → Done or stays Review)
9097
-
9098
- d. If QA left unchecked items:
9099
- - Dev Agent (New Chat): Address remaining items
9100
- - Return to QA for final approval
9101
-
9102
- 4. REPEAT: Continue cycle for all epic stories
10165
+ All stories implemented and reviewed!
10166
+ Project development phase complete.
9103
10167
 
9104
10168
  Reference: data#bmad-kb:IDE Development Workflow
9105
10169
 
@@ -9112,12 +10176,36 @@ workflow:
9112
10176
  D --> E[po: validate with po-master-checklist]
9113
10177
  E --> F{PO finds issues?}
9114
10178
  F -->|Yes| G[Return to relevant agent for fixes]
9115
- F -->|No| H[Move to IDE Environment]
10179
+ F -->|No| H[po: shard documents]
9116
10180
  G --> E
9117
-
9118
- style H fill:#90EE90
10181
+
10182
+ H --> I[sm: create story]
10183
+ I --> J{Review draft story?}
10184
+ J -->|Yes| K[analyst/pm: review & approve story]
10185
+ J -->|No| L[dev: implement story]
10186
+ K --> L
10187
+ L --> M{QA review?}
10188
+ M -->|Yes| N[qa: review implementation]
10189
+ M -->|No| O{More stories?}
10190
+ N --> P{QA found issues?}
10191
+ P -->|Yes| Q[dev: address QA feedback]
10192
+ P -->|No| O
10193
+ Q --> N
10194
+ O -->|Yes| I
10195
+ O -->|No| R{Epic retrospective?}
10196
+ R -->|Yes| S[po: epic retrospective]
10197
+ R -->|No| T[Project Complete]
10198
+ S --> T
10199
+
10200
+ style T fill:#90EE90
10201
+ style H fill:#ADD8E6
10202
+ style I fill:#ADD8E6
10203
+ style L fill:#ADD8E6
9119
10204
  style C fill:#FFE4B5
9120
10205
  style D fill:#FFE4B5
10206
+ style K fill:#F0E68C
10207
+ style N fill:#F0E68C
10208
+ style S fill:#F0E68C
9121
10209
  ```
9122
10210
 
9123
10211
  decision_guidance:
@@ -9187,42 +10275,92 @@ workflow:
9187
10275
  condition: po_checklist_issues
9188
10276
  notes: "If PO finds issues, return to relevant agent to fix and re-export updated documents to docs/ folder."
9189
10277
 
10278
+ - agent: po
10279
+ action: shard_documents
10280
+ creates: sharded_docs
10281
+ requires: all_artifacts_in_project
10282
+ notes: |
10283
+ Shard documents for IDE development:
10284
+ - Option A: Use PO agent to shard: @po then ask to shard docs/prd.md
10285
+ - Option B: Manual: Drag shard-doc task + docs/prd.md into chat
10286
+ - Creates docs/prd/ and docs/architecture/ folders with sharded content
10287
+
10288
+ - agent: sm
10289
+ action: create_story
10290
+ creates: story.md
10291
+ requires: sharded_docs
10292
+ repeats: for_each_epic
10293
+ notes: |
10294
+ Story creation cycle:
10295
+ - SM Agent (New Chat): @sm → *create
10296
+ - Creates next story from sharded docs
10297
+ - Story starts in "Draft" status
10298
+
10299
+ - agent: analyst/pm
10300
+ action: review_draft_story
10301
+ updates: story.md
10302
+ requires: story.md
10303
+ optional: true
10304
+ condition: user_wants_story_review
10305
+ notes: |
10306
+ OPTIONAL: Review and approve draft story
10307
+ - NOTE: story-review task coming soon
10308
+ - Review story completeness and alignment
10309
+ - Update story status: Draft → Approved
10310
+
10311
+ - agent: dev
10312
+ action: implement_story
10313
+ creates: implementation_files
10314
+ requires: story.md
10315
+ notes: |
10316
+ Dev Agent (New Chat): @dev
10317
+ - Implements approved story
10318
+ - Updates File List with all changes
10319
+ - Marks story as "Review" when complete
10320
+
10321
+ - agent: qa
10322
+ action: review_implementation
10323
+ updates: implementation_files
10324
+ requires: implementation_files
10325
+ optional: true
10326
+ notes: |
10327
+ OPTIONAL: QA Agent (New Chat): @qa → review-story
10328
+ - Senior dev review with refactoring ability
10329
+ - Fixes small issues directly
10330
+ - Leaves checklist for remaining items
10331
+ - Updates story status (Review → Done or stays Review)
10332
+
10333
+ - agent: dev
10334
+ action: address_qa_feedback
10335
+ updates: implementation_files
10336
+ condition: qa_left_unchecked_items
10337
+ notes: |
10338
+ If QA left unchecked items:
10339
+ - Dev Agent (New Chat): Address remaining items
10340
+ - Return to QA for final approval
10341
+
10342
+ - repeat_development_cycle:
10343
+ action: continue_for_all_stories
10344
+ notes: |
10345
+ Repeat story cycle (SM → Dev → QA) for all epic stories
10346
+ Continue until all stories in PRD are complete
10347
+
10348
+ - agent: po
10349
+ action: epic_retrospective
10350
+ creates: epic-retrospective.md
10351
+ condition: epic_complete
10352
+ optional: true
10353
+ notes: |
10354
+ OPTIONAL: After epic completion
10355
+ - NOTE: epic-retrospective task coming soon
10356
+ - Validate epic was completed correctly
10357
+ - Document learnings and improvements
10358
+
9190
10359
  - workflow_end:
9191
- action: move_to_ide
10360
+ action: project_complete
9192
10361
  notes: |
9193
- Planning phase complete! Now transition to IDE Development:
9194
-
9195
- 1. ENSURE DOCUMENTS ARE IN PROJECT:
9196
- - Copy final prd.md to project's docs/prd.md
9197
- - Copy final architecture.md to project's docs/architecture.md
9198
- - All documents must be in the project before proceeding
9199
-
9200
- 2. SHARD DOCUMENTS (in IDE):
9201
- - Option A: Use PO agent to shard: @po then ask to shard docs/prd.md
9202
- - Option B: Manual: Drag shard-doc task + docs/prd.md into chat
9203
- - This creates docs/prd/ and docs/architecture/ folders with sharded content
9204
-
9205
- 3. START DEVELOPMENT CYCLE:
9206
- a. SM Agent (New Chat): @sm → *create
9207
- - Creates next story from sharded docs
9208
- - Review and approve story (Draft → Approved)
9209
-
9210
- b. Dev Agent (New Chat): @dev
9211
- - Implements approved story
9212
- - Updates File List with all changes
9213
- - Marks story as "Review" when complete
9214
-
9215
- c. QA Agent (New Chat): @qa → review-story
9216
- - Senior dev review with refactoring ability
9217
- - Fixes small issues directly
9218
- - Leaves checklist for remaining items
9219
- - Updates story status (Review → Done or stays Review)
9220
-
9221
- d. If QA left unchecked items:
9222
- - Dev Agent (New Chat): Address remaining items
9223
- - Return to QA for final approval
9224
-
9225
- 4. REPEAT: Continue cycle for all epic stories
10362
+ All stories implemented and reviewed!
10363
+ Project development phase complete.
9226
10364
 
9227
10365
  Reference: data#bmad-kb:IDE Development Workflow
9228
10366
 
@@ -9236,13 +10374,37 @@ workflow:
9236
10374
  E --> F[po: validate with po-master-checklist]
9237
10375
  F --> G{PO finds issues?}
9238
10376
  G -->|Yes| H[Return to relevant agent for fixes]
9239
- G -->|No| I[Move to IDE Environment]
10377
+ G -->|No| I[po: shard documents]
9240
10378
  H --> F
9241
-
9242
- style I fill:#90EE90
10379
+
10380
+ I --> J[sm: create story]
10381
+ J --> K{Review draft story?}
10382
+ K -->|Yes| L[analyst/pm: review & approve story]
10383
+ K -->|No| M[dev: implement story]
10384
+ L --> M
10385
+ M --> N{QA review?}
10386
+ N -->|Yes| O[qa: review implementation]
10387
+ N -->|No| P{More stories?}
10388
+ O --> Q{QA found issues?}
10389
+ Q -->|Yes| R[dev: address QA feedback]
10390
+ Q -->|No| P
10391
+ R --> O
10392
+ P -->|Yes| J
10393
+ P -->|No| S{Epic retrospective?}
10394
+ S -->|Yes| T[po: epic retrospective]
10395
+ S -->|No| U[Project Complete]
10396
+ T --> U
10397
+
10398
+ style U fill:#90EE90
10399
+ style I fill:#ADD8E6
10400
+ style J fill:#ADD8E6
10401
+ style M fill:#ADD8E6
9243
10402
  style C fill:#FFE4B5
9244
10403
  style D fill:#FFE4B5
9245
10404
  style E fill:#FFE4B5
10405
+ style L fill:#F0E68C
10406
+ style O fill:#F0E68C
10407
+ style T fill:#F0E68C
9246
10408
  ```
9247
10409
 
9248
10410
  decision_guidance:
@@ -9338,42 +10500,92 @@ workflow:
9338
10500
  action: guide_development_sequence
9339
10501
  notes: "Based on PRD stories: If stories are frontend-heavy, start with frontend project/directory first. If backend-heavy or API-first, start with backend. For tightly coupled features, follow story sequence in monorepo setup. Reference sharded PRD epics for development order."
9340
10502
 
10503
+ - agent: po
10504
+ action: shard_documents
10505
+ creates: sharded_docs
10506
+ requires: all_artifacts_in_project
10507
+ notes: |
10508
+ Shard documents for IDE development:
10509
+ - Option A: Use PO agent to shard: @po then ask to shard docs/prd.md
10510
+ - Option B: Manual: Drag shard-doc task + docs/prd.md into chat
10511
+ - Creates docs/prd/ and docs/architecture/ folders with sharded content
10512
+
10513
+ - agent: sm
10514
+ action: create_story
10515
+ creates: story.md
10516
+ requires: sharded_docs
10517
+ repeats: for_each_epic
10518
+ notes: |
10519
+ Story creation cycle:
10520
+ - SM Agent (New Chat): @sm → *create
10521
+ - Creates next story from sharded docs
10522
+ - Story starts in "Draft" status
10523
+
10524
+ - agent: analyst/pm
10525
+ action: review_draft_story
10526
+ updates: story.md
10527
+ requires: story.md
10528
+ optional: true
10529
+ condition: user_wants_story_review
10530
+ notes: |
10531
+ OPTIONAL: Review and approve draft story
10532
+ - NOTE: story-review task coming soon
10533
+ - Review story completeness and alignment
10534
+ - Update story status: Draft → Approved
10535
+
10536
+ - agent: dev
10537
+ action: implement_story
10538
+ creates: implementation_files
10539
+ requires: story.md
10540
+ notes: |
10541
+ Dev Agent (New Chat): @dev
10542
+ - Implements approved story
10543
+ - Updates File List with all changes
10544
+ - Marks story as "Review" when complete
10545
+
10546
+ - agent: qa
10547
+ action: review_implementation
10548
+ updates: implementation_files
10549
+ requires: implementation_files
10550
+ optional: true
10551
+ notes: |
10552
+ OPTIONAL: QA Agent (New Chat): @qa → review-story
10553
+ - Senior dev review with refactoring ability
10554
+ - Fixes small issues directly
10555
+ - Leaves checklist for remaining items
10556
+ - Updates story status (Review → Done or stays Review)
10557
+
10558
+ - agent: dev
10559
+ action: address_qa_feedback
10560
+ updates: implementation_files
10561
+ condition: qa_left_unchecked_items
10562
+ notes: |
10563
+ If QA left unchecked items:
10564
+ - Dev Agent (New Chat): Address remaining items
10565
+ - Return to QA for final approval
10566
+
10567
+ - repeat_development_cycle:
10568
+ action: continue_for_all_stories
10569
+ notes: |
10570
+ Repeat story cycle (SM → Dev → QA) for all epic stories
10571
+ Continue until all stories in PRD are complete
10572
+
10573
+ - agent: po
10574
+ action: epic_retrospective
10575
+ creates: epic-retrospective.md
10576
+ condition: epic_complete
10577
+ optional: true
10578
+ notes: |
10579
+ OPTIONAL: After epic completion
10580
+ - NOTE: epic-retrospective task coming soon
10581
+ - Validate epic was completed correctly
10582
+ - Document learnings and improvements
10583
+
9341
10584
  - workflow_end:
9342
- action: move_to_ide
10585
+ action: project_complete
9343
10586
  notes: |
9344
- Planning phase complete! Now transition to IDE Development:
9345
-
9346
- 1. ENSURE DOCUMENTS ARE IN PROJECT:
9347
- - Copy final prd.md to project's docs/prd.md
9348
- - Copy final architecture.md to project's docs/architecture.md
9349
- - All documents must be in the project before proceeding
9350
-
9351
- 2. SHARD DOCUMENTS (in IDE):
9352
- - Option A: Use PO agent to shard: @po then ask to shard docs/prd.md
9353
- - Option B: Manual: Drag shard-doc task + docs/prd.md into chat
9354
- - This creates docs/prd/ and docs/architecture/ folders with sharded content
9355
-
9356
- 3. START DEVELOPMENT CYCLE:
9357
- a. SM Agent (New Chat): @sm → *create
9358
- - Creates next story from sharded docs
9359
- - Review and approve story (Draft → Approved)
9360
-
9361
- b. Dev Agent (New Chat): @dev
9362
- - Implements approved story
9363
- - Updates File List with all changes
9364
- - Marks story as "Review" when complete
9365
-
9366
- c. QA Agent (New Chat): @qa → review-story
9367
- - Senior dev review with refactoring ability
9368
- - Fixes small issues directly
9369
- - Leaves checklist for remaining items
9370
- - Updates story status (Review → Done or stays Review)
9371
-
9372
- d. If QA left unchecked items:
9373
- - Dev Agent (New Chat): Address remaining items
9374
- - Return to QA for final approval
9375
-
9376
- 4. REPEAT: Continue cycle for all epic stories
10587
+ All stories implemented and reviewed!
10588
+ Project development phase complete.
9377
10589
 
9378
10590
  Reference: data#bmad-kb:IDE Development Workflow
9379
10591
 
@@ -9394,21 +10606,45 @@ workflow:
9394
10606
  G --> H
9395
10607
  H --> I{PO finds issues?}
9396
10608
  I -->|Yes| J[Return to relevant agent for fixes]
9397
- I -->|No| K[Move to IDE Environment]
10609
+ I -->|No| K[po: shard documents]
9398
10610
  J --> H
10611
+
10612
+ K --> L[sm: create story]
10613
+ L --> M{Review draft story?}
10614
+ M -->|Yes| N[analyst/pm: review & approve story]
10615
+ M -->|No| O[dev: implement story]
10616
+ N --> O
10617
+ O --> P{QA review?}
10618
+ P -->|Yes| Q[qa: review implementation]
10619
+ P -->|No| R{More stories?}
10620
+ Q --> S{QA found issues?}
10621
+ S -->|Yes| T[dev: address QA feedback]
10622
+ S -->|No| R
10623
+ T --> Q
10624
+ R -->|Yes| L
10625
+ R -->|No| U{Epic retrospective?}
10626
+ U -->|Yes| V[po: epic retrospective]
10627
+ U -->|No| W[Project Complete]
10628
+ V --> W
9399
10629
 
9400
10630
  B -.-> B1[Optional: brainstorming]
9401
10631
  B -.-> B2[Optional: market research]
9402
10632
  D -.-> D1[Optional: user research]
9403
10633
  E -.-> E1[Optional: technical research]
9404
10634
 
9405
- style K fill:#90EE90
10635
+ style W fill:#90EE90
10636
+ style K fill:#ADD8E6
10637
+ style L fill:#ADD8E6
10638
+ style O fill:#ADD8E6
9406
10639
  style D3 fill:#E6E6FA
9407
10640
  style D4 fill:#E6E6FA
9408
10641
  style B fill:#FFE4B5
9409
10642
  style C fill:#FFE4B5
9410
10643
  style D fill:#FFE4B5
9411
10644
  style E fill:#FFE4B5
10645
+ style N fill:#F0E68C
10646
+ style Q fill:#F0E68C
10647
+ style V fill:#F0E68C
9412
10648
  ```
9413
10649
 
9414
10650
  decision_guidance:
@@ -9483,42 +10719,92 @@ workflow:
9483
10719
  condition: po_checklist_issues
9484
10720
  notes: "If PO finds issues, return to relevant agent to fix and re-export updated documents to docs/ folder."
9485
10721
 
10722
+ - agent: po
10723
+ action: shard_documents
10724
+ creates: sharded_docs
10725
+ requires: all_artifacts_in_project
10726
+ notes: |
10727
+ Shard documents for IDE development:
10728
+ - Option A: Use PO agent to shard: @po then ask to shard docs/prd.md
10729
+ - Option B: Manual: Drag shard-doc task + docs/prd.md into chat
10730
+ - Creates docs/prd/ and docs/architecture/ folders with sharded content
10731
+
10732
+ - agent: sm
10733
+ action: create_story
10734
+ creates: story.md
10735
+ requires: sharded_docs
10736
+ repeats: for_each_epic
10737
+ notes: |
10738
+ Story creation cycle:
10739
+ - SM Agent (New Chat): @sm → *create
10740
+ - Creates next story from sharded docs
10741
+ - Story starts in "Draft" status
10742
+
10743
+ - agent: analyst/pm
10744
+ action: review_draft_story
10745
+ updates: story.md
10746
+ requires: story.md
10747
+ optional: true
10748
+ condition: user_wants_story_review
10749
+ notes: |
10750
+ OPTIONAL: Review and approve draft story
10751
+ - NOTE: story-review task coming soon
10752
+ - Review story completeness and alignment
10753
+ - Update story status: Draft → Approved
10754
+
10755
+ - agent: dev
10756
+ action: implement_story
10757
+ creates: implementation_files
10758
+ requires: story.md
10759
+ notes: |
10760
+ Dev Agent (New Chat): @dev
10761
+ - Implements approved story
10762
+ - Updates File List with all changes
10763
+ - Marks story as "Review" when complete
10764
+
10765
+ - agent: qa
10766
+ action: review_implementation
10767
+ updates: implementation_files
10768
+ requires: implementation_files
10769
+ optional: true
10770
+ notes: |
10771
+ OPTIONAL: QA Agent (New Chat): @qa → review-story
10772
+ - Senior dev review with refactoring ability
10773
+ - Fixes small issues directly
10774
+ - Leaves checklist for remaining items
10775
+ - Updates story status (Review → Done or stays Review)
10776
+
10777
+ - agent: dev
10778
+ action: address_qa_feedback
10779
+ updates: implementation_files
10780
+ condition: qa_left_unchecked_items
10781
+ notes: |
10782
+ If QA left unchecked items:
10783
+ - Dev Agent (New Chat): Address remaining items
10784
+ - Return to QA for final approval
10785
+
10786
+ - repeat_development_cycle:
10787
+ action: continue_for_all_stories
10788
+ notes: |
10789
+ Repeat story cycle (SM → Dev → QA) for all epic stories
10790
+ Continue until all stories in PRD are complete
10791
+
10792
+ - agent: po
10793
+ action: epic_retrospective
10794
+ creates: epic-retrospective.md
10795
+ condition: epic_complete
10796
+ optional: true
10797
+ notes: |
10798
+ OPTIONAL: After epic completion
10799
+ - NOTE: epic-retrospective task coming soon
10800
+ - Validate epic was completed correctly
10801
+ - Document learnings and improvements
10802
+
9486
10803
  - workflow_end:
9487
- action: move_to_ide
10804
+ action: project_complete
9488
10805
  notes: |
9489
- Planning phase complete! Now transition to IDE Development:
9490
-
9491
- 1. ENSURE DOCUMENTS ARE IN PROJECT:
9492
- - Copy final prd.md to project's docs/prd.md
9493
- - Copy final architecture.md to project's docs/architecture.md
9494
- - All documents must be in the project before proceeding
9495
-
9496
- 2. SHARD DOCUMENTS (in IDE):
9497
- - Option A: Use PO agent to shard: @po then ask to shard docs/prd.md
9498
- - Option B: Manual: Drag shard-doc task + docs/prd.md into chat
9499
- - This creates docs/prd/ and docs/architecture/ folders with sharded content
9500
-
9501
- 3. START DEVELOPMENT CYCLE:
9502
- a. SM Agent (New Chat): @sm → *create
9503
- - Creates next story from sharded docs
9504
- - Review and approve story (Draft → Approved)
9505
-
9506
- b. Dev Agent (New Chat): @dev
9507
- - Implements approved story
9508
- - Updates File List with all changes
9509
- - Marks story as "Review" when complete
9510
-
9511
- c. QA Agent (New Chat): @qa → review-story
9512
- - Senior dev review with refactoring ability
9513
- - Fixes small issues directly
9514
- - Leaves checklist for remaining items
9515
- - Updates story status (Review → Done or stays Review)
9516
-
9517
- d. If QA left unchecked items:
9518
- - Dev Agent (New Chat): Address remaining items
9519
- - Return to QA for final approval
9520
-
9521
- 4. REPEAT: Continue cycle for all epic stories
10806
+ All stories implemented and reviewed!
10807
+ Service development phase complete.
9522
10808
 
9523
10809
  Reference: data#bmad-kb:IDE Development Workflow
9524
10810
 
@@ -9534,17 +10820,41 @@ workflow:
9534
10820
  F --> G
9535
10821
  G --> H{PO finds issues?}
9536
10822
  H -->|Yes| I[Return to relevant agent for fixes]
9537
- H -->|No| J[Move to IDE Environment]
10823
+ H -->|No| J[po: shard documents]
9538
10824
  I --> G
10825
+
10826
+ J --> K[sm: create story]
10827
+ K --> L{Review draft story?}
10828
+ L -->|Yes| M[analyst/pm: review & approve story]
10829
+ L -->|No| N[dev: implement story]
10830
+ M --> N
10831
+ N --> O{QA review?}
10832
+ O -->|Yes| P[qa: review implementation]
10833
+ O -->|No| Q{More stories?}
10834
+ P --> R{QA found issues?}
10835
+ R -->|Yes| S[dev: address QA feedback]
10836
+ R -->|No| Q
10837
+ S --> P
10838
+ Q -->|Yes| K
10839
+ Q -->|No| T{Epic retrospective?}
10840
+ T -->|Yes| U[po: epic retrospective]
10841
+ T -->|No| V[Project Complete]
10842
+ U --> V
9539
10843
 
9540
10844
  B -.-> B1[Optional: brainstorming]
9541
10845
  B -.-> B2[Optional: market research]
9542
10846
  D -.-> D1[Optional: technical research]
9543
10847
 
9544
- style J fill:#90EE90
10848
+ style V fill:#90EE90
10849
+ style J fill:#ADD8E6
10850
+ style K fill:#ADD8E6
10851
+ style N fill:#ADD8E6
9545
10852
  style B fill:#FFE4B5
9546
10853
  style C fill:#FFE4B5
9547
10854
  style D fill:#FFE4B5
10855
+ style M fill:#F0E68C
10856
+ style P fill:#F0E68C
10857
+ style U fill:#F0E68C
9548
10858
  ```
9549
10859
 
9550
10860
  decision_guidance:
@@ -9637,42 +10947,92 @@ workflow:
9637
10947
  condition: user_has_generated_ui
9638
10948
  notes: "If user generated UI with v0/Lovable: For polyrepo setup, place downloaded project in separate frontend repo. For monorepo, place in apps/web or frontend/ directory. Review architecture document for specific guidance."
9639
10949
 
10950
+ - agent: po
10951
+ action: shard_documents
10952
+ creates: sharded_docs
10953
+ requires: all_artifacts_in_project
10954
+ notes: |
10955
+ Shard documents for IDE development:
10956
+ - Option A: Use PO agent to shard: @po then ask to shard docs/prd.md
10957
+ - Option B: Manual: Drag shard-doc task + docs/prd.md into chat
10958
+ - Creates docs/prd/ and docs/architecture/ folders with sharded content
10959
+
10960
+ - agent: sm
10961
+ action: create_story
10962
+ creates: story.md
10963
+ requires: sharded_docs
10964
+ repeats: for_each_epic
10965
+ notes: |
10966
+ Story creation cycle:
10967
+ - SM Agent (New Chat): @sm → *create
10968
+ - Creates next story from sharded docs
10969
+ - Story starts in "Draft" status
10970
+
10971
+ - agent: analyst/pm
10972
+ action: review_draft_story
10973
+ updates: story.md
10974
+ requires: story.md
10975
+ optional: true
10976
+ condition: user_wants_story_review
10977
+ notes: |
10978
+ OPTIONAL: Review and approve draft story
10979
+ - NOTE: story-review task coming soon
10980
+ - Review story completeness and alignment
10981
+ - Update story status: Draft → Approved
10982
+
10983
+ - agent: dev
10984
+ action: implement_story
10985
+ creates: implementation_files
10986
+ requires: story.md
10987
+ notes: |
10988
+ Dev Agent (New Chat): @dev
10989
+ - Implements approved story
10990
+ - Updates File List with all changes
10991
+ - Marks story as "Review" when complete
10992
+
10993
+ - agent: qa
10994
+ action: review_implementation
10995
+ updates: implementation_files
10996
+ requires: implementation_files
10997
+ optional: true
10998
+ notes: |
10999
+ OPTIONAL: QA Agent (New Chat): @qa → review-story
11000
+ - Senior dev review with refactoring ability
11001
+ - Fixes small issues directly
11002
+ - Leaves checklist for remaining items
11003
+ - Updates story status (Review → Done or stays Review)
11004
+
11005
+ - agent: dev
11006
+ action: address_qa_feedback
11007
+ updates: implementation_files
11008
+ condition: qa_left_unchecked_items
11009
+ notes: |
11010
+ If QA left unchecked items:
11011
+ - Dev Agent (New Chat): Address remaining items
11012
+ - Return to QA for final approval
11013
+
11014
+ - repeat_development_cycle:
11015
+ action: continue_for_all_stories
11016
+ notes: |
11017
+ Repeat story cycle (SM → Dev → QA) for all epic stories
11018
+ Continue until all stories in PRD are complete
11019
+
11020
+ - agent: po
11021
+ action: epic_retrospective
11022
+ creates: epic-retrospective.md
11023
+ condition: epic_complete
11024
+ optional: true
11025
+ notes: |
11026
+ OPTIONAL: After epic completion
11027
+ - NOTE: epic-retrospective task coming soon
11028
+ - Validate epic was completed correctly
11029
+ - Document learnings and improvements
11030
+
9640
11031
  - workflow_end:
9641
- action: move_to_ide
11032
+ action: project_complete
9642
11033
  notes: |
9643
- Planning phase complete! Now transition to IDE Development:
9644
-
9645
- 1. ENSURE DOCUMENTS ARE IN PROJECT:
9646
- - Copy final prd.md to project's docs/prd.md
9647
- - Copy final architecture.md to project's docs/architecture.md
9648
- - All documents must be in the project before proceeding
9649
-
9650
- 2. SHARD DOCUMENTS (in IDE):
9651
- - Option A: Use PO agent to shard: @po then ask to shard docs/prd.md
9652
- - Option B: Manual: Drag shard-doc task + docs/prd.md into chat
9653
- - This creates docs/prd/ and docs/architecture/ folders with sharded content
9654
-
9655
- 3. START DEVELOPMENT CYCLE:
9656
- a. SM Agent (New Chat): @sm → *create
9657
- - Creates next story from sharded docs
9658
- - Review and approve story (Draft → Approved)
9659
-
9660
- b. Dev Agent (New Chat): @dev
9661
- - Implements approved story
9662
- - Updates File List with all changes
9663
- - Marks story as "Review" when complete
9664
-
9665
- c. QA Agent (New Chat): @qa → review-story
9666
- - Senior dev review with refactoring ability
9667
- - Fixes small issues directly
9668
- - Leaves checklist for remaining items
9669
- - Updates story status (Review → Done or stays Review)
9670
-
9671
- d. If QA left unchecked items:
9672
- - Dev Agent (New Chat): Address remaining items
9673
- - Return to QA for final approval
9674
-
9675
- 4. REPEAT: Continue cycle for all epic stories
11034
+ All stories implemented and reviewed!
11035
+ Project development phase complete.
9676
11036
 
9677
11037
  Reference: data#bmad-kb:IDE Development Workflow
9678
11038
 
@@ -9693,21 +11053,45 @@ workflow:
9693
11053
  G --> H
9694
11054
  H --> I{PO finds issues?}
9695
11055
  I -->|Yes| J[Return to relevant agent for fixes]
9696
- I -->|No| K[Move to IDE Environment]
11056
+ I -->|No| K[po: shard documents]
9697
11057
  J --> H
11058
+
11059
+ K --> L[sm: create story]
11060
+ L --> M{Review draft story?}
11061
+ M -->|Yes| N[analyst/pm: review & approve story]
11062
+ M -->|No| O[dev: implement story]
11063
+ N --> O
11064
+ O --> P{QA review?}
11065
+ P -->|Yes| Q[qa: review implementation]
11066
+ P -->|No| R{More stories?}
11067
+ Q --> S{QA found issues?}
11068
+ S -->|Yes| T[dev: address QA feedback]
11069
+ S -->|No| R
11070
+ T --> Q
11071
+ R -->|Yes| L
11072
+ R -->|No| U{Epic retrospective?}
11073
+ U -->|Yes| V[po: epic retrospective]
11074
+ U -->|No| W[Project Complete]
11075
+ V --> W
9698
11076
 
9699
11077
  B -.-> B1[Optional: brainstorming]
9700
11078
  B -.-> B2[Optional: market research]
9701
11079
  D -.-> D1[Optional: user research]
9702
11080
  E -.-> E1[Optional: technical research]
9703
11081
 
9704
- style K fill:#90EE90
11082
+ style W fill:#90EE90
11083
+ style K fill:#ADD8E6
11084
+ style L fill:#ADD8E6
11085
+ style O fill:#ADD8E6
9705
11086
  style D3 fill:#E6E6FA
9706
11087
  style D4 fill:#E6E6FA
9707
11088
  style B fill:#FFE4B5
9708
11089
  style C fill:#FFE4B5
9709
11090
  style D fill:#FFE4B5
9710
11091
  style E fill:#FFE4B5
11092
+ style N fill:#F0E68C
11093
+ style Q fill:#F0E68C
11094
+ style V fill:#F0E68C
9711
11095
  ```
9712
11096
 
9713
11097
  decision_guidance: