Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

SKILL.md 12KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297
  1. ---
  2. name: bmad-sprint-status
  3. description: 'Summarize sprint status and surface risks. Use when the user says "check sprint status" or "show sprint status"'
  4. ---
  5. # Sprint Status Workflow
  6. **Goal:** Summarize sprint status, surface risks, and recommend the next workflow action.
  7. **Your Role:** You are a Developer providing clear, actionable sprint visibility. No time estimates — focus on status, risks, and next steps.
  8. ## Conventions
  9. - Bare paths (e.g. `checklist.md`) resolve from the skill root.
  10. - `{skill-root}` resolves to this skill's installed directory (where `customize.toml` lives).
  11. - `{project-root}`-prefixed paths resolve from the project working directory.
  12. - `{skill-name}` resolves to the skill directory's basename.
  13. ## On Activation
  14. ### Step 1: Resolve the Workflow Block
  15. Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow`
  16. **If the script fails**, resolve the `workflow` block yourself by reading these three files in base → team → user order and applying the same structural merge rules as the resolver:
  17. 1. `{skill-root}/customize.toml` — defaults
  18. 2. `{project-root}/_bmad/custom/{skill-name}.toml` — team overrides
  19. 3. `{project-root}/_bmad/custom/{skill-name}.user.toml` — personal overrides
  20. Any missing file is skipped. Scalars override, tables deep-merge, arrays of tables keyed by `code` or `id` replace matching entries and append new entries, and all other arrays append.
  21. ### Step 2: Execute Prepend Steps
  22. Execute each entry in `{workflow.activation_steps_prepend}` in order before proceeding.
  23. ### Step 3: Load Persistent Facts
  24. Treat every entry in `{workflow.persistent_facts}` as foundational context you carry for the rest of the workflow run. Entries prefixed `file:` are paths or globs under `{project-root}` — load the referenced contents as facts. All other entries are facts verbatim.
  25. ### Step 4: Load Config
  26. Load config from `{project-root}/_bmad/bmm/config.yaml` and resolve:
  27. - `project_name`, `user_name`
  28. - `communication_language`, `document_output_language`
  29. - `implementation_artifacts`
  30. - `date` as system-generated current datetime
  31. - YOU MUST ALWAYS SPEAK OUTPUT in your Agent communication style with the config `{communication_language}`
  32. ### Step 5: Greet the User
  33. Greet `{user_name}`, speaking in `{communication_language}`.
  34. ### Step 6: Execute Append Steps
  35. Execute each entry in `{workflow.activation_steps_append}` in order.
  36. Activation is complete. Begin the workflow below.
  37. ## Paths
  38. - `sprint_status_file` = `{implementation_artifacts}/sprint-status.yaml`
  39. ## Input Files
  40. | Input | Path | Load Strategy |
  41. |-------|------|---------------|
  42. | Sprint status | `{sprint_status_file}` | FULL_LOAD |
  43. ## Execution
  44. <workflow>
  45. <step n="0" goal="Determine execution mode">
  46. <action>Set mode = {{mode}} if provided by caller; otherwise mode = "interactive"</action>
  47. <check if="mode == data">
  48. <action>Jump to Step 20</action>
  49. </check>
  50. <check if="mode == validate">
  51. <action>Jump to Step 30</action>
  52. </check>
  53. <check if="mode == interactive">
  54. <action>Continue to Step 1</action>
  55. </check>
  56. </step>
  57. <step n="1" goal="Locate sprint status file">
  58. <action>Load {project_context} for project-wide patterns and conventions (if exists)</action>
  59. <action>Try {sprint_status_file}</action>
  60. <check if="file not found">
  61. <output>sprint-status.yaml not found.
  62. Run `/bmad:bmm:workflows:sprint-planning` to generate it, then rerun sprint-status.</output>
  63. <action>Exit workflow</action>
  64. </check>
  65. <action>Continue to Step 2</action>
  66. </step>
  67. <step n="2" goal="Read and parse sprint-status.yaml">
  68. <action>Read the FULL file: {sprint_status_file}</action>
  69. <action>Parse fields: generated, last_updated, project, project_key, tracking_system, story_location</action>
  70. <action>Parse development_status map. Classify keys:</action>
  71. - Epics: keys starting with "epic-" (and not ending with "-retrospective")
  72. - Retrospectives: keys ending with "-retrospective"
  73. - Stories: everything else (e.g., 1-2-login-form)
  74. <action>Map legacy story status "drafted" → "ready-for-dev"</action>
  75. <action>Count story statuses: backlog, ready-for-dev, in-progress, review, done</action>
  76. <action>Map legacy epic status "contexted" → "in-progress"</action>
  77. <action>Count epic statuses: backlog, in-progress, done</action>
  78. <action>Count retrospective statuses: optional, done</action>
  79. <action>Validate all statuses against known values:</action>
  80. - Valid story statuses: backlog, ready-for-dev, in-progress, review, done, drafted (legacy)
  81. - Valid epic statuses: backlog, in-progress, done, contexted (legacy)
  82. - Valid retrospective statuses: optional, done
  83. <check if="any status is unrecognized">
  84. <output>
  85. **Unknown status detected:**
  86. {{#each invalid_entries}}
  87. - `{{key}}`: "{{status}}" (not recognized)
  88. {{/each}}
  89. **Valid statuses:**
  90. - Stories: backlog, ready-for-dev, in-progress, review, done
  91. - Epics: backlog, in-progress, done
  92. - Retrospectives: optional, done
  93. </output>
  94. <ask>How should these be corrected?
  95. {{#each invalid_entries}}
  96. {{@index}}. {{key}}: "{{status}}" → [select valid status]
  97. {{/each}}
  98. Enter corrections (e.g., "1=in-progress, 2=backlog") or "skip" to continue without fixing:</ask>
  99. <check if="user provided corrections">
  100. <action>Update sprint-status.yaml with corrected values</action>
  101. <action>Re-parse the file with corrected statuses</action>
  102. </check>
  103. </check>
  104. <action>Detect risks:</action>
  105. - IF any story has status "review": suggest `/bmad:bmm:workflows:code-review`
  106. - IF any story has status "in-progress" AND no stories have status "ready-for-dev": recommend staying focused on active story
  107. - IF all epics have status "backlog" AND no stories have status "ready-for-dev": prompt `/bmad:bmm:workflows:create-story`
  108. - IF `last_updated` timestamp is more than 7 days old (or `last_updated` is missing, fall back to `generated`): warn "sprint-status.yaml may be stale"
  109. - IF any story key doesn't match an epic pattern (e.g., story "5-1-..." but no "epic-5"): warn "orphaned story detected"
  110. - IF any epic has status in-progress but has no associated stories: warn "in-progress epic has no stories"
  111. </step>
  112. <step n="3" goal="Select next action recommendation">
  113. <action>Pick the next recommended workflow using priority:</action>
  114. <note>When selecting "first" story: sort by epic number, then story number (e.g., 1-1 before 1-2 before 2-1)</note>
  115. 1. If any story status == in-progress → recommend `dev-story` for the first in-progress story
  116. 2. Else if any story status == review → recommend `code-review` for the first review story
  117. 3. Else if any story status == ready-for-dev → recommend `dev-story`
  118. 4. Else if any story status == backlog → recommend `create-story`
  119. 5. Else if any retrospective status == optional → recommend `retrospective`
  120. 6. Else → All implementation items done; congratulate the user - you both did amazing work together!
  121. <action>Store selected recommendation as: next_story_id, next_workflow_id, next_agent (DEV)</action>
  122. </step>
  123. <step n="4" goal="Display summary">
  124. <output>
  125. ## Sprint Status
  126. - Project: {{project}} ({{project_key}})
  127. - Tracking: {{tracking_system}}
  128. - Status file: {sprint_status_file}
  129. **Stories:** backlog {{count_backlog}}, ready-for-dev {{count_ready}}, in-progress {{count_in_progress}}, review {{count_review}}, done {{count_done}}
  130. **Epics:** backlog {{epic_backlog}}, in-progress {{epic_in_progress}}, done {{epic_done}}
  131. **Next Recommendation:** /bmad:bmm:workflows:{{next_workflow_id}} ({{next_story_id}})
  132. {{#if risks}}
  133. **Risks:**
  134. {{#each risks}}
  135. - {{this}}
  136. {{/each}}
  137. {{/if}}
  138. </output>
  139. </step>
  140. <step n="5" goal="Offer actions">
  141. <ask>Pick an option:
  142. 1) Run recommended workflow now
  143. 2) Show all stories grouped by status
  144. 3) Show raw sprint-status.yaml
  145. 4) Exit
  146. Choice:</ask>
  147. <check if="choice == 1">
  148. <output>Run `/bmad:bmm:workflows:{{next_workflow_id}}`.
  149. If the command targets a story, set `story_key={{next_story_id}}` when prompted.</output>
  150. </check>
  151. <check if="choice == 2">
  152. <output>
  153. ### Stories by Status
  154. - In Progress: {{stories_in_progress}}
  155. - Review: {{stories_in_review}}
  156. - Ready for Dev: {{stories_ready_for_dev}}
  157. - Backlog: {{stories_backlog}}
  158. - Done: {{stories_done}}
  159. </output>
  160. </check>
  161. <check if="choice == 3">
  162. <action>Display the full contents of {sprint_status_file}</action>
  163. </check>
  164. <check if="choice == 4">
  165. <action>Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete` — if the resolved value is non-empty, follow it as the final terminal instruction before exiting.</action>
  166. <action>Exit workflow</action>
  167. </check>
  168. </step>
  169. <!-- ========================= -->
  170. <!-- Data mode for other flows -->
  171. <!-- ========================= -->
  172. <step n="20" goal="Data mode output">
  173. <action>Load and parse {sprint_status_file} same as Step 2</action>
  174. <action>Compute recommendation same as Step 3</action>
  175. <template-output>next_workflow_id = {{next_workflow_id}}</template-output>
  176. <template-output>next_story_id = {{next_story_id}}</template-output>
  177. <template-output>count_backlog = {{count_backlog}}</template-output>
  178. <template-output>count_ready = {{count_ready}}</template-output>
  179. <template-output>count_in_progress = {{count_in_progress}}</template-output>
  180. <template-output>count_review = {{count_review}}</template-output>
  181. <template-output>count_done = {{count_done}}</template-output>
  182. <template-output>epic_backlog = {{epic_backlog}}</template-output>
  183. <template-output>epic_in_progress = {{epic_in_progress}}</template-output>
  184. <template-output>epic_done = {{epic_done}}</template-output>
  185. <template-output>risks = {{risks}}</template-output>
  186. <action>Return to caller</action>
  187. </step>
  188. <!-- ========================= -->
  189. <!-- Validate mode -->
  190. <!-- ========================= -->
  191. <step n="30" goal="Validate sprint-status file">
  192. <action>Check that {sprint_status_file} exists</action>
  193. <check if="missing">
  194. <template-output>is_valid = false</template-output>
  195. <template-output>error = "sprint-status.yaml missing"</template-output>
  196. <template-output>suggestion = "Run sprint-planning to create it"</template-output>
  197. <action>Return</action>
  198. </check>
  199. <action>Read and parse {sprint_status_file}</action>
  200. <action>Validate required metadata fields exist: generated, project, project_key, tracking_system, story_location (last_updated is optional for backward compatibility)</action>
  201. <check if="any required field missing">
  202. <template-output>is_valid = false</template-output>
  203. <template-output>error = "Missing required field(s): {{missing_fields}}"</template-output>
  204. <template-output>suggestion = "Re-run sprint-planning or add missing fields manually"</template-output>
  205. <action>Return</action>
  206. </check>
  207. <action>Verify development_status section exists with at least one entry</action>
  208. <check if="development_status missing or empty">
  209. <template-output>is_valid = false</template-output>
  210. <template-output>error = "development_status missing or empty"</template-output>
  211. <template-output>suggestion = "Re-run sprint-planning or repair the file manually"</template-output>
  212. <action>Return</action>
  213. </check>
  214. <action>Validate all status values against known valid statuses:</action>
  215. - Stories: backlog, ready-for-dev, in-progress, review, done (legacy: drafted)
  216. - Epics: backlog, in-progress, done (legacy: contexted)
  217. - Retrospectives: optional, done
  218. <check if="any invalid status found">
  219. <template-output>is_valid = false</template-output>
  220. <template-output>error = "Invalid status values: {{invalid_entries}}"</template-output>
  221. <template-output>suggestion = "Fix invalid statuses in sprint-status.yaml"</template-output>
  222. <action>Return</action>
  223. </check>
  224. <template-output>is_valid = true</template-output>
  225. <template-output>message = "sprint-status.yaml valid: metadata complete, all statuses recognized"</template-output>
  226. <action>Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete` — if the resolved value is non-empty, follow it as the final terminal instruction before exiting.</action>
  227. </step>
  228. </workflow>