|
| 1 | +--- |
| 2 | +name: sprint-planning |
| 3 | +description: 'Generate and manage sprint status tracking file, extracting all epics and stories and tracking their status through the development lifecycle' |
| 4 | +--- |
| 5 | + |
| 6 | +# Sprint Planning - Sprint Status Generator |
| 7 | + |
| 8 | +## EPICS |
| 9 | + |
| 10 | +{epics} |
| 11 | + |
| 12 | +## SPRINT STATUS TEMPLATE |
| 13 | + |
| 14 | +{sprint_status_template} |
| 15 | + |
| 16 | +--- |
| 17 | + |
| 18 | +## Step 1: Parse Epics and Extract All Work Items |
| 19 | + |
| 20 | +For each epic, extract: |
| 21 | + |
| 22 | +- Epic numbers from headers like `## Epic 1:` or `## Epic 2:` |
| 23 | +- Story IDs and titles from patterns like `### Story 1.1: User Authentication` |
| 24 | +- Convert story format from `Epic.Story: Title` to kebab-case key: `epic-story-title` |
| 25 | + |
| 26 | +**Story ID Conversion Rules:** |
| 27 | + |
| 28 | +- Original: `### Story 1.1: User Authentication` |
| 29 | +- Replace period with dash: `1-1` |
| 30 | +- Convert title to kebab-case: `user-authentication` |
| 31 | +- Final key: `1-1-user-authentication` |
| 32 | + |
| 33 | +Build complete inventory of all epics and stories. |
| 34 | + |
| 35 | +## Step 2: Build Sprint Status Structure |
| 36 | + |
| 37 | +For each epic found, create entries in this order: |
| 38 | + |
| 39 | +1. **Epic entry** - Key: `epic-{num}`, Default status: `backlog` |
| 40 | +2. **Story entries** - Key: `{epic}-{story}-{title}`, Default status: `backlog` |
| 41 | +3. **Retrospective entry** - Key: `epic-{num}-retrospective`, Default status: `optional` |
| 42 | + |
| 43 | +**Example structure:** |
| 44 | + |
| 45 | +```yaml |
| 46 | +development_status: |
| 47 | + epic-1: backlog |
| 48 | + 1-1-user-authentication: backlog |
| 49 | + 1-2-account-management: backlog |
| 50 | + epic-1-retrospective: optional |
| 51 | +``` |
| 52 | +
|
| 53 | +## Step 3: Generate Sprint Status File |
| 54 | +
|
| 55 | +Create `.codemachine/artifacts/sprint-status.yaml` with: |
| 56 | + |
| 57 | +**File Structure:** |
| 58 | + |
| 59 | +```yaml |
| 60 | +# generated: {date} |
| 61 | +# project: {project_name} |
| 62 | +# project_key: {project_key} |
| 63 | +# tracking_system: {tracking_system} |
| 64 | +# story_location: {story_location} |
| 65 | +
|
| 66 | +# STATUS DEFINITIONS: |
| 67 | +# ================== |
| 68 | +# Epic Status: |
| 69 | +# - backlog: Epic not yet started |
| 70 | +# - in-progress: Epic actively being worked on |
| 71 | +# - done: All stories in epic completed |
| 72 | +# |
| 73 | +# Epic Status Transitions: |
| 74 | +# - backlog → in-progress: Automatically when first story is created (via create-story) |
| 75 | +# - in-progress → done: Manually when all stories reach 'done' status |
| 76 | +# |
| 77 | +# Story Status: |
| 78 | +# - backlog: Story only exists in epic file |
| 79 | +# - ready-for-dev: Story file created in stories folder |
| 80 | +# - in-progress: Developer actively working on implementation |
| 81 | +# - review: Ready for code review (via Dev's code-review workflow) |
| 82 | +# - done: Story completed |
| 83 | +# |
| 84 | +# Retrospective Status: |
| 85 | +# - optional: Can be completed but not required |
| 86 | +# - done: Retrospective has been completed |
| 87 | +# |
| 88 | +# WORKFLOW NOTES: |
| 89 | +# =============== |
| 90 | +# - Epic transitions to 'in-progress' automatically when first story is created |
| 91 | +# - Stories can be worked in parallel if team capacity allows |
| 92 | +# - SM typically creates next story after previous one is 'done' to incorporate learnings |
| 93 | +# - Dev moves story to 'review', then runs code-review (fresh context, different LLM recommended) |
| 94 | +
|
| 95 | +generated: { date } |
| 96 | +project: { project_name } |
| 97 | +project_key: { project_key } |
| 98 | +tracking_system: { tracking_system } |
| 99 | +story_location: { story_location } |
| 100 | +
|
| 101 | +development_status: |
| 102 | + # All epics, stories, and retrospectives in order |
| 103 | +``` |
| 104 | + |
| 105 | +<action>Write the complete sprint status YAML to .codemachine/artifacts/sprint-status.yaml</action> |
| 106 | +<action>CRITICAL: Metadata appears TWICE - once as comments (#) for documentation, once as YAML key:value fields for parsing</action> |
| 107 | +<action>Ensure all items are ordered: epic, its stories, its retrospective, next epic...</action> |
| 108 | +</step> |
| 109 | + |
| 110 | +<step n="5" goal="Validate and report"> |
| 111 | +<action>Perform validation checks:</action> |
| 112 | + |
| 113 | +- [ ] Every epic in epic files appears in .codemachine/artifacts/sprint-status.yaml |
| 114 | +- [ ] Every story in epic files appears in .codemachine/artifacts/sprint-status.yaml |
| 115 | +- [ ] Every epic has a corresponding retrospective entry |
| 116 | +- [ ] No items in .codemachine/artifacts/sprint-status.yaml that don't exist in epic files |
| 117 | +- [ ] All status values are legal (match state machine definitions) |
| 118 | +- [ ] File is valid YAML syntax |
| 119 | + |
| 120 | +<action>Count totals:</action> |
| 121 | + |
| 122 | +- Total epics: {{epic_count}} |
| 123 | +- Total stories: {{story_count}} |
| 124 | +- Epics in-progress: {{in_progress_count}} |
| 125 | +- Stories done: {{done_count}} |
| 126 | + |
| 127 | +<action>Display completion summary to {user_name} in {communication_language}:</action> |
| 128 | + |
| 129 | +**Sprint Status Generated Successfully** |
| 130 | + |
| 131 | +- **File Location:** .codemachine/artifacts/sprint-status.yaml |
| 132 | +- **Total Epics:** {{epic_count}} |
| 133 | +- **Total Stories:** {{story_count}} |
| 134 | +- **Epics In Progress:** {{epics_in_progress_count}} |
| 135 | +- **Stories Completed:** {{done_count}} |
| 136 | + |
| 137 | +**Next Steps:** |
| 138 | + |
| 139 | +1. Review the generated .codemachine/artifacts/sprint-status.yaml |
| 140 | +2. Use this file to track development progress |
| 141 | +3. Agents will update statuses as they work |
| 142 | +4. Re-run this workflow to refresh auto-detected statuses |
| 143 | + |
| 144 | +</step> |
| 145 | + |
| 146 | +</workflow> |
| 147 | + |
| 148 | +## Additional Documentation |
| 149 | + |
| 150 | +### Status State Machine |
| 151 | + |
| 152 | +**Epic Status Flow:** |
| 153 | + |
| 154 | +``` |
| 155 | +backlog → in-progress → done |
| 156 | +``` |
| 157 | +
|
| 158 | +- **backlog**: Epic not yet started |
| 159 | +- **in-progress**: Epic actively being worked on (stories being created/implemented) |
| 160 | +- **done**: All stories in epic completed |
| 161 | +
|
| 162 | +**Story Status Flow:** |
| 163 | +
|
| 164 | +``` |
| 165 | +backlog → ready-for-dev → in-progress → review → done |
| 166 | +``` |
| 167 | +
|
| 168 | +- **backlog**: Story only exists in epic file |
| 169 | +- **ready-for-dev**: Story file created (e.g., `stories/1-3-plant-naming.md`) |
| 170 | +- **in-progress**: Developer actively working |
| 171 | +- **review**: Ready for code review (via Dev's code-review workflow) |
| 172 | +- **done**: Completed |
| 173 | +
|
| 174 | +**Retrospective Status:** |
| 175 | +
|
| 176 | +``` |
| 177 | +optional ↔ done |
| 178 | +``` |
| 179 | +
|
| 180 | +- **optional**: Ready to be conducted but not required |
| 181 | +- **done**: Finished |
| 182 | +
|
| 183 | +### Guidelines |
| 184 | +
|
| 185 | +1. **Epic Activation**: Mark epic as `in-progress` when starting work on its first story |
| 186 | +2. **Sequential Default**: Stories are typically worked in order, but parallel work is supported |
| 187 | +3. **Parallel Work Supported**: Multiple stories can be `in-progress` if team capacity allows |
| 188 | +4. **Review Before Done**: Stories should pass through `review` before `done` |
| 189 | +5. **Learning Transfer**: SM typically creates next story after previous one is `done` to incorporate learnings |
0 commit comments