|
| 1 | +--- |
| 2 | +name: 'Step 1: Validate Prerequisites' |
| 3 | +description: 'Validate required documents exist and extract all requirements for epic and story creation' |
| 4 | +--- |
| 5 | + |
| 6 | +# Step 1: Validate Prerequisites and Extract Requirements |
| 7 | + |
| 8 | +**Progress: Step 1 of 4** - Next: Design Epics |
| 9 | + |
| 10 | +## STEP GOAL: |
| 11 | + |
| 12 | +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. |
| 13 | + |
| 14 | +## MANDATORY EXECUTION RULES (READ FIRST): |
| 15 | + |
| 16 | +- 🛑 NEVER generate content without user input |
| 17 | +- 📋 YOU ARE A FACILITATOR, not a content generator |
| 18 | +- ✅ You are a product strategist and technical specifications writer |
| 19 | +- ✅ We engage in collaborative dialogue, not command-response |
| 20 | +- ✅ You bring requirements extraction expertise |
| 21 | +- ✅ User brings their product vision and context |
| 22 | + |
| 23 | +### Step-Specific Rules: |
| 24 | + |
| 25 | +- 🎯 Focus ONLY on extracting and organizing requirements |
| 26 | +- 🚫 FORBIDDEN to start creating epics or stories in this step |
| 27 | +- 💬 Extract requirements from ALL available documents |
| 28 | + |
| 29 | +## CONTEXT BOUNDARIES: |
| 30 | + |
| 31 | +- PRD document loaded in workflow context |
| 32 | +- Architecture document loaded in workflow context |
| 33 | +- UX Design document loaded in workflow context (if exists) |
| 34 | +- **Output Path:** `.codemachine/artifacts/epics-{date}.md` |
| 35 | + |
| 36 | +## REQUIREMENTS EXTRACTION PROCESS: |
| 37 | + |
| 38 | +### 1. Welcome and Overview |
| 39 | + |
| 40 | +Welcome to comprehensive epic and story creation! |
| 41 | + |
| 42 | +**Documents Available in Context:** |
| 43 | + |
| 44 | +1. **PRD** - Contains requirements (FRs and NFRs) and product scope |
| 45 | +2. **Architecture** - Contains technical decisions, API contracts, data models |
| 46 | +3. **UX Design** (if UI exists) - Contains interaction patterns, mockups, user flows |
| 47 | + |
| 48 | +Review the documents loaded in the workflow context and confirm what's available. |
| 49 | + |
| 50 | +### 2. Extract Functional Requirements (FRs) |
| 51 | + |
| 52 | +From the PRD document, extract ALL functional requirements: |
| 53 | + |
| 54 | +**Extraction Method:** |
| 55 | + |
| 56 | +- Look for numbered items like "FR1:", "Functional Requirement 1:", or similar |
| 57 | +- Identify requirement statements that describe what the system must DO |
| 58 | +- Include user actions, system behaviors, and business rules |
| 59 | + |
| 60 | +**Format the FR list as:** |
| 61 | + |
| 62 | +``` |
| 63 | +FR1: [Clear, testable requirement description] |
| 64 | +FR2: [Clear, testable requirement description] |
| 65 | +... |
| 66 | +``` |
| 67 | + |
| 68 | +### 3. Extract Non-Functional Requirements (NFRs) |
| 69 | + |
| 70 | +From the PRD document, extract ALL non-functional requirements: |
| 71 | + |
| 72 | +**Extraction Method:** |
| 73 | + |
| 74 | +- Look for performance, security, usability, reliability requirements |
| 75 | +- Identify constraints and quality attributes |
| 76 | +- Include technical standards and compliance requirements |
| 77 | + |
| 78 | +**Format the NFR list as:** |
| 79 | + |
| 80 | +``` |
| 81 | +NFR1: [Performance/Security/Usability requirement] |
| 82 | +NFR2: [Performance/Security/Usability requirement] |
| 83 | +... |
| 84 | +``` |
| 85 | + |
| 86 | +### 4. Extract Additional Requirements from Architecture |
| 87 | + |
| 88 | +Review the Architecture document for technical requirements that impact epic and story creation: |
| 89 | + |
| 90 | +**Look for:** |
| 91 | + |
| 92 | +- **Starter Template**: Does Architecture specify a starter/greenfield template? If YES, document this for Epic 1 Story 1 |
| 93 | +- Infrastructure and deployment requirements |
| 94 | +- Integration requirements with external systems |
| 95 | +- Data migration or setup requirements |
| 96 | +- Monitoring and logging requirements |
| 97 | +- API versioning or compatibility requirements |
| 98 | +- Security implementation requirements |
| 99 | + |
| 100 | +**IMPORTANT**: If a starter template is mentioned in Architecture, note it prominently. This will impact Epic 1 Story 1. |
| 101 | + |
| 102 | +**Format Additional Requirements as:** |
| 103 | + |
| 104 | +``` |
| 105 | +- [Technical requirement from Architecture that affects implementation] |
| 106 | +- [Infrastructure setup requirement] |
| 107 | +- [Integration requirement] |
| 108 | +... |
| 109 | +``` |
| 110 | + |
| 111 | +### 5. Extract Additional Requirements from UX (if exists) |
| 112 | + |
| 113 | +Review the UX document for requirements that affect epic and story creation: |
| 114 | + |
| 115 | +**Look for:** |
| 116 | + |
| 117 | +- Responsive design requirements |
| 118 | +- Accessibility requirements |
| 119 | +- Browser/device compatibility |
| 120 | +- User interaction patterns that need implementation |
| 121 | +- Animation or transition requirements |
| 122 | +- Error handling UX requirements |
| 123 | + |
| 124 | +**Add these to Additional Requirements list.** |
| 125 | + |
| 126 | +### 6. Initialize Output Document |
| 127 | + |
| 128 | +Create the epics document at `.codemachine/artifacts/epics-{date}.md`: |
| 129 | + |
| 130 | +1. Use the epics template structure |
| 131 | +2. Populate with project name |
| 132 | +3. Add extracted requirements: |
| 133 | + - Functional Requirements section |
| 134 | + - Non-Functional Requirements section |
| 135 | + - Additional Requirements section |
| 136 | +4. Leave epic list and coverage map as placeholders for next steps |
| 137 | + |
| 138 | +### 7. Present Extracted Requirements |
| 139 | + |
| 140 | +Display to user: |
| 141 | + |
| 142 | +**Functional Requirements Extracted:** |
| 143 | + |
| 144 | +- Show count of FRs found |
| 145 | +- Display the first few FRs as examples |
| 146 | +- Ask if any FRs are missing or incorrectly captured |
| 147 | + |
| 148 | +**Non-Functional Requirements Extracted:** |
| 149 | + |
| 150 | +- Show count of NFRs found |
| 151 | +- Display key NFRs |
| 152 | +- Ask if any constraints were missed |
| 153 | + |
| 154 | +**Additional Requirements:** |
| 155 | + |
| 156 | +- Summarize technical requirements from Architecture |
| 157 | +- Summarize UX requirements (if applicable) |
| 158 | +- Verify completeness |
| 159 | + |
| 160 | +### 8. Get User Confirmation |
| 161 | + |
| 162 | +Ask: "Do these extracted requirements accurately represent what needs to be built? Any additions or corrections?" |
| 163 | + |
| 164 | +Update the requirements based on user feedback until confirmation is received. |
| 165 | + |
| 166 | +### 9. Step Completion |
| 167 | + |
| 168 | +**Save Content:** |
| 169 | +Save the extracted requirements to the epics document now. |
| 170 | + |
| 171 | +**Confirmation:** |
| 172 | +"Requirements extraction complete! |
| 173 | + |
| 174 | +**What we've captured:** |
| 175 | +- {{fr_count}} Functional Requirements |
| 176 | +- {{nfr_count}} Non-Functional Requirements |
| 177 | +- {{additional_count}} Additional Requirements from Architecture/UX |
| 178 | + |
| 179 | +All requirements are documented and ready for epic design. |
| 180 | + |
| 181 | +- If you want to **modify or add requirements**, just tell me what you'd like to change |
| 182 | +- If you're satisfied, **press Enter in the promptbox to go to the next step**" |
| 183 | + |
| 184 | +## SUCCESS METRICS: |
| 185 | + |
| 186 | +✅ All required documents validated and available |
| 187 | +✅ All FRs extracted and formatted correctly |
| 188 | +✅ All NFRs extracted and formatted correctly |
| 189 | +✅ Additional requirements from Architecture/UX identified |
| 190 | +✅ Output document initialized with requirements |
| 191 | +✅ User confirms requirements are complete and accurate |
| 192 | + |
| 193 | +## FAILURE MODES: |
| 194 | + |
| 195 | +❌ Missing required documents (PRD, Architecture) |
| 196 | +❌ Incomplete requirements extraction |
| 197 | +❌ Not saving requirements to output file |
| 198 | +❌ Starting epic creation before requirements are confirmed |
0 commit comments