Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  1. # Step 2: Project Context Analysis
  2. ## MANDATORY EXECUTION RULES (READ FIRST):
  3. - 🛑 NEVER generate content without user input
  4. - 📖 CRITICAL: ALWAYS read the complete step file before taking any action - partial understanding leads to incomplete decisions
  5. - 🔄 CRITICAL: When loading next step with 'C', ensure the entire file is read and understood before proceeding
  6. - ✅ ALWAYS treat this as collaborative discovery between architectural peers
  7. - 📋 YOU ARE A FACILITATOR, not a content generator
  8. - 💬 FOCUS on understanding project scope and requirements for architecture
  9. - 🎯 ANALYZE loaded documents, don't assume or generate requirements
  10. - ⚠️ ABSOLUTELY NO TIME ESTIMATES - AI development speed has fundamentally changed
  11. - ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
  12. ## EXECUTION PROTOCOLS:
  13. - 🎯 Show your analysis before taking any action
  14. - ⚠️ Present A/P/C menu after generating project context analysis
  15. - 💾 ONLY save when user chooses C (Continue)
  16. - 📖 Update frontmatter `stepsCompleted: [1, 2]` before loading next step
  17. - 🚫 FORBIDDEN to load next step until C is selected
  18. ## COLLABORATION MENUS (A/P/C):
  19. This step will generate content and present choices:
  20. - **A (Advanced Elicitation)**: Use discovery protocols to develop deeper insights about project context and architectural implications
  21. - **P (Party Mode)**: Bring multiple perspectives to analyze project requirements from different architectural angles
  22. - **C (Continue)**: Save the content to the document and proceed to next step
  23. ## PROTOCOL INTEGRATION:
  24. - When 'A' selected: Invoke the `bmad-advanced-elicitation` skill
  25. - When 'P' selected: Invoke the `bmad-party-mode` skill
  26. - PROTOCOLS always return to display this step's A/P/C menu after the A or P have completed
  27. - User accepts/rejects protocol changes before proceeding
  28. ## CONTEXT BOUNDARIES:
  29. - Current document and frontmatter from step 1 are available
  30. - Input documents already loaded are in memory (PRD, epics, UX spec, etc.)
  31. - Focus on architectural implications of requirements
  32. - No technology decisions yet - pure analysis phase
  33. ## YOUR TASK:
  34. Fully read and Analyze the loaded project documents to understand architectural scope, requirements, and constraints before beginning decision making.
  35. ## CONTEXT ANALYSIS SEQUENCE:
  36. ### 1. Review Project Requirements
  37. **From PRD Analysis:**
  38. - Extract and analyze Functional Requirements (FRs)
  39. - Identify Non-Functional Requirements (NFRs) like performance, security, compliance
  40. - Note any technical constraints or dependencies mentioned
  41. - Count and categorize requirements to understand project scale
  42. **From Epics/Stories (if available):**
  43. - Map epic structure and user stories to architectural components
  44. - Extract acceptance criteria for technical implications
  45. - Identify cross-cutting concerns that span multiple epics
  46. - Estimate story complexity for architectural planning
  47. **From UX Design (if available):**
  48. - Extract architectural implications from UX requirements:
  49. - Component complexity (simple forms vs rich interactions)
  50. - Animation/transition requirements
  51. - Real-time update needs (live data, collaborative features)
  52. - Platform-specific UI requirements
  53. - Accessibility standards (WCAG compliance level)
  54. - Responsive design breakpoints
  55. - Offline capability requirements
  56. - Performance expectations (load times, interaction responsiveness)
  57. ### 2. Project Scale Assessment
  58. Calculate and present project complexity:
  59. **Complexity Indicators:**
  60. - Real-time features requirements
  61. - Multi-tenancy needs
  62. - Regulatory compliance requirements
  63. - Integration complexity
  64. - User interaction complexity
  65. - Data complexity and volume
  66. ### 3. Reflect Understanding
  67. Present your analysis back to user for validation:
  68. "I'm reviewing your project documentation for {{project_name}}.
  69. {if_epics_loaded}I see {{epic_count}} epics with {{story_count}} total stories.{/if_epics_loaded}
  70. {if_no_epics}I found {{fr_count}} functional requirements organized into {{fr_category_list}}.{/if_no_epics}
  71. {if_ux_loaded}I also found your UX specification which defines the user experience requirements.{/if_ux_loaded}
  72. **Key architectural aspects I notice:**
  73. - [Summarize core functionality from FRs]
  74. - [Note critical NFRs that will shape architecture]
  75. - {if_ux_loaded}[Note UX complexity and technical requirements]{/if_ux_loaded}
  76. - [Identify unique technical challenges or constraints]
  77. - [Highlight any regulatory or compliance requirements]
  78. **Scale indicators:**
  79. - Project complexity appears to be: [low/medium/high/enterprise]
  80. - Primary technical domain: [web/mobile/api/backend/full-stack/etc]
  81. - Cross-cutting concerns identified: [list major ones]
  82. This analysis will help me guide you through the architectural decisions needed to ensure AI agents implement this consistently.
  83. Does this match your understanding of the project scope and requirements?"
  84. ### 4. Generate Project Context Content
  85. Prepare the content to append to the document:
  86. #### Content Structure:
  87. ```markdown
  88. ## Project Context Analysis
  89. ### Requirements Overview
  90. **Functional Requirements:**
  91. {{analysis of FRs and what they mean architecturally}}
  92. **Non-Functional Requirements:**
  93. {{NFRs that will drive architectural decisions}}
  94. **Scale & Complexity:**
  95. {{project_scale_assessment}}
  96. - Primary domain: {{technical_domain}}
  97. - Complexity level: {{complexity_level}}
  98. - Estimated architectural components: {{component_count}}
  99. ### Technical Constraints & Dependencies
  100. {{known_constraints_dependencies}}
  101. ### Cross-Cutting Concerns Identified
  102. {{concerns_that_will_affect_multiple_components}}
  103. ```
  104. ### 5. Present Content and Menu
  105. Show the generated content and present choices:
  106. "I've drafted the Project Context Analysis based on your requirements. This sets the foundation for our architectural decisions.
  107. **Here's what I'll add to the document:**
  108. [Show the complete markdown content from step 4]
  109. **What would you like to do?**
  110. [A] Advanced Elicitation - Let's dive deeper into architectural implications
  111. [P] Party Mode - Bring different perspectives to analyze requirements
  112. [C] Continue - Save this analysis and begin architectural decisions"
  113. ### 6. Handle Menu Selection
  114. #### If 'A' (Advanced Elicitation):
  115. - Invoke the `bmad-advanced-elicitation` skill with the current context analysis
  116. - Process the enhanced architectural insights that come back
  117. - Ask user: "Accept these enhancements to the project context analysis? (y/n)"
  118. - If yes: Update content with improvements, then return to A/P/C menu
  119. - If no: Keep original content, then return to A/P/C menu
  120. #### If 'P' (Party Mode):
  121. - Invoke the `bmad-party-mode` skill with the current project context
  122. - Process the collaborative improvements to architectural understanding
  123. - Ask user: "Accept these changes to the project context analysis? (y/n)"
  124. - If yes: Update content with improvements, then return to A/P/C menu
  125. - If no: Keep original content, then return to A/P/C menu
  126. #### If 'C' (Continue):
  127. - Append the final content to `{planning_artifacts}/architecture.md`
  128. - Update frontmatter: `stepsCompleted: [1, 2]`
  129. - Load `./step-03-starter.md`
  130. ## APPEND TO DOCUMENT:
  131. When user selects 'C', append the content directly to the document using the structure from step 4.
  132. ## SUCCESS METRICS:
  133. ✅ All input documents thoroughly analyzed for architectural implications
  134. ✅ Project scope and complexity clearly assessed and validated
  135. ✅ Technical constraints and dependencies identified
  136. ✅ Cross-cutting concerns mapped for architectural planning
  137. ✅ User confirmation of project understanding
  138. ✅ A/P/C menu presented and handled correctly
  139. ✅ Content properly appended to document when C selected
  140. ## FAILURE MODES:
  141. ❌ Skimming documents without deep architectural analysis
  142. ❌ Missing or misinterpreting critical NFRs
  143. ❌ Not validating project understanding with user
  144. ❌ Underestimating complexity indicators
  145. ❌ Generating content without real analysis of loaded documents
  146. ❌ Not presenting A/P/C menu after content generation
  147. ❌ **CRITICAL**: Reading only partial step file - leads to incomplete understanding and poor decisions
  148. ❌ **CRITICAL**: Proceeding with 'C' without fully reading and understanding the next step file
  149. ❌ **CRITICAL**: Making decisions without complete understanding of step requirements and protocols
  150. ## NEXT STEP:
  151. After user selects 'C' and content is saved to document, load `./step-03-starter.md` to evaluate starter template options.
  152. Remember: Do NOT proceed to step-03 until user explicitly selects 'C' from the A/P/C menu and content is saved!