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.

SKILL.md 13KB

5 päivää sitten
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301
  1. ---
  2. name: bmad-correct-course
  3. description: 'Manage significant changes during sprint execution. Use when the user says "correct course" or "propose sprint change"'
  4. ---
  5. # Correct Course - Sprint Change Management Workflow
  6. **Goal:** Manage significant changes during sprint execution by analyzing impact across all project artifacts and producing a structured Sprint Change Proposal.
  7. **Your Role:** You are a Developer navigating change management. Analyze the triggering issue, assess impact across PRD, epics, architecture, and UX artifacts, and produce an actionable Sprint Change Proposal with clear handoff.
  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. - `user_skill_level`
  30. - `implementation_artifacts`
  31. - `planning_artifacts`
  32. - `project_knowledge`
  33. - `date` as system-generated current datetime
  34. - YOU MUST ALWAYS SPEAK OUTPUT in your Agent communication style with the config `{communication_language}`
  35. - Language MUST be tailored to `{user_skill_level}`
  36. - Generate all documents in `{document_output_language}`
  37. - DOCUMENT OUTPUT: Updated epics, stories, or PRD sections. Clear, actionable changes. User skill level (`{user_skill_level}`) affects conversation style ONLY, not document updates.
  38. ### Step 5: Greet the User
  39. Greet `{user_name}`, speaking in `{communication_language}`.
  40. ### Step 6: Execute Append Steps
  41. Execute each entry in `{workflow.activation_steps_append}` in order.
  42. Activation is complete. Begin the workflow below.
  43. ## Paths
  44. - `default_output_file` = `{planning_artifacts}/sprint-change-proposal-{date}.md`
  45. ## Input Files
  46. | Input | Path | Load Strategy |
  47. |-------|------|---------------|
  48. | PRD | `{planning_artifacts}/*prd*.md` (whole) or `{planning_artifacts}/*prd*/*.md` (sharded) | FULL_LOAD |
  49. | Epics | `{planning_artifacts}/*epic*.md` (whole) or `{planning_artifacts}/*epic*/*.md` (sharded) | FULL_LOAD |
  50. | Architecture | `{planning_artifacts}/*architecture*.md` (whole) or `{planning_artifacts}/*architecture*/*.md` (sharded) | FULL_LOAD |
  51. | UX Design | `{planning_artifacts}/*ux*.md` (whole) or `{planning_artifacts}/*ux*/*.md` (sharded) | FULL_LOAD |
  52. | Spec | `{planning_artifacts}/*spec-*.md` (whole) | FULL_LOAD |
  53. | Document Project | `{project_knowledge}/index.md` (sharded) | INDEX_GUIDED |
  54. ## Execution
  55. ### Document Discovery - Loading Project Artifacts
  56. **Strategy**: Course correction needs broad project context to assess change impact accurately. Load all available planning artifacts.
  57. **Discovery Process for FULL_LOAD documents (PRD, Epics, Architecture, UX Design, Spec):**
  58. 1. **Search for whole document first** - Look for files matching the whole-document pattern (e.g., `*prd*.md`, `*epic*.md`, `*architecture*.md`, `*ux*.md`, `*spec-*.md`)
  59. 2. **Check for sharded version** - If whole document not found, look for a directory with `index.md` (e.g., `prd/index.md`, `epics/index.md`)
  60. 3. **If sharded version found**:
  61. - Read `index.md` to understand the document structure
  62. - Read ALL section files listed in the index
  63. - Process the combined content as a single document
  64. 4. **Priority**: If both whole and sharded versions exist, use the whole document
  65. **Discovery Process for INDEX_GUIDED documents (Document Project):**
  66. 1. **Search for index file** - Look for `{project_knowledge}/index.md`
  67. 2. **If found**: Read the index to understand available documentation sections
  68. 3. **Selectively load sections** based on relevance to the change being analyzed — do NOT load everything, only sections that relate to the impacted areas
  69. 4. **This document is optional** — skip if `{project_knowledge}` does not exist (greenfield projects)
  70. **Fuzzy matching**: Be flexible with document names — users may use variations like `prd.md`, `bmm-prd.md`, `product-requirements.md`, etc.
  71. **Missing documents**: Not all documents may exist. PRD and Epics are essential; Architecture, UX Design, Spec, and Document Project are loaded if available. HALT if PRD or Epics cannot be found.
  72. <workflow>
  73. <step n="1" goal="Initialize Change Navigation">
  74. <action>Confirm change trigger and gather user description of the issue</action>
  75. <action>Ask: "What specific issue or change has been identified that requires navigation?"</action>
  76. <action>Verify access to project documents:</action>
  77. - PRD (Product Requirements Document) — required
  78. - Current Epics and Stories — required
  79. - Architecture documentation — optional, load if available
  80. - UI/UX specifications — optional, load if available
  81. <action>Ask user for mode preference:</action>
  82. - **Incremental** (recommended): Refine each edit collaboratively
  83. - **Batch**: Present all changes at once for review
  84. <action>Store mode selection for use throughout workflow</action>
  85. <action if="change trigger is unclear">HALT: "Cannot navigate change without clear understanding of the triggering issue. Please provide specific details about what needs to change and why."</action>
  86. <action if="PRD or Epics are unavailable">HALT: "Need access to PRD and Epics to assess change impact. Please ensure these documents are accessible. Architecture and UI/UX will be used if available."</action>
  87. </step>
  88. <step n="2" goal="Execute Change Analysis Checklist">
  89. <action>Read fully and follow the systematic analysis from: checklist.md</action>
  90. <action>Work through each checklist section interactively with the user</action>
  91. <action>Record status for each checklist item:</action>
  92. - [x] Done - Item completed successfully
  93. - [N/A] Skip - Item not applicable to this change
  94. - [!] Action-needed - Item requires attention or follow-up
  95. <action>Maintain running notes of findings and impacts discovered</action>
  96. <action>Present checklist progress after each major section</action>
  97. <action if="checklist cannot be completed">Identify blocking issues and work with user to resolve before continuing</action>
  98. </step>
  99. <step n="3" goal="Draft Specific Change Proposals">
  100. <action>Based on checklist findings, create explicit edit proposals for each identified artifact</action>
  101. <action>For Story changes:</action>
  102. - Show old → new text format
  103. - Include story ID and section being modified
  104. - Provide rationale for each change
  105. - Example format:
  106. ```
  107. Story: [STORY-123] User Authentication
  108. Section: Acceptance Criteria
  109. OLD:
  110. - User can log in with email/password
  111. NEW:
  112. - User can log in with email/password
  113. - User can enable 2FA via authenticator app
  114. Rationale: Security requirement identified during implementation
  115. ```
  116. <action>For PRD modifications:</action>
  117. - Specify exact sections to update
  118. - Show current content and proposed changes
  119. - Explain impact on MVP scope and requirements
  120. <action>For Architecture changes:</action>
  121. - Identify affected components, patterns, or technology choices
  122. - Describe diagram updates needed
  123. - Note any ripple effects on other components
  124. <action>For UI/UX specification updates:</action>
  125. - Reference specific screens or components
  126. - Show wireframe or flow changes needed
  127. - Connect changes to user experience impact
  128. <check if="mode is Incremental">
  129. <action>Present each edit proposal individually</action>
  130. <ask>Review and refine this change? Options: Approve [a], Edit [e], Skip [s]</ask>
  131. <action>Iterate on each proposal based on user feedback</action>
  132. </check>
  133. <action if="mode is Batch">Collect all edit proposals and present together at end of step</action>
  134. </step>
  135. <step n="4" goal="Generate Sprint Change Proposal">
  136. <action>Compile comprehensive Sprint Change Proposal document with following sections:</action>
  137. <action>Section 1: Issue Summary</action>
  138. - Clear problem statement describing what triggered the change
  139. - Context about when/how the issue was discovered
  140. - Evidence or examples demonstrating the issue
  141. <action>Section 2: Impact Analysis</action>
  142. - Epic Impact: Which epics are affected and how
  143. - Story Impact: Current and future stories requiring changes
  144. - Artifact Conflicts: PRD, Architecture, UI/UX documents needing updates
  145. - Technical Impact: Code, infrastructure, or deployment implications
  146. <action>Section 3: Recommended Approach</action>
  147. - Present chosen path forward from checklist evaluation:
  148. - Direct Adjustment: Modify/add stories within existing plan
  149. - Potential Rollback: Revert completed work to simplify resolution
  150. - MVP Review: Reduce scope or modify goals
  151. - Provide clear rationale for recommendation
  152. - Include effort estimate, risk assessment, and timeline impact
  153. <action>Section 4: Detailed Change Proposals</action>
  154. - Include all refined edit proposals from Step 3
  155. - Group by artifact type (Stories, PRD, Architecture, UI/UX)
  156. - Ensure each change includes before/after and justification
  157. <action>Section 5: Implementation Handoff</action>
  158. - Categorize change scope:
  159. - Minor: Direct implementation by Developer agent
  160. - Moderate: Backlog reorganization needed (PO/DEV)
  161. - Major: Fundamental replan required (PM/Architect)
  162. - Specify handoff recipients and their responsibilities
  163. - Define success criteria for implementation
  164. <action>Present complete Sprint Change Proposal to user</action>
  165. <action>Write Sprint Change Proposal document to {default_output_file}</action>
  166. <ask>Review complete proposal. Continue [c] or Edit [e]?</ask>
  167. </step>
  168. <step n="5" goal="Finalize and Route for Implementation">
  169. <action>Get explicit user approval for complete proposal</action>
  170. <ask>Do you approve this Sprint Change Proposal for implementation? (yes/no/revise)</ask>
  171. <check if="no or revise">
  172. <action>Gather specific feedback on what needs adjustment</action>
  173. <action>Return to appropriate step to address concerns</action>
  174. <goto step="3">If changes needed to edit proposals</goto>
  175. <goto step="4">If changes needed to overall proposal structure</goto>
  176. </check>
  177. <check if="yes the proposal is approved by the user">
  178. <action>Finalize Sprint Change Proposal document</action>
  179. <action>Determine change scope classification:</action>
  180. - **Minor**: Can be implemented directly by Developer agent
  181. - **Moderate**: Requires backlog reorganization and PO/DEV coordination
  182. - **Major**: Needs fundamental replan with PM/Architect involvement
  183. <action>Provide appropriate handoff based on scope:</action>
  184. </check>
  185. <check if="Minor scope">
  186. <action>Route to: Developer agent for direct implementation</action>
  187. <action>Deliverables: Finalized edit proposals and implementation tasks</action>
  188. </check>
  189. <check if="Moderate scope">
  190. <action>Route to: Product Owner / Developer agents</action>
  191. <action>Deliverables: Sprint Change Proposal + backlog reorganization plan</action>
  192. </check>
  193. <check if="Major scope">
  194. <action>Route to: Product Manager / Solution Architect</action>
  195. <action>Deliverables: Complete Sprint Change Proposal + escalation notice</action>
  196. <action>Confirm handoff completion and next steps with user</action>
  197. <action>Document handoff in workflow execution log</action>
  198. </check>
  199. </step>
  200. <step n="6" goal="Workflow Completion">
  201. <action>Summarize workflow execution:</action>
  202. - Issue addressed: {{change_trigger}}
  203. - Change scope: {{scope_classification}}
  204. - Artifacts modified: {{list_of_artifacts}}
  205. - Routed to: {{handoff_recipients}}
  206. <action>Confirm all deliverables produced:</action>
  207. - Sprint Change Proposal document
  208. - Specific edit proposals with before/after
  209. - Implementation handoff plan
  210. <action>Report workflow completion to user with personalized message: "Correct Course workflow complete, {user_name}!"</action>
  211. <action>Remind user of success criteria and next steps for Developer agent</action>
  212. <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>
  213. </step>
  214. </workflow>