greenfield-ui.yaml 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  1. # <!-- Powered by BMAD™ Core -->
  2. workflow:
  3. id: greenfield-ui
  4. name: Greenfield UI/Frontend Development
  5. description: >-
  6. Agent workflow for building frontend applications from concept to development.
  7. Supports both comprehensive planning for complex UIs and rapid prototyping for simple interfaces.
  8. type: greenfield
  9. project_types:
  10. - spa
  11. - mobile-app
  12. - micro-frontend
  13. - static-site
  14. - ui-prototype
  15. - simple-interface
  16. sequence:
  17. - agent: analyst
  18. creates: project-brief.md
  19. optional_steps:
  20. - brainstorming_session
  21. - market_research_prompt
  22. notes: "Can do brainstorming first, then optional deep research before creating project brief. SAVE OUTPUT: Copy final project-brief.md to your project's docs/ folder."
  23. - agent: pm
  24. creates: prd.md
  25. requires: project-brief.md
  26. notes: "Creates PRD from project brief using prd-tmpl, focused on UI/frontend requirements. SAVE OUTPUT: Copy final prd.md to your project's docs/ folder."
  27. - agent: ux-expert
  28. creates: front-end-spec.md
  29. requires: prd.md
  30. optional_steps:
  31. - user_research_prompt
  32. notes: "Creates UI/UX specification using front-end-spec-tmpl. SAVE OUTPUT: Copy final front-end-spec.md to your project's docs/ folder."
  33. - agent: ux-expert
  34. creates: v0_prompt (optional)
  35. requires: front-end-spec.md
  36. condition: user_wants_ai_generation
  37. notes: "OPTIONAL BUT RECOMMENDED: Generate AI UI prompt for tools like v0, Lovable, etc. Use the generate-ai-frontend-prompt task. User can then generate UI in external tool and download project structure."
  38. - agent: architect
  39. creates: front-end-architecture.md
  40. requires: front-end-spec.md
  41. optional_steps:
  42. - technical_research_prompt
  43. - review_generated_ui_structure
  44. notes: "Creates frontend architecture using front-end-architecture-tmpl. If user generated UI with v0/Lovable, can incorporate the project structure into architecture. May suggest changes to PRD stories or new stories. SAVE OUTPUT: Copy final front-end-architecture.md to your project's docs/ folder."
  45. - agent: pm
  46. updates: prd.md (if needed)
  47. requires: front-end-architecture.md
  48. condition: architecture_suggests_prd_changes
  49. notes: "If architect suggests story changes, update PRD and re-export the complete unredacted prd.md to docs/ folder."
  50. - agent: po
  51. validates: all_artifacts
  52. uses: po-master-checklist
  53. notes: "Validates all documents for consistency and completeness. May require updates to any document."
  54. - agent: various
  55. updates: any_flagged_documents
  56. condition: po_checklist_issues
  57. notes: "If PO finds issues, return to relevant agent to fix and re-export updated documents to docs/ folder."
  58. - step: project_setup_guidance
  59. action: guide_project_structure
  60. condition: user_has_generated_ui
  61. notes: "If user generated UI with v0/Lovable: For polyrepo setup, place downloaded project in separate frontend repo. For monorepo, place in apps/web or frontend/ directory. Review architecture document for specific guidance."
  62. - agent: po
  63. action: shard_documents
  64. creates: sharded_docs
  65. requires: all_artifacts_in_project
  66. notes: |
  67. Shard documents for IDE development:
  68. - Option A: Use PO agent to shard: @po then ask to shard docs/prd.md
  69. - Option B: Manual: Drag shard-doc task + docs/prd.md into chat
  70. - Creates docs/prd/ and docs/architecture/ folders with sharded content
  71. - agent: sm
  72. action: create_story
  73. creates: story.md
  74. requires: sharded_docs
  75. repeats: for_each_epic
  76. notes: |
  77. Story creation cycle:
  78. - SM Agent (New Chat): @sm → *create
  79. - Creates next story from sharded docs
  80. - Story starts in "Draft" status
  81. - agent: analyst/pm
  82. action: review_draft_story
  83. updates: story.md
  84. requires: story.md
  85. optional: true
  86. condition: user_wants_story_review
  87. notes: |
  88. OPTIONAL: Review and approve draft story
  89. - NOTE: story-review task coming soon
  90. - Review story completeness and alignment
  91. - Update story status: Draft → Approved
  92. - agent: dev
  93. action: implement_story
  94. creates: implementation_files
  95. requires: story.md
  96. notes: |
  97. Dev Agent (New Chat): @dev
  98. - Implements approved story
  99. - Updates File List with all changes
  100. - Marks story as "Review" when complete
  101. - agent: qa
  102. action: review_implementation
  103. updates: implementation_files
  104. requires: implementation_files
  105. optional: true
  106. notes: |
  107. OPTIONAL: QA Agent (New Chat): @qa → review-story
  108. - Senior dev review with refactoring ability
  109. - Fixes small issues directly
  110. - Leaves checklist for remaining items
  111. - Updates story status (Review → Done or stays Review)
  112. - agent: dev
  113. action: address_qa_feedback
  114. updates: implementation_files
  115. condition: qa_left_unchecked_items
  116. notes: |
  117. If QA left unchecked items:
  118. - Dev Agent (New Chat): Address remaining items
  119. - Return to QA for final approval
  120. - step: repeat_development_cycle
  121. action: continue_for_all_stories
  122. notes: |
  123. Repeat story cycle (SM → Dev → QA) for all epic stories
  124. Continue until all stories in PRD are complete
  125. - agent: po
  126. action: epic_retrospective
  127. creates: epic-retrospective.md
  128. condition: epic_complete
  129. optional: true
  130. notes: |
  131. OPTIONAL: After epic completion
  132. - NOTE: epic-retrospective task coming soon
  133. - Validate epic was completed correctly
  134. - Document learnings and improvements
  135. - step: workflow_end
  136. action: project_complete
  137. notes: |
  138. All stories implemented and reviewed!
  139. Project development phase complete.
  140. Reference: .bmad-core/data/bmad-kb.md#IDE Development Workflow
  141. flow_diagram: |
  142. ```mermaid
  143. graph TD
  144. A[Start: UI Development] --> B[analyst: project-brief.md]
  145. B --> C[pm: prd.md]
  146. C --> D[ux-expert: front-end-spec.md]
  147. D --> D2{Generate v0 prompt?}
  148. D2 -->|Yes| D3[ux-expert: create v0 prompt]
  149. D2 -->|No| E[architect: front-end-architecture.md]
  150. D3 --> D4[User: generate UI in v0/Lovable]
  151. D4 --> E
  152. E --> F{Architecture suggests PRD changes?}
  153. F -->|Yes| G[pm: update prd.md]
  154. F -->|No| H[po: validate all artifacts]
  155. G --> H
  156. H --> I{PO finds issues?}
  157. I -->|Yes| J[Return to relevant agent for fixes]
  158. I -->|No| K[po: shard documents]
  159. J --> H
  160. K --> L[sm: create story]
  161. L --> M{Review draft story?}
  162. M -->|Yes| N[analyst/pm: review & approve story]
  163. M -->|No| O[dev: implement story]
  164. N --> O
  165. O --> P{QA review?}
  166. P -->|Yes| Q[qa: review implementation]
  167. P -->|No| R{More stories?}
  168. Q --> S{QA found issues?}
  169. S -->|Yes| T[dev: address QA feedback]
  170. S -->|No| R
  171. T --> Q
  172. R -->|Yes| L
  173. R -->|No| U{Epic retrospective?}
  174. U -->|Yes| V[po: epic retrospective]
  175. U -->|No| W[Project Complete]
  176. V --> W
  177. B -.-> B1[Optional: brainstorming]
  178. B -.-> B2[Optional: market research]
  179. D -.-> D1[Optional: user research]
  180. E -.-> E1[Optional: technical research]
  181. style W fill:#90EE90
  182. style K fill:#ADD8E6
  183. style L fill:#ADD8E6
  184. style O fill:#ADD8E6
  185. style D3 fill:#E6E6FA
  186. style D4 fill:#E6E6FA
  187. style B fill:#FFE4B5
  188. style C fill:#FFE4B5
  189. style D fill:#FFE4B5
  190. style E fill:#FFE4B5
  191. style N fill:#F0E68C
  192. style Q fill:#F0E68C
  193. style V fill:#F0E68C
  194. ```
  195. decision_guidance:
  196. when_to_use:
  197. - Building production frontend applications
  198. - Multiple views/pages with complex interactions
  199. - Need comprehensive UI/UX design and testing
  200. - Multiple team members will be involved
  201. - Long-term maintenance expected
  202. - Customer-facing applications
  203. handoff_prompts:
  204. analyst_to_pm: "Project brief is complete. Save it as docs/project-brief.md in your project, then create the PRD."
  205. pm_to_ux: "PRD is ready. Save it as docs/prd.md in your project, then create the UI/UX specification."
  206. ux_to_architect: "UI/UX spec complete. Save it as docs/front-end-spec.md in your project, then create the frontend architecture."
  207. architect_review: "Frontend architecture complete. Save it as docs/front-end-architecture.md. Do you suggest any changes to the PRD stories or need new stories added?"
  208. architect_to_pm: "Please update the PRD with the suggested story changes, then re-export the complete prd.md to docs/."
  209. updated_to_po: "All documents ready in docs/ folder. Please validate all artifacts for consistency."
  210. po_issues: "PO found issues with [document]. Please return to [agent] to fix and re-save the updated document."
  211. complete: "All planning artifacts validated and saved in docs/ folder. Move to IDE environment to begin development."