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
@@ -69,6 +69,9 @@ startup:
69
69
  - Announce: Introduce yourself as the BMAD Orchestrator, explain you can coordinate agents and workflows
70
70
  - IMPORTANT: Tell users that all commands start with * (e.g., *help, *agent, *workflow)
71
71
  - Mention *help shows all available commands and options
72
+ - Check for active workflow plan using utils#plan-management
73
+ - 'If plan exists: Show 📋 Active plan: {workflow} ({progress}% complete). Use *plan-status for details.'
74
+ - 'If plan exists: Suggest next action based on plan progress'
72
75
  - Assess user goal against available agents and workflows in this bundle
73
76
  - If clear match to an agent's expertise, suggest transformation with *agent command
74
77
  - If project-oriented, suggest *workflow-guidance to explore options
@@ -83,6 +86,9 @@ commands:
83
86
  task: Run a specific task (list if name not specified)
84
87
  workflow: Start a specific workflow (list if name not specified)
85
88
  workflow-guidance: Get personalized help selecting the right workflow
89
+ plan: Create detailed workflow plan before starting
90
+ plan-status: Show current workflow plan progress
91
+ plan-update: Update workflow plan status
86
92
  checklist: Execute a checklist (list if name not specified)
87
93
  yolo: Toggle skip confirmations mode
88
94
  party-mode: Group chat with all agents
@@ -106,6 +112,9 @@ help-display-template: |
106
112
  Workflow Commands:
107
113
  *workflow [name] .... Start specific workflow (list if no name)
108
114
  *workflow-guidance .. Get personalized help selecting the right workflow
115
+ *plan ............... Create detailed workflow plan before starting
116
+ *plan-status ........ Show current workflow plan progress
117
+ *plan-update ........ Update workflow plan status
109
118
 
110
119
  Other Commands:
111
120
  *yolo ............... Toggle skip confirmations mode
@@ -146,6 +155,8 @@ workflow-guidance:
146
155
  - Understand each workflow's purpose, options, and decision points
147
156
  - Ask clarifying questions based on the workflow's structure
148
157
  - Guide users through workflow selection when multiple options exist
158
+ - For complex projects, offer to create a workflow plan using create-workflow-plan task
159
+ - When appropriate, suggest: Would you like me to create a detailed workflow plan before starting?
149
160
  - For workflows with divergent paths, help users choose the right path
150
161
  - Adapt questions to the specific domain (e.g., game dev vs infrastructure vs web dev)
151
162
  - Only recommend workflows that actually exist in the current bundle
@@ -154,10 +165,13 @@ dependencies:
154
165
  tasks:
155
166
  - advanced-elicitation
156
167
  - create-doc
168
+ - create-workflow-plan
157
169
  - kb-mode-interaction
170
+ - update-workflow-plan
158
171
  data:
159
172
  - bmad-kb
160
173
  utils:
174
+ - plan-management
161
175
  - workflow-management
162
176
  - template-format
163
177
  ```
@@ -274,11 +288,22 @@ Generate documents from templates by EXECUTING (not just reading) embedded instr
274
288
 
275
289
  ## Execution Flow
276
290
 
291
+ ### 0. Check Workflow Plan (if configured)
292
+
293
+ [[LLM: Check if plan tracking is enabled in core-config.yml]]
294
+
295
+ - If `workflow.trackProgress: true`, check for active plan using utils#plan-management
296
+ - If plan exists and this document creation is part of the plan:
297
+ - Verify this is the expected next step
298
+ - If out of sequence and `enforceSequence: true`, warn user and halt without user override
299
+ - If out of sequence and `enforceSequence: false`, ask for confirmation
300
+ - Continue with normal execution after plan check
301
+
277
302
  ### 1. Identify Template
278
303
 
279
304
  - Load from `templates#*` or `{root}/templates directory`
280
305
  - Agent-specific templates are listed in agent's dependencies
281
- - If agent has `templates: [prd-tmpl, architecture-tmpl]`, offer to create "PRD" and "Architecture" documents
306
+ - If agent has `templates: [prd-tmpl, architecture-tmpl]` for example, then offer to create "PRD" and "Architecture" documents
282
307
 
283
308
  ### 2. Ask Interaction Mode
284
309
 
@@ -315,6 +340,15 @@ Generate documents from templates by EXECUTING (not just reading) embedded instr
315
340
  - Begin directly with content (no preamble)
316
341
  - Include any handoff prompts from template
317
342
 
343
+ ### 6. Update Workflow Plan (if applicable)
344
+
345
+ [[LLM: After successful document creation]]
346
+
347
+ - If plan tracking is enabled and document was part of plan:
348
+ - Call update-workflow-plan task to mark step complete
349
+ - Parameters: task: create-doc, step_id: {from plan}, status: complete
350
+ - Show next recommended step from plan
351
+
318
352
  ## Common Mistakes to Avoid
319
353
 
320
354
  ❌ Skipping elicitation tasks
@@ -332,6 +366,298 @@ Generate documents from templates by EXECUTING (not just reading) embedded instr
332
366
  Templates contain precise instructions for a reason. Follow them exactly to ensure document quality and completeness.
333
367
  ==================== END: tasks#create-doc ====================
334
368
 
369
+ ==================== START: tasks#create-workflow-plan ====================
370
+ # Create Workflow Plan Task
371
+
372
+ ## Purpose
373
+
374
+ 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.
375
+
376
+ ## Task Instructions
377
+
378
+ ### 1. Understand User's Goal
379
+
380
+ [[LLM: Start with discovery questions to understand what the user wants to accomplish]]
381
+
382
+ Ask the user:
383
+
384
+ 1. **Project Type**:
385
+ - Are you starting a new project (greenfield) or enhancing an existing one (brownfield)?
386
+ - What type of application? (web app, service/API, UI only, full-stack)
387
+
388
+ 2. **For Greenfield**:
389
+ - Do you need a quick prototype or production-ready application?
390
+ - Will this have a UI component?
391
+ - Single service or multiple services?
392
+
393
+ 3. **For Brownfield**:
394
+ - What's the scope of the enhancement?
395
+ - Single bug fix or small feature (few hours)
396
+ - Small enhancement (1-3 stories)
397
+ - Major feature requiring coordination
398
+ - Architectural changes or modernization
399
+ - Do you have existing documentation?
400
+ - Are you following existing patterns or introducing new ones?
401
+
402
+ ### 2. Recommend Appropriate Workflow
403
+
404
+ Based on the answers, recommend:
405
+
406
+ **Greenfield Options:**
407
+
408
+ - `greenfield-fullstack` - Complete web application
409
+ - `greenfield-service` - Backend API/service only
410
+ - `greenfield-ui` - Frontend only
411
+
412
+ **Brownfield Options:**
413
+
414
+ - `brownfield-create-story` - Single small change
415
+ - `brownfield-create-epic` - Small feature (1-3 stories)
416
+ - `brownfield-fullstack` - Major enhancement
417
+
418
+ **Simplified Option:**
419
+
420
+ - For users unsure or wanting flexibility, suggest starting with individual agent tasks
421
+
422
+ ### 3. Explain Selected Workflow
423
+
424
+ [[LLM: Once workflow is selected, provide clear explanation]]
425
+
426
+ For the selected workflow, explain:
427
+
428
+ 1. **Overview**: What this workflow accomplishes
429
+ 2. **Duration**: Estimated time for planning phase
430
+ 3. **Outputs**: What documents will be created
431
+ 4. **Decision Points**: Where user input will be needed
432
+ 5. **Requirements**: What information should be ready
433
+
434
+ ### 4. Create Workflow Plan Document
435
+
436
+ [[LLM: Generate a comprehensive plan document with the following structure]]
437
+
438
+ ```markdown
439
+ # Workflow Plan: {{Workflow Name}}
440
+
441
+ <!-- WORKFLOW-PLAN-META
442
+ workflow-id: {{workflow-id}}
443
+ status: active
444
+ created: {{ISO-8601 timestamp}}
445
+ updated: {{ISO-8601 timestamp}}
446
+ version: 1.0
447
+ -->
448
+
449
+ **Created Date**: {{current date}}
450
+ **Project**: {{project name}}
451
+ **Type**: {{greenfield/brownfield}}
452
+ **Status**: Active
453
+ **Estimated Planning Duration**: {{time estimate}}
454
+
455
+ ## Objective
456
+
457
+ {{Clear description of what will be accomplished}}
458
+
459
+ ## Selected Workflow
460
+
461
+ **Workflow**: `{{workflow-id}}`
462
+ **Reason**: {{Why this workflow fits the user's needs}}
463
+
464
+ ## Workflow Steps
465
+
466
+ ### Planning Phase
467
+
468
+ - [ ] Step 1: {{step name}} <!-- step-id: 1.1, agent: {{agent}}, task: {{task}} -->
469
+ - **Agent**: {{agent name}}
470
+ - **Action**: {{what happens}}
471
+ - **Output**: {{what's created}}
472
+ - **User Input**: {{if any}}
473
+
474
+ - [ ] Step 2: {{step name}} <!-- step-id: 1.2, agent: {{agent}}, task: {{task}} -->
475
+ - **Agent**: {{agent name}}
476
+ - **Action**: {{what happens}}
477
+ - **Output**: {{what's created}}
478
+ - **Decision Point**: {{if any}} <!-- decision-id: D1 -->
479
+
480
+ {{Continue for all planning steps}}
481
+
482
+ ### Development Phase (IDE)
483
+
484
+ - [ ] Document Sharding <!-- step-id: 2.1, agent: po, task: shard-doc -->
485
+ - Prepare documents for story creation
486
+
487
+ - [ ] Story Development Cycle <!-- step-id: 2.2, repeats: true -->
488
+ - [ ] Create story (SM agent) <!-- step-id: 2.2.1, agent: sm, task: create-next-story -->
489
+ - [ ] Review story (optional) <!-- step-id: 2.2.2, agent: analyst, optional: true -->
490
+ - [ ] Implement story (Dev agent) <!-- step-id: 2.2.3, agent: dev -->
491
+ - [ ] QA review (optional) <!-- step-id: 2.2.4, agent: qa, optional: true -->
492
+ - [ ] Repeat for all stories
493
+
494
+ - [ ] Epic Retrospective (optional) <!-- step-id: 2.3, agent: po, optional: true -->
495
+
496
+ ## Key Decision Points
497
+
498
+ 1. **{{Decision Name}}** (Step {{n}}): <!-- decision-id: D1, status: pending -->
499
+ - Trigger: {{what causes this decision}}
500
+ - Options: {{available choices}}
501
+ - Impact: {{how it affects the workflow}}
502
+ - Decision Made: _Pending_
503
+
504
+ {{List all decision points}}
505
+
506
+ ## Expected Outputs
507
+
508
+ ### Planning Documents
509
+ - [ ] {{document 1}} - {{description}}
510
+ - [ ] {{document 2}} - {{description}}
511
+ {{etc...}}
512
+
513
+ ### Development Artifacts
514
+ - [ ] Stories in `docs/stories/`
515
+ - [ ] Implementation code
516
+ - [ ] Tests
517
+ - [ ] Updated documentation
518
+
519
+ ## Prerequisites Checklist
520
+
521
+ Before starting this workflow, ensure you have:
522
+
523
+ - [ ] {{prerequisite 1}}
524
+ - [ ] {{prerequisite 2}}
525
+ - [ ] {{prerequisite 3}}
526
+ {{etc...}}
527
+
528
+ ## Customization Options
529
+
530
+ Based on your project needs, you may:
531
+ - Skip {{optional step}} if {{condition}}
532
+ - Add {{additional step}} if {{condition}}
533
+ - Choose {{alternative}} instead of {{default}}
534
+
535
+ ## Risk Considerations
536
+
537
+ {{For brownfield only}}
538
+ - Integration complexity: {{assessment}}
539
+ - Rollback strategy: {{approach}}
540
+ - Testing requirements: {{special needs}}
541
+
542
+ ## Next Steps
543
+
544
+ 1. Review this plan and confirm it matches your expectations
545
+ 2. Gather any missing prerequisites
546
+ 3. Start workflow with: `*task workflow {{workflow-id}}`
547
+ 4. Or begin with first agent: `@{{first-agent}}`
548
+
549
+ ## Notes
550
+
551
+ {{Any additional context or warnings}}
552
+
553
+ ---
554
+ *This plan can be updated as you progress through the workflow. Check off completed items to track progress.*
555
+ ```
556
+
557
+ ### 5. Save and Present Plan
558
+
559
+ 1. Save the plan as `docs/workflow-plan.md`
560
+ 2. Inform user: "Workflow plan created at docs/workflow-plan.md"
561
+ 3. Offer options:
562
+ - Review the plan together
563
+ - Start the workflow now
564
+ - Gather prerequisites first
565
+ - Modify the plan
566
+
567
+ ### 6. Plan Variations
568
+
569
+ [[LLM: Adjust plan detail based on workflow complexity]]
570
+
571
+ **For Simple Workflows** (create-story, create-epic):
572
+
573
+ - Simpler checklist format
574
+ - Focus on immediate next steps
575
+ - Less detailed explanations
576
+
577
+ **For Complex Workflows** (full greenfield/brownfield):
578
+
579
+ - Detailed step breakdowns
580
+ - All decision points documented
581
+ - Comprehensive output descriptions
582
+ - Risk mitigation sections
583
+
584
+ **For Brownfield Workflows**:
585
+
586
+ - Include existing system impact analysis
587
+ - Document integration checkpoints
588
+ - Add rollback considerations
589
+ - Note documentation dependencies
590
+
591
+ ### 7. Interactive Planning Mode
592
+
593
+ [[LLM: If user wants to customize the workflow]]
594
+
595
+ If user wants to modify the standard workflow:
596
+
597
+ 1. Present workflow steps as options
598
+ 2. Allow skipping optional steps
599
+ 3. Let user reorder certain steps
600
+ 4. Document customizations in plan
601
+ 5. Warn about dependencies if steps are skipped
602
+
603
+ ### 8. Execution Guidance
604
+
605
+ After plan is created, provide clear guidance:
606
+
607
+ ```text
608
+ Your workflow plan is ready! Here's how to proceed:
609
+
610
+ 1. **Review the plan**: Check that all steps align with your goals
611
+ 2. **Gather prerequisites**: Use the checklist to ensure you're ready
612
+ 3. **Start execution**:
613
+ - Full workflow: `*task workflow {{workflow-id}}`
614
+ - Step by step: Start with `@{{first-agent}}`
615
+ 4. **Track progress**: Check off steps in the plan as completed
616
+
617
+ Would you like to:
618
+ a) Review the plan together
619
+ b) Start the workflow now
620
+ c) Gather prerequisites first
621
+ d) Modify the plan
622
+ ```
623
+
624
+ ## Success Criteria
625
+
626
+ The workflow plan is successful when:
627
+
628
+ 1. User clearly understands what will happen
629
+ 2. All decision points are documented
630
+ 3. Prerequisites are identified
631
+ 4. Expected outputs are clear
632
+ 5. User feels confident to proceed
633
+ 6. Plan serves as useful progress tracker
634
+
635
+ ## Integration with BMad Master and Orchestrator
636
+
637
+ When used by BMad Master or BMad Orchestrator, this task should:
638
+
639
+ 1. Be offered when user asks about workflows
640
+ 2. Be suggested before starting complex workflows
641
+ 3. Create a plan that the agent can reference during execution
642
+ 4. Allow the agent to track progress against the plan
643
+
644
+ ## Example Usage
645
+
646
+ ```text
647
+ User: "I need to add a payment system to my existing app"
648
+
649
+ BMad Orchestrator: "Let me help you create a workflow plan for that enhancement. I'll ask a few questions to recommend the best approach..."
650
+
651
+ [Runs through discovery questions]
652
+
653
+ BMad Orchestrator: "Based on your answers, I recommend the brownfield-fullstack workflow. Let me create a detailed plan for you..."
654
+
655
+ [Creates and saves plan]
656
+
657
+ 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?"
658
+ ```
659
+ ==================== END: tasks#create-workflow-plan ====================
660
+
335
661
  ==================== START: tasks#kb-mode-interaction ====================
336
662
  # KB Mode Interaction Task
337
663
 
@@ -405,6 +731,257 @@ Or ask me about anything else related to BMAD-METHOD!
405
731
  **Assistant**: [Provides focused information about workflows from the KB, then offers to explore specific workflow types or related topics]
406
732
  ==================== END: tasks#kb-mode-interaction ====================
407
733
 
734
+ ==================== START: tasks#update-workflow-plan ====================
735
+ # Update Workflow Plan Task
736
+
737
+ ## Purpose
738
+
739
+ 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.
740
+
741
+ ## Task Instructions
742
+
743
+ ### 0. Load Plan Configuration
744
+
745
+ [[LLM: First load core-config.yml to get plan settings]]
746
+
747
+ Check workflow configuration:
748
+
749
+ - `workflow.planFile` - Location of the plan (default: docs/workflow-plan.md)
750
+ - `workflow.trackProgress` - Whether tracking is enabled
751
+ - `workflow.updateOnCompletion` - Whether to auto-update on task completion
752
+
753
+ If tracking is disabled, inform user and exit.
754
+
755
+ ### 1. Verify Plan Exists
756
+
757
+ [[LLM: Check if workflow plan exists at configured location]]
758
+
759
+ If no plan exists:
760
+
761
+ ```
762
+ No active workflow plan found at {location}.
763
+ Would you like to create one? Use *plan command.
764
+ ```
765
+
766
+ ### 2. Determine Update Type
767
+
768
+ [[LLM: Ask user what type of update they want to make]]
769
+
770
+ Present options:
771
+
772
+ ```
773
+ What would you like to update in the workflow plan?
774
+
775
+ 1. Mark step as complete
776
+ 2. Update current step
777
+ 3. Add deviation note
778
+ 4. Mark decision point resolution
779
+ 5. Update overall status
780
+ 6. View current plan status only
781
+
782
+ Please select an option (1-6):
783
+ ```
784
+
785
+ ### 3. Parse Current Plan
786
+
787
+ [[LLM: Read and parse the plan to understand current state]]
788
+
789
+ Extract:
790
+
791
+ - All steps with their checkbox status
792
+ - Step IDs from comments (if present)
793
+ - Current completion percentage
794
+ - Any existing deviation notes
795
+ - Decision points and their status
796
+
797
+ ### 4. Execute Updates
798
+
799
+ #### 4.1 Mark Step Complete
800
+
801
+ If user selected option 1:
802
+
803
+ 1. Show numbered list of incomplete steps
804
+ 2. Ask which step to mark complete
805
+ 3. Update the checkbox from `[ ]` to `[x]`
806
+ 4. Add completion timestamp: `<!-- completed: YYYY-MM-DD HH:MM -->`
807
+ 5. If this was the current step, identify next step
808
+
809
+ #### 4.2 Update Current Step
810
+
811
+ If user selected option 2:
812
+
813
+ 1. Show all steps with current status
814
+ 2. Ask which step is now current
815
+ 3. Add/move `<!-- current-step -->` marker
816
+ 4. Optionally add note about why sequence changed
817
+
818
+ #### 4.3 Add Deviation Note
819
+
820
+ If user selected option 3:
821
+
822
+ 1. Ask for deviation description
823
+ 2. Ask which step this relates to (or general)
824
+ 3. Insert note in appropriate location:
825
+
826
+ ```markdown
827
+ > **Deviation Note** (YYYY-MM-DD): {user_note}
828
+ > Related to: Step X.Y or General workflow
829
+ ```
830
+
831
+ #### 4.4 Mark Decision Resolution
832
+
833
+ If user selected option 4:
834
+
835
+ 1. Show pending decision points
836
+ 2. Ask which decision was made
837
+ 3. Record the decision and chosen path
838
+ 4. Update related steps based on decision
839
+
840
+ #### 4.5 Update Overall Status
841
+
842
+ If user selected option 5:
843
+
844
+ 1. Show current overall status
845
+ 2. Provide options:
846
+ - Active (continuing with plan)
847
+ - Paused (temporarily stopped)
848
+ - Abandoned (no longer following)
849
+ - Complete (all steps done)
850
+ 3. Update plan header with new status
851
+
852
+ ### 5. Automatic Updates (When Called by Tasks)
853
+
854
+ [[LLM: When called automatically by another task]]
855
+
856
+ If called with parameters:
857
+
858
+ ```
859
+ task: {task_name}
860
+ step_id: {step_identifier}
861
+ status: complete|skipped|failed
862
+ note: {optional_note}
863
+ ```
864
+
865
+ Automatically:
866
+
867
+ 1. Find the corresponding step
868
+ 2. Update its status
869
+ 3. Add completion metadata
870
+ 4. Add note if provided
871
+ 5. Calculate new progress percentage
872
+
873
+ ### 6. Generate Update Summary
874
+
875
+ After updates, show summary:
876
+
877
+ ```
878
+ ✅ Workflow Plan Updated
879
+
880
+ Changes made:
881
+ - {change_1}
882
+ - {change_2}
883
+
884
+ New Status:
885
+ - Progress: {X}% complete ({completed}/{total} steps)
886
+ - Current Step: {current_step}
887
+ - Next Recommended: {next_step}
888
+
889
+ Plan location: {file_path}
890
+ ```
891
+
892
+ ### 7. Integration with Other Tasks
893
+
894
+ [[LLM: How other tasks should call this]]
895
+
896
+ Other tasks can integrate by:
897
+
898
+ 1. **After Task Completion**:
899
+
900
+ ```
901
+ At end of task execution:
902
+ - Check if task corresponds to a plan step
903
+ - If yes, call update-workflow-plan with:
904
+ - task: {current_task_name}
905
+ - step_id: {matching_step}
906
+ - status: complete
907
+ ```
908
+
909
+ 2. **On Task Failure**:
910
+
911
+ ```
912
+ If task fails:
913
+ - Call update-workflow-plan with:
914
+ - task: {current_task_name}
915
+ - status: failed
916
+ - note: {failure_reason}
917
+ ```
918
+
919
+ ### 8. Plan Status Display
920
+
921
+ [[LLM: When user selects view status only]]
922
+
923
+ Display comprehensive status:
924
+
925
+ ```markdown
926
+ 📋 Workflow Plan Status
927
+ ━━━━━━━━━━━━━━━━━━━━
928
+ Workflow: {workflow_name}
929
+ Status: {Active|Paused|Complete}
930
+ Progress: {X}% complete ({completed}/{total} steps)
931
+ Last Updated: {timestamp}
932
+
933
+ ✅ Completed Steps:
934
+ - [x] Step 1.1: {description} (completed: {date})
935
+ - [x] Step 1.2: {description} (completed: {date})
936
+
937
+ 🔄 Current Step:
938
+ - [ ] Step 2.1: {description} <!-- current-step -->
939
+ Agent: {agent_name}
940
+ Task: {task_name}
941
+
942
+ 📌 Upcoming Steps:
943
+ - [ ] Step 2.2: {description}
944
+ - [ ] Step 3.1: {description}
945
+
946
+ ⚠️ Deviations/Notes:
947
+ {any_deviation_notes}
948
+
949
+ 📊 Decision Points:
950
+ - Decision 1: {status} - {choice_made}
951
+ - Decision 2: Pending
952
+
953
+ 💡 Next Action:
954
+ Based on the plan, you should {recommended_action}
955
+ ```
956
+
957
+ ## Success Criteria
958
+
959
+ The update is successful when:
960
+
961
+ 1. Plan accurately reflects current workflow state
962
+ 2. All updates are clearly timestamped
963
+ 3. Deviations are documented with reasons
964
+ 4. Progress calculation is correct
965
+ 5. Next steps are clear to user
966
+ 6. Plan remains readable and well-formatted
967
+
968
+ ## Error Handling
969
+
970
+ - **Plan file not found**: Offer to create new plan
971
+ - **Malformed plan**: Attempt basic updates, warn user
972
+ - **Write permission error**: Show changes that would be made
973
+ - **Step not found**: Show available steps, ask for clarification
974
+ - **Concurrent updates**: Implement simple locking or warn about conflicts
975
+
976
+ ## Notes
977
+
978
+ - Always preserve plan history (don't delete old information)
979
+ - Keep updates atomic to prevent corruption
980
+ - Consider creating backup before major updates
981
+ - Updates should enhance, not complicate, the workflow experience
982
+ - If plan becomes too cluttered, suggest creating fresh plan for next phase
983
+ ==================== END: tasks#update-workflow-plan ====================
984
+
408
985
  ==================== START: data#bmad-kb ====================
409
986
  # BMAD Knowledge Base
410
987
 
@@ -501,6 +1078,7 @@ npx bmad-method install
501
1078
  - **Windsurf**: Built-in AI capabilities
502
1079
  - **Cline**: VS Code extension with AI features
503
1080
  - **Roo Code**: Web-based IDE with agent support
1081
+ - **VS Code Copilot**: AI-powered coding assistant
504
1082
 
505
1083
  **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.
506
1084
 
@@ -686,6 +1264,7 @@ You are the "Vibe CEO" - thinking like a CEO with unlimited resources and a sing
686
1264
  - **Cursor**: `@agent-name` (e.g., `@bmad-master`)
687
1265
  - **Windsurf**: `@agent-name` (e.g., `@bmad-master`)
688
1266
  - **Roo Code**: Select mode from mode selector (e.g., `bmad-bmad-master`)
1267
+ - **VS Code Copilot**: Open the Chat view (`⌃⌘I` on Mac, `Ctrl+Alt+I` on Windows/Linux) and select **Agent** from the chat mode selector.
689
1268
 
690
1269
  **Chat Management Guidelines**:
691
1270
  - **Claude Code, Cursor, Windsurf**: Start new chats when switching agents
@@ -1155,6 +1734,232 @@ Use the **expansion-creator** pack to build your own:
1155
1734
  - **Contributing**: See `CONTRIBUTING.md` for full guidelines
1156
1735
  ==================== END: data#bmad-kb ====================
1157
1736
 
1737
+ ==================== START: utils#plan-management ====================
1738
+ # Plan Management Utility
1739
+
1740
+ ## Purpose
1741
+
1742
+ 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.
1743
+
1744
+ ## Core Functions
1745
+
1746
+ ### 1. Check Plan Existence
1747
+
1748
+ [[LLM: When any agent starts or task begins, check if a workflow plan exists]]
1749
+
1750
+ ```
1751
+ Check for workflow plan:
1752
+ 1. Look for docs/workflow-plan.md (default location)
1753
+ 2. Check core-config.yml for custom plan location
1754
+ 3. Return plan status (exists/not exists)
1755
+ ```
1756
+
1757
+ ### 2. Parse Plan Status
1758
+
1759
+ [[LLM: Extract current progress from the plan document]]
1760
+
1761
+ **Plan Parsing Logic:**
1762
+
1763
+ 1. **Identify Step Structure**:
1764
+ - Look for checkbox lines: `- [ ]` or `- [x]`
1765
+ - Extract step IDs from comments: `<!-- step-id: X.Y -->`
1766
+ - Identify agent assignments: `<!-- agent: pm -->`
1767
+
1768
+ 2. **Determine Current State**:
1769
+ - Last completed step (highest numbered `[x]`)
1770
+ - Next expected step (first `[ ]` after completed steps)
1771
+ - Overall progress percentage
1772
+
1773
+ 3. **Extract Metadata**:
1774
+ - Workflow type from plan header
1775
+ - Decision points and their status
1776
+ - Any deviation notes
1777
+
1778
+ ### 3. Sequence Validation
1779
+
1780
+ [[LLM: Check if requested action aligns with plan sequence]]
1781
+
1782
+ **Validation Rules:**
1783
+
1784
+ 1. **Strict Mode** (enforceSequence: true):
1785
+ - Must complete steps in exact order
1786
+ - Warn and block if out of sequence
1787
+ - Require explicit override justification
1788
+
1789
+ 2. **Flexible Mode** (enforceSequence: false):
1790
+ - Warn about sequence deviation
1791
+ - Allow with confirmation
1792
+ - Log deviation reason
1793
+
1794
+ **Warning Templates:**
1795
+
1796
+ ```
1797
+ SEQUENCE WARNING:
1798
+ The workflow plan shows you should complete "{expected_step}" next.
1799
+ You're attempting to: "{requested_action}"
1800
+
1801
+ In strict mode: Block and require plan update
1802
+ In flexible mode: Allow with confirmation
1803
+ ```
1804
+
1805
+ ### 4. Plan Update Operations
1806
+
1807
+ [[LLM: Provide consistent way to update plan progress]]
1808
+
1809
+ **Update Actions:**
1810
+
1811
+ 1. **Mark Step Complete**:
1812
+ - Change `- [ ]` to `- [x]`
1813
+ - Add completion timestamp comment
1814
+ - Update any status metadata
1815
+
1816
+ 2. **Add Deviation Note**:
1817
+ - Insert note explaining why sequence changed
1818
+ - Reference the deviation in plan
1819
+
1820
+ 3. **Update Current Step Pointer**:
1821
+ - Add/move `<!-- current-step -->` marker
1822
+ - Update last-modified timestamp
1823
+
1824
+ ### 5. Integration Instructions
1825
+
1826
+ [[LLM: How agents and tasks should use this utility]]
1827
+
1828
+ **For Agents (startup sequence)**:
1829
+
1830
+ ```
1831
+ 1. Check if plan exists using this utility
1832
+ 2. If exists:
1833
+ - Parse current status
1834
+ - Show user: "Active workflow plan detected. Current step: {X}"
1835
+ - Suggest: "Next recommended action: {next_step}"
1836
+ 3. Continue with normal startup
1837
+ ```
1838
+
1839
+ **For Tasks (pre-execution)**:
1840
+
1841
+ ```
1842
+ 1. Check if plan exists
1843
+ 2. If exists:
1844
+ - Verify this task aligns with plan
1845
+ - If not aligned:
1846
+ - In strict mode: Show warning and stop
1847
+ - In flexible mode: Show warning and ask for confirmation
1848
+ 3. After task completion:
1849
+ - Update plan if task was a planned step
1850
+ - Add note if task was unplanned
1851
+ ```
1852
+
1853
+ ### 6. Plan Status Report Format
1854
+
1855
+ [[LLM: Standard format for showing plan status]]
1856
+
1857
+ ```
1858
+ 📋 Workflow Plan Status
1859
+ ━━━━━━━━━━━━━━━━━━━━
1860
+ Workflow: {workflow_name}
1861
+ Progress: {X}% complete ({completed}/{total} steps)
1862
+
1863
+ ✅ Completed:
1864
+ - {completed_step_1}
1865
+ - {completed_step_2}
1866
+
1867
+ 🔄 Current Step:
1868
+ - {current_step_description}
1869
+
1870
+ 📌 Upcoming:
1871
+ - {next_step_1}
1872
+ - {next_step_2}
1873
+
1874
+ ⚠️ Notes:
1875
+ - {any_deviations_or_notes}
1876
+ ```
1877
+
1878
+ ### 7. Decision Point Handling
1879
+
1880
+ [[LLM: Special handling for workflow decision points]]
1881
+
1882
+ When encountering a decision point in the plan:
1883
+
1884
+ 1. **Identify Decision Marker**: `<!-- decision: {decision_id} -->`
1885
+ 2. **Check Decision Status**: Made/Pending
1886
+ 3. **If Pending**:
1887
+ - Block progress until decision made
1888
+ - Show options to user
1889
+ - Record decision when made
1890
+ 4. **If Made**:
1891
+ - Verify current path aligns with decision
1892
+ - Warn if attempting alternate path
1893
+
1894
+ ### 8. Plan Abandonment
1895
+
1896
+ [[LLM: Graceful handling when user wants to stop following plan]]
1897
+
1898
+ If user wants to abandon plan:
1899
+
1900
+ 1. Confirm abandonment intent
1901
+ 2. Add abandonment note to plan
1902
+ 3. Mark plan as "Abandoned" in header
1903
+ 4. Stop plan checking for remainder of session
1904
+ 5. Suggest creating new plan if needed
1905
+
1906
+ ## Usage Examples
1907
+
1908
+ ### Example 1: Agent Startup Check
1909
+
1910
+ ```
1911
+ BMad Master starting...
1912
+
1913
+ [Check for plan]
1914
+ Found active workflow plan: brownfield-fullstack
1915
+ Progress: 40% complete (4/10 steps)
1916
+ Current step: Create PRD (pm agent)
1917
+
1918
+ Suggestion: Based on your plan, you should work with the PM agent next.
1919
+ Use *agent pm to switch, or *plan-status to see full progress.
1920
+ ```
1921
+
1922
+ ### Example 2: Task Sequence Warning
1923
+
1924
+ ```
1925
+ User: *task create-next-story
1926
+
1927
+ [Plan check triggered]
1928
+ ⚠️ SEQUENCE WARNING:
1929
+ Your workflow plan indicates the PRD hasn't been created yet.
1930
+ Creating stories before the PRD may lead to incomplete requirements.
1931
+
1932
+ Would you like to:
1933
+ 1. Continue anyway (will note deviation in plan)
1934
+ 2. Switch to creating PRD first (*agent pm)
1935
+ 3. View plan status (*plan-status)
1936
+ ```
1937
+
1938
+ ### Example 3: Automatic Plan Update
1939
+
1940
+ ```
1941
+ [After completing create-doc task for PRD]
1942
+
1943
+ ✅ Plan Updated: Marked "Create PRD" as complete
1944
+ 📍 Next step: Create Architecture Document (architect agent)
1945
+ ```
1946
+
1947
+ ## Implementation Notes
1948
+
1949
+ - This utility should be lightweight and fast
1950
+ - Plan parsing should be resilient to format variations
1951
+ - Always preserve user agency - warnings not blocks (unless strict mode)
1952
+ - Plan updates should be atomic to prevent corruption
1953
+ - Consider plan versioning for rollback capability
1954
+
1955
+ ## Error Handling
1956
+
1957
+ - Missing plan: Return null, don't error
1958
+ - Malformed plan: Warn but continue, treat as no plan
1959
+ - Update failures: Log but don't block task completion
1960
+ - Parse errors: Fallback to basic text search
1961
+ ==================== END: utils#plan-management ====================
1962
+
1158
1963
  ==================== START: utils#workflow-management ====================
1159
1964
  # Workflow Management
1160
1965