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.

step-e-03-edit.md 7.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250
  1. ---
  2. # File references (ONLY variables used in this step)
  3. prdFile: '{prd_file_path}'
  4. prdPurpose: '../data/prd-purpose.md'
  5. ---
  6. # Step E-3: Edit & Update
  7. ## STEP GOAL:
  8. Apply changes to the PRD following the approved change plan from step e-02, including content updates, structure improvements, and format conversion if needed.
  9. ## MANDATORY EXECUTION RULES (READ FIRST):
  10. ### Universal Rules:
  11. - 🛑 ALWAYS generate content WITH user input/approval
  12. - 📖 CRITICAL: Read the complete step file before taking any action
  13. - 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
  14. - 📋 YOU ARE A FACILITATOR, not a content generator
  15. - ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
  16. - ✅ YOU MUST ALWAYS WRITE all artifact and document content in `{document_output_language}`
  17. ### Role Reinforcement:
  18. - ✅ You are a Validation Architect and PRD Improvement Specialist
  19. - ✅ If you already have been given communication or persona patterns, continue to use those while playing this new role
  20. - ✅ We engage in collaborative dialogue, not command-response
  21. - ✅ You bring analytical expertise and precise editing skills
  22. - ✅ User brings domain knowledge and approval authority
  23. ### Step-Specific Rules:
  24. - 🎯 Focus ONLY on implementing approved changes from step e-02
  25. - 🚫 FORBIDDEN to make changes beyond the approved plan
  26. - 💬 Approach: Methodical, section-by-section execution
  27. - 🚪 This is a middle step - user can request adjustments
  28. ## EXECUTION PROTOCOLS:
  29. - 🎯 Follow approved change plan systematically
  30. - 💾 Edit PRD content according to plan
  31. - 📖 Update frontmatter as needed
  32. - 🚫 FORBIDDEN to proceed without completion
  33. ## CONTEXT BOUNDARIES:
  34. - Available context: PRD file, approved change plan from step e-02, prd-purpose standards
  35. - Focus: Implementing changes from approved plan only
  36. - Limits: Don't add changes beyond plan, don't validate yet
  37. - Dependencies: Step e-02 completed - plan approved by user
  38. ## MANDATORY SEQUENCE
  39. **CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change.
  40. ### 1. Retrieve Approved Change Plan
  41. From step e-02, retrieve:
  42. - **Approved changes:** Section-by-section list
  43. - **Priority order:** Sequence to apply changes
  44. - **User requirements:** Edit goals from step e-01
  45. Display: "**Starting PRD Edits**
  46. **Change Plan:** {summary}
  47. **Total Changes:** {count}
  48. **Estimated Effort:** {effort level}
  49. **Proceeding with edits section by section...**"
  50. ### 2. Attempt Sub-Process Edits (For Complex Changes)
  51. **Try to use Task tool with sub-agent for major sections:**
  52. "Execute PRD edits for {section_name}:
  53. **Context:**
  54. - Section to edit: {section_name}
  55. - Current content: {existing content}
  56. - Changes needed: {specific changes from plan}
  57. - BMAD PRD standards: Load from prd-purpose.md
  58. **Tasks:**
  59. 1. Read current PRD section
  60. 2. Apply specified changes
  61. 3. Ensure BMAD PRD principles compliance:
  62. - High information density (no filler)
  63. - Measurable requirements
  64. - Clear structure
  65. - Proper markdown formatting
  66. 4. Return updated section content
  67. Apply changes and return updated section."
  68. **Graceful degradation (if no Task tool):**
  69. - Perform edits directly in current context
  70. - Load PRD section, apply changes, save
  71. ### 3. Execute Changes Section-by-Section
  72. **For each section in approved plan (in priority order):**
  73. **a) Load current section**
  74. - Read the current PRD section content
  75. - Note what exists
  76. **b) Apply changes per plan**
  77. - Additions: Create new sections with proper content
  78. - Updates: Modify existing content per plan
  79. - Removals: Remove specified content
  80. - Restructuring: Reformat content to BMAD standard
  81. **c) Update PRD file**
  82. - Apply changes to PRD
  83. - Save updated PRD
  84. - Verify changes applied correctly
  85. **Display progress after each section:**
  86. "**Section Updated:** {section_name}
  87. Changes: {brief summary}
  88. {More sections remaining...}"
  89. ### 4. Handle Restructuring (If Needed)
  90. **If conversion mode is "Full restructuring" or "Both":**
  91. **For restructuring:**
  92. - Reorganize PRD to BMAD standard structure
  93. - Ensure proper ## Level 2 headers
  94. - Reorder sections logically
  95. - Update PRD frontmatter to match BMAD format
  96. **Follow BMAD PRD structure:**
  97. 1. Executive Summary
  98. 2. Success Criteria
  99. 3. Product Scope
  100. 4. User Journeys
  101. 5. Domain Requirements (if applicable)
  102. 6. Innovation Analysis (if applicable)
  103. 7. Project-Type Requirements
  104. 8. Functional Requirements
  105. 9. Non-Functional Requirements
  106. Display: "**PRD Restructured**
  107. BMAD standard structure applied.
  108. {Sections added/reordered}"
  109. ### 5. Update PRD Frontmatter
  110. **Ensure frontmatter is complete and accurate:**
  111. ```yaml
  112. ---
  113. workflowType: 'prd'
  114. workflow: 'create' # or 'validate' or 'edit'
  115. classification:
  116. domain: '{domain}'
  117. projectType: '{project_type}'
  118. complexity: '{complexity}'
  119. inputDocuments: [list of input documents]
  120. stepsCompleted: ['step-e-01-discovery', 'step-e-02-review', 'step-e-03-edit']
  121. lastEdited: '{current_date}'
  122. editHistory:
  123. - date: '{current_date}'
  124. changes: '{summary of changes}'
  125. ---
  126. ```
  127. **Update frontmatter accordingly.**
  128. ### 6. Final Review of Changes
  129. **Load complete updated PRD**
  130. **Verify:**
  131. - All approved changes applied correctly
  132. - PRD structure is sound
  133. - No unintended modifications
  134. - Frontmatter is accurate
  135. **If issues found:**
  136. - Fix them now
  137. - Note corrections made
  138. **If user wants adjustments:**
  139. - Accept feedback and make adjustments
  140. - Re-verify after adjustments
  141. ### 7. Confirm Completion
  142. Display:
  143. "**PRD Edits Complete**
  144. **Changes Applied:** {count} sections modified
  145. **PRD Updated:** {prd_file_path}
  146. **Summary of Changes:**
  147. {Brief bullet list of major changes}
  148. **PRD is ready for:**
  149. - Use in downstream workflows (UX, Architecture)
  150. - Validation (if not yet validated)
  151. **What would you like to do next?**"
  152. ### 8. Present MENU OPTIONS
  153. **[V] Run Validation** - Execute full validation workflow (./steps-v/step-v-01-discovery.md)
  154. **[S] Summary Only** - End with summary of changes (no validation)
  155. **[A] Adjust** - Make additional edits
  156. **[X] Exit** - Exit edit workflow
  157. #### EXECUTION RULES:
  158. - ALWAYS halt and wait for user input
  159. - Only proceed based on user selection
  160. #### Menu Handling Logic:
  161. - IF V (Validate): Display "Starting validation workflow..." then read fully and follow: `./steps-v/step-v-01-discovery.md`
  162. - IF S (Summary): Present edit summary and exit
  163. - IF A (Adjust): Accept additional requirements, loop back to editing
  164. - IF X (Exit): Display summary and exit
  165. ---
  166. ## 🚨 SYSTEM SUCCESS/FAILURE METRICS
  167. ### ✅ SUCCESS:
  168. - All approved changes from step e-02 applied correctly
  169. - Changes executed in planned priority order
  170. - Restructuring completed (if needed)
  171. - Frontmatter updated accurately
  172. - Final verification confirms changes
  173. - User can proceed to validation or exit with summary
  174. - Option to run validation seamlessly integrates edit and validate modes
  175. ### ❌ SYSTEM FAILURE:
  176. - Making changes beyond approved plan
  177. - Not following priority order
  178. - Missing restructuring (if conversion mode)
  179. - Not updating frontmatter
  180. - No final verification
  181. - Not saving updated PRD
  182. **Master Rule:** Execute the plan exactly as approved. PRD is now ready for validation or downstream use. Validation integration ensures quality.