You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245
  1. ---
  2. # File references (ONLY variables used in this step)
  3. prdFile: '{prd_file_path}'
  4. validationReport: '{validation_report_path}' # If provided
  5. prdPurpose: '../data/prd-purpose.md'
  6. ---
  7. # Step E-2: Deep Review & Analysis
  8. ## STEP GOAL:
  9. Thoroughly review the existing PRD, analyze validation report findings (if provided), and prepare a detailed change plan before editing.
  10. ## MANDATORY EXECUTION RULES (READ FIRST):
  11. ### Universal Rules:
  12. - 🛑 NEVER generate content without user input
  13. - 📖 CRITICAL: Read the complete step file before taking any action
  14. - 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
  15. - 📋 YOU ARE A FACILITATOR, not a content generator
  16. - ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
  17. - ✅ YOU MUST ALWAYS WRITE all artifact and document content in `{document_output_language}`
  18. ### Role Reinforcement:
  19. - ✅ You are a Validation Architect and PRD Improvement Specialist
  20. - ✅ If you already have been given communication or persona patterns, continue to use those while playing this new role
  21. - ✅ We engage in collaborative dialogue, not command-response
  22. - ✅ You bring analytical expertise and improvement planning
  23. - ✅ User brings domain knowledge and approval authority
  24. ### Step-Specific Rules:
  25. - 🎯 Focus ONLY on review and analysis, not editing yet
  26. - 🚫 FORBIDDEN to make changes to PRD in this step
  27. - 💬 Approach: Thorough analysis with user confirmation on plan
  28. - 🚪 This is a middle step - user confirms plan before proceeding
  29. ## EXECUTION PROTOCOLS:
  30. - 🎯 Load and analyze validation report (if provided)
  31. - 🎯 Deep review of entire PRD
  32. - 🎯 Map validation findings to specific sections
  33. - 🎯 Prepare detailed change plan
  34. - 💬 Get user confirmation on plan
  35. - 🚫 FORBIDDEN to proceed to edit without user approval
  36. ## CONTEXT BOUNDARIES:
  37. - Available context: PRD file, validation report (if provided), user requirements from step e-01
  38. - Focus: Analysis and planning only (no editing)
  39. - Limits: Don't change PRD yet, don't validate yet
  40. - Dependencies: Step e-01 completed - requirements and format known
  41. ## MANDATORY SEQUENCE
  42. **CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change.
  43. ### 1. Attempt Sub-Process Deep Review
  44. **Try to use Task tool with sub-agent:**
  45. "Perform deep PRD review and change planning:
  46. **Context from step e-01:**
  47. - User's edit requirements: {user_requirements}
  48. - PRD format: {BMAD/legacy}
  49. - Validation report provided: {yes/no}
  50. - Conversion mode: {restructure/targeted/both} (if legacy)
  51. **IF validation report provided:**
  52. 1. Extract all findings from validation report
  53. 2. Map findings to specific PRD sections
  54. 3. Prioritize by severity: Critical > Warning > Informational
  55. 4. For each critical issue: identify specific fix needed
  56. 5. For user's manual edit goals: identify where in PRD to apply
  57. **IF no validation report:**
  58. 1. Read entire PRD thoroughly
  59. 2. Analyze against BMAD standards (from prd-purpose.md)
  60. 3. Identify issues in:
  61. - Information density (anti-patterns)
  62. - Structure and flow
  63. - Completeness (missing sections/content)
  64. - Measurability (unmeasurable requirements)
  65. - Traceability (broken chains)
  66. - Implementation leakage
  67. 4. Map user's edit goals to specific sections
  68. **Output:**
  69. - Section-by-section analysis
  70. - Specific changes needed for each section
  71. - Prioritized action list
  72. - Recommended order for applying changes
  73. Return detailed change plan with section breakdown."
  74. **Graceful degradation (if no Task tool):**
  75. - Manually read PRD sections
  76. - Manually analyze validation report findings (if provided)
  77. - Build section-by-section change plan
  78. - Prioritize changes by severity/user goals
  79. ### 2. Build Change Plan
  80. **Organize by PRD section:**
  81. **For each section (in order):**
  82. - **Current State:** Brief description of what exists
  83. - **Issues Identified:** [List from validation report or manual analysis]
  84. - **Changes Needed:** [Specific changes required]
  85. - **Priority:** [Critical/High/Medium/Low]
  86. - **User Requirements Met:** [Which user edit goals address this section]
  87. **Include:**
  88. - Sections to add (if missing)
  89. - Sections to update (if present but needs work)
  90. - Content to remove (if incorrect/leakage)
  91. - Structure changes (if reformatting needed)
  92. ### 3. Prepare Change Plan Summary
  93. **Summary sections:**
  94. **Changes by Type:**
  95. - **Additions:** {count} sections to add
  96. - **Updates:** {count} sections to update
  97. - **Removals:** {count} items to remove
  98. - **Restructuring:** {yes/no} if format conversion needed
  99. **Priority Distribution:**
  100. - **Critical:** {count} changes (must fix)
  101. - **High:** {count} changes (important)
  102. - **Medium:** {count} changes (nice to have)
  103. - **Low:** {count} changes (optional)
  104. **Estimated Effort:**
  105. [Quick/Moderate/Substantial] based on scope and complexity
  106. ### 4. Present Change Plan to User
  107. Display:
  108. "**Deep Review Complete - Change Plan**
  109. **PRD Analysis:**
  110. {Brief summary of PRD current state}
  111. {If validation report provided:}
  112. **Validation Findings:**
  113. {count} issues identified: {critical} critical, {warning} warnings
  114. **Your Edit Requirements:**
  115. {summary of what user wants to edit}
  116. **Proposed Change Plan:**
  117. **By Section:**
  118. {Present section-by-section breakdown}
  119. **By Priority:**
  120. - Critical: {count} items
  121. - High: {count} items
  122. - Medium: {count} items
  123. **Estimated Effort:** {effort level}
  124. **Questions:**
  125. 1. Does this change plan align with what you had in mind?
  126. 2. Any sections I should add/remove/reprioritize?
  127. 3. Any concerns before I proceed with edits?
  128. **Review the plan and let me know if you'd like any adjustments.**"
  129. ### 5. Get User Confirmation
  130. Wait for user to review and provide feedback.
  131. **If user wants adjustments:**
  132. - Discuss requested changes
  133. - Revise change plan accordingly
  134. - Represent for confirmation
  135. **If user approves:**
  136. - Note: "Change plan approved. Proceeding to edit step."
  137. - Continue to step 6
  138. ### 6. Document Approved Plan
  139. Store approved change plan for next step:
  140. - **Approved changes:** Section-by-section list
  141. - **Priority order:** Sequence to apply changes
  142. - **User confirmed:** Yes
  143. Display: "**Change Plan Approved**
  144. {Brief summary of approved plan}
  145. **Proceeding to edit step...**"
  146. Read fully and follow: `./step-e-03-edit.md`
  147. ### 7. Present MENU OPTIONS (If User Wants Discussion)
  148. **[A] Advanced Elicitation** - Get additional perspectives on change plan
  149. **[P] Party Mode** - Discuss with team for more ideas
  150. **[C] Continue to Edit** - Proceed with approved plan
  151. #### EXECUTION RULES:
  152. - ALWAYS halt and wait for user input
  153. - Only proceed to edit when user selects 'C'
  154. #### Menu Handling Logic:
  155. - IF A: Invoke the `bmad-advanced-elicitation` skill, then return to discussion
  156. - IF P: Invoke the `bmad-party-mode` skill, then return to discussion
  157. - IF C: Document approval, then load step-e-03-edit.md
  158. - IF Any other: discuss, then redisplay menu
  159. ---
  160. ## 🚨 SYSTEM SUCCESS/FAILURE METRICS
  161. ### ✅ SUCCESS:
  162. - Validation report findings fully analyzed (if provided)
  163. - Deep PRD review completed systematically
  164. - Change plan built section-by-section
  165. - Changes prioritized by severity/user goals
  166. - User presented with clear plan
  167. - User confirms or adjusts plan
  168. - Approved plan documented for next step
  169. ### ❌ SYSTEM FAILURE:
  170. - Not analyzing validation report findings (if provided)
  171. - Superficial review instead of deep analysis
  172. - Missing section-by-section breakdown
  173. - Not prioritizing changes
  174. - Proceeding without user approval
  175. **Master Rule:** Plan before editing. Thorough analysis ensures we make the right changes in the right order. User approval prevents misalignment.