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.
- package/CHANGELOG.md +19 -0
- package/README.md +3 -2
- package/bmad-core/agents/bmad-master.md +14 -1
- package/bmad-core/agents/bmad-orchestrator.md +14 -0
- package/bmad-core/core-config.yml +5 -0
- package/bmad-core/data/bmad-kb.md +3 -1
- package/bmad-core/tasks/create-brownfield-story.md +355 -0
- package/bmad-core/tasks/create-next-story.md +25 -0
- package/bmad-core/tasks/create-workflow-plan.md +289 -0
- package/bmad-core/tasks/update-workflow-plan.md +248 -0
- package/bmad-core/templates/brownfield-prd-tmpl.md +52 -28
- package/bmad-core/utils/plan-management.md +223 -0
- package/bmad-core/workflows/brownfield-fullstack.yml +240 -55
- package/bmad-core/workflows/brownfield-service.yml +110 -36
- package/bmad-core/workflows/brownfield-ui.yml +110 -36
- package/bmad-core/workflows/greenfield-fullstack.yml +110 -36
- package/bmad-core/workflows/greenfield-service.yml +110 -36
- package/bmad-core/workflows/greenfield-ui.yml +110 -36
- package/common/tasks/create-doc.md +21 -1
- package/dist/agents/analyst.txt +24 -2
- package/dist/agents/architect.txt +21 -1
- package/dist/agents/bmad-master.txt +884 -31
- package/dist/agents/bmad-orchestrator.txt +807 -2
- package/dist/agents/pm.txt +73 -29
- package/dist/agents/sm.txt +25 -0
- package/dist/agents/ux-expert.txt +21 -1
- package/dist/expansion-packs/bmad-2d-phaser-game-dev/agents/game-designer.txt +21 -1
- package/dist/expansion-packs/bmad-2d-phaser-game-dev/teams/phaser-2d-nodejs-game-team.txt +804 -1
- package/dist/expansion-packs/bmad-infrastructure-devops/agents/infra-devops-platform.txt +21 -1
- package/dist/teams/team-all.txt +1676 -267
- package/dist/teams/team-fullstack.txt +1651 -267
- package/dist/teams/team-ide-minimal.txt +832 -2
- package/dist/teams/team-no-ui.txt +1080 -103
- package/docs/bmad-workflow-guide.md +2 -1
- package/docs/core-architecture.md +2 -1
- package/package.json +1 -1
- package/tools/installer/bin/bmad.js +3 -2
- package/tools/installer/config/install.config.yml +13 -0
- package/tools/installer/lib/ide-setup.js +214 -1
- package/tools/installer/lib/installer.js +3 -13
- package/tools/installer/package.json +1 -1
- package/tools/lib/dependency-resolver.js +2 -2
|
@@ -64,6 +64,9 @@ persona:
|
|
|
64
64
|
- Process (*) commands immediately
|
|
65
65
|
startup:
|
|
66
66
|
- Greet the user with your name and role, and inform of the *help command.
|
|
67
|
+
- Check for active workflow plan using utils#plan-management
|
|
68
|
+
- 'If plan exists: Show brief status - Active plan detected: {workflow} - {progress}%'
|
|
69
|
+
- 'If plan exists: Suggest next step based on plan'
|
|
67
70
|
- CRITICAL: Do NOT scan filesystem or load any resources during startup
|
|
68
71
|
- CRITICAL: Do NOT run discovery tasks automatically
|
|
69
72
|
- Wait for user request before any tool use
|
|
@@ -75,16 +78,24 @@ commands:
|
|
|
75
78
|
- status: Current context
|
|
76
79
|
- task {template|util|checklist|workflow}: Execute
|
|
77
80
|
- list {task|template|util|checklist|workflow}: List resources by type
|
|
81
|
+
- plan: Create workflow plan (for complex projects)
|
|
82
|
+
- plan-status: Show current workflow plan progress
|
|
83
|
+
- plan-update: Update workflow plan status
|
|
78
84
|
- exit: Exit (confirm)
|
|
79
85
|
- yolo: Toggle Yolo Mode off on - on will skip doc section confirmations
|
|
80
86
|
- doc-out: Output full document
|
|
81
87
|
fuzzy-matching:
|
|
82
88
|
- 85% confidence threshold
|
|
83
89
|
- Show numbered list if unsure
|
|
90
|
+
workflow-guidance:
|
|
91
|
+
- When user asks about workflows, offer: Would you like me to create a workflow plan first? (*plan)
|
|
92
|
+
- For complex projects, suggest planning before execution
|
|
93
|
+
- Plan command maps to create-workflow-plan task
|
|
84
94
|
execution:
|
|
85
95
|
- NEVER use tools during startup - only announce and wait
|
|
86
96
|
- Runtime discovery ONLY when user requests specific resources
|
|
87
97
|
- Workflow: User request → Runtime discovery → Load resource → Execute instructions → Guide inputs → Provide feedback
|
|
98
|
+
- For workflow requests: Suggest *plan command first for complex projects
|
|
88
99
|
- Suggest related resources after completion
|
|
89
100
|
dependencies:
|
|
90
101
|
tasks:
|
|
@@ -96,12 +107,14 @@ dependencies:
|
|
|
96
107
|
- correct-course
|
|
97
108
|
- create-deep-research-prompt
|
|
98
109
|
- create-doc
|
|
110
|
+
- create-workflow-plan
|
|
99
111
|
- document-project
|
|
100
112
|
- create-next-story
|
|
101
113
|
- execute-checklist
|
|
102
114
|
- generate-ai-frontend-prompt
|
|
103
115
|
- index-docs
|
|
104
116
|
- shard-doc
|
|
117
|
+
- update-workflow-plan
|
|
105
118
|
templates:
|
|
106
119
|
- agent-tmpl
|
|
107
120
|
- architecture-tmpl
|
|
@@ -119,7 +132,7 @@ dependencies:
|
|
|
119
132
|
- bmad-kb
|
|
120
133
|
- technical-preferences
|
|
121
134
|
utils:
|
|
122
|
-
-
|
|
135
|
+
- plan-management
|
|
123
136
|
- template-format
|
|
124
137
|
- workflow-management
|
|
125
138
|
workflows:
|
|
@@ -1184,11 +1197,22 @@ Generate documents from templates by EXECUTING (not just reading) embedded instr
|
|
|
1184
1197
|
|
|
1185
1198
|
## Execution Flow
|
|
1186
1199
|
|
|
1200
|
+
### 0. Check Workflow Plan (if configured)
|
|
1201
|
+
|
|
1202
|
+
[[LLM: Check if plan tracking is enabled in core-config.yml]]
|
|
1203
|
+
|
|
1204
|
+
- If `workflow.trackProgress: true`, check for active plan using utils#plan-management
|
|
1205
|
+
- If plan exists and this document creation is part of the plan:
|
|
1206
|
+
- Verify this is the expected next step
|
|
1207
|
+
- If out of sequence and `enforceSequence: true`, warn user and halt without user override
|
|
1208
|
+
- If out of sequence and `enforceSequence: false`, ask for confirmation
|
|
1209
|
+
- Continue with normal execution after plan check
|
|
1210
|
+
|
|
1187
1211
|
### 1. Identify Template
|
|
1188
1212
|
|
|
1189
1213
|
- Load from `templates#*` or `{root}/templates directory`
|
|
1190
1214
|
- Agent-specific templates are listed in agent's dependencies
|
|
1191
|
-
- If agent has `templates: [prd-tmpl, architecture-tmpl]
|
|
1215
|
+
- If agent has `templates: [prd-tmpl, architecture-tmpl]` for example, then offer to create "PRD" and "Architecture" documents
|
|
1192
1216
|
|
|
1193
1217
|
### 2. Ask Interaction Mode
|
|
1194
1218
|
|
|
@@ -1225,6 +1249,15 @@ Generate documents from templates by EXECUTING (not just reading) embedded instr
|
|
|
1225
1249
|
- Begin directly with content (no preamble)
|
|
1226
1250
|
- Include any handoff prompts from template
|
|
1227
1251
|
|
|
1252
|
+
### 6. Update Workflow Plan (if applicable)
|
|
1253
|
+
|
|
1254
|
+
[[LLM: After successful document creation]]
|
|
1255
|
+
|
|
1256
|
+
- If plan tracking is enabled and document was part of plan:
|
|
1257
|
+
- Call update-workflow-plan task to mark step complete
|
|
1258
|
+
- Parameters: task: create-doc, step_id: {from plan}, status: complete
|
|
1259
|
+
- Show next recommended step from plan
|
|
1260
|
+
|
|
1228
1261
|
## Common Mistakes to Avoid
|
|
1229
1262
|
|
|
1230
1263
|
❌ Skipping elicitation tasks
|
|
@@ -1242,6 +1275,298 @@ Generate documents from templates by EXECUTING (not just reading) embedded instr
|
|
|
1242
1275
|
Templates contain precise instructions for a reason. Follow them exactly to ensure document quality and completeness.
|
|
1243
1276
|
==================== END: tasks#create-doc ====================
|
|
1244
1277
|
|
|
1278
|
+
==================== START: tasks#create-workflow-plan ====================
|
|
1279
|
+
# Create Workflow Plan Task
|
|
1280
|
+
|
|
1281
|
+
## Purpose
|
|
1282
|
+
|
|
1283
|
+
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.
|
|
1284
|
+
|
|
1285
|
+
## Task Instructions
|
|
1286
|
+
|
|
1287
|
+
### 1. Understand User's Goal
|
|
1288
|
+
|
|
1289
|
+
[[LLM: Start with discovery questions to understand what the user wants to accomplish]]
|
|
1290
|
+
|
|
1291
|
+
Ask the user:
|
|
1292
|
+
|
|
1293
|
+
1. **Project Type**:
|
|
1294
|
+
- Are you starting a new project (greenfield) or enhancing an existing one (brownfield)?
|
|
1295
|
+
- What type of application? (web app, service/API, UI only, full-stack)
|
|
1296
|
+
|
|
1297
|
+
2. **For Greenfield**:
|
|
1298
|
+
- Do you need a quick prototype or production-ready application?
|
|
1299
|
+
- Will this have a UI component?
|
|
1300
|
+
- Single service or multiple services?
|
|
1301
|
+
|
|
1302
|
+
3. **For Brownfield**:
|
|
1303
|
+
- What's the scope of the enhancement?
|
|
1304
|
+
- Single bug fix or small feature (few hours)
|
|
1305
|
+
- Small enhancement (1-3 stories)
|
|
1306
|
+
- Major feature requiring coordination
|
|
1307
|
+
- Architectural changes or modernization
|
|
1308
|
+
- Do you have existing documentation?
|
|
1309
|
+
- Are you following existing patterns or introducing new ones?
|
|
1310
|
+
|
|
1311
|
+
### 2. Recommend Appropriate Workflow
|
|
1312
|
+
|
|
1313
|
+
Based on the answers, recommend:
|
|
1314
|
+
|
|
1315
|
+
**Greenfield Options:**
|
|
1316
|
+
|
|
1317
|
+
- `greenfield-fullstack` - Complete web application
|
|
1318
|
+
- `greenfield-service` - Backend API/service only
|
|
1319
|
+
- `greenfield-ui` - Frontend only
|
|
1320
|
+
|
|
1321
|
+
**Brownfield Options:**
|
|
1322
|
+
|
|
1323
|
+
- `brownfield-create-story` - Single small change
|
|
1324
|
+
- `brownfield-create-epic` - Small feature (1-3 stories)
|
|
1325
|
+
- `brownfield-fullstack` - Major enhancement
|
|
1326
|
+
|
|
1327
|
+
**Simplified Option:**
|
|
1328
|
+
|
|
1329
|
+
- For users unsure or wanting flexibility, suggest starting with individual agent tasks
|
|
1330
|
+
|
|
1331
|
+
### 3. Explain Selected Workflow
|
|
1332
|
+
|
|
1333
|
+
[[LLM: Once workflow is selected, provide clear explanation]]
|
|
1334
|
+
|
|
1335
|
+
For the selected workflow, explain:
|
|
1336
|
+
|
|
1337
|
+
1. **Overview**: What this workflow accomplishes
|
|
1338
|
+
2. **Duration**: Estimated time for planning phase
|
|
1339
|
+
3. **Outputs**: What documents will be created
|
|
1340
|
+
4. **Decision Points**: Where user input will be needed
|
|
1341
|
+
5. **Requirements**: What information should be ready
|
|
1342
|
+
|
|
1343
|
+
### 4. Create Workflow Plan Document
|
|
1344
|
+
|
|
1345
|
+
[[LLM: Generate a comprehensive plan document with the following structure]]
|
|
1346
|
+
|
|
1347
|
+
```markdown
|
|
1348
|
+
# Workflow Plan: {{Workflow Name}}
|
|
1349
|
+
|
|
1350
|
+
<!-- WORKFLOW-PLAN-META
|
|
1351
|
+
workflow-id: {{workflow-id}}
|
|
1352
|
+
status: active
|
|
1353
|
+
created: {{ISO-8601 timestamp}}
|
|
1354
|
+
updated: {{ISO-8601 timestamp}}
|
|
1355
|
+
version: 1.0
|
|
1356
|
+
-->
|
|
1357
|
+
|
|
1358
|
+
**Created Date**: {{current date}}
|
|
1359
|
+
**Project**: {{project name}}
|
|
1360
|
+
**Type**: {{greenfield/brownfield}}
|
|
1361
|
+
**Status**: Active
|
|
1362
|
+
**Estimated Planning Duration**: {{time estimate}}
|
|
1363
|
+
|
|
1364
|
+
## Objective
|
|
1365
|
+
|
|
1366
|
+
{{Clear description of what will be accomplished}}
|
|
1367
|
+
|
|
1368
|
+
## Selected Workflow
|
|
1369
|
+
|
|
1370
|
+
**Workflow**: `{{workflow-id}}`
|
|
1371
|
+
**Reason**: {{Why this workflow fits the user's needs}}
|
|
1372
|
+
|
|
1373
|
+
## Workflow Steps
|
|
1374
|
+
|
|
1375
|
+
### Planning Phase
|
|
1376
|
+
|
|
1377
|
+
- [ ] Step 1: {{step name}} <!-- step-id: 1.1, agent: {{agent}}, task: {{task}} -->
|
|
1378
|
+
- **Agent**: {{agent name}}
|
|
1379
|
+
- **Action**: {{what happens}}
|
|
1380
|
+
- **Output**: {{what's created}}
|
|
1381
|
+
- **User Input**: {{if any}}
|
|
1382
|
+
|
|
1383
|
+
- [ ] Step 2: {{step name}} <!-- step-id: 1.2, agent: {{agent}}, task: {{task}} -->
|
|
1384
|
+
- **Agent**: {{agent name}}
|
|
1385
|
+
- **Action**: {{what happens}}
|
|
1386
|
+
- **Output**: {{what's created}}
|
|
1387
|
+
- **Decision Point**: {{if any}} <!-- decision-id: D1 -->
|
|
1388
|
+
|
|
1389
|
+
{{Continue for all planning steps}}
|
|
1390
|
+
|
|
1391
|
+
### Development Phase (IDE)
|
|
1392
|
+
|
|
1393
|
+
- [ ] Document Sharding <!-- step-id: 2.1, agent: po, task: shard-doc -->
|
|
1394
|
+
- Prepare documents for story creation
|
|
1395
|
+
|
|
1396
|
+
- [ ] Story Development Cycle <!-- step-id: 2.2, repeats: true -->
|
|
1397
|
+
- [ ] Create story (SM agent) <!-- step-id: 2.2.1, agent: sm, task: create-next-story -->
|
|
1398
|
+
- [ ] Review story (optional) <!-- step-id: 2.2.2, agent: analyst, optional: true -->
|
|
1399
|
+
- [ ] Implement story (Dev agent) <!-- step-id: 2.2.3, agent: dev -->
|
|
1400
|
+
- [ ] QA review (optional) <!-- step-id: 2.2.4, agent: qa, optional: true -->
|
|
1401
|
+
- [ ] Repeat for all stories
|
|
1402
|
+
|
|
1403
|
+
- [ ] Epic Retrospective (optional) <!-- step-id: 2.3, agent: po, optional: true -->
|
|
1404
|
+
|
|
1405
|
+
## Key Decision Points
|
|
1406
|
+
|
|
1407
|
+
1. **{{Decision Name}}** (Step {{n}}): <!-- decision-id: D1, status: pending -->
|
|
1408
|
+
- Trigger: {{what causes this decision}}
|
|
1409
|
+
- Options: {{available choices}}
|
|
1410
|
+
- Impact: {{how it affects the workflow}}
|
|
1411
|
+
- Decision Made: _Pending_
|
|
1412
|
+
|
|
1413
|
+
{{List all decision points}}
|
|
1414
|
+
|
|
1415
|
+
## Expected Outputs
|
|
1416
|
+
|
|
1417
|
+
### Planning Documents
|
|
1418
|
+
- [ ] {{document 1}} - {{description}}
|
|
1419
|
+
- [ ] {{document 2}} - {{description}}
|
|
1420
|
+
{{etc...}}
|
|
1421
|
+
|
|
1422
|
+
### Development Artifacts
|
|
1423
|
+
- [ ] Stories in `docs/stories/`
|
|
1424
|
+
- [ ] Implementation code
|
|
1425
|
+
- [ ] Tests
|
|
1426
|
+
- [ ] Updated documentation
|
|
1427
|
+
|
|
1428
|
+
## Prerequisites Checklist
|
|
1429
|
+
|
|
1430
|
+
Before starting this workflow, ensure you have:
|
|
1431
|
+
|
|
1432
|
+
- [ ] {{prerequisite 1}}
|
|
1433
|
+
- [ ] {{prerequisite 2}}
|
|
1434
|
+
- [ ] {{prerequisite 3}}
|
|
1435
|
+
{{etc...}}
|
|
1436
|
+
|
|
1437
|
+
## Customization Options
|
|
1438
|
+
|
|
1439
|
+
Based on your project needs, you may:
|
|
1440
|
+
- Skip {{optional step}} if {{condition}}
|
|
1441
|
+
- Add {{additional step}} if {{condition}}
|
|
1442
|
+
- Choose {{alternative}} instead of {{default}}
|
|
1443
|
+
|
|
1444
|
+
## Risk Considerations
|
|
1445
|
+
|
|
1446
|
+
{{For brownfield only}}
|
|
1447
|
+
- Integration complexity: {{assessment}}
|
|
1448
|
+
- Rollback strategy: {{approach}}
|
|
1449
|
+
- Testing requirements: {{special needs}}
|
|
1450
|
+
|
|
1451
|
+
## Next Steps
|
|
1452
|
+
|
|
1453
|
+
1. Review this plan and confirm it matches your expectations
|
|
1454
|
+
2. Gather any missing prerequisites
|
|
1455
|
+
3. Start workflow with: `*task workflow {{workflow-id}}`
|
|
1456
|
+
4. Or begin with first agent: `@{{first-agent}}`
|
|
1457
|
+
|
|
1458
|
+
## Notes
|
|
1459
|
+
|
|
1460
|
+
{{Any additional context or warnings}}
|
|
1461
|
+
|
|
1462
|
+
---
|
|
1463
|
+
*This plan can be updated as you progress through the workflow. Check off completed items to track progress.*
|
|
1464
|
+
```
|
|
1465
|
+
|
|
1466
|
+
### 5. Save and Present Plan
|
|
1467
|
+
|
|
1468
|
+
1. Save the plan as `docs/workflow-plan.md`
|
|
1469
|
+
2. Inform user: "Workflow plan created at docs/workflow-plan.md"
|
|
1470
|
+
3. Offer options:
|
|
1471
|
+
- Review the plan together
|
|
1472
|
+
- Start the workflow now
|
|
1473
|
+
- Gather prerequisites first
|
|
1474
|
+
- Modify the plan
|
|
1475
|
+
|
|
1476
|
+
### 6. Plan Variations
|
|
1477
|
+
|
|
1478
|
+
[[LLM: Adjust plan detail based on workflow complexity]]
|
|
1479
|
+
|
|
1480
|
+
**For Simple Workflows** (create-story, create-epic):
|
|
1481
|
+
|
|
1482
|
+
- Simpler checklist format
|
|
1483
|
+
- Focus on immediate next steps
|
|
1484
|
+
- Less detailed explanations
|
|
1485
|
+
|
|
1486
|
+
**For Complex Workflows** (full greenfield/brownfield):
|
|
1487
|
+
|
|
1488
|
+
- Detailed step breakdowns
|
|
1489
|
+
- All decision points documented
|
|
1490
|
+
- Comprehensive output descriptions
|
|
1491
|
+
- Risk mitigation sections
|
|
1492
|
+
|
|
1493
|
+
**For Brownfield Workflows**:
|
|
1494
|
+
|
|
1495
|
+
- Include existing system impact analysis
|
|
1496
|
+
- Document integration checkpoints
|
|
1497
|
+
- Add rollback considerations
|
|
1498
|
+
- Note documentation dependencies
|
|
1499
|
+
|
|
1500
|
+
### 7. Interactive Planning Mode
|
|
1501
|
+
|
|
1502
|
+
[[LLM: If user wants to customize the workflow]]
|
|
1503
|
+
|
|
1504
|
+
If user wants to modify the standard workflow:
|
|
1505
|
+
|
|
1506
|
+
1. Present workflow steps as options
|
|
1507
|
+
2. Allow skipping optional steps
|
|
1508
|
+
3. Let user reorder certain steps
|
|
1509
|
+
4. Document customizations in plan
|
|
1510
|
+
5. Warn about dependencies if steps are skipped
|
|
1511
|
+
|
|
1512
|
+
### 8. Execution Guidance
|
|
1513
|
+
|
|
1514
|
+
After plan is created, provide clear guidance:
|
|
1515
|
+
|
|
1516
|
+
```text
|
|
1517
|
+
Your workflow plan is ready! Here's how to proceed:
|
|
1518
|
+
|
|
1519
|
+
1. **Review the plan**: Check that all steps align with your goals
|
|
1520
|
+
2. **Gather prerequisites**: Use the checklist to ensure you're ready
|
|
1521
|
+
3. **Start execution**:
|
|
1522
|
+
- Full workflow: `*task workflow {{workflow-id}}`
|
|
1523
|
+
- Step by step: Start with `@{{first-agent}}`
|
|
1524
|
+
4. **Track progress**: Check off steps in the plan as completed
|
|
1525
|
+
|
|
1526
|
+
Would you like to:
|
|
1527
|
+
a) Review the plan together
|
|
1528
|
+
b) Start the workflow now
|
|
1529
|
+
c) Gather prerequisites first
|
|
1530
|
+
d) Modify the plan
|
|
1531
|
+
```
|
|
1532
|
+
|
|
1533
|
+
## Success Criteria
|
|
1534
|
+
|
|
1535
|
+
The workflow plan is successful when:
|
|
1536
|
+
|
|
1537
|
+
1. User clearly understands what will happen
|
|
1538
|
+
2. All decision points are documented
|
|
1539
|
+
3. Prerequisites are identified
|
|
1540
|
+
4. Expected outputs are clear
|
|
1541
|
+
5. User feels confident to proceed
|
|
1542
|
+
6. Plan serves as useful progress tracker
|
|
1543
|
+
|
|
1544
|
+
## Integration with BMad Master and Orchestrator
|
|
1545
|
+
|
|
1546
|
+
When used by BMad Master or BMad Orchestrator, this task should:
|
|
1547
|
+
|
|
1548
|
+
1. Be offered when user asks about workflows
|
|
1549
|
+
2. Be suggested before starting complex workflows
|
|
1550
|
+
3. Create a plan that the agent can reference during execution
|
|
1551
|
+
4. Allow the agent to track progress against the plan
|
|
1552
|
+
|
|
1553
|
+
## Example Usage
|
|
1554
|
+
|
|
1555
|
+
```text
|
|
1556
|
+
User: "I need to add a payment system to my existing app"
|
|
1557
|
+
|
|
1558
|
+
BMad Orchestrator: "Let me help you create a workflow plan for that enhancement. I'll ask a few questions to recommend the best approach..."
|
|
1559
|
+
|
|
1560
|
+
[Runs through discovery questions]
|
|
1561
|
+
|
|
1562
|
+
BMad Orchestrator: "Based on your answers, I recommend the brownfield-fullstack workflow. Let me create a detailed plan for you..."
|
|
1563
|
+
|
|
1564
|
+
[Creates and saves plan]
|
|
1565
|
+
|
|
1566
|
+
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?"
|
|
1567
|
+
```
|
|
1568
|
+
==================== END: tasks#create-workflow-plan ====================
|
|
1569
|
+
|
|
1245
1570
|
==================== START: tasks#document-project ====================
|
|
1246
1571
|
# Document an Existing Project
|
|
1247
1572
|
|
|
@@ -1591,6 +1916,22 @@ To identify the next logical story based on project progress and epic definition
|
|
|
1591
1916
|
- `architecture.architectureSharded`: Whether architecture is sharded
|
|
1592
1917
|
- `architecture.architectureFile`: Location of monolithic architecture
|
|
1593
1918
|
- `architecture.architectureShardedLocation`: Location of sharded architecture files
|
|
1919
|
+
- `workflow.trackProgress`: Whether workflow plan tracking is enabled
|
|
1920
|
+
- `workflow.planFile`: Location of workflow plan (if tracking enabled)
|
|
1921
|
+
|
|
1922
|
+
### 0.5 Check Workflow Plan (if configured)
|
|
1923
|
+
|
|
1924
|
+
[[LLM: Check if workflow plan tracking is enabled]]
|
|
1925
|
+
|
|
1926
|
+
- If `workflow.trackProgress: true`, check for active plan at `workflow.planFile`
|
|
1927
|
+
- If plan exists:
|
|
1928
|
+
- Parse plan to check if story creation is the expected next step
|
|
1929
|
+
- If out of sequence and `workflow.enforceSequence: true`:
|
|
1930
|
+
- Show warning: "The workflow plan indicates you should complete {expected_step} before creating stories."
|
|
1931
|
+
- Block execution unless user explicitly overrides
|
|
1932
|
+
- If out of sequence and `workflow.enforceSequence: false`:
|
|
1933
|
+
- Show warning but allow continuation with confirmation
|
|
1934
|
+
- Continue with story identification after plan check
|
|
1594
1935
|
|
|
1595
1936
|
### 1. Identify Next Story for Preparation
|
|
1596
1937
|
|
|
@@ -1814,6 +2155,15 @@ Provide a summary to the user including:
|
|
|
1814
2155
|
- Recommendations for story review before approval
|
|
1815
2156
|
- Next steps: Story should be reviewed by PO for approval before dev work begins
|
|
1816
2157
|
|
|
2158
|
+
### 10. Update Workflow Plan (if applicable)
|
|
2159
|
+
|
|
2160
|
+
[[LLM: After successful story creation]]
|
|
2161
|
+
|
|
2162
|
+
- If `workflow.trackProgress: true` and `workflow.updateOnCompletion: true`:
|
|
2163
|
+
- Call update-workflow-plan task to mark story creation step complete
|
|
2164
|
+
- Parameters: task: create-next-story, step_id: {from plan}, status: complete
|
|
2165
|
+
- If plan shows next step, mention it in completion message
|
|
2166
|
+
|
|
1817
2167
|
[[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.]]
|
|
1818
2168
|
==================== END: tasks#create-next-story ====================
|
|
1819
2169
|
|
|
@@ -2343,6 +2693,257 @@ Document sharded successfully:
|
|
|
2343
2693
|
- Ensure the sharding is reversible (could reconstruct the original from shards)
|
|
2344
2694
|
==================== END: tasks#shard-doc ====================
|
|
2345
2695
|
|
|
2696
|
+
==================== START: tasks#update-workflow-plan ====================
|
|
2697
|
+
# Update Workflow Plan Task
|
|
2698
|
+
|
|
2699
|
+
## Purpose
|
|
2700
|
+
|
|
2701
|
+
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.
|
|
2702
|
+
|
|
2703
|
+
## Task Instructions
|
|
2704
|
+
|
|
2705
|
+
### 0. Load Plan Configuration
|
|
2706
|
+
|
|
2707
|
+
[[LLM: First load core-config.yml to get plan settings]]
|
|
2708
|
+
|
|
2709
|
+
Check workflow configuration:
|
|
2710
|
+
|
|
2711
|
+
- `workflow.planFile` - Location of the plan (default: docs/workflow-plan.md)
|
|
2712
|
+
- `workflow.trackProgress` - Whether tracking is enabled
|
|
2713
|
+
- `workflow.updateOnCompletion` - Whether to auto-update on task completion
|
|
2714
|
+
|
|
2715
|
+
If tracking is disabled, inform user and exit.
|
|
2716
|
+
|
|
2717
|
+
### 1. Verify Plan Exists
|
|
2718
|
+
|
|
2719
|
+
[[LLM: Check if workflow plan exists at configured location]]
|
|
2720
|
+
|
|
2721
|
+
If no plan exists:
|
|
2722
|
+
|
|
2723
|
+
```
|
|
2724
|
+
No active workflow plan found at {location}.
|
|
2725
|
+
Would you like to create one? Use *plan command.
|
|
2726
|
+
```
|
|
2727
|
+
|
|
2728
|
+
### 2. Determine Update Type
|
|
2729
|
+
|
|
2730
|
+
[[LLM: Ask user what type of update they want to make]]
|
|
2731
|
+
|
|
2732
|
+
Present options:
|
|
2733
|
+
|
|
2734
|
+
```
|
|
2735
|
+
What would you like to update in the workflow plan?
|
|
2736
|
+
|
|
2737
|
+
1. Mark step as complete
|
|
2738
|
+
2. Update current step
|
|
2739
|
+
3. Add deviation note
|
|
2740
|
+
4. Mark decision point resolution
|
|
2741
|
+
5. Update overall status
|
|
2742
|
+
6. View current plan status only
|
|
2743
|
+
|
|
2744
|
+
Please select an option (1-6):
|
|
2745
|
+
```
|
|
2746
|
+
|
|
2747
|
+
### 3. Parse Current Plan
|
|
2748
|
+
|
|
2749
|
+
[[LLM: Read and parse the plan to understand current state]]
|
|
2750
|
+
|
|
2751
|
+
Extract:
|
|
2752
|
+
|
|
2753
|
+
- All steps with their checkbox status
|
|
2754
|
+
- Step IDs from comments (if present)
|
|
2755
|
+
- Current completion percentage
|
|
2756
|
+
- Any existing deviation notes
|
|
2757
|
+
- Decision points and their status
|
|
2758
|
+
|
|
2759
|
+
### 4. Execute Updates
|
|
2760
|
+
|
|
2761
|
+
#### 4.1 Mark Step Complete
|
|
2762
|
+
|
|
2763
|
+
If user selected option 1:
|
|
2764
|
+
|
|
2765
|
+
1. Show numbered list of incomplete steps
|
|
2766
|
+
2. Ask which step to mark complete
|
|
2767
|
+
3. Update the checkbox from `[ ]` to `[x]`
|
|
2768
|
+
4. Add completion timestamp: `<!-- completed: YYYY-MM-DD HH:MM -->`
|
|
2769
|
+
5. If this was the current step, identify next step
|
|
2770
|
+
|
|
2771
|
+
#### 4.2 Update Current Step
|
|
2772
|
+
|
|
2773
|
+
If user selected option 2:
|
|
2774
|
+
|
|
2775
|
+
1. Show all steps with current status
|
|
2776
|
+
2. Ask which step is now current
|
|
2777
|
+
3. Add/move `<!-- current-step -->` marker
|
|
2778
|
+
4. Optionally add note about why sequence changed
|
|
2779
|
+
|
|
2780
|
+
#### 4.3 Add Deviation Note
|
|
2781
|
+
|
|
2782
|
+
If user selected option 3:
|
|
2783
|
+
|
|
2784
|
+
1. Ask for deviation description
|
|
2785
|
+
2. Ask which step this relates to (or general)
|
|
2786
|
+
3. Insert note in appropriate location:
|
|
2787
|
+
|
|
2788
|
+
```markdown
|
|
2789
|
+
> **Deviation Note** (YYYY-MM-DD): {user_note}
|
|
2790
|
+
> Related to: Step X.Y or General workflow
|
|
2791
|
+
```
|
|
2792
|
+
|
|
2793
|
+
#### 4.4 Mark Decision Resolution
|
|
2794
|
+
|
|
2795
|
+
If user selected option 4:
|
|
2796
|
+
|
|
2797
|
+
1. Show pending decision points
|
|
2798
|
+
2. Ask which decision was made
|
|
2799
|
+
3. Record the decision and chosen path
|
|
2800
|
+
4. Update related steps based on decision
|
|
2801
|
+
|
|
2802
|
+
#### 4.5 Update Overall Status
|
|
2803
|
+
|
|
2804
|
+
If user selected option 5:
|
|
2805
|
+
|
|
2806
|
+
1. Show current overall status
|
|
2807
|
+
2. Provide options:
|
|
2808
|
+
- Active (continuing with plan)
|
|
2809
|
+
- Paused (temporarily stopped)
|
|
2810
|
+
- Abandoned (no longer following)
|
|
2811
|
+
- Complete (all steps done)
|
|
2812
|
+
3. Update plan header with new status
|
|
2813
|
+
|
|
2814
|
+
### 5. Automatic Updates (When Called by Tasks)
|
|
2815
|
+
|
|
2816
|
+
[[LLM: When called automatically by another task]]
|
|
2817
|
+
|
|
2818
|
+
If called with parameters:
|
|
2819
|
+
|
|
2820
|
+
```
|
|
2821
|
+
task: {task_name}
|
|
2822
|
+
step_id: {step_identifier}
|
|
2823
|
+
status: complete|skipped|failed
|
|
2824
|
+
note: {optional_note}
|
|
2825
|
+
```
|
|
2826
|
+
|
|
2827
|
+
Automatically:
|
|
2828
|
+
|
|
2829
|
+
1. Find the corresponding step
|
|
2830
|
+
2. Update its status
|
|
2831
|
+
3. Add completion metadata
|
|
2832
|
+
4. Add note if provided
|
|
2833
|
+
5. Calculate new progress percentage
|
|
2834
|
+
|
|
2835
|
+
### 6. Generate Update Summary
|
|
2836
|
+
|
|
2837
|
+
After updates, show summary:
|
|
2838
|
+
|
|
2839
|
+
```
|
|
2840
|
+
✅ Workflow Plan Updated
|
|
2841
|
+
|
|
2842
|
+
Changes made:
|
|
2843
|
+
- {change_1}
|
|
2844
|
+
- {change_2}
|
|
2845
|
+
|
|
2846
|
+
New Status:
|
|
2847
|
+
- Progress: {X}% complete ({completed}/{total} steps)
|
|
2848
|
+
- Current Step: {current_step}
|
|
2849
|
+
- Next Recommended: {next_step}
|
|
2850
|
+
|
|
2851
|
+
Plan location: {file_path}
|
|
2852
|
+
```
|
|
2853
|
+
|
|
2854
|
+
### 7. Integration with Other Tasks
|
|
2855
|
+
|
|
2856
|
+
[[LLM: How other tasks should call this]]
|
|
2857
|
+
|
|
2858
|
+
Other tasks can integrate by:
|
|
2859
|
+
|
|
2860
|
+
1. **After Task Completion**:
|
|
2861
|
+
|
|
2862
|
+
```
|
|
2863
|
+
At end of task execution:
|
|
2864
|
+
- Check if task corresponds to a plan step
|
|
2865
|
+
- If yes, call update-workflow-plan with:
|
|
2866
|
+
- task: {current_task_name}
|
|
2867
|
+
- step_id: {matching_step}
|
|
2868
|
+
- status: complete
|
|
2869
|
+
```
|
|
2870
|
+
|
|
2871
|
+
2. **On Task Failure**:
|
|
2872
|
+
|
|
2873
|
+
```
|
|
2874
|
+
If task fails:
|
|
2875
|
+
- Call update-workflow-plan with:
|
|
2876
|
+
- task: {current_task_name}
|
|
2877
|
+
- status: failed
|
|
2878
|
+
- note: {failure_reason}
|
|
2879
|
+
```
|
|
2880
|
+
|
|
2881
|
+
### 8. Plan Status Display
|
|
2882
|
+
|
|
2883
|
+
[[LLM: When user selects view status only]]
|
|
2884
|
+
|
|
2885
|
+
Display comprehensive status:
|
|
2886
|
+
|
|
2887
|
+
```markdown
|
|
2888
|
+
📋 Workflow Plan Status
|
|
2889
|
+
━━━━━━━━━━━━━━━━━━━━
|
|
2890
|
+
Workflow: {workflow_name}
|
|
2891
|
+
Status: {Active|Paused|Complete}
|
|
2892
|
+
Progress: {X}% complete ({completed}/{total} steps)
|
|
2893
|
+
Last Updated: {timestamp}
|
|
2894
|
+
|
|
2895
|
+
✅ Completed Steps:
|
|
2896
|
+
- [x] Step 1.1: {description} (completed: {date})
|
|
2897
|
+
- [x] Step 1.2: {description} (completed: {date})
|
|
2898
|
+
|
|
2899
|
+
🔄 Current Step:
|
|
2900
|
+
- [ ] Step 2.1: {description} <!-- current-step -->
|
|
2901
|
+
Agent: {agent_name}
|
|
2902
|
+
Task: {task_name}
|
|
2903
|
+
|
|
2904
|
+
📌 Upcoming Steps:
|
|
2905
|
+
- [ ] Step 2.2: {description}
|
|
2906
|
+
- [ ] Step 3.1: {description}
|
|
2907
|
+
|
|
2908
|
+
⚠️ Deviations/Notes:
|
|
2909
|
+
{any_deviation_notes}
|
|
2910
|
+
|
|
2911
|
+
📊 Decision Points:
|
|
2912
|
+
- Decision 1: {status} - {choice_made}
|
|
2913
|
+
- Decision 2: Pending
|
|
2914
|
+
|
|
2915
|
+
💡 Next Action:
|
|
2916
|
+
Based on the plan, you should {recommended_action}
|
|
2917
|
+
```
|
|
2918
|
+
|
|
2919
|
+
## Success Criteria
|
|
2920
|
+
|
|
2921
|
+
The update is successful when:
|
|
2922
|
+
|
|
2923
|
+
1. Plan accurately reflects current workflow state
|
|
2924
|
+
2. All updates are clearly timestamped
|
|
2925
|
+
3. Deviations are documented with reasons
|
|
2926
|
+
4. Progress calculation is correct
|
|
2927
|
+
5. Next steps are clear to user
|
|
2928
|
+
6. Plan remains readable and well-formatted
|
|
2929
|
+
|
|
2930
|
+
## Error Handling
|
|
2931
|
+
|
|
2932
|
+
- **Plan file not found**: Offer to create new plan
|
|
2933
|
+
- **Malformed plan**: Attempt basic updates, warn user
|
|
2934
|
+
- **Write permission error**: Show changes that would be made
|
|
2935
|
+
- **Step not found**: Show available steps, ask for clarification
|
|
2936
|
+
- **Concurrent updates**: Implement simple locking or warn about conflicts
|
|
2937
|
+
|
|
2938
|
+
## Notes
|
|
2939
|
+
|
|
2940
|
+
- Always preserve plan history (don't delete old information)
|
|
2941
|
+
- Keep updates atomic to prevent corruption
|
|
2942
|
+
- Consider creating backup before major updates
|
|
2943
|
+
- Updates should enhance, not complicate, the workflow experience
|
|
2944
|
+
- If plan becomes too cluttered, suggest creating fresh plan for next phase
|
|
2945
|
+
==================== END: tasks#update-workflow-plan ====================
|
|
2946
|
+
|
|
2346
2947
|
==================== START: templates#architecture-tmpl ====================
|
|
2347
2948
|
# {{Project Name}} Architecture Document
|
|
2348
2949
|
|
|
@@ -3694,34 +4295,45 @@ Do not proceed with any recommendations until the user has validated your unders
|
|
|
3694
4295
|
|
|
3695
4296
|
### Existing Project Overview
|
|
3696
4297
|
|
|
3697
|
-
[[LLM:
|
|
4298
|
+
[[LLM: Check if document-project analysis was already performed. If yes, reference that output instead of re-analyzing.]]
|
|
3698
4299
|
|
|
3699
|
-
**
|
|
4300
|
+
**Analysis Source**: [[LLM: Indicate one of the following:
|
|
4301
|
+
- Document-project output available at: {{path}}
|
|
4302
|
+
- IDE-based fresh analysis
|
|
4303
|
+
- User-provided information
|
|
4304
|
+
]]
|
|
3700
4305
|
|
|
3701
|
-
**Current Project State**: [[LLM:
|
|
4306
|
+
**Current Project State**: [[LLM:
|
|
4307
|
+
- If document-project output exists: Extract summary from "High Level Architecture" and "Technical Summary" sections
|
|
4308
|
+
- Otherwise: Brief description of what the project currently does and its primary purpose
|
|
4309
|
+
]]
|
|
3702
4310
|
|
|
3703
4311
|
### Available Documentation Analysis
|
|
3704
4312
|
|
|
3705
|
-
[[LLM:
|
|
4313
|
+
[[LLM:
|
|
4314
|
+
If document-project was run:
|
|
4315
|
+
- Note: "Document-project analysis available - using existing technical documentation"
|
|
4316
|
+
- List key documents created by document-project
|
|
4317
|
+
- Skip the missing documentation check below
|
|
3706
4318
|
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
- Coding standards
|
|
3710
|
-
- API documentation or OpenAPI specs
|
|
3711
|
-
- External API integrations
|
|
3712
|
-
- UX/UI guidelines or existing patterns]]
|
|
4319
|
+
Otherwise, check for existing documentation:
|
|
4320
|
+
]]
|
|
3713
4321
|
|
|
3714
4322
|
**Available Documentation**:
|
|
3715
4323
|
|
|
3716
|
-
- [ ] Tech Stack Documentation
|
|
3717
|
-
- [ ] Source Tree/Architecture
|
|
3718
|
-
- [ ] Coding Standards
|
|
3719
|
-
- [ ] API Documentation
|
|
3720
|
-
- [ ] External API Documentation
|
|
3721
|
-
- [ ] UX/UI Guidelines
|
|
4324
|
+
- [ ] Tech Stack Documentation [[LLM: If from document-project, check ✓]]
|
|
4325
|
+
- [ ] Source Tree/Architecture [[LLM: If from document-project, check ✓]]
|
|
4326
|
+
- [ ] Coding Standards [[LLM: If from document-project, may be partial]]
|
|
4327
|
+
- [ ] API Documentation [[LLM: If from document-project, check ✓]]
|
|
4328
|
+
- [ ] External API Documentation [[LLM: If from document-project, check ✓]]
|
|
4329
|
+
- [ ] UX/UI Guidelines [[LLM: May not be in document-project]]
|
|
4330
|
+
- [ ] Technical Debt Documentation [[LLM: If from document-project, check ✓]]
|
|
3722
4331
|
- [ ] Other: \***\*\_\_\_\*\***
|
|
3723
4332
|
|
|
3724
|
-
[[LLM:
|
|
4333
|
+
[[LLM:
|
|
4334
|
+
- If document-project was already run: "Using existing project analysis from document-project output."
|
|
4335
|
+
- If critical documentation is missing and no document-project: "I recommend running the document-project task first..."
|
|
4336
|
+
]]
|
|
3725
4337
|
|
|
3726
4338
|
### Enhancement Scope Definition
|
|
3727
4339
|
|
|
@@ -3811,13 +4423,19 @@ Do not proceed with any recommendations until the user has validated your unders
|
|
|
3811
4423
|
|
|
3812
4424
|
### Existing Technology Stack
|
|
3813
4425
|
|
|
3814
|
-
[[LLM:
|
|
4426
|
+
[[LLM:
|
|
4427
|
+
If document-project output available:
|
|
4428
|
+
- Extract from "Actual Tech Stack" table in High Level Architecture section
|
|
4429
|
+
- Include version numbers and any noted constraints
|
|
4430
|
+
|
|
4431
|
+
Otherwise, document the current technology stack:
|
|
4432
|
+
]]
|
|
3815
4433
|
|
|
3816
|
-
**Languages**: [[LLM:
|
|
3817
|
-
**Frameworks**: [[LLM:
|
|
3818
|
-
**Database**: [[LLM:
|
|
3819
|
-
**Infrastructure**: [[LLM:
|
|
3820
|
-
**External Dependencies**: [[LLM:
|
|
4434
|
+
**Languages**: [[LLM: From document-project or fresh analysis]]
|
|
4435
|
+
**Frameworks**: [[LLM: From document-project or fresh analysis]]
|
|
4436
|
+
**Database**: [[LLM: From document-project or fresh analysis]]
|
|
4437
|
+
**Infrastructure**: [[LLM: From document-project or fresh analysis]]
|
|
4438
|
+
**External Dependencies**: [[LLM: From document-project "External Services" section or fresh analysis]]
|
|
3821
4439
|
|
|
3822
4440
|
### Integration Approach
|
|
3823
4441
|
|
|
@@ -3848,12 +4466,19 @@ Do not proceed with any recommendations until the user has validated your unders
|
|
|
3848
4466
|
|
|
3849
4467
|
### Risk Assessment and Mitigation
|
|
3850
4468
|
|
|
3851
|
-
[[LLM:
|
|
4469
|
+
[[LLM:
|
|
4470
|
+
If document-project output available:
|
|
4471
|
+
- Reference "Technical Debt and Known Issues" section
|
|
4472
|
+
- Include "Workarounds and Gotchas" that might impact enhancement
|
|
4473
|
+
- Note any identified constraints from "Critical Technical Debt"
|
|
3852
4474
|
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
**
|
|
4475
|
+
Build risk assessment incorporating existing known issues:
|
|
4476
|
+
]]
|
|
4477
|
+
|
|
4478
|
+
**Technical Risks**: [[LLM: Include risks from document-project + new enhancement risks]]
|
|
4479
|
+
**Integration Risks**: [[LLM: Reference integration constraints from document-project]]
|
|
4480
|
+
**Deployment Risks**: [[LLM: Include deployment gotchas from document-project]]
|
|
4481
|
+
**Mitigation Strategies**: [[LLM: Address both existing and new risks]]
|
|
3857
4482
|
|
|
3858
4483
|
## Epic and Story Structure
|
|
3859
4484
|
|
|
@@ -8396,7 +9021,7 @@ BMAD transforms you into a "Vibe CEO" - directing a team of specialized AI agent
|
|
|
8396
9021
|
5. Type `/help` to see available commands
|
|
8397
9022
|
|
|
8398
9023
|
#### Option 2: IDE Integration
|
|
8399
|
-
**Best for**: Cursor, Claude Code, Windsurf, Cline, Roo Code users
|
|
9024
|
+
**Best for**: Cursor, Claude Code, Windsurf, Cline, Roo Code, VS Code Copilot users
|
|
8400
9025
|
|
|
8401
9026
|
```bash
|
|
8402
9027
|
# Interactive installation (recommended)
|
|
@@ -8411,6 +9036,7 @@ npx bmad-method install
|
|
|
8411
9036
|
- **Windsurf**: Built-in AI capabilities
|
|
8412
9037
|
- **Cline**: VS Code extension with AI features
|
|
8413
9038
|
- **Roo Code**: Web-based IDE with agent support
|
|
9039
|
+
- **VS Code Copilot**: AI-powered coding assistant
|
|
8414
9040
|
|
|
8415
9041
|
**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.
|
|
8416
9042
|
|
|
@@ -8596,6 +9222,7 @@ You are the "Vibe CEO" - thinking like a CEO with unlimited resources and a sing
|
|
|
8596
9222
|
- **Cursor**: `@agent-name` (e.g., `@bmad-master`)
|
|
8597
9223
|
- **Windsurf**: `@agent-name` (e.g., `@bmad-master`)
|
|
8598
9224
|
- **Roo Code**: Select mode from mode selector (e.g., `bmad-bmad-master`)
|
|
9225
|
+
- **VS Code Copilot**: Open the Chat view (`⌃⌘I` on Mac, `Ctrl+Alt+I` on Windows/Linux) and select **Agent** from the chat mode selector.
|
|
8599
9226
|
|
|
8600
9227
|
**Chat Management Guidelines**:
|
|
8601
9228
|
- **Claude Code, Cursor, Windsurf**: Start new chats when switching agents
|
|
@@ -9071,6 +9698,232 @@ Use the **expansion-creator** pack to build your own:
|
|
|
9071
9698
|
None Listed
|
|
9072
9699
|
==================== END: data#technical-preferences ====================
|
|
9073
9700
|
|
|
9701
|
+
==================== START: utils#plan-management ====================
|
|
9702
|
+
# Plan Management Utility
|
|
9703
|
+
|
|
9704
|
+
## Purpose
|
|
9705
|
+
|
|
9706
|
+
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.
|
|
9707
|
+
|
|
9708
|
+
## Core Functions
|
|
9709
|
+
|
|
9710
|
+
### 1. Check Plan Existence
|
|
9711
|
+
|
|
9712
|
+
[[LLM: When any agent starts or task begins, check if a workflow plan exists]]
|
|
9713
|
+
|
|
9714
|
+
```
|
|
9715
|
+
Check for workflow plan:
|
|
9716
|
+
1. Look for docs/workflow-plan.md (default location)
|
|
9717
|
+
2. Check core-config.yml for custom plan location
|
|
9718
|
+
3. Return plan status (exists/not exists)
|
|
9719
|
+
```
|
|
9720
|
+
|
|
9721
|
+
### 2. Parse Plan Status
|
|
9722
|
+
|
|
9723
|
+
[[LLM: Extract current progress from the plan document]]
|
|
9724
|
+
|
|
9725
|
+
**Plan Parsing Logic:**
|
|
9726
|
+
|
|
9727
|
+
1. **Identify Step Structure**:
|
|
9728
|
+
- Look for checkbox lines: `- [ ]` or `- [x]`
|
|
9729
|
+
- Extract step IDs from comments: `<!-- step-id: X.Y -->`
|
|
9730
|
+
- Identify agent assignments: `<!-- agent: pm -->`
|
|
9731
|
+
|
|
9732
|
+
2. **Determine Current State**:
|
|
9733
|
+
- Last completed step (highest numbered `[x]`)
|
|
9734
|
+
- Next expected step (first `[ ]` after completed steps)
|
|
9735
|
+
- Overall progress percentage
|
|
9736
|
+
|
|
9737
|
+
3. **Extract Metadata**:
|
|
9738
|
+
- Workflow type from plan header
|
|
9739
|
+
- Decision points and their status
|
|
9740
|
+
- Any deviation notes
|
|
9741
|
+
|
|
9742
|
+
### 3. Sequence Validation
|
|
9743
|
+
|
|
9744
|
+
[[LLM: Check if requested action aligns with plan sequence]]
|
|
9745
|
+
|
|
9746
|
+
**Validation Rules:**
|
|
9747
|
+
|
|
9748
|
+
1. **Strict Mode** (enforceSequence: true):
|
|
9749
|
+
- Must complete steps in exact order
|
|
9750
|
+
- Warn and block if out of sequence
|
|
9751
|
+
- Require explicit override justification
|
|
9752
|
+
|
|
9753
|
+
2. **Flexible Mode** (enforceSequence: false):
|
|
9754
|
+
- Warn about sequence deviation
|
|
9755
|
+
- Allow with confirmation
|
|
9756
|
+
- Log deviation reason
|
|
9757
|
+
|
|
9758
|
+
**Warning Templates:**
|
|
9759
|
+
|
|
9760
|
+
```
|
|
9761
|
+
SEQUENCE WARNING:
|
|
9762
|
+
The workflow plan shows you should complete "{expected_step}" next.
|
|
9763
|
+
You're attempting to: "{requested_action}"
|
|
9764
|
+
|
|
9765
|
+
In strict mode: Block and require plan update
|
|
9766
|
+
In flexible mode: Allow with confirmation
|
|
9767
|
+
```
|
|
9768
|
+
|
|
9769
|
+
### 4. Plan Update Operations
|
|
9770
|
+
|
|
9771
|
+
[[LLM: Provide consistent way to update plan progress]]
|
|
9772
|
+
|
|
9773
|
+
**Update Actions:**
|
|
9774
|
+
|
|
9775
|
+
1. **Mark Step Complete**:
|
|
9776
|
+
- Change `- [ ]` to `- [x]`
|
|
9777
|
+
- Add completion timestamp comment
|
|
9778
|
+
- Update any status metadata
|
|
9779
|
+
|
|
9780
|
+
2. **Add Deviation Note**:
|
|
9781
|
+
- Insert note explaining why sequence changed
|
|
9782
|
+
- Reference the deviation in plan
|
|
9783
|
+
|
|
9784
|
+
3. **Update Current Step Pointer**:
|
|
9785
|
+
- Add/move `<!-- current-step -->` marker
|
|
9786
|
+
- Update last-modified timestamp
|
|
9787
|
+
|
|
9788
|
+
### 5. Integration Instructions
|
|
9789
|
+
|
|
9790
|
+
[[LLM: How agents and tasks should use this utility]]
|
|
9791
|
+
|
|
9792
|
+
**For Agents (startup sequence)**:
|
|
9793
|
+
|
|
9794
|
+
```
|
|
9795
|
+
1. Check if plan exists using this utility
|
|
9796
|
+
2. If exists:
|
|
9797
|
+
- Parse current status
|
|
9798
|
+
- Show user: "Active workflow plan detected. Current step: {X}"
|
|
9799
|
+
- Suggest: "Next recommended action: {next_step}"
|
|
9800
|
+
3. Continue with normal startup
|
|
9801
|
+
```
|
|
9802
|
+
|
|
9803
|
+
**For Tasks (pre-execution)**:
|
|
9804
|
+
|
|
9805
|
+
```
|
|
9806
|
+
1. Check if plan exists
|
|
9807
|
+
2. If exists:
|
|
9808
|
+
- Verify this task aligns with plan
|
|
9809
|
+
- If not aligned:
|
|
9810
|
+
- In strict mode: Show warning and stop
|
|
9811
|
+
- In flexible mode: Show warning and ask for confirmation
|
|
9812
|
+
3. After task completion:
|
|
9813
|
+
- Update plan if task was a planned step
|
|
9814
|
+
- Add note if task was unplanned
|
|
9815
|
+
```
|
|
9816
|
+
|
|
9817
|
+
### 6. Plan Status Report Format
|
|
9818
|
+
|
|
9819
|
+
[[LLM: Standard format for showing plan status]]
|
|
9820
|
+
|
|
9821
|
+
```
|
|
9822
|
+
📋 Workflow Plan Status
|
|
9823
|
+
━━━━━━━━━━━━━━━━━━━━
|
|
9824
|
+
Workflow: {workflow_name}
|
|
9825
|
+
Progress: {X}% complete ({completed}/{total} steps)
|
|
9826
|
+
|
|
9827
|
+
✅ Completed:
|
|
9828
|
+
- {completed_step_1}
|
|
9829
|
+
- {completed_step_2}
|
|
9830
|
+
|
|
9831
|
+
🔄 Current Step:
|
|
9832
|
+
- {current_step_description}
|
|
9833
|
+
|
|
9834
|
+
📌 Upcoming:
|
|
9835
|
+
- {next_step_1}
|
|
9836
|
+
- {next_step_2}
|
|
9837
|
+
|
|
9838
|
+
⚠️ Notes:
|
|
9839
|
+
- {any_deviations_or_notes}
|
|
9840
|
+
```
|
|
9841
|
+
|
|
9842
|
+
### 7. Decision Point Handling
|
|
9843
|
+
|
|
9844
|
+
[[LLM: Special handling for workflow decision points]]
|
|
9845
|
+
|
|
9846
|
+
When encountering a decision point in the plan:
|
|
9847
|
+
|
|
9848
|
+
1. **Identify Decision Marker**: `<!-- decision: {decision_id} -->`
|
|
9849
|
+
2. **Check Decision Status**: Made/Pending
|
|
9850
|
+
3. **If Pending**:
|
|
9851
|
+
- Block progress until decision made
|
|
9852
|
+
- Show options to user
|
|
9853
|
+
- Record decision when made
|
|
9854
|
+
4. **If Made**:
|
|
9855
|
+
- Verify current path aligns with decision
|
|
9856
|
+
- Warn if attempting alternate path
|
|
9857
|
+
|
|
9858
|
+
### 8. Plan Abandonment
|
|
9859
|
+
|
|
9860
|
+
[[LLM: Graceful handling when user wants to stop following plan]]
|
|
9861
|
+
|
|
9862
|
+
If user wants to abandon plan:
|
|
9863
|
+
|
|
9864
|
+
1. Confirm abandonment intent
|
|
9865
|
+
2. Add abandonment note to plan
|
|
9866
|
+
3. Mark plan as "Abandoned" in header
|
|
9867
|
+
4. Stop plan checking for remainder of session
|
|
9868
|
+
5. Suggest creating new plan if needed
|
|
9869
|
+
|
|
9870
|
+
## Usage Examples
|
|
9871
|
+
|
|
9872
|
+
### Example 1: Agent Startup Check
|
|
9873
|
+
|
|
9874
|
+
```
|
|
9875
|
+
BMad Master starting...
|
|
9876
|
+
|
|
9877
|
+
[Check for plan]
|
|
9878
|
+
Found active workflow plan: brownfield-fullstack
|
|
9879
|
+
Progress: 40% complete (4/10 steps)
|
|
9880
|
+
Current step: Create PRD (pm agent)
|
|
9881
|
+
|
|
9882
|
+
Suggestion: Based on your plan, you should work with the PM agent next.
|
|
9883
|
+
Use *agent pm to switch, or *plan-status to see full progress.
|
|
9884
|
+
```
|
|
9885
|
+
|
|
9886
|
+
### Example 2: Task Sequence Warning
|
|
9887
|
+
|
|
9888
|
+
```
|
|
9889
|
+
User: *task create-next-story
|
|
9890
|
+
|
|
9891
|
+
[Plan check triggered]
|
|
9892
|
+
⚠️ SEQUENCE WARNING:
|
|
9893
|
+
Your workflow plan indicates the PRD hasn't been created yet.
|
|
9894
|
+
Creating stories before the PRD may lead to incomplete requirements.
|
|
9895
|
+
|
|
9896
|
+
Would you like to:
|
|
9897
|
+
1. Continue anyway (will note deviation in plan)
|
|
9898
|
+
2. Switch to creating PRD first (*agent pm)
|
|
9899
|
+
3. View plan status (*plan-status)
|
|
9900
|
+
```
|
|
9901
|
+
|
|
9902
|
+
### Example 3: Automatic Plan Update
|
|
9903
|
+
|
|
9904
|
+
```
|
|
9905
|
+
[After completing create-doc task for PRD]
|
|
9906
|
+
|
|
9907
|
+
✅ Plan Updated: Marked "Create PRD" as complete
|
|
9908
|
+
📍 Next step: Create Architecture Document (architect agent)
|
|
9909
|
+
```
|
|
9910
|
+
|
|
9911
|
+
## Implementation Notes
|
|
9912
|
+
|
|
9913
|
+
- This utility should be lightweight and fast
|
|
9914
|
+
- Plan parsing should be resilient to format variations
|
|
9915
|
+
- Always preserve user agency - warnings not blocks (unless strict mode)
|
|
9916
|
+
- Plan updates should be atomic to prevent corruption
|
|
9917
|
+
- Consider plan versioning for rollback capability
|
|
9918
|
+
|
|
9919
|
+
## Error Handling
|
|
9920
|
+
|
|
9921
|
+
- Missing plan: Return null, don't error
|
|
9922
|
+
- Malformed plan: Warn but continue, treat as no plan
|
|
9923
|
+
- Update failures: Log but don't block task completion
|
|
9924
|
+
- Parse errors: Fallback to basic text search
|
|
9925
|
+
==================== END: utils#plan-management ====================
|
|
9926
|
+
|
|
9074
9927
|
==================== START: utils#template-format ====================
|
|
9075
9928
|
# Template Format Conventions
|
|
9076
9929
|
|