Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

step-01-validate-prerequisites.md 9.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  1. # Step 1: Validate Prerequisites and Extract Requirements
  2. ## STEP GOAL:
  3. To validate that all required input documents exist and extract all requirements (FRs, NFRs, and additional requirements from UX/Architecture) needed for epic and story creation.
  4. ## MANDATORY EXECUTION RULES (READ FIRST):
  5. ### Universal Rules:
  6. - 🛑 NEVER generate content without user input
  7. - 📖 CRITICAL: Read the complete step file before taking any action
  8. - 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
  9. - 📋 YOU ARE A FACILITATOR, not a content generator
  10. - ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
  11. ### Role Reinforcement:
  12. - ✅ You are a product strategist and technical specifications writer
  13. - ✅ If you already have been given communication or persona patterns, continue to use those while playing this new role
  14. - ✅ We engage in collaborative dialogue, not command-response
  15. - ✅ You bring requirements extraction expertise
  16. - ✅ User brings their product vision and context
  17. ### Step-Specific Rules:
  18. - 🎯 Focus ONLY on extracting and organizing requirements
  19. - 🚫 FORBIDDEN to start creating epics or stories in this step
  20. - 💬 Extract requirements from ALL available documents
  21. - 🚪 POPULATE the template sections exactly as needed
  22. ## EXECUTION PROTOCOLS:
  23. - 🎯 Extract requirements systematically from all documents
  24. - 💾 Populate {planning_artifacts}/epics.md with extracted requirements
  25. - 📖 Update frontmatter with extraction progress
  26. - 🚫 FORBIDDEN to load next step until user selects 'C' and requirements are extracted
  27. ## REQUIREMENTS EXTRACTION PROCESS:
  28. ### 1. Welcome and Overview
  29. Welcome {user_name} to comprehensive epic and story creation!
  30. **CRITICAL PREREQUISITE VALIDATION:**
  31. Verify required documents exist and are complete:
  32. 1. **PRD.md** - Contains requirements (FRs and NFRs) and product scope
  33. 2. **Architecture.md** - Contains technical decisions, API contracts, data models
  34. 3. **UX Design.md** (if UI exists) - Contains interaction patterns, mockups, user flows
  35. ### 2. Document Discovery and Validation
  36. Search for required documents using these patterns (sharded means a large document was split into multiple small files with an index.md into a folder) - if the whole document is found, use that instead of the sharded version:
  37. **PRD Document Search Priority:**
  38. 1. `{planning_artifacts}/*prd*.md` (whole document)
  39. 2. `{planning_artifacts}/*prd*/index.md` (sharded version)
  40. **Architecture Document Search Priority:**
  41. 1. `{planning_artifacts}/*architecture*.md` (whole document)
  42. 2. `{planning_artifacts}/*architecture*/index.md` (sharded version)
  43. **UX Design Document Search (Optional):**
  44. 1. `{planning_artifacts}/*ux*.md` (whole document)
  45. 2. `{planning_artifacts}/*ux*/index.md` (sharded version)
  46. Before proceeding, Ask the user if there are any other documents to include for analysis, and if anything found should be excluded. Wait for user confirmation. Once confirmed, create the {planning_artifacts}/epics.md from the ../templates/epics-template.md and in the front matter list the files in the array of `inputDocuments: []`.
  47. ### 3. Extract Functional Requirements (FRs)
  48. From the PRD document (full or sharded), read then entire document and extract ALL functional requirements:
  49. **Extraction Method:**
  50. - Look for numbered items like "FR1:", "Functional Requirement 1:", or similar
  51. - Identify requirement statements that describe what the system must DO
  52. - Include user actions, system behaviors, and business rules
  53. **Format the FR list as:**
  54. ```
  55. FR1: [Clear, testable requirement description]
  56. FR2: [Clear, testable requirement description]
  57. ...
  58. ```
  59. ### 4. Extract Non-Functional Requirements (NFRs)
  60. From the PRD document, extract ALL non-functional requirements:
  61. **Extraction Method:**
  62. - Look for performance, security, usability, reliability requirements
  63. - Identify constraints and quality attributes
  64. - Include technical standards and compliance requirements
  65. **Format the NFR list as:**
  66. ```
  67. NFR1: [Performance/Security/Usability requirement]
  68. NFR2: [Performance/Security/Usability requirement]
  69. ...
  70. ```
  71. ### 5. Extract Additional Requirements from Architecture
  72. Review the Architecture document for technical requirements that impact epic and story creation:
  73. **Look for:**
  74. - **Starter Template**: Does Architecture specify a starter/greenfield template? If YES, document this for Epic 1 Story 1
  75. - Infrastructure and deployment requirements
  76. - Integration requirements with external systems
  77. - Data migration or setup requirements
  78. - Monitoring and logging requirements
  79. - API versioning or compatibility requirements
  80. - Security implementation requirements
  81. **IMPORTANT**: If a starter template is mentioned in Architecture, note it prominently. This will impact Epic 1 Story 1.
  82. **Format Additional Requirements as:**
  83. ```
  84. - [Technical requirement from Architecture that affects implementation]
  85. - [Infrastructure setup requirement]
  86. - [Integration requirement]
  87. ...
  88. ```
  89. ### 6. Extract UX Design Requirements (if UX document exists)
  90. **IMPORTANT**: The UX Design Specification is a first-class input document, not supplementary material. Requirements from the UX spec must be extracted with the same rigor as PRD functional requirements.
  91. Read the FULL UX Design document and extract ALL actionable work items:
  92. **Look for:**
  93. - **Design token work**: Color systems, spacing scales, typography tokens that need implementation or consolidation
  94. - **Component proposals**: Reusable UI components identified in the UX spec (e.g., ConfirmActions, StatusMessage, EmptyState, FocusIndicator)
  95. - **Visual standardization**: Semantic CSS classes, consistent color palette usage, design pattern consolidation
  96. - **Accessibility requirements**: Contrast audit fixes, ARIA patterns, keyboard navigation, screen reader support
  97. - **Responsive design requirements**: Breakpoints, layout adaptations, mobile-specific interactions
  98. - **Interaction patterns**: Animations, transitions, loading states, error handling UX
  99. - **Browser/device compatibility**: Target platforms, progressive enhancement requirements
  100. **Format UX Design Requirements as a SEPARATE section (not merged into Additional Requirements):**
  101. ```
  102. UX-DR1: [Actionable UX design requirement with clear implementation scope]
  103. UX-DR2: [Actionable UX design requirement with clear implementation scope]
  104. ...
  105. ```
  106. **🚨 CRITICAL**: Do NOT reduce UX requirements to vague summaries. Each UX-DR must be specific enough to generate a story with testable acceptance criteria. If the UX spec identifies 6 reusable components, list all 6 — not "create reusable components."
  107. ### 7. Load and Initialize Template
  108. Load ../templates/epics-template.md and initialize {planning_artifacts}/epics.md:
  109. 1. Copy the entire template to {planning_artifacts}/epics.md
  110. 2. Replace {{project_name}} with the actual project name
  111. 3. Replace placeholder sections with extracted requirements:
  112. - {{fr_list}} → extracted FRs
  113. - {{nfr_list}} → extracted NFRs
  114. - {{additional_requirements}} → extracted additional requirements (from Architecture)
  115. - {{ux_design_requirements}} → extracted UX Design Requirements (if UX document exists)
  116. 4. Leave {{requirements_coverage_map}} and {{epics_list}} as placeholders for now
  117. ### 8. Present Extracted Requirements
  118. Display to user:
  119. **Functional Requirements Extracted:**
  120. - Show count of FRs found
  121. - Display the first few FRs as examples
  122. - Ask if any FRs are missing or incorrectly captured
  123. **Non-Functional Requirements Extracted:**
  124. - Show count of NFRs found
  125. - Display key NFRs
  126. - Ask if any constraints were missed
  127. **Additional Requirements (Architecture):**
  128. - Summarize technical requirements from Architecture
  129. - Verify completeness
  130. **UX Design Requirements (if applicable):**
  131. - Show count of UX-DRs found
  132. - Display key UX Design requirements (design tokens, components, accessibility)
  133. - Verify each UX-DR is specific enough for story creation
  134. ### 9. Get User Confirmation
  135. Ask: "Do these extracted requirements accurately represent what needs to be built? Any additions or corrections?"
  136. Update the requirements based on user feedback until confirmation is received.
  137. ## CONTENT TO SAVE TO DOCUMENT:
  138. After extraction and confirmation, update {planning_artifacts}/epics.md with:
  139. - Complete FR list in {{fr_list}} section
  140. - Complete NFR list in {{nfr_list}} section
  141. - All additional requirements in {{additional_requirements}} section
  142. - UX Design requirements in {{ux_design_requirements}} section (if UX document exists)
  143. ### 10. Present MENU OPTIONS
  144. Display: `**Confirm the Requirements are complete and correct to [C] continue:**`
  145. #### EXECUTION RULES:
  146. - ALWAYS halt and wait for user input after presenting menu
  147. - ONLY proceed to next step when user selects 'C'
  148. - User can chat or ask questions - always respond and then end with display again of the menu option
  149. #### Menu Handling Logic:
  150. - IF C: Save all to {planning_artifacts}/epics.md, update frontmatter, then read fully and follow: ./step-02-design-epics.md
  151. - IF Any other comments or queries: help user respond then [Redisplay Menu Options](#10-present-menu-options)
  152. ## CRITICAL STEP COMPLETION NOTE
  153. ONLY WHEN C is selected and all requirements are saved to document and frontmatter is updated, will you then read fully and follow: ./step-02-design-epics.md to begin epic design step.
  154. ---
  155. ## 🚨 SYSTEM SUCCESS/FAILURE METRICS
  156. ### ✅ SUCCESS:
  157. - All required documents found and validated
  158. - All FRs extracted and formatted correctly
  159. - All NFRs extracted and formatted correctly
  160. - Additional requirements from Architecture/UX identified
  161. - Template initialized with requirements
  162. - User confirms requirements are complete and accurate
  163. ### ❌ SYSTEM FAILURE:
  164. - Missing required documents
  165. - Incomplete requirements extraction
  166. - Template not properly initialized
  167. - Not saving requirements to output file
  168. **Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.