greenfield-fullstack.yaml 9.4 KB

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