ma-agents 3.1.0 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (23) hide show
  1. package/README.md +48 -2
  2. package/lib/bmad-extension/module-help.csv +8 -4
  3. package/lib/bmad-extension/skills/add-sprint/SKILL.md +126 -40
  4. package/lib/bmad-extension/skills/add-to-sprint/SKILL.md +116 -142
  5. package/lib/bmad-extension/skills/cleanup-done/.gitkeep +0 -0
  6. package/lib/bmad-extension/skills/cleanup-done/SKILL.md +159 -0
  7. package/lib/bmad-extension/skills/cleanup-done/bmad-skill-manifest.yaml +3 -0
  8. package/lib/bmad-extension/skills/create-bug-story/SKILL.md +75 -7
  9. package/lib/bmad-extension/skills/generate-backlog/SKILL.md +183 -0
  10. package/lib/bmad-extension/skills/generate-backlog/bmad-skill-manifest.yaml +3 -0
  11. package/lib/bmad-extension/skills/modify-sprint/SKILL.md +63 -0
  12. package/lib/bmad-extension/skills/prioritize-backlog/.gitkeep +0 -0
  13. package/lib/bmad-extension/skills/prioritize-backlog/SKILL.md +195 -0
  14. package/lib/bmad-extension/skills/prioritize-backlog/bmad-skill-manifest.yaml +3 -0
  15. package/lib/bmad-extension/skills/remove-from-sprint/.gitkeep +0 -0
  16. package/lib/bmad-extension/skills/remove-from-sprint/SKILL.md +163 -0
  17. package/lib/bmad-extension/skills/remove-from-sprint/bmad-skill-manifest.yaml +3 -0
  18. package/lib/bmad-extension/skills/sprint-status-view/SKILL.md +199 -138
  19. package/lib/bmad-extension/workflows/add-sprint/workflow.md +129 -39
  20. package/lib/bmad-extension/workflows/add-to-sprint/workflow.md +3 -205
  21. package/lib/bmad-extension/workflows/modify-sprint/workflow.md +5 -0
  22. package/lib/bmad-extension/workflows/sprint-status-view/workflow.md +3 -192
  23. package/package.json +1 -1
package/README.md CHANGED
@@ -60,7 +60,11 @@ The `_bmad-output/` folder is **intentionally tracked in version control** as pr
60
60
  `_bmad-output/` holds all AI-generated planning artifacts produced by BMAD agents:
61
61
 
62
62
  - **`planning-artifacts/`** — PRDs, architecture documents, UX designs
63
- - **`implementation-artifacts/`** — Epics, user stories, sprint status
63
+ - **`implementation-artifacts/`** — Epics, user stories, sprint status, backlog
64
+ - **`sprints/`** — Sprint entity YAML files (`sprint-{id}.yaml`)
65
+ - **`done/`** — Archived completed stories and bugs
66
+ - **`backlog.yaml`** — Flat prioritized backlog (generated)
67
+ - **`sprint-status.yaml`** — Sprint status (derived, auto-regenerated)
64
68
  - **`methodology/`** — BMAD-METHOD training materials and onboarding presentation
65
69
 
66
70
  ### Why it is version-controlled
@@ -117,7 +121,7 @@ The file is version-controlled as part of `_bmad-output/` project knowledge. Com
117
121
  | Joseph (MIL-STD-498) | `_bmad/skills/` | `generic` | `_bmad/bmm/agents/mil498.md` |
118
122
  | Antigravity | `_bmad/skills/` | `generic` | `_bmad/bmm/agents/antigravity.md` |
119
123
 
120
- ## Available Skills (28)
124
+ ## Available Skills (34)
121
125
 
122
126
  | Skill ID | Domain | Description |
123
127
  | :--- | :--- | :--- |
@@ -154,6 +158,13 @@ The file is version-controlled as part of `_bmad-output/` project knowledge. Com
154
158
  | `self-signed-cert` | Security | Automated Root CA and self-signed certificate generation |
155
159
  | `docker-image-signing` | Security | Automated cryptographic signing for Docker images |
156
160
  | `docker-hardening-verification` | Security | Audits images for least-privilege and OpenShift compatibility |
161
+ | **Sprint Management** | | |
162
+ | `add-sprint` | Agile | Create sprint entities with capacity, ISO dates, and structured YAML schema |
163
+ | `generate-backlog` | Agile | Generate or refresh a flat prioritized backlog from epics and bug stories |
164
+ | `add-to-sprint` | Agile | Assign backlog items to a sprint with capacity enforcement |
165
+ | `remove-from-sprint` | Agile | Remove items from a sprint and return to unassigned backlog |
166
+ | `cleanup-done` | Agile | Archive done items to `done/` and remove from sprint/backlog tracking |
167
+ | `prioritize-backlog` | Agile | Reprioritize backlog using severity, value, dependencies, and type |
157
168
 
158
169
  ## Automated Skill Discovery
159
170
 
@@ -242,6 +253,36 @@ The integration includes a suite of specialized playbooks:
242
253
  - **Security & Trust**: Vault secrets, certificate generation, and vulnerability scanning.
243
254
  - **Diagnostics**: Advanced health checks across K8s, Docker, and Podman.
244
255
 
256
+ #### Sprint Management (v3.1+)
257
+
258
+ `ma-agents` includes a complete sprint management system built on first-class YAML entities:
259
+
260
+ **Data Model:**
261
+ - **Sprint entities** at `sprints/sprint-{id}.yaml` — capacity, dates, assigned items, status lifecycle (`planning` -> `active` -> `closed`)
262
+ - **Flat backlog** at `backlog.yaml` — prioritized list of stories and bugs, independent of epic grouping
263
+ - **Bug lifecycle** — bugs are first-class backlog items with severity, type classification, and the same lifecycle as stories
264
+ - **Derived sprint-status.yaml** — auto-regenerated from backlog + sprint files (no manual maintenance)
265
+
266
+ **Workflows:**
267
+
268
+ | Command | Description |
269
+ |---------|-------------|
270
+ | `/add-sprint` | Create a sprint with capacity limits and optional ISO dates |
271
+ | `/generate-backlog` | Build or refresh the flat backlog from epics and bug files |
272
+ | `/add-to-sprint` | Assign backlog items to a sprint (dual-write: backlog + sprint file) |
273
+ | `/remove-from-sprint` | Return items from sprint to backlog (status preserved) |
274
+ | `/cleanup-done` | Archive completed items to `done/`, auto-close empty sprints |
275
+ | `/prioritize-backlog` | Reorder backlog — full, quick-adjust, or AI-suggested modes |
276
+ | `/sprint-status-view` | View sprint capacity, items, backlog, and regenerate sprint-status.yaml |
277
+ | `/create-bug-story` | Create a structured bug with severity, type, and automatic backlog entry |
278
+
279
+ **Key Design Principles:**
280
+ - **Dual-write consistency**: assigning/removing items updates both `backlog.yaml` and the sprint file atomically
281
+ - **Single-active sprint**: only one sprint can be `active` at a time
282
+ - **Done item archival**: completed work moves to `done/` subfolder, freeing sprint capacity
283
+ - **Priority is independent of epics**: stories from different epics interleave by priority, not epic order
284
+ - **Concurrency guards**: sprint files use `last_modified` timestamps to detect external modifications
285
+
245
286
  ### Install Options (Direct)
246
287
  ```bash
247
288
  # Default: installs to project-level paths (current directory)
@@ -436,6 +477,11 @@ ma-agents/
436
477
  │ ├── bmad.js # BMAD-METHOD integration and injection logic
437
478
  │ ├── bmad-cache/ # Pre-bundled BMAD external modules (bmb, cis, gds, tea)
438
479
  │ ├── bmad-customizations/ # BMAD persona templates (.md) and YAML configs
480
+ │ ├── bmad-extension/ # Extension module: sprint management, bug tracking, agent skills
481
+ │ │ ├── skills/ # SKILL.md packages (add-sprint, generate-backlog, etc.)
482
+ │ │ ├── workflows/ # Legacy workflow copies (redirects to SKILL.md)
483
+ │ │ ├── module.yaml # Extension module definition
484
+ │ │ └── module-help.csv # Skill registry with descriptions and output paths
439
485
  │ ├── bmad-workflows/ # Specialized BMAD playbooks (SRE, Cyber, etc.)
440
486
  │ └── mil498-templates/ # MIL-STD-498 DID library (SRS, SSS, SSDD, etc.)
441
487
  ├── scripts/
@@ -29,9 +29,13 @@ ma-skills,4-implementation,Vault Secrets,cyber-vault-secrets,,skill:cyber-vault-
29
29
  ma-skills,4-implementation,Verify Docker Users,cyber-verify-docker-users,,skill:cyber-verify-docker-users,bmad-cyber-verify-docker-users,false,bmm-cyber,,"Verify Docker image user configurations and hardening compliance.",output_folder,"verification report",
30
30
  ma-skills,4-implementation,Verify Image Signature,cyber-verify-image-signature,,skill:cyber-verify-image-signature,bmad-cyber-verify-image-signature,false,bmm-cyber,,"Verify Docker image signatures for supply chain integrity.",output_folder,"verification report",
31
31
  ma-skills,4-implementation,Vulnerability Scan,cyber-vulnerability-scan,,skill:cyber-vulnerability-scan,bmad-cyber-vulnerability-scan,false,bmm-cyber,,"Orchestrate vulnerability scanning across project components.",output_folder,"scan report",
32
- ma-skills,4-implementation,Create Bug Story,create-bug-story,,skill:create-bug-story,create-bug-story,false,bmm-dev,,"Create a structured bug story from a detected defect and add to backlog.",_bmad-output/implementation-artifacts,"bug story",
33
- ma-skills,4-implementation,Add Sprint,add-sprint,,skill:add-sprint,add-sprint,false,bmm-sm,,"Create a new sprint with capacity limits and optional start/end context.",_bmad-output/implementation-artifacts,"sprint plan",
32
+ ma-skills,4-implementation,Create Bug Story,create-bug-story,,skill:create-bug-story,create-bug-story,false,bmm-dev,,"Create a structured bug story with severity and type classification, add to backlog.yaml.",_bmad-output/implementation-artifacts,"bug story",
33
+ ma-skills,4-implementation,Add Sprint,add-sprint,,skill:add-sprint,add-sprint,false,bmm-sm,,"Create a new sprint entity with capacity limits and optional ISO dates (YAML schema).",_bmad-output/implementation-artifacts/sprints,"sprint entity",
34
34
  ma-skills,4-implementation,Modify Sprint,modify-sprint,,skill:modify-sprint,modify-sprint,false,bmm-sm,,"Modify existing sprint — add/remove items, change capacity, update metadata.",_bmad-output/implementation-artifacts,"sprint plan",
35
- ma-skills,4-implementation,Add to Sprint,add-to-sprint,,skill:add-to-sprint,add-to-sprint,false,bmm-sm,,"Assign backlog items (stories + bugs) to a sprint using multi-criteria prioritization.",_bmad-output/implementation-artifacts,"sprint plan",
35
+ ma-skills,4-implementation,Add to Sprint,add-to-sprint,,skill:add-to-sprint,add-to-sprint,false,bmm-sm,,"Assign backlog items to a sprint from flat prioritized backlog.",_bmad-output/implementation-artifacts,"sprint plan",
36
36
  ma-skills,4-implementation,Project Context Expansion,project-context-expansion,,skill:project-context-expansion,project-context-expansion,false,bmm-sm,,"Post-retrospective companion to update project-context.md with new rules.",_bmad-output,"project context",
37
- ma-skills,4-implementation,Sprint Status View,sprint-status-view,,skill:sprint-status-view,sprint-status-view,false,bmm-sm,,"View sprint progress with assigned items and remaining capacity.",_bmad-output/implementation-artifacts,"status display",
37
+ ma-skills,4-implementation,Sprint Status View,sprint-status-view,,skill:sprint-status-view,sprint-status-view,false,bmm-sm,,"View sprint status with capacity, items, and backlog. Regenerates sprint-status.yaml.",_bmad-output/implementation-artifacts,"status display",
38
+ ma-skills,4-implementation,Generate Backlog,generate-backlog,,skill:generate-backlog,generate-backlog,false,bmm-sm,,"Generate or refresh flat backlog from epics and bug stories.",_bmad-output/implementation-artifacts,"backlog",
39
+ ma-skills,4-implementation,Remove from Sprint,remove-from-sprint,,skill:remove-from-sprint,remove-from-sprint,false,bmm-sm,,"Remove items from a sprint and return to unassigned backlog.",_bmad-output/implementation-artifacts,"sprint plan",
40
+ ma-skills,4-implementation,Cleanup Done,cleanup-done,,skill:cleanup-done,cleanup-done,false,bmm-sm,,"Archive done items — move files to done/ and remove from sprint/backlog.",_bmad-output/implementation-artifacts,"archived items",
41
+ ma-skills,4-implementation,Prioritize Backlog,prioritize-backlog,,skill:prioritize-backlog,prioritize-backlog,false,bmm-sm,,"Reprioritize backlog using multiple criteria — severity, value, dependencies.",_bmad-output/implementation-artifacts,"backlog",
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: add-sprint
3
- description: Guided workflow to create a new sprint with capacity limits for realistic sprint planning
3
+ description: Guided workflow to create a new sprint entity with capacity limits, optional ISO dates, and structured YAML schema for sprint planning
4
4
  type: skill
5
5
  triggers:
6
6
  - "add sprint"
@@ -9,17 +9,35 @@ triggers:
9
9
 
10
10
  # Add Sprint Workflow
11
11
 
12
- Guided workflow to create a new sprint with capacity limits for realistic sprint planning.
12
+ Guided workflow to create a new sprint entity with capacity limits, optional ISO dates, and structured YAML schema.
13
13
 
14
14
  <workflow>
15
15
 
16
- <step n="1" goal="Gather sprint number and name">
17
- <action>Ask the user for the sprint number (e.g., 1, 2, 3)</action>
18
- <ask>What is the sprint number? (e.g., 1)</ask>
19
- <action>Store as {{sprint_number}}</action>
20
- <ask>What is the sprint name? (e.g., "Sprint 1 Foundation") press Enter to use "Sprint {{sprint_number}}"</ask>
21
- <action>If user presses Enter or leaves blank, default to "Sprint {{sprint_number}}"</action>
22
- <action>Store as {{sprint_name}}</action>
16
+ <step n="1" goal="Gather and validate sprint number and name">
17
+ <action>Ask the user for the sprint number</action>
18
+ <ask>What is the sprint number? (positive integer, e.g., 1, 2, 3)</ask>
19
+ <action>Store input as {{sprint_number_input}}</action>
20
+ <action>Validate {{sprint_number_input}} matches `^[1-9]\d*$` (positive integer, no leading zeros, no non-numeric characters)</action>
21
+ <action>Validate {{sprint_number_input}} is <= 9999</action>
22
+ <check if="{{sprint_number_input}} fails validation (zero, negative, non-numeric, leading zeros like '03', or > 9999)">
23
+ <output>❌ Invalid sprint number: "{{sprint_number_input}}". Must be a positive integer (1-9999), no leading zeros.</output>
24
+ <goto step="1" />
25
+ </check>
26
+ <action>Store as {{sprint_number}} (integer)</action>
27
+ <action>Construct {{sprint_id}} = "sprint-{{sprint_number}}"</action>
28
+
29
+ <!-- Smart default name: detect naming patterns from existing sprints -->
30
+ <action>Glob `_bmad-output/implementation-artifacts/sprints/sprint-*.yaml` to discover existing sprint files</action>
31
+ <action>If existing sprints found, read the `name` field from the most recent one (highest sprint number)</action>
32
+ <action>Infer a smart default name:
33
+ - If previous name follows a sequential pattern with a numeric suffix (e.g., "app04"), suggest the next increment (e.g., "app05")
34
+ - If previous name follows a date pattern (e.g., "2026-W14"), suggest the next date interval
35
+ - If previous name is "Sprint {n}", suggest "Sprint {{sprint_number}}"
36
+ - If no pattern detected or no existing sprints, default to "Sprint {{sprint_number}}"
37
+ </action>
38
+ <ask>Sprint name? (press Enter for "{{default_name}}", or type a custom name):</ask>
39
+ <action>If user presses Enter or leaves blank, set {{sprint_name}} = "{{default_name}}"</action>
40
+ <action>If user provides input, store as {{sprint_name}}</action>
23
41
  </step>
24
42
 
25
43
  <step n="2" goal="Gather capacity as positive integer">
@@ -34,32 +52,71 @@ Guided workflow to create a new sprint with capacity limits for realistic sprint
34
52
  <action>Store as {{capacity}} (integer)</action>
35
53
  </step>
36
54
 
37
- <step n="3" goal="Gather optional start and end context">
38
- <action>Explain: start/end context can be dates (e.g., "2026-03-18") or milestone descriptions (e.g., "Q1 Planning Complete")</action>
39
- <ask>Optional — Sprint start context (date or milestone, press Enter to skip):</ask>
40
- <action>Store as {{start_context}} (empty string if skipped)</action>
41
- <ask>Optional Sprint end context (date or milestone, press Enter to skip):</ask>
42
- <action>Store as {{end_context}} (empty string if skipped)</action>
55
+ <step n="3a" goal="Gather optional start date (ISO format)">
56
+ <action>Explain: start and end dates are optional ISO dates (YYYY-MM-DD format). Press Enter to skip.</action>
57
+ <ask>Optional — Sprint start date (YYYY-MM-DD, press Enter to skip):</ask>
58
+ <action>Store input as {{start_input}}</action>
59
+ <check if="{{start_input}} is not empty">
60
+ <action>Validate {{start_input}} matches regex `^\d{4}-\d{2}-\d{2}$`</action>
61
+ <action>Verify {{start_input}} resolves to a real calendar date (reject impossible dates like 2026-02-30, 2026-13-45, etc.)</action>
62
+ <check if="{{start_input}} fails date validation">
63
+ <output>❌ Invalid date: "{{start_input}}". Must be a valid date in YYYY-MM-DD format (e.g., 2026-04-01).</output>
64
+ <goto step="3a" />
65
+ </check>
66
+ </check>
67
+ <action>Store as {{start_date}} (valid ISO date string, or empty string "" if skipped)</action>
68
+ </step>
69
+
70
+ <step n="3b" goal="Gather optional end date (ISO format)">
71
+ <ask>Optional — Sprint end date (YYYY-MM-DD, press Enter to skip):</ask>
72
+ <action>Store input as {{end_input}}</action>
73
+ <check if="{{end_input}} is not empty">
74
+ <action>Validate {{end_input}} matches regex `^\d{4}-\d{2}-\d{2}$`</action>
75
+ <action>Verify {{end_input}} resolves to a real calendar date</action>
76
+ <check if="{{end_input}} fails date validation">
77
+ <output>❌ Invalid date: "{{end_input}}". Must be a valid date in YYYY-MM-DD format (e.g., 2026-04-14).</output>
78
+ <goto step="3b" />
79
+ </check>
80
+ </check>
81
+ <action>Store as {{end_date}} (valid ISO date string, or empty string "" if skipped)</action>
82
+
83
+ <check if="both {{start_date}} and {{end_date}} are non-empty AND {{start_date}} > {{end_date}}">
84
+ <output>❌ Invalid date range: start date ({{start_date}}) is after end date ({{end_date}}). Start must be on or before end.</output>
85
+ <goto step="3a" />
86
+ </check>
43
87
  </step>
44
88
 
45
89
  <step n="4" goal="Confirm and validate all inputs">
46
90
  <output>
47
91
  ## Sprint Summary — Please Confirm
48
92
 
49
- - **Sprint Number:** {{sprint_number}}
50
- - **Sprint Name:** {{sprint_name}}
93
+ - **Sprint ID:** {{sprint_id}}
94
+ - **Sprint Name:** "{{sprint_name}}"
95
+ - **Status:** planning
51
96
  - **Capacity (max items):** {{capacity}}
52
- - **Start Context:** {{start_context}} *(empty if skipped)*
53
- - **End Context:** {{end_context}} *(empty if skipped)*
54
- - **Output File:** `_bmad-output/implementation-artifacts/sprint-plan-{{sprint_number}}.yaml`
97
+ - **Start Date:** {{start_date}} *(empty if skipped)*
98
+ - **End Date:** {{end_date}} *(empty if skipped)*
99
+ - **Items:** [] *(empty — items assigned via /add-to-sprint)*
100
+ - **Output File:** `_bmad-output/implementation-artifacts/sprints/{{sprint_id}}.yaml`
55
101
  </output>
56
102
  <ask>Confirm creation? [y] Yes / [n] Cancel / [e] Edit a field:</ask>
57
103
  <check if="user selects 'e'">
58
104
  <ask>Which field to edit? (number / name / capacity / start / end)</ask>
59
105
  <check if="field == 'number'">
60
- <ask>New sprint number:</ask>
61
- <action>Store as {{sprint_number}}</action>
62
- <action>If sprint name was auto-defaulted to the old "Sprint {n}", update it to "Sprint {{sprint_number}}"</action>
106
+ <ask>New sprint number? (positive integer, 1-9999)</ask>
107
+ <action>Store input as {{sprint_number_input}}</action>
108
+ <action>Validate {{sprint_number_input}} matches `^[1-9]\d*$` and is <= 9999</action>
109
+ <check if="{{sprint_number_input}} fails validation">
110
+ <output>❌ Invalid sprint number: "{{sprint_number_input}}". Must be a positive integer (1-9999), no leading zeros.</output>
111
+ <goto step="4" />
112
+ </check>
113
+ <action>Store as {{sprint_number}} (integer)</action>
114
+ <action>Construct {{sprint_id}} = "sprint-{{sprint_number}}"</action>
115
+ <action>If sprint name was using previous default "Sprint {old_n}", update to "Sprint {{sprint_number}}"</action>
116
+ <action>Check if file exists at `_bmad-output/implementation-artifacts/sprints/{{sprint_id}}.yaml`</action>
117
+ <check if="file already exists at new path">
118
+ <output>⚠️ A sprint entity already exists at `_bmad-output/implementation-artifacts/sprints/{{sprint_id}}.yaml`. You will be prompted to overwrite at creation.</output>
119
+ </check>
63
120
  <goto step="4" />
64
121
  </check>
65
122
  <check if="field == 'name'">
@@ -68,45 +125,74 @@ Guided workflow to create a new sprint with capacity limits for realistic sprint
68
125
  <goto step="4" />
69
126
  </check>
70
127
  <check if="field == 'capacity'"><goto step="2" /></check>
71
- <check if="field == 'start'"><goto step="3" /></check>
72
- <check if="field == 'end'"><goto step="3" /></check>
128
+ <check if="field == 'start'"><goto step="3a" /></check>
129
+ <check if="field == 'end'"><goto step="3b" /></check>
130
+ <check if="field is not recognized">
131
+ <output>❌ Unrecognized field: "{{field}}". Valid options: number, name, capacity, start, end.</output>
132
+ <goto step="4" />
133
+ </check>
73
134
  </check>
74
135
  <check if="user selects 'n'">
75
136
  <output>❌ Sprint creation cancelled.</output>
76
137
  <action>Exit workflow</action>
77
138
  </check>
139
+ <check if="user input is not 'y', 'n', or 'e'">
140
+ <output>❌ Unrecognized option: "{{user_input}}". Please enter [y] Yes, [n] Cancel, or [e] Edit a field.</output>
141
+ <goto step="4" />
142
+ </check>
78
143
  </step>
79
144
 
80
- <step n="5" goal="Generate sprint artifact file">
81
- <action>Determine output path: `_bmad-output/implementation-artifacts/sprint-plan-{{sprint_number}}.yaml`</action>
82
- <action>Check if file already exists at output path</action>
83
- <check if="file already exists">
84
- <output>⚠️ A sprint plan already exists at `_bmad-output/implementation-artifacts/sprint-plan-{{sprint_number}}.yaml`.</output>
85
- <ask>Overwrite existing sprint plan? [y] Yes / [n] Cancel:</ask>
145
+ <step n="5" goal="Generate sprint entity YAML file">
146
+ <action>Determine output path: `_bmad-output/implementation-artifacts/sprints/{{sprint_id}}.yaml`</action>
147
+ <action>Ensure directory `_bmad-output/implementation-artifacts/sprints/` exists (create if needed)</action>
148
+
149
+ <!-- Overwrite protection for new path -->
150
+ <action>Check if file already exists at `_bmad-output/implementation-artifacts/sprints/{{sprint_id}}.yaml`</action>
151
+ <check if="file already exists at new path">
152
+ <anchor id="overwrite_prompt" />
153
+ <output>⚠️ A sprint entity already exists at `_bmad-output/implementation-artifacts/sprints/{{sprint_id}}.yaml`.</output>
154
+ <ask>Overwrite existing sprint? [y] Yes / [n] Cancel:</ask>
86
155
  <check if="user selects 'n'">
87
- <output>❌ Sprint creation cancelled to preserve existing sprint plan.</output>
156
+ <output>❌ Sprint creation cancelled to preserve existing sprint.</output>
88
157
  <action>Exit workflow</action>
89
158
  </check>
159
+ <check if="user input is not 'y' or 'n'">
160
+ <output>❌ Unrecognized option: "{{user_input}}". Please enter [y] Yes or [n] Cancel.</output>
161
+ <goto anchor="overwrite_prompt" />
162
+ </check>
90
163
  </check>
164
+
165
+ <!-- Advisory check for old-format file -->
166
+ <action>Check if file exists at old path: `_bmad-output/implementation-artifacts/sprint-plan-{{sprint_number}}.yaml`</action>
167
+ <check if="old-format file exists">
168
+ <output>ℹ️ **Note:** An old-format sprint file exists at `_bmad-output/implementation-artifacts/sprint-plan-{{sprint_number}}.yaml`. The new sprint will be created at the new path. The old file is NOT auto-migrated — review or remove it manually if no longer needed.</output>
169
+ </check>
170
+
91
171
  <action>Get current ISO timestamp for created_date and last_modified</action>
92
- <action>Write sprint artifact YAML to `_bmad-output/implementation-artifacts/sprint-plan-{{sprint_number}}.yaml` with this structure:
172
+ <action>Write sprint entity YAML to `_bmad-output/implementation-artifacts/sprints/{{sprint_id}}.yaml` with this structure:
93
173
 
94
174
  ```yaml
95
- sprint_number: {{sprint_number}}
96
- sprint_name: "{{sprint_name}}"
97
- capacity: {{capacity}}
98
- assigned_items: []
175
+ id: {{sprint_id}}
176
+ name: "{{sprint_name}}"
99
177
  status: planning
100
- start_context: "{{start_context}}"
101
- end_context: "{{end_context}}"
178
+ capacity: {{capacity}}
179
+ start: "{{start_date}}"
180
+ end: "{{end_date}}"
181
+ items: []
102
182
  created_date: "{{current_iso_timestamp}}"
103
183
  last_modified: "{{current_iso_timestamp}}"
104
184
  ```
185
+
186
+ **YAML output rules:**
187
+ - Always quote the `name` field to handle special characters
188
+ - `start` and `end` are empty string `""` if skipped
189
+ - `items` is always empty array `[]` at creation
190
+ - `status` is always `planning` at creation (never `active` or `closed`)
105
191
  </action>
106
192
  <output>
107
193
  ✅ **Sprint created successfully!**
108
194
 
109
- - **File:** `_bmad-output/implementation-artifacts/sprint-plan-{{sprint_number}}.yaml`
195
+ - **File:** `_bmad-output/implementation-artifacts/sprints/{{sprint_id}}.yaml`
110
196
  - **Sprint:** {{sprint_name}}
111
197
  - **Capacity:** {{capacity}} items
112
198
  - **Status:** planning