bmad-method 4.22.1 → 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 (42) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/README.md +3 -2
  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/data/bmad-kb.md +3 -1
  7. package/bmad-core/tasks/create-brownfield-story.md +355 -0
  8. package/bmad-core/tasks/create-next-story.md +25 -0
  9. package/bmad-core/tasks/create-workflow-plan.md +289 -0
  10. package/bmad-core/tasks/update-workflow-plan.md +248 -0
  11. package/bmad-core/templates/brownfield-prd-tmpl.md +52 -28
  12. package/bmad-core/utils/plan-management.md +223 -0
  13. package/bmad-core/workflows/brownfield-fullstack.yml +240 -55
  14. package/bmad-core/workflows/brownfield-service.yml +110 -36
  15. package/bmad-core/workflows/brownfield-ui.yml +110 -36
  16. package/bmad-core/workflows/greenfield-fullstack.yml +110 -36
  17. package/bmad-core/workflows/greenfield-service.yml +110 -36
  18. package/bmad-core/workflows/greenfield-ui.yml +110 -36
  19. package/common/tasks/create-doc.md +21 -1
  20. package/dist/agents/analyst.txt +24 -2
  21. package/dist/agents/architect.txt +21 -1
  22. package/dist/agents/bmad-master.txt +884 -31
  23. package/dist/agents/bmad-orchestrator.txt +807 -2
  24. package/dist/agents/pm.txt +73 -29
  25. package/dist/agents/sm.txt +25 -0
  26. package/dist/agents/ux-expert.txt +21 -1
  27. package/dist/expansion-packs/bmad-2d-phaser-game-dev/agents/game-designer.txt +21 -1
  28. package/dist/expansion-packs/bmad-2d-phaser-game-dev/teams/phaser-2d-nodejs-game-team.txt +804 -1
  29. package/dist/expansion-packs/bmad-infrastructure-devops/agents/infra-devops-platform.txt +21 -1
  30. package/dist/teams/team-all.txt +1676 -267
  31. package/dist/teams/team-fullstack.txt +1651 -267
  32. package/dist/teams/team-ide-minimal.txt +832 -2
  33. package/dist/teams/team-no-ui.txt +1080 -103
  34. package/docs/bmad-workflow-guide.md +2 -1
  35. package/docs/core-architecture.md +2 -1
  36. package/package.json +1 -1
  37. package/tools/installer/bin/bmad.js +3 -2
  38. package/tools/installer/config/install.config.yml +13 -0
  39. package/tools/installer/lib/ide-setup.js +214 -1
  40. package/tools/installer/lib/installer.js +3 -13
  41. package/tools/installer/package.json +1 -1
  42. package/tools/lib/dependency-resolver.js +2 -2
@@ -82,6 +82,9 @@ startup:
82
82
  - Announce: Introduce yourself as the BMAD Orchestrator, explain you can coordinate agents and workflows
83
83
  - IMPORTANT: Tell users that all commands start with * (e.g., *help, *agent, *workflow)
84
84
  - Mention *help shows all available commands and options
85
+ - Check for active workflow plan using utils#plan-management
86
+ - 'If plan exists: Show 📋 Active plan: {workflow} ({progress}% complete). Use *plan-status for details.'
87
+ - 'If plan exists: Suggest next action based on plan progress'
85
88
  - Assess user goal against available agents and workflows in this bundle
86
89
  - If clear match to an agent's expertise, suggest transformation with *agent command
87
90
  - If project-oriented, suggest *workflow-guidance to explore options
@@ -96,6 +99,9 @@ commands:
96
99
  task: Run a specific task (list if name not specified)
97
100
  workflow: Start a specific workflow (list if name not specified)
98
101
  workflow-guidance: Get personalized help selecting the right workflow
102
+ plan: Create detailed workflow plan before starting
103
+ plan-status: Show current workflow plan progress
104
+ plan-update: Update workflow plan status
99
105
  checklist: Execute a checklist (list if name not specified)
100
106
  yolo: Toggle skip confirmations mode
101
107
  party-mode: Group chat with all agents
@@ -119,6 +125,9 @@ help-display-template: |
119
125
  Workflow Commands:
120
126
  *workflow [name] .... Start specific workflow (list if no name)
121
127
  *workflow-guidance .. Get personalized help selecting the right workflow
128
+ *plan ............... Create detailed workflow plan before starting
129
+ *plan-status ........ Show current workflow plan progress
130
+ *plan-update ........ Update workflow plan status
122
131
 
123
132
  Other Commands:
124
133
  *yolo ............... Toggle skip confirmations mode
@@ -159,6 +168,8 @@ workflow-guidance:
159
168
  - Understand each workflow's purpose, options, and decision points
160
169
  - Ask clarifying questions based on the workflow's structure
161
170
  - Guide users through workflow selection when multiple options exist
171
+ - For complex projects, offer to create a workflow plan using create-workflow-plan task
172
+ - When appropriate, suggest: Would you like me to create a detailed workflow plan before starting?
162
173
  - For workflows with divergent paths, help users choose the right path
163
174
  - Adapt questions to the specific domain (e.g., game dev vs infrastructure vs web dev)
164
175
  - Only recommend workflows that actually exist in the current bundle
@@ -167,10 +178,13 @@ dependencies:
167
178
  tasks:
168
179
  - advanced-elicitation
169
180
  - create-doc
181
+ - create-workflow-plan
170
182
  - kb-mode-interaction
183
+ - update-workflow-plan
171
184
  data:
172
185
  - bmad-kb
173
186
  utils:
187
+ - plan-management
174
188
  - workflow-management
175
189
  - template-format
176
190
  ```
@@ -510,11 +524,22 @@ Generate documents from templates by EXECUTING (not just reading) embedded instr
510
524
 
511
525
  ## Execution Flow
512
526
 
527
+ ### 0. Check Workflow Plan (if configured)
528
+
529
+ [[LLM: Check if plan tracking is enabled in core-config.yml]]
530
+
531
+ - If `workflow.trackProgress: true`, check for active plan using utils#plan-management
532
+ - If plan exists and this document creation is part of the plan:
533
+ - Verify this is the expected next step
534
+ - If out of sequence and `enforceSequence: true`, warn user and halt without user override
535
+ - If out of sequence and `enforceSequence: false`, ask for confirmation
536
+ - Continue with normal execution after plan check
537
+
513
538
  ### 1. Identify Template
514
539
 
515
540
  - Load from `templates#*` or `{root}/templates directory`
516
541
  - Agent-specific templates are listed in agent's dependencies
517
- - If agent has `templates: [prd-tmpl, architecture-tmpl]`, offer to create "PRD" and "Architecture" documents
542
+ - If agent has `templates: [prd-tmpl, architecture-tmpl]` for example, then offer to create "PRD" and "Architecture" documents
518
543
 
519
544
  ### 2. Ask Interaction Mode
520
545
 
@@ -551,6 +576,15 @@ Generate documents from templates by EXECUTING (not just reading) embedded instr
551
576
  - Begin directly with content (no preamble)
552
577
  - Include any handoff prompts from template
553
578
 
579
+ ### 6. Update Workflow Plan (if applicable)
580
+
581
+ [[LLM: After successful document creation]]
582
+
583
+ - If plan tracking is enabled and document was part of plan:
584
+ - Call update-workflow-plan task to mark step complete
585
+ - Parameters: task: create-doc, step_id: {from plan}, status: complete
586
+ - Show next recommended step from plan
587
+
554
588
  ## Common Mistakes to Avoid
555
589
 
556
590
  ❌ Skipping elicitation tasks
@@ -568,6 +602,298 @@ Generate documents from templates by EXECUTING (not just reading) embedded instr
568
602
  Templates contain precise instructions for a reason. Follow them exactly to ensure document quality and completeness.
569
603
  ==================== END: tasks#create-doc ====================
570
604
 
605
+ ==================== START: tasks#create-workflow-plan ====================
606
+ # Create Workflow Plan Task
607
+
608
+ ## Purpose
609
+
610
+ 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.
611
+
612
+ ## Task Instructions
613
+
614
+ ### 1. Understand User's Goal
615
+
616
+ [[LLM: Start with discovery questions to understand what the user wants to accomplish]]
617
+
618
+ Ask the user:
619
+
620
+ 1. **Project Type**:
621
+ - Are you starting a new project (greenfield) or enhancing an existing one (brownfield)?
622
+ - What type of application? (web app, service/API, UI only, full-stack)
623
+
624
+ 2. **For Greenfield**:
625
+ - Do you need a quick prototype or production-ready application?
626
+ - Will this have a UI component?
627
+ - Single service or multiple services?
628
+
629
+ 3. **For Brownfield**:
630
+ - What's the scope of the enhancement?
631
+ - Single bug fix or small feature (few hours)
632
+ - Small enhancement (1-3 stories)
633
+ - Major feature requiring coordination
634
+ - Architectural changes or modernization
635
+ - Do you have existing documentation?
636
+ - Are you following existing patterns or introducing new ones?
637
+
638
+ ### 2. Recommend Appropriate Workflow
639
+
640
+ Based on the answers, recommend:
641
+
642
+ **Greenfield Options:**
643
+
644
+ - `greenfield-fullstack` - Complete web application
645
+ - `greenfield-service` - Backend API/service only
646
+ - `greenfield-ui` - Frontend only
647
+
648
+ **Brownfield Options:**
649
+
650
+ - `brownfield-create-story` - Single small change
651
+ - `brownfield-create-epic` - Small feature (1-3 stories)
652
+ - `brownfield-fullstack` - Major enhancement
653
+
654
+ **Simplified Option:**
655
+
656
+ - For users unsure or wanting flexibility, suggest starting with individual agent tasks
657
+
658
+ ### 3. Explain Selected Workflow
659
+
660
+ [[LLM: Once workflow is selected, provide clear explanation]]
661
+
662
+ For the selected workflow, explain:
663
+
664
+ 1. **Overview**: What this workflow accomplishes
665
+ 2. **Duration**: Estimated time for planning phase
666
+ 3. **Outputs**: What documents will be created
667
+ 4. **Decision Points**: Where user input will be needed
668
+ 5. **Requirements**: What information should be ready
669
+
670
+ ### 4. Create Workflow Plan Document
671
+
672
+ [[LLM: Generate a comprehensive plan document with the following structure]]
673
+
674
+ ```markdown
675
+ # Workflow Plan: {{Workflow Name}}
676
+
677
+ <!-- WORKFLOW-PLAN-META
678
+ workflow-id: {{workflow-id}}
679
+ status: active
680
+ created: {{ISO-8601 timestamp}}
681
+ updated: {{ISO-8601 timestamp}}
682
+ version: 1.0
683
+ -->
684
+
685
+ **Created Date**: {{current date}}
686
+ **Project**: {{project name}}
687
+ **Type**: {{greenfield/brownfield}}
688
+ **Status**: Active
689
+ **Estimated Planning Duration**: {{time estimate}}
690
+
691
+ ## Objective
692
+
693
+ {{Clear description of what will be accomplished}}
694
+
695
+ ## Selected Workflow
696
+
697
+ **Workflow**: `{{workflow-id}}`
698
+ **Reason**: {{Why this workflow fits the user's needs}}
699
+
700
+ ## Workflow Steps
701
+
702
+ ### Planning Phase
703
+
704
+ - [ ] Step 1: {{step name}} <!-- step-id: 1.1, agent: {{agent}}, task: {{task}} -->
705
+ - **Agent**: {{agent name}}
706
+ - **Action**: {{what happens}}
707
+ - **Output**: {{what's created}}
708
+ - **User Input**: {{if any}}
709
+
710
+ - [ ] Step 2: {{step name}} <!-- step-id: 1.2, agent: {{agent}}, task: {{task}} -->
711
+ - **Agent**: {{agent name}}
712
+ - **Action**: {{what happens}}
713
+ - **Output**: {{what's created}}
714
+ - **Decision Point**: {{if any}} <!-- decision-id: D1 -->
715
+
716
+ {{Continue for all planning steps}}
717
+
718
+ ### Development Phase (IDE)
719
+
720
+ - [ ] Document Sharding <!-- step-id: 2.1, agent: po, task: shard-doc -->
721
+ - Prepare documents for story creation
722
+
723
+ - [ ] Story Development Cycle <!-- step-id: 2.2, repeats: true -->
724
+ - [ ] Create story (SM agent) <!-- step-id: 2.2.1, agent: sm, task: create-next-story -->
725
+ - [ ] Review story (optional) <!-- step-id: 2.2.2, agent: analyst, optional: true -->
726
+ - [ ] Implement story (Dev agent) <!-- step-id: 2.2.3, agent: dev -->
727
+ - [ ] QA review (optional) <!-- step-id: 2.2.4, agent: qa, optional: true -->
728
+ - [ ] Repeat for all stories
729
+
730
+ - [ ] Epic Retrospective (optional) <!-- step-id: 2.3, agent: po, optional: true -->
731
+
732
+ ## Key Decision Points
733
+
734
+ 1. **{{Decision Name}}** (Step {{n}}): <!-- decision-id: D1, status: pending -->
735
+ - Trigger: {{what causes this decision}}
736
+ - Options: {{available choices}}
737
+ - Impact: {{how it affects the workflow}}
738
+ - Decision Made: _Pending_
739
+
740
+ {{List all decision points}}
741
+
742
+ ## Expected Outputs
743
+
744
+ ### Planning Documents
745
+ - [ ] {{document 1}} - {{description}}
746
+ - [ ] {{document 2}} - {{description}}
747
+ {{etc...}}
748
+
749
+ ### Development Artifacts
750
+ - [ ] Stories in `docs/stories/`
751
+ - [ ] Implementation code
752
+ - [ ] Tests
753
+ - [ ] Updated documentation
754
+
755
+ ## Prerequisites Checklist
756
+
757
+ Before starting this workflow, ensure you have:
758
+
759
+ - [ ] {{prerequisite 1}}
760
+ - [ ] {{prerequisite 2}}
761
+ - [ ] {{prerequisite 3}}
762
+ {{etc...}}
763
+
764
+ ## Customization Options
765
+
766
+ Based on your project needs, you may:
767
+ - Skip {{optional step}} if {{condition}}
768
+ - Add {{additional step}} if {{condition}}
769
+ - Choose {{alternative}} instead of {{default}}
770
+
771
+ ## Risk Considerations
772
+
773
+ {{For brownfield only}}
774
+ - Integration complexity: {{assessment}}
775
+ - Rollback strategy: {{approach}}
776
+ - Testing requirements: {{special needs}}
777
+
778
+ ## Next Steps
779
+
780
+ 1. Review this plan and confirm it matches your expectations
781
+ 2. Gather any missing prerequisites
782
+ 3. Start workflow with: `*task workflow {{workflow-id}}`
783
+ 4. Or begin with first agent: `@{{first-agent}}`
784
+
785
+ ## Notes
786
+
787
+ {{Any additional context or warnings}}
788
+
789
+ ---
790
+ *This plan can be updated as you progress through the workflow. Check off completed items to track progress.*
791
+ ```
792
+
793
+ ### 5. Save and Present Plan
794
+
795
+ 1. Save the plan as `docs/workflow-plan.md`
796
+ 2. Inform user: "Workflow plan created at docs/workflow-plan.md"
797
+ 3. Offer options:
798
+ - Review the plan together
799
+ - Start the workflow now
800
+ - Gather prerequisites first
801
+ - Modify the plan
802
+
803
+ ### 6. Plan Variations
804
+
805
+ [[LLM: Adjust plan detail based on workflow complexity]]
806
+
807
+ **For Simple Workflows** (create-story, create-epic):
808
+
809
+ - Simpler checklist format
810
+ - Focus on immediate next steps
811
+ - Less detailed explanations
812
+
813
+ **For Complex Workflows** (full greenfield/brownfield):
814
+
815
+ - Detailed step breakdowns
816
+ - All decision points documented
817
+ - Comprehensive output descriptions
818
+ - Risk mitigation sections
819
+
820
+ **For Brownfield Workflows**:
821
+
822
+ - Include existing system impact analysis
823
+ - Document integration checkpoints
824
+ - Add rollback considerations
825
+ - Note documentation dependencies
826
+
827
+ ### 7. Interactive Planning Mode
828
+
829
+ [[LLM: If user wants to customize the workflow]]
830
+
831
+ If user wants to modify the standard workflow:
832
+
833
+ 1. Present workflow steps as options
834
+ 2. Allow skipping optional steps
835
+ 3. Let user reorder certain steps
836
+ 4. Document customizations in plan
837
+ 5. Warn about dependencies if steps are skipped
838
+
839
+ ### 8. Execution Guidance
840
+
841
+ After plan is created, provide clear guidance:
842
+
843
+ ```text
844
+ Your workflow plan is ready! Here's how to proceed:
845
+
846
+ 1. **Review the plan**: Check that all steps align with your goals
847
+ 2. **Gather prerequisites**: Use the checklist to ensure you're ready
848
+ 3. **Start execution**:
849
+ - Full workflow: `*task workflow {{workflow-id}}`
850
+ - Step by step: Start with `@{{first-agent}}`
851
+ 4. **Track progress**: Check off steps in the plan as completed
852
+
853
+ Would you like to:
854
+ a) Review the plan together
855
+ b) Start the workflow now
856
+ c) Gather prerequisites first
857
+ d) Modify the plan
858
+ ```
859
+
860
+ ## Success Criteria
861
+
862
+ The workflow plan is successful when:
863
+
864
+ 1. User clearly understands what will happen
865
+ 2. All decision points are documented
866
+ 3. Prerequisites are identified
867
+ 4. Expected outputs are clear
868
+ 5. User feels confident to proceed
869
+ 6. Plan serves as useful progress tracker
870
+
871
+ ## Integration with BMad Master and Orchestrator
872
+
873
+ When used by BMad Master or BMad Orchestrator, this task should:
874
+
875
+ 1. Be offered when user asks about workflows
876
+ 2. Be suggested before starting complex workflows
877
+ 3. Create a plan that the agent can reference during execution
878
+ 4. Allow the agent to track progress against the plan
879
+
880
+ ## Example Usage
881
+
882
+ ```text
883
+ User: "I need to add a payment system to my existing app"
884
+
885
+ BMad Orchestrator: "Let me help you create a workflow plan for that enhancement. I'll ask a few questions to recommend the best approach..."
886
+
887
+ [Runs through discovery questions]
888
+
889
+ BMad Orchestrator: "Based on your answers, I recommend the brownfield-fullstack workflow. Let me create a detailed plan for you..."
890
+
891
+ [Creates and saves plan]
892
+
893
+ 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?"
894
+ ```
895
+ ==================== END: tasks#create-workflow-plan ====================
896
+
571
897
  ==================== START: tasks#kb-mode-interaction ====================
572
898
  # KB Mode Interaction Task
573
899
 
@@ -641,6 +967,257 @@ Or ask me about anything else related to BMAD-METHOD!
641
967
  **Assistant**: [Provides focused information about workflows from the KB, then offers to explore specific workflow types or related topics]
642
968
  ==================== END: tasks#kb-mode-interaction ====================
643
969
 
970
+ ==================== START: tasks#update-workflow-plan ====================
971
+ # Update Workflow Plan Task
972
+
973
+ ## Purpose
974
+
975
+ 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.
976
+
977
+ ## Task Instructions
978
+
979
+ ### 0. Load Plan Configuration
980
+
981
+ [[LLM: First load core-config.yml to get plan settings]]
982
+
983
+ Check workflow configuration:
984
+
985
+ - `workflow.planFile` - Location of the plan (default: docs/workflow-plan.md)
986
+ - `workflow.trackProgress` - Whether tracking is enabled
987
+ - `workflow.updateOnCompletion` - Whether to auto-update on task completion
988
+
989
+ If tracking is disabled, inform user and exit.
990
+
991
+ ### 1. Verify Plan Exists
992
+
993
+ [[LLM: Check if workflow plan exists at configured location]]
994
+
995
+ If no plan exists:
996
+
997
+ ```
998
+ No active workflow plan found at {location}.
999
+ Would you like to create one? Use *plan command.
1000
+ ```
1001
+
1002
+ ### 2. Determine Update Type
1003
+
1004
+ [[LLM: Ask user what type of update they want to make]]
1005
+
1006
+ Present options:
1007
+
1008
+ ```
1009
+ What would you like to update in the workflow plan?
1010
+
1011
+ 1. Mark step as complete
1012
+ 2. Update current step
1013
+ 3. Add deviation note
1014
+ 4. Mark decision point resolution
1015
+ 5. Update overall status
1016
+ 6. View current plan status only
1017
+
1018
+ Please select an option (1-6):
1019
+ ```
1020
+
1021
+ ### 3. Parse Current Plan
1022
+
1023
+ [[LLM: Read and parse the plan to understand current state]]
1024
+
1025
+ Extract:
1026
+
1027
+ - All steps with their checkbox status
1028
+ - Step IDs from comments (if present)
1029
+ - Current completion percentage
1030
+ - Any existing deviation notes
1031
+ - Decision points and their status
1032
+
1033
+ ### 4. Execute Updates
1034
+
1035
+ #### 4.1 Mark Step Complete
1036
+
1037
+ If user selected option 1:
1038
+
1039
+ 1. Show numbered list of incomplete steps
1040
+ 2. Ask which step to mark complete
1041
+ 3. Update the checkbox from `[ ]` to `[x]`
1042
+ 4. Add completion timestamp: `<!-- completed: YYYY-MM-DD HH:MM -->`
1043
+ 5. If this was the current step, identify next step
1044
+
1045
+ #### 4.2 Update Current Step
1046
+
1047
+ If user selected option 2:
1048
+
1049
+ 1. Show all steps with current status
1050
+ 2. Ask which step is now current
1051
+ 3. Add/move `<!-- current-step -->` marker
1052
+ 4. Optionally add note about why sequence changed
1053
+
1054
+ #### 4.3 Add Deviation Note
1055
+
1056
+ If user selected option 3:
1057
+
1058
+ 1. Ask for deviation description
1059
+ 2. Ask which step this relates to (or general)
1060
+ 3. Insert note in appropriate location:
1061
+
1062
+ ```markdown
1063
+ > **Deviation Note** (YYYY-MM-DD): {user_note}
1064
+ > Related to: Step X.Y or General workflow
1065
+ ```
1066
+
1067
+ #### 4.4 Mark Decision Resolution
1068
+
1069
+ If user selected option 4:
1070
+
1071
+ 1. Show pending decision points
1072
+ 2. Ask which decision was made
1073
+ 3. Record the decision and chosen path
1074
+ 4. Update related steps based on decision
1075
+
1076
+ #### 4.5 Update Overall Status
1077
+
1078
+ If user selected option 5:
1079
+
1080
+ 1. Show current overall status
1081
+ 2. Provide options:
1082
+ - Active (continuing with plan)
1083
+ - Paused (temporarily stopped)
1084
+ - Abandoned (no longer following)
1085
+ - Complete (all steps done)
1086
+ 3. Update plan header with new status
1087
+
1088
+ ### 5. Automatic Updates (When Called by Tasks)
1089
+
1090
+ [[LLM: When called automatically by another task]]
1091
+
1092
+ If called with parameters:
1093
+
1094
+ ```
1095
+ task: {task_name}
1096
+ step_id: {step_identifier}
1097
+ status: complete|skipped|failed
1098
+ note: {optional_note}
1099
+ ```
1100
+
1101
+ Automatically:
1102
+
1103
+ 1. Find the corresponding step
1104
+ 2. Update its status
1105
+ 3. Add completion metadata
1106
+ 4. Add note if provided
1107
+ 5. Calculate new progress percentage
1108
+
1109
+ ### 6. Generate Update Summary
1110
+
1111
+ After updates, show summary:
1112
+
1113
+ ```
1114
+ ✅ Workflow Plan Updated
1115
+
1116
+ Changes made:
1117
+ - {change_1}
1118
+ - {change_2}
1119
+
1120
+ New Status:
1121
+ - Progress: {X}% complete ({completed}/{total} steps)
1122
+ - Current Step: {current_step}
1123
+ - Next Recommended: {next_step}
1124
+
1125
+ Plan location: {file_path}
1126
+ ```
1127
+
1128
+ ### 7. Integration with Other Tasks
1129
+
1130
+ [[LLM: How other tasks should call this]]
1131
+
1132
+ Other tasks can integrate by:
1133
+
1134
+ 1. **After Task Completion**:
1135
+
1136
+ ```
1137
+ At end of task execution:
1138
+ - Check if task corresponds to a plan step
1139
+ - If yes, call update-workflow-plan with:
1140
+ - task: {current_task_name}
1141
+ - step_id: {matching_step}
1142
+ - status: complete
1143
+ ```
1144
+
1145
+ 2. **On Task Failure**:
1146
+
1147
+ ```
1148
+ If task fails:
1149
+ - Call update-workflow-plan with:
1150
+ - task: {current_task_name}
1151
+ - status: failed
1152
+ - note: {failure_reason}
1153
+ ```
1154
+
1155
+ ### 8. Plan Status Display
1156
+
1157
+ [[LLM: When user selects view status only]]
1158
+
1159
+ Display comprehensive status:
1160
+
1161
+ ```markdown
1162
+ 📋 Workflow Plan Status
1163
+ ━━━━━━━━━━━━━━━━━━━━
1164
+ Workflow: {workflow_name}
1165
+ Status: {Active|Paused|Complete}
1166
+ Progress: {X}% complete ({completed}/{total} steps)
1167
+ Last Updated: {timestamp}
1168
+
1169
+ ✅ Completed Steps:
1170
+ - [x] Step 1.1: {description} (completed: {date})
1171
+ - [x] Step 1.2: {description} (completed: {date})
1172
+
1173
+ 🔄 Current Step:
1174
+ - [ ] Step 2.1: {description} <!-- current-step -->
1175
+ Agent: {agent_name}
1176
+ Task: {task_name}
1177
+
1178
+ 📌 Upcoming Steps:
1179
+ - [ ] Step 2.2: {description}
1180
+ - [ ] Step 3.1: {description}
1181
+
1182
+ ⚠️ Deviations/Notes:
1183
+ {any_deviation_notes}
1184
+
1185
+ 📊 Decision Points:
1186
+ - Decision 1: {status} - {choice_made}
1187
+ - Decision 2: Pending
1188
+
1189
+ 💡 Next Action:
1190
+ Based on the plan, you should {recommended_action}
1191
+ ```
1192
+
1193
+ ## Success Criteria
1194
+
1195
+ The update is successful when:
1196
+
1197
+ 1. Plan accurately reflects current workflow state
1198
+ 2. All updates are clearly timestamped
1199
+ 3. Deviations are documented with reasons
1200
+ 4. Progress calculation is correct
1201
+ 5. Next steps are clear to user
1202
+ 6. Plan remains readable and well-formatted
1203
+
1204
+ ## Error Handling
1205
+
1206
+ - **Plan file not found**: Offer to create new plan
1207
+ - **Malformed plan**: Attempt basic updates, warn user
1208
+ - **Write permission error**: Show changes that would be made
1209
+ - **Step not found**: Show available steps, ask for clarification
1210
+ - **Concurrent updates**: Implement simple locking or warn about conflicts
1211
+
1212
+ ## Notes
1213
+
1214
+ - Always preserve plan history (don't delete old information)
1215
+ - Keep updates atomic to prevent corruption
1216
+ - Consider creating backup before major updates
1217
+ - Updates should enhance, not complicate, the workflow experience
1218
+ - If plan becomes too cluttered, suggest creating fresh plan for next phase
1219
+ ==================== END: tasks#update-workflow-plan ====================
1220
+
644
1221
  ==================== START: data#bmad-kb ====================
645
1222
  # BMAD Knowledge Base
646
1223
 
@@ -722,7 +1299,7 @@ BMAD transforms you into a "Vibe CEO" - directing a team of specialized AI agent
722
1299
  5. Type `/help` to see available commands
723
1300
 
724
1301
  #### Option 2: IDE Integration
725
- **Best for**: Cursor, Claude Code, Windsurf, Cline, Roo Code users
1302
+ **Best for**: Cursor, Claude Code, Windsurf, Cline, Roo Code, VS Code Copilot users
726
1303
 
727
1304
  ```bash
728
1305
  # Interactive installation (recommended)
@@ -737,6 +1314,7 @@ npx bmad-method install
737
1314
  - **Windsurf**: Built-in AI capabilities
738
1315
  - **Cline**: VS Code extension with AI features
739
1316
  - **Roo Code**: Web-based IDE with agent support
1317
+ - **VS Code Copilot**: AI-powered coding assistant
740
1318
 
741
1319
  **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.
742
1320
 
@@ -922,6 +1500,7 @@ You are the "Vibe CEO" - thinking like a CEO with unlimited resources and a sing
922
1500
  - **Cursor**: `@agent-name` (e.g., `@bmad-master`)
923
1501
  - **Windsurf**: `@agent-name` (e.g., `@bmad-master`)
924
1502
  - **Roo Code**: Select mode from mode selector (e.g., `bmad-bmad-master`)
1503
+ - **VS Code Copilot**: Open the Chat view (`⌃⌘I` on Mac, `Ctrl+Alt+I` on Windows/Linux) and select **Agent** from the chat mode selector.
925
1504
 
926
1505
  **Chat Management Guidelines**:
927
1506
  - **Claude Code, Cursor, Windsurf**: Start new chats when switching agents
@@ -1391,6 +1970,232 @@ Use the **expansion-creator** pack to build your own:
1391
1970
  - **Contributing**: See `CONTRIBUTING.md` for full guidelines
1392
1971
  ==================== END: data#bmad-kb ====================
1393
1972
 
1973
+ ==================== START: utils#plan-management ====================
1974
+ # Plan Management Utility
1975
+
1976
+ ## Purpose
1977
+
1978
+ 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.
1979
+
1980
+ ## Core Functions
1981
+
1982
+ ### 1. Check Plan Existence
1983
+
1984
+ [[LLM: When any agent starts or task begins, check if a workflow plan exists]]
1985
+
1986
+ ```
1987
+ Check for workflow plan:
1988
+ 1. Look for docs/workflow-plan.md (default location)
1989
+ 2. Check core-config.yml for custom plan location
1990
+ 3. Return plan status (exists/not exists)
1991
+ ```
1992
+
1993
+ ### 2. Parse Plan Status
1994
+
1995
+ [[LLM: Extract current progress from the plan document]]
1996
+
1997
+ **Plan Parsing Logic:**
1998
+
1999
+ 1. **Identify Step Structure**:
2000
+ - Look for checkbox lines: `- [ ]` or `- [x]`
2001
+ - Extract step IDs from comments: `<!-- step-id: X.Y -->`
2002
+ - Identify agent assignments: `<!-- agent: pm -->`
2003
+
2004
+ 2. **Determine Current State**:
2005
+ - Last completed step (highest numbered `[x]`)
2006
+ - Next expected step (first `[ ]` after completed steps)
2007
+ - Overall progress percentage
2008
+
2009
+ 3. **Extract Metadata**:
2010
+ - Workflow type from plan header
2011
+ - Decision points and their status
2012
+ - Any deviation notes
2013
+
2014
+ ### 3. Sequence Validation
2015
+
2016
+ [[LLM: Check if requested action aligns with plan sequence]]
2017
+
2018
+ **Validation Rules:**
2019
+
2020
+ 1. **Strict Mode** (enforceSequence: true):
2021
+ - Must complete steps in exact order
2022
+ - Warn and block if out of sequence
2023
+ - Require explicit override justification
2024
+
2025
+ 2. **Flexible Mode** (enforceSequence: false):
2026
+ - Warn about sequence deviation
2027
+ - Allow with confirmation
2028
+ - Log deviation reason
2029
+
2030
+ **Warning Templates:**
2031
+
2032
+ ```
2033
+ SEQUENCE WARNING:
2034
+ The workflow plan shows you should complete "{expected_step}" next.
2035
+ You're attempting to: "{requested_action}"
2036
+
2037
+ In strict mode: Block and require plan update
2038
+ In flexible mode: Allow with confirmation
2039
+ ```
2040
+
2041
+ ### 4. Plan Update Operations
2042
+
2043
+ [[LLM: Provide consistent way to update plan progress]]
2044
+
2045
+ **Update Actions:**
2046
+
2047
+ 1. **Mark Step Complete**:
2048
+ - Change `- [ ]` to `- [x]`
2049
+ - Add completion timestamp comment
2050
+ - Update any status metadata
2051
+
2052
+ 2. **Add Deviation Note**:
2053
+ - Insert note explaining why sequence changed
2054
+ - Reference the deviation in plan
2055
+
2056
+ 3. **Update Current Step Pointer**:
2057
+ - Add/move `<!-- current-step -->` marker
2058
+ - Update last-modified timestamp
2059
+
2060
+ ### 5. Integration Instructions
2061
+
2062
+ [[LLM: How agents and tasks should use this utility]]
2063
+
2064
+ **For Agents (startup sequence)**:
2065
+
2066
+ ```
2067
+ 1. Check if plan exists using this utility
2068
+ 2. If exists:
2069
+ - Parse current status
2070
+ - Show user: "Active workflow plan detected. Current step: {X}"
2071
+ - Suggest: "Next recommended action: {next_step}"
2072
+ 3. Continue with normal startup
2073
+ ```
2074
+
2075
+ **For Tasks (pre-execution)**:
2076
+
2077
+ ```
2078
+ 1. Check if plan exists
2079
+ 2. If exists:
2080
+ - Verify this task aligns with plan
2081
+ - If not aligned:
2082
+ - In strict mode: Show warning and stop
2083
+ - In flexible mode: Show warning and ask for confirmation
2084
+ 3. After task completion:
2085
+ - Update plan if task was a planned step
2086
+ - Add note if task was unplanned
2087
+ ```
2088
+
2089
+ ### 6. Plan Status Report Format
2090
+
2091
+ [[LLM: Standard format for showing plan status]]
2092
+
2093
+ ```
2094
+ 📋 Workflow Plan Status
2095
+ ━━━━━━━━━━━━━━━━━━━━
2096
+ Workflow: {workflow_name}
2097
+ Progress: {X}% complete ({completed}/{total} steps)
2098
+
2099
+ ✅ Completed:
2100
+ - {completed_step_1}
2101
+ - {completed_step_2}
2102
+
2103
+ 🔄 Current Step:
2104
+ - {current_step_description}
2105
+
2106
+ 📌 Upcoming:
2107
+ - {next_step_1}
2108
+ - {next_step_2}
2109
+
2110
+ ⚠️ Notes:
2111
+ - {any_deviations_or_notes}
2112
+ ```
2113
+
2114
+ ### 7. Decision Point Handling
2115
+
2116
+ [[LLM: Special handling for workflow decision points]]
2117
+
2118
+ When encountering a decision point in the plan:
2119
+
2120
+ 1. **Identify Decision Marker**: `<!-- decision: {decision_id} -->`
2121
+ 2. **Check Decision Status**: Made/Pending
2122
+ 3. **If Pending**:
2123
+ - Block progress until decision made
2124
+ - Show options to user
2125
+ - Record decision when made
2126
+ 4. **If Made**:
2127
+ - Verify current path aligns with decision
2128
+ - Warn if attempting alternate path
2129
+
2130
+ ### 8. Plan Abandonment
2131
+
2132
+ [[LLM: Graceful handling when user wants to stop following plan]]
2133
+
2134
+ If user wants to abandon plan:
2135
+
2136
+ 1. Confirm abandonment intent
2137
+ 2. Add abandonment note to plan
2138
+ 3. Mark plan as "Abandoned" in header
2139
+ 4. Stop plan checking for remainder of session
2140
+ 5. Suggest creating new plan if needed
2141
+
2142
+ ## Usage Examples
2143
+
2144
+ ### Example 1: Agent Startup Check
2145
+
2146
+ ```
2147
+ BMad Master starting...
2148
+
2149
+ [Check for plan]
2150
+ Found active workflow plan: brownfield-fullstack
2151
+ Progress: 40% complete (4/10 steps)
2152
+ Current step: Create PRD (pm agent)
2153
+
2154
+ Suggestion: Based on your plan, you should work with the PM agent next.
2155
+ Use *agent pm to switch, or *plan-status to see full progress.
2156
+ ```
2157
+
2158
+ ### Example 2: Task Sequence Warning
2159
+
2160
+ ```
2161
+ User: *task create-next-story
2162
+
2163
+ [Plan check triggered]
2164
+ ⚠️ SEQUENCE WARNING:
2165
+ Your workflow plan indicates the PRD hasn't been created yet.
2166
+ Creating stories before the PRD may lead to incomplete requirements.
2167
+
2168
+ Would you like to:
2169
+ 1. Continue anyway (will note deviation in plan)
2170
+ 2. Switch to creating PRD first (*agent pm)
2171
+ 3. View plan status (*plan-status)
2172
+ ```
2173
+
2174
+ ### Example 3: Automatic Plan Update
2175
+
2176
+ ```
2177
+ [After completing create-doc task for PRD]
2178
+
2179
+ ✅ Plan Updated: Marked "Create PRD" as complete
2180
+ 📍 Next step: Create Architecture Document (architect agent)
2181
+ ```
2182
+
2183
+ ## Implementation Notes
2184
+
2185
+ - This utility should be lightweight and fast
2186
+ - Plan parsing should be resilient to format variations
2187
+ - Always preserve user agency - warnings not blocks (unless strict mode)
2188
+ - Plan updates should be atomic to prevent corruption
2189
+ - Consider plan versioning for rollback capability
2190
+
2191
+ ## Error Handling
2192
+
2193
+ - Missing plan: Return null, don't error
2194
+ - Malformed plan: Warn but continue, treat as no plan
2195
+ - Update failures: Log but don't block task completion
2196
+ - Parse errors: Fallback to basic text search
2197
+ ==================== END: utils#plan-management ====================
2198
+
1394
2199
  ==================== START: utils#workflow-management ====================
1395
2200
  # Workflow Management
1396
2201
 
@@ -2901,6 +3706,22 @@ To identify the next logical story based on project progress and epic definition
2901
3706
  - `architecture.architectureSharded`: Whether architecture is sharded
2902
3707
  - `architecture.architectureFile`: Location of monolithic architecture
2903
3708
  - `architecture.architectureShardedLocation`: Location of sharded architecture files
3709
+ - `workflow.trackProgress`: Whether workflow plan tracking is enabled
3710
+ - `workflow.planFile`: Location of workflow plan (if tracking enabled)
3711
+
3712
+ ### 0.5 Check Workflow Plan (if configured)
3713
+
3714
+ [[LLM: Check if workflow plan tracking is enabled]]
3715
+
3716
+ - If `workflow.trackProgress: true`, check for active plan at `workflow.planFile`
3717
+ - If plan exists:
3718
+ - Parse plan to check if story creation is the expected next step
3719
+ - If out of sequence and `workflow.enforceSequence: true`:
3720
+ - Show warning: "The workflow plan indicates you should complete {expected_step} before creating stories."
3721
+ - Block execution unless user explicitly overrides
3722
+ - If out of sequence and `workflow.enforceSequence: false`:
3723
+ - Show warning but allow continuation with confirmation
3724
+ - Continue with story identification after plan check
2904
3725
 
2905
3726
  ### 1. Identify Next Story for Preparation
2906
3727
 
@@ -3124,6 +3945,15 @@ Provide a summary to the user including:
3124
3945
  - Recommendations for story review before approval
3125
3946
  - Next steps: Story should be reviewed by PO for approval before dev work begins
3126
3947
 
3948
+ ### 10. Update Workflow Plan (if applicable)
3949
+
3950
+ [[LLM: After successful story creation]]
3951
+
3952
+ - If `workflow.trackProgress: true` and `workflow.updateOnCompletion: true`:
3953
+ - Call update-workflow-plan task to mark story creation step complete
3954
+ - Parameters: task: create-next-story, step_id: {from plan}, status: complete
3955
+ - If plan shows next step, mention it in completion message
3956
+
3127
3957
  [[LLM: Remember - The success of this task depends on extracting real, specific technical details from the architecture shards. The dev agent should have everything they need in the story file without having to search through multiple documents.]]
3128
3958
  ==================== END: tasks#create-next-story ====================
3129
3959