@posx/core 5.5.165 → 5.5.166

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 (131) hide show
  1. package/.bmad-core/agent-teams/team-all.yaml +14 -0
  2. package/.bmad-core/agent-teams/team-fullstack.yaml +18 -0
  3. package/.bmad-core/agent-teams/team-ide-minimal.yaml +10 -0
  4. package/.bmad-core/agent-teams/team-no-ui.yaml +13 -0
  5. package/.bmad-core/agents/analyst.md +81 -0
  6. package/.bmad-core/agents/architect.md +83 -0
  7. package/.bmad-core/agents/bmad-master.md +107 -0
  8. package/.bmad-core/agents/bmad-orchestrator.md +149 -0
  9. package/.bmad-core/agents/dev.md +75 -0
  10. package/.bmad-core/agents/pm.md +81 -0
  11. package/.bmad-core/agents/po.md +76 -0
  12. package/.bmad-core/agents/qa.md +69 -0
  13. package/.bmad-core/agents/sm.md +62 -0
  14. package/.bmad-core/agents/ux-expert.md +66 -0
  15. package/.bmad-core/bmad-core/user-guide.md +0 -0
  16. package/.bmad-core/checklists/architect-checklist.md +443 -0
  17. package/.bmad-core/checklists/change-checklist.md +182 -0
  18. package/.bmad-core/checklists/pm-checklist.md +375 -0
  19. package/.bmad-core/checklists/po-master-checklist.md +441 -0
  20. package/.bmad-core/checklists/story-dod-checklist.md +101 -0
  21. package/.bmad-core/checklists/story-draft-checklist.md +156 -0
  22. package/.bmad-core/core-config.yaml +20 -0
  23. package/.bmad-core/data/bmad-kb.md +813 -0
  24. package/.bmad-core/data/brainstorming-techniques.md +36 -0
  25. package/.bmad-core/data/elicitation-methods.md +154 -0
  26. package/.bmad-core/data/technical-preferences.md +3 -0
  27. package/.bmad-core/enhanced-ide-development-workflow.md +43 -0
  28. package/.bmad-core/install-manifest.yaml +207 -0
  29. package/.bmad-core/tasks/advanced-elicitation.md +119 -0
  30. package/.bmad-core/tasks/brownfield-create-epic.md +160 -0
  31. package/.bmad-core/tasks/brownfield-create-story.md +147 -0
  32. package/.bmad-core/tasks/correct-course.md +70 -0
  33. package/.bmad-core/tasks/create-brownfield-story.md +321 -0
  34. package/.bmad-core/tasks/create-deep-research-prompt.md +289 -0
  35. package/.bmad-core/tasks/create-doc.md +101 -0
  36. package/.bmad-core/tasks/create-next-story.md +112 -0
  37. package/.bmad-core/tasks/document-project.md +347 -0
  38. package/.bmad-core/tasks/execute-checklist.md +93 -0
  39. package/.bmad-core/tasks/facilitate-brainstorming-session.md +136 -0
  40. package/.bmad-core/tasks/generate-ai-frontend-prompt.md +51 -0
  41. package/.bmad-core/tasks/index-docs.md +178 -0
  42. package/.bmad-core/tasks/kb-mode-interaction.md +75 -0
  43. package/.bmad-core/tasks/review-story.md +162 -0
  44. package/.bmad-core/tasks/shard-doc.md +187 -0
  45. package/.bmad-core/tasks/validate-next-story.md +134 -0
  46. package/.bmad-core/templates/architecture-tmpl.yaml +650 -0
  47. package/.bmad-core/templates/brainstorming-output-tmpl.yaml +156 -0
  48. package/.bmad-core/templates/brownfield-architecture-tmpl.yaml +476 -0
  49. package/.bmad-core/templates/brownfield-prd-tmpl.yaml +280 -0
  50. package/.bmad-core/templates/competitor-analysis-tmpl.yaml +293 -0
  51. package/.bmad-core/templates/front-end-architecture-tmpl.yaml +206 -0
  52. package/.bmad-core/templates/front-end-spec-tmpl.yaml +349 -0
  53. package/.bmad-core/templates/fullstack-architecture-tmpl.yaml +805 -0
  54. package/.bmad-core/templates/market-research-tmpl.yaml +252 -0
  55. package/.bmad-core/templates/prd-tmpl.yaml +202 -0
  56. package/.bmad-core/templates/project-brief-tmpl.yaml +221 -0
  57. package/.bmad-core/templates/story-tmpl.yaml +137 -0
  58. package/.bmad-core/user-guide.md +251 -0
  59. package/.bmad-core/utils/bmad-doc-template.md +325 -0
  60. package/.bmad-core/utils/workflow-management.md +69 -0
  61. package/.bmad-core/workflows/brownfield-fullstack.yaml +297 -0
  62. package/.bmad-core/workflows/brownfield-service.yaml +187 -0
  63. package/.bmad-core/workflows/brownfield-ui.yaml +197 -0
  64. package/.bmad-core/workflows/greenfield-fullstack.yaml +240 -0
  65. package/.bmad-core/workflows/greenfield-service.yaml +206 -0
  66. package/.bmad-core/workflows/greenfield-ui.yaml +235 -0
  67. package/.bmad-core/working-in-the-brownfield.md +364 -0
  68. package/.claude/commands/BMad/agents/analyst.md +85 -0
  69. package/.claude/commands/BMad/agents/architect.md +87 -0
  70. package/.claude/commands/BMad/agents/bmad-master.md +111 -0
  71. package/.claude/commands/BMad/agents/bmad-orchestrator.md +153 -0
  72. package/.claude/commands/BMad/agents/dev.md +79 -0
  73. package/.claude/commands/BMad/agents/pm.md +85 -0
  74. package/.claude/commands/BMad/agents/po.md +80 -0
  75. package/.claude/commands/BMad/agents/qa.md +73 -0
  76. package/.claude/commands/BMad/agents/sm.md +66 -0
  77. package/.claude/commands/BMad/agents/ux-expert.md +70 -0
  78. package/.claude/commands/BMad/tasks/advanced-elicitation.md +123 -0
  79. package/.claude/commands/BMad/tasks/brownfield-create-epic.md +164 -0
  80. package/.claude/commands/BMad/tasks/brownfield-create-story.md +151 -0
  81. package/.claude/commands/BMad/tasks/correct-course.md +74 -0
  82. package/.claude/commands/BMad/tasks/create-brownfield-story.md +325 -0
  83. package/.claude/commands/BMad/tasks/create-deep-research-prompt.md +293 -0
  84. package/.claude/commands/BMad/tasks/create-doc.md +105 -0
  85. package/.claude/commands/BMad/tasks/create-next-story.md +116 -0
  86. package/.claude/commands/BMad/tasks/document-project.md +351 -0
  87. package/.claude/commands/BMad/tasks/execute-checklist.md +97 -0
  88. package/.claude/commands/BMad/tasks/facilitate-brainstorming-session.md +140 -0
  89. package/.claude/commands/BMad/tasks/generate-ai-frontend-prompt.md +55 -0
  90. package/.claude/commands/BMad/tasks/index-docs.md +182 -0
  91. package/.claude/commands/BMad/tasks/kb-mode-interaction.md +79 -0
  92. package/.claude/commands/BMad/tasks/review-story.md +166 -0
  93. package/.claude/commands/BMad/tasks/shard-doc.md +191 -0
  94. package/.claude/commands/BMad/tasks/validate-next-story.md +138 -0
  95. package/.cursor/rules/analyst.mdc +95 -0
  96. package/.cursor/rules/architect.mdc +97 -0
  97. package/.cursor/rules/bmad-master.mdc +121 -0
  98. package/.cursor/rules/bmad-orchestrator.mdc +163 -0
  99. package/.cursor/rules/dev.mdc +89 -0
  100. package/.cursor/rules/pm.mdc +95 -0
  101. package/.cursor/rules/po.mdc +90 -0
  102. package/.cursor/rules/qa.mdc +83 -0
  103. package/.cursor/rules/sm.mdc +76 -0
  104. package/.cursor/rules/ux-expert.mdc +80 -0
  105. package/build/index.js +1 -1
  106. package/package.json +1 -1
  107. package/package.publish.json +1 -1
  108. package/web-bundles/agents/analyst.txt +2882 -0
  109. package/web-bundles/agents/architect.txt +3543 -0
  110. package/web-bundles/agents/bmad-master.txt +8756 -0
  111. package/web-bundles/agents/bmad-orchestrator.txt +1490 -0
  112. package/web-bundles/agents/dev.txt +428 -0
  113. package/web-bundles/agents/pm.txt +2229 -0
  114. package/web-bundles/agents/po.txt +1364 -0
  115. package/web-bundles/agents/qa.txt +386 -0
  116. package/web-bundles/agents/sm.txt +668 -0
  117. package/web-bundles/agents/ux-expert.txt +701 -0
  118. package/web-bundles/expansion-packs/bmad-2d-phaser-game-dev/agents/game-designer.txt +2408 -0
  119. package/web-bundles/expansion-packs/bmad-2d-phaser-game-dev/agents/game-developer.txt +1631 -0
  120. package/web-bundles/expansion-packs/bmad-2d-phaser-game-dev/agents/game-sm.txt +822 -0
  121. package/web-bundles/expansion-packs/bmad-2d-phaser-game-dev/teams/phaser-2d-nodejs-game-team.txt +10989 -0
  122. package/web-bundles/expansion-packs/bmad-2d-unity-game-dev/agents/game-architect.txt +4047 -0
  123. package/web-bundles/expansion-packs/bmad-2d-unity-game-dev/agents/game-designer.txt +3744 -0
  124. package/web-bundles/expansion-packs/bmad-2d-unity-game-dev/agents/game-developer.txt +465 -0
  125. package/web-bundles/expansion-packs/bmad-2d-unity-game-dev/agents/game-sm.txt +990 -0
  126. package/web-bundles/expansion-packs/bmad-2d-unity-game-dev/teams/unity-2d-game-team.txt +15467 -0
  127. package/web-bundles/expansion-packs/bmad-infrastructure-devops/agents/infra-devops-platform.txt +2077 -0
  128. package/web-bundles/teams/team-all.txt +11062 -0
  129. package/web-bundles/teams/team-fullstack.txt +10392 -0
  130. package/web-bundles/teams/team-ide-minimal.txt +3507 -0
  131. package/web-bundles/teams/team-no-ui.txt +8951 -0
@@ -0,0 +1,325 @@
1
+ # BMad Document Template Specification
2
+
3
+ ## Overview
4
+
5
+ BMad document templates are defined in YAML format to drive interactive document generation and agent interaction. Templates separate structure definition from content generation, making them both human and LLM-agent-friendly.
6
+
7
+ ## Template Structure
8
+
9
+ ```yaml
10
+ template:
11
+ id: template-identifier
12
+ name: Human Readable Template Name
13
+ version: 1.0
14
+ output:
15
+ format: markdown
16
+ filename: default-path/to/{{filename}}.md
17
+ title: "{{variable}} Document Title"
18
+
19
+ workflow:
20
+ mode: interactive
21
+ elicitation: advanced-elicitation
22
+
23
+ sections:
24
+ - id: section-id
25
+ title: Section Title
26
+ instruction: |
27
+ Detailed instructions for the LLM on how to handle this section
28
+ # ... additional section properties
29
+ ```
30
+
31
+ ## Core Fields
32
+
33
+ ### Template Metadata
34
+
35
+ - **id**: Unique identifier for the template
36
+ - **name**: Human-readable name displayed in UI
37
+ - **version**: Template version for tracking changes
38
+ - **output.format**: Default "markdown" for document templates
39
+ - **output.filename**: Default output file path (can include variables)
40
+ - **output.title**: Document title (becomes H1 in markdown)
41
+
42
+ ### Workflow Configuration
43
+
44
+ - **workflow.mode**: Default interaction mode ("interactive" or "yolo")
45
+ - **workflow.elicitation**: Elicitation task to use ("advanced-elicitation")
46
+
47
+ ## Section Properties
48
+
49
+ ### Required Fields
50
+
51
+ - **id**: Unique section identifier
52
+ - **title**: Section heading text
53
+ - **instruction**: Detailed guidance for LLM on handling this section
54
+
55
+ ### Optional Fields
56
+
57
+ #### Content Control
58
+
59
+ - **type**: Content type hint for structured sections
60
+ - **template**: Fixed template text for section content
61
+ - **item_template**: Template for repeatable items within section
62
+ - **prefix**: Prefix for numbered items (e.g., "FR", "NFR")
63
+
64
+ #### Behavior Flags
65
+
66
+ - **elicit**: Boolean - Apply elicitation after section rendered
67
+ - **repeatable**: Boolean - Section can be repeated multiple times
68
+ - **condition**: String - Condition for including section (e.g., "has ui requirements")
69
+
70
+ #### Agent Permissions
71
+
72
+ - **owner**: String - Agent role that initially creates/populates this section
73
+ - **editors**: Array - List of agent roles allowed to modify this section
74
+ - **readonly**: Boolean - Section cannot be modified after initial creation
75
+
76
+ #### Content Guidance
77
+
78
+ - **examples**: Array of example content (not included in output)
79
+ - **choices**: Object with choice options for common decisions
80
+ - **placeholder**: Default placeholder text
81
+
82
+ #### Structure
83
+
84
+ - **sections**: Array of nested child sections
85
+
86
+ ## Supported Types
87
+
88
+ ### Content Types
89
+
90
+ - **bullet-list**: Unordered list items
91
+ - **numbered-list**: Ordered list with optional prefix
92
+ - **paragraphs**: Free-form paragraph text
93
+ - **table**: Structured table data
94
+ - **code-block**: Code or configuration blocks
95
+ - **template-text**: Fixed template with variable substitution
96
+ - **mermaid**: Mermaid diagram with specified type and details
97
+
98
+ ### Special Types
99
+
100
+ - **repeatable-container**: Container for multiple instances
101
+ - **conditional-block**: Content shown based on conditions
102
+ - **choice-selector**: Present choices to user
103
+
104
+ ## Advanced Features
105
+
106
+ ### Variable Substitution
107
+
108
+ Use `{{variable_name}}` in titles, templates, and content:
109
+
110
+ ```yaml
111
+ title: "Epic {{epic_number}} {{epic_title}}"
112
+ template: "As a {{user_type}}, I want {{action}}, so that {{benefit}}."
113
+ ```
114
+
115
+ ### Conditional Sections
116
+
117
+ ```yaml
118
+ - id: ui-section
119
+ title: User Interface Design
120
+ condition: Project has UX/UI Requirements
121
+ instruction: Only include if project has UI components
122
+ ```
123
+
124
+ ### Choice Integration
125
+
126
+ ```yaml
127
+ choices:
128
+ architecture: [Monolith, Microservices, Serverless]
129
+ testing: [Unit Only, Unit + Integration, Full Pyramid]
130
+ ```
131
+
132
+ ### Mermaid Diagrams
133
+
134
+ ```yaml
135
+ - id: system-architecture
136
+ title: System Architecture Diagram
137
+ type: mermaid
138
+ instruction: Create a system architecture diagram showing key components and data flow
139
+ mermaid_type: flowchart
140
+ details: |
141
+ Show the following components:
142
+ - User interface layer
143
+ - API gateway
144
+ - Core services
145
+ - Database layer
146
+ - External integrations
147
+ ```
148
+
149
+ **Supported mermaid_type values:**
150
+
151
+ **Core Diagram Types:**
152
+
153
+ - `flowchart` - Flow charts and process diagrams
154
+ - `sequenceDiagram` - Sequence diagrams for interactions
155
+ - `classDiagram` - Class relationship diagrams (UML)
156
+ - `stateDiagram` - State transition diagrams
157
+ - `erDiagram` - Entity relationship diagrams
158
+ - `gantt` - Gantt charts for timelines
159
+ - `pie` - Pie charts for data visualization
160
+
161
+ **Advanced Diagram Types:**
162
+
163
+ - `journey` - User journey maps
164
+ - `mindmap` - Mindmaps for brainstorming
165
+ - `timeline` - Timeline diagrams for chronological events
166
+ - `quadrantChart` - Quadrant charts for data categorization
167
+ - `xyChart` - XY charts (bar charts, line charts)
168
+ - `sankey` - Sankey diagrams for flow visualization
169
+
170
+ **Specialized Types:**
171
+
172
+ - `c4Context` - C4 context diagrams (experimental)
173
+ - `requirement` - Requirement diagrams
174
+ - `packet` - Network packet diagrams
175
+ - `block` - Block diagrams
176
+ - `kanban` - Kanban boards
177
+
178
+ ### Agent Permissions Example
179
+
180
+ ```yaml
181
+ - id: story-details
182
+ title: Story
183
+ owner: scrum-master
184
+ editors: [scrum-master]
185
+ readonly: false
186
+ sections:
187
+ - id: dev-notes
188
+ title: Dev Notes
189
+ owner: dev-agent
190
+ editors: [dev-agent]
191
+ readonly: false
192
+ instruction: Implementation notes and technical details
193
+ - id: qa-results
194
+ title: QA Results
195
+ owner: qa-agent
196
+ editors: [qa-agent]
197
+ readonly: true
198
+ instruction: Quality assurance test results
199
+ ```
200
+
201
+ ### Repeatable Sections
202
+
203
+ ```yaml
204
+ - id: epic-details
205
+ title: Epic {{epic_number}} {{epic_title}}
206
+ repeatable: true
207
+ sections:
208
+ - id: story
209
+ title: Story {{epic_number}}.{{story_number}} {{story_title}}
210
+ repeatable: true
211
+ sections:
212
+ - id: criteria
213
+ title: Acceptance Criteria
214
+ type: numbered-list
215
+ item_template: "{{criterion_number}}: {{criteria}}"
216
+ repeatable: true
217
+ ```
218
+
219
+ ### Examples with Code Blocks
220
+
221
+ ````yaml
222
+ examples:
223
+ - "FR6: The system must authenticate users within 2 seconds"
224
+ - |
225
+ ```mermaid
226
+ sequenceDiagram
227
+ participant User
228
+ participant API
229
+ participant DB
230
+ User->>API: POST /login
231
+ API->>DB: Validate credentials
232
+ DB-->>API: User data
233
+ API-->>User: JWT token
234
+ ```
235
+ - |
236
+ **Architecture Decision Record**
237
+
238
+ **Decision**: Use PostgreSQL for primary database
239
+ **Rationale**: ACID compliance and JSON support needed
240
+ **Consequences**: Requires database management expertise
241
+ ````
242
+
243
+ ## Section Hierarchy
244
+
245
+ Templates define the complete document structure starting with the first H2 - each level in is the next H#:
246
+
247
+ ```yaml
248
+ sections:
249
+ - id: overview
250
+ title: Project Overview
251
+ sections:
252
+ - id: goals
253
+ title: Goals
254
+ - id: scope
255
+ title: Scope
256
+ sections:
257
+ - id: in-scope
258
+ title: In Scope
259
+ - id: out-scope
260
+ title: Out of Scope
261
+ ```
262
+
263
+ ## Processing Flow
264
+
265
+ 1. **Parse Template**: Load and validate YAML structure
266
+ 2. **Initialize Workflow**: Set interaction mode and elicitation
267
+ 3. **Process Sections**: Handle each section in order:
268
+ - Check conditions
269
+ - Apply instructions
270
+ - Generate content
271
+ - Handle choices and variables
272
+ - Apply elicitation if specified
273
+ - Process nested sections
274
+ 4. **Generate Output**: Create clean markdown document
275
+
276
+ ## Best Practices
277
+
278
+ ### Template Design
279
+
280
+ - Keep instructions clear and specific
281
+ - Use examples for complex content
282
+ - Structure sections logically
283
+ - Include all necessary guidance for LLM
284
+
285
+ ### Content Instructions
286
+
287
+ - Be explicit about expected format
288
+ - Include reasoning for decisions
289
+ - Specify interaction patterns
290
+ - Reference other documents when needed
291
+
292
+ ### Variable Naming
293
+
294
+ - Use descriptive variable names
295
+ - Follow consistent naming conventions
296
+ - Document expected variable values
297
+
298
+ ### Examples Usage
299
+
300
+ - Provide concrete examples for complex sections
301
+ - Include both simple and complex cases
302
+ - Use realistic project scenarios
303
+ - Include code blocks and diagrams when helpful
304
+
305
+ ## Validation
306
+
307
+ Templates should be validated for:
308
+
309
+ - Valid YAML syntax
310
+ - Required fields present
311
+ - Consistent section IDs
312
+ - Proper nesting structure
313
+ - Valid variable references
314
+
315
+ ## Migration from Legacy
316
+
317
+ When converting from markdown+frontmatter templates:
318
+
319
+ 1. Extract embedded `[[LLM:]]` instructions to `instruction` fields
320
+ 2. Convert `<<REPEAT>>` blocks to `repeatable: true` sections
321
+ 3. Extract `^^CONDITIONS^^` to `condition` fields
322
+ 4. Move `@{examples}` to `examples` arrays
323
+ 5. Convert `{{placeholders}}` to proper variable syntax
324
+
325
+ This specification ensures templates are both human-readable and machine-processable while maintaining the flexibility needed for complex document generation.
@@ -0,0 +1,69 @@
1
+ # Workflow Management
2
+
3
+ Enables BMad orchestrator to manage and execute team workflows.
4
+
5
+ ## Dynamic Workflow Loading
6
+
7
+ Read available workflows from current team configuration's `workflows` field. Each team bundle defines its own supported workflows.
8
+
9
+ **Key Commands**:
10
+
11
+ - `/workflows` - List workflows in current bundle or workflows folder
12
+ - `/agent-list` - Show agents in current bundle
13
+
14
+ ## Workflow Commands
15
+
16
+ ### /workflows
17
+
18
+ Lists available workflows with titles and descriptions.
19
+
20
+ ### /workflow-start {workflow-id}
21
+
22
+ Starts workflow and transitions to first agent.
23
+
24
+ ### /workflow-status
25
+
26
+ Shows current progress, completed artifacts, and next steps.
27
+
28
+ ### /workflow-resume
29
+
30
+ Resumes workflow from last position. User can provide completed artifacts.
31
+
32
+ ### /workflow-next
33
+
34
+ Shows next recommended agent and action.
35
+
36
+ ## Execution Flow
37
+
38
+ 1. **Starting**: Load definition → Identify first stage → Transition to agent → Guide artifact creation
39
+
40
+ 2. **Stage Transitions**: Mark complete → Check conditions → Load next agent → Pass artifacts
41
+
42
+ 3. **Artifact Tracking**: Track status, creator, timestamps in workflow_state
43
+
44
+ 4. **Interruption Handling**: Analyze provided artifacts → Determine position → Suggest next step
45
+
46
+ ## Context Passing
47
+
48
+ When transitioning, pass:
49
+
50
+ - Previous artifacts
51
+ - Current workflow stage
52
+ - Expected outputs
53
+ - Decisions/constraints
54
+
55
+ ## Multi-Path Workflows
56
+
57
+ Handle conditional paths by asking clarifying questions when needed.
58
+
59
+ ## Best Practices
60
+
61
+ 1. Show progress
62
+ 2. Explain transitions
63
+ 3. Preserve context
64
+ 4. Allow flexibility
65
+ 5. Track state
66
+
67
+ ## Agent Integration
68
+
69
+ Agents should be workflow-aware: know active workflow, their role, access artifacts, understand expected outputs.
@@ -0,0 +1,297 @@
1
+ workflow:
2
+ id: brownfield-fullstack
3
+ name: Brownfield Full-Stack Enhancement
4
+ description: >-
5
+ Agent workflow for enhancing existing full-stack applications with new features,
6
+ modernization, or significant changes. Handles existing system analysis and safe integration.
7
+ type: brownfield
8
+ project_types:
9
+ - feature-addition
10
+ - refactoring
11
+ - modernization
12
+ - integration-enhancement
13
+
14
+ sequence:
15
+ - step: enhancement_classification
16
+ agent: analyst
17
+ action: classify enhancement scope
18
+ notes: |
19
+ Determine enhancement complexity to route to appropriate path:
20
+ - Single story (< 4 hours) → Use brownfield-create-story task
21
+ - Small feature (1-3 stories) → Use brownfield-create-epic task
22
+ - Major enhancement (multiple epics) → Continue with full workflow
23
+
24
+ Ask user: "Can you describe the enhancement scope? Is this a small fix, a feature addition, or a major enhancement requiring architectural changes?"
25
+
26
+ - step: routing_decision
27
+ condition: based_on_classification
28
+ routes:
29
+ single_story:
30
+ agent: pm
31
+ uses: brownfield-create-story
32
+ notes: "Create single story for immediate implementation. Exit workflow after story creation."
33
+ small_feature:
34
+ agent: pm
35
+ uses: brownfield-create-epic
36
+ notes: "Create focused epic with 1-3 stories. Exit workflow after epic creation."
37
+ major_enhancement:
38
+ continue: to_next_step
39
+ notes: "Continue with comprehensive planning workflow below."
40
+
41
+ - step: documentation_check
42
+ agent: analyst
43
+ action: check existing documentation
44
+ condition: major_enhancement_path
45
+ notes: |
46
+ Check if adequate project documentation exists:
47
+ - Look for existing architecture docs, API specs, coding standards
48
+ - Assess if documentation is current and comprehensive
49
+ - If adequate: Skip document-project, proceed to PRD
50
+ - If inadequate: Run document-project first
51
+
52
+ - step: project_analysis
53
+ agent: architect
54
+ action: analyze existing project and use task document-project
55
+ creates: brownfield-architecture.md (or multiple documents)
56
+ condition: documentation_inadequate
57
+ notes: "Run document-project to capture current system state, technical debt, and constraints. Pass findings to PRD creation."
58
+
59
+ - agent: pm
60
+ creates: prd.md
61
+ uses: brownfield-prd-tmpl
62
+ requires: existing_documentation_or_analysis
63
+ notes: |
64
+ Creates PRD for major enhancement. If document-project was run, reference its output to avoid re-analysis.
65
+ If skipped, use existing project documentation.
66
+ SAVE OUTPUT: Copy final prd.md to your project's docs/ folder.
67
+
68
+ - step: architecture_decision
69
+ agent: pm/architect
70
+ action: determine if architecture document needed
71
+ condition: after_prd_creation
72
+ notes: |
73
+ Review PRD to determine if architectural planning is needed:
74
+ - New architectural patterns → Create architecture doc
75
+ - New libraries/frameworks → Create architecture doc
76
+ - Platform/infrastructure changes → Create architecture doc
77
+ - Following existing patterns → Skip to story creation
78
+
79
+ - agent: architect
80
+ creates: architecture.md
81
+ uses: brownfield-architecture-tmpl
82
+ requires: prd.md
83
+ condition: architecture_changes_needed
84
+ notes: "Creates architecture ONLY for significant architectural changes. SAVE OUTPUT: Copy final architecture.md to your project's docs/ folder."
85
+
86
+ - agent: po
87
+ validates: all_artifacts
88
+ uses: po-master-checklist
89
+ notes: "Validates all documents for integration safety and completeness. May require updates to any document."
90
+
91
+ - agent: various
92
+ updates: any_flagged_documents
93
+ condition: po_checklist_issues
94
+ notes: "If PO finds issues, return to relevant agent to fix and re-export updated documents to docs/ folder."
95
+
96
+ - agent: po
97
+ action: shard_documents
98
+ creates: sharded_docs
99
+ requires: all_artifacts_in_project
100
+ notes: |
101
+ Shard documents for IDE development:
102
+ - Option A: Use PO agent to shard: @po then ask to shard docs/prd.md
103
+ - Option B: Manual: Drag shard-doc task + docs/prd.md into chat
104
+ - Creates docs/prd/ and docs/architecture/ folders with sharded content
105
+
106
+ - agent: sm
107
+ action: create_story
108
+ creates: story.md
109
+ requires: sharded_docs_or_brownfield_docs
110
+ repeats: for_each_epic_or_enhancement
111
+ notes: |
112
+ Story creation cycle:
113
+ - For sharded PRD: @sm → *create (uses create-next-story)
114
+ - For brownfield docs: @sm → use create-brownfield-story task
115
+ - Creates story from available documentation
116
+ - Story starts in "Draft" status
117
+ - May require additional context gathering for brownfield
118
+
119
+ - agent: analyst/pm
120
+ action: review_draft_story
121
+ updates: story.md
122
+ requires: story.md
123
+ optional: true
124
+ condition: user_wants_story_review
125
+ notes: |
126
+ OPTIONAL: Review and approve draft story
127
+ - NOTE: story-review task coming soon
128
+ - Review story completeness and alignment
129
+ - Update story status: Draft → Approved
130
+
131
+ - agent: dev
132
+ action: implement_story
133
+ creates: implementation_files
134
+ requires: story.md
135
+ notes: |
136
+ Dev Agent (New Chat): @dev
137
+ - Implements approved story
138
+ - Updates File List with all changes
139
+ - Marks story as "Review" when complete
140
+
141
+ - agent: qa
142
+ action: review_implementation
143
+ updates: implementation_files
144
+ requires: implementation_files
145
+ optional: true
146
+ notes: |
147
+ OPTIONAL: QA Agent (New Chat): @qa → review-story
148
+ - Senior dev review with refactoring ability
149
+ - Fixes small issues directly
150
+ - Leaves checklist for remaining items
151
+ - Updates story status (Review → Done or stays Review)
152
+
153
+ - agent: dev
154
+ action: address_qa_feedback
155
+ updates: implementation_files
156
+ condition: qa_left_unchecked_items
157
+ notes: |
158
+ If QA left unchecked items:
159
+ - Dev Agent (New Chat): Address remaining items
160
+ - Return to QA for final approval
161
+
162
+ - repeat_development_cycle:
163
+ action: continue_for_all_stories
164
+ notes: |
165
+ Repeat story cycle (SM → Dev → QA) for all epic stories
166
+ Continue until all stories in PRD are complete
167
+
168
+ - agent: po
169
+ action: epic_retrospective
170
+ creates: epic-retrospective.md
171
+ condition: epic_complete
172
+ optional: true
173
+ notes: |
174
+ OPTIONAL: After epic completion
175
+ - NOTE: epic-retrospective task coming soon
176
+ - Validate epic was completed correctly
177
+ - Document learnings and improvements
178
+
179
+ - workflow_end:
180
+ action: project_complete
181
+ notes: |
182
+ All stories implemented and reviewed!
183
+ Project development phase complete.
184
+
185
+ Reference: .bmad-core/data/bmad-kb.md#IDE Development Workflow
186
+
187
+ flow_diagram: |
188
+ ```mermaid
189
+ graph TD
190
+ A[Start: Brownfield Enhancement] --> B[analyst: classify enhancement scope]
191
+ B --> C{Enhancement Size?}
192
+
193
+ C -->|Single Story| D[pm: brownfield-create-story]
194
+ C -->|1-3 Stories| E[pm: brownfield-create-epic]
195
+ C -->|Major Enhancement| F[analyst: check documentation]
196
+
197
+ D --> END1[To Dev Implementation]
198
+ E --> END2[To Story Creation]
199
+
200
+ F --> G{Docs Adequate?}
201
+ G -->|No| H[architect: document-project]
202
+ G -->|Yes| I[pm: brownfield PRD]
203
+ H --> I
204
+
205
+ I --> J{Architecture Needed?}
206
+ J -->|Yes| K[architect: architecture.md]
207
+ J -->|No| L[po: validate artifacts]
208
+ K --> L
209
+
210
+ L --> M{PO finds issues?}
211
+ M -->|Yes| N[Fix issues]
212
+ M -->|No| O[po: shard documents]
213
+ N --> L
214
+
215
+ O --> P[sm: create story]
216
+ P --> Q{Story Type?}
217
+ Q -->|Sharded PRD| R[create-next-story]
218
+ Q -->|Brownfield Docs| S[create-brownfield-story]
219
+
220
+ R --> T{Review draft?}
221
+ S --> T
222
+ T -->|Yes| U[review & approve]
223
+ T -->|No| V[dev: implement]
224
+ U --> V
225
+
226
+ V --> W{QA review?}
227
+ W -->|Yes| X[qa: review]
228
+ W -->|No| Y{More stories?}
229
+ X --> Z{Issues?}
230
+ Z -->|Yes| AA[dev: fix]
231
+ Z -->|No| Y
232
+ AA --> X
233
+ Y -->|Yes| P
234
+ Y -->|No| AB{Retrospective?}
235
+ AB -->|Yes| AC[po: retrospective]
236
+ AB -->|No| AD[Complete]
237
+ AC --> AD
238
+
239
+ style AD fill:#90EE90
240
+ style END1 fill:#90EE90
241
+ style END2 fill:#90EE90
242
+ style D fill:#87CEEB
243
+ style E fill:#87CEEB
244
+ style I fill:#FFE4B5
245
+ style K fill:#FFE4B5
246
+ style O fill:#ADD8E6
247
+ style P fill:#ADD8E6
248
+ style V fill:#ADD8E6
249
+ style U fill:#F0E68C
250
+ style X fill:#F0E68C
251
+ style AC fill:#F0E68C
252
+ ```
253
+
254
+ decision_guidance:
255
+ when_to_use:
256
+ - Enhancement requires coordinated stories
257
+ - Architectural changes are needed
258
+ - Significant integration work required
259
+ - Risk assessment and mitigation planning necessary
260
+ - Multiple team members will work on related changes
261
+
262
+ handoff_prompts:
263
+ classification_complete: |
264
+ Enhancement classified as: {{enhancement_type}}
265
+ {{if single_story}}: Proceeding with brownfield-create-story task for immediate implementation.
266
+ {{if small_feature}}: Creating focused epic with brownfield-create-epic task.
267
+ {{if major_enhancement}}: Continuing with comprehensive planning workflow.
268
+
269
+ documentation_assessment: |
270
+ Documentation assessment complete:
271
+ {{if adequate}}: Existing documentation is sufficient. Proceeding directly to PRD creation.
272
+ {{if inadequate}}: Running document-project to capture current system state before PRD.
273
+
274
+ document_project_to_pm: |
275
+ Project analysis complete. Key findings documented in:
276
+ - {{document_list}}
277
+ Use these findings to inform PRD creation and avoid re-analyzing the same aspects.
278
+
279
+ pm_to_architect_decision: |
280
+ PRD complete and saved as docs/prd.md.
281
+ Architectural changes identified: {{yes/no}}
282
+ {{if yes}}: Proceeding to create architecture document for: {{specific_changes}}
283
+ {{if no}}: No architectural changes needed. Proceeding to validation.
284
+
285
+ architect_to_po: "Architecture complete. Save it as docs/architecture.md. Please validate all artifacts for integration safety."
286
+
287
+ po_to_sm: |
288
+ All artifacts validated.
289
+ Documentation type available: {{sharded_prd / brownfield_docs}}
290
+ {{if sharded}}: Use standard create-next-story task.
291
+ {{if brownfield}}: Use create-brownfield-story task to handle varied documentation formats.
292
+
293
+ sm_story_creation: |
294
+ Creating story from {{documentation_type}}.
295
+ {{if missing_context}}: May need to gather additional context from user during story creation.
296
+
297
+ complete: "All planning artifacts validated and development can begin. Stories will be created based on available documentation format."