siesa-agents 2.1.27 → 2.1.29
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.
- package/README.md +0 -2
- package/bin/install.js +9 -6
- package/bmad-core/agents/dev.md +3 -0
- package/bmad-core/agents/pm.md +19 -0
- package/bmad-core/agents/po.md +22 -0
- package/bmad-core/data/jira-preferences.md +153 -0
- package/bmad-core/tasks/create-next-story.md +31 -0
- package/bmad-core/tasks/jira-setup.md +396 -0
- package/bmad-core/tasks/sync-epic-files-to-jira.md +513 -0
- package/bmad-core/tasks/sync-prd-to-jira.md +439 -0
- package/bmad-core/tasks/sync-stories-batch-to-jira.md +561 -0
- package/bmad-core/tasks/sync-story-to-jira.md +628 -0
- package/bmad-core/tasks/update-epic-stories-jira-status.md +799 -0
- package/bmad-core/tasks/update-story-jira-status.md +600 -0
- package/bmad-core/tasks/validate-jira-auth.md +251 -0
- package/bmad-core/templates/jira-conf-tmpl.md +13 -0
- package/claude/commands/BMad/agents/dev.md +3 -0
- package/claude/commands/BMad/agents/pm.md +6 -0
- package/claude/commands/BMad/agents/po.md +21 -0
- package/claude/settings.local.json +3 -0
- package/github/chatmodes/dev.chatmode.md +3 -0
- package/github/chatmodes/pm.chatmode.md +6 -0
- package/github/chatmodes/po.chatmode.md +17 -1
- package/package.json +1 -1
- package/vscode/mcp.json +4 -0
|
@@ -0,0 +1,600 @@
|
|
|
1
|
+
<!-- Powered by BMAD™ Core -->
|
|
2
|
+
|
|
3
|
+
# Update Story Status Task
|
|
4
|
+
|
|
5
|
+
## Purpose
|
|
6
|
+
|
|
7
|
+
Update the status of a story in Jira by transitioning it to a selected target state. This task validates that all prerequisites are met before allowing the transition, including checking that all tasks/subtasks are completed and QA gates have passed.
|
|
8
|
+
|
|
9
|
+
## When to Use This Task
|
|
10
|
+
|
|
11
|
+
**Use this task when:**
|
|
12
|
+
|
|
13
|
+
- Story implementation is complete and ready to transition to next state
|
|
14
|
+
- All tasks and subtasks are checked off locally
|
|
15
|
+
- QA gates (if present) need validation before marking as done
|
|
16
|
+
- You need to move story to a specific workflow state (Ready for Review, Done, In Testing, etc.)
|
|
17
|
+
|
|
18
|
+
**Prerequisites:**
|
|
19
|
+
|
|
20
|
+
- Story document exists in `docs/stories/`
|
|
21
|
+
- All tasks and subtasks marked with `[x]` in story file
|
|
22
|
+
- Jira preferences configured in `.bmad-core/data/jira-preferences.md`
|
|
23
|
+
- Project-specific Jira configuration in `docs/jira-conf.md`
|
|
24
|
+
- Story exists in Jira with valid issue key
|
|
25
|
+
- Available transitions configured in `.bmad-core/core-config.yaml` under `jira.storyTransitions`
|
|
26
|
+
|
|
27
|
+
## Instructions
|
|
28
|
+
|
|
29
|
+
### Phase 1: Story Identification & Validation
|
|
30
|
+
|
|
31
|
+
#### Step 0: Validate Jira Authentication (REQUIRED)
|
|
32
|
+
|
|
33
|
+
**CRITICAL:** Validate authentication BEFORE any Jira operations
|
|
34
|
+
|
|
35
|
+
**Action:** Execute authentication check
|
|
36
|
+
|
|
37
|
+
- [ ] Call `validate-jira-auth.md` task
|
|
38
|
+
- [ ] Verify authentication is active
|
|
39
|
+
- [ ] Only proceed if validation passes
|
|
40
|
+
|
|
41
|
+
**If validation fails:** HALT and instruct user to re-authenticate via MCP panel before continuing.
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
#### Step 1: Identify Target Story
|
|
46
|
+
|
|
47
|
+
**Input Parameter:** `{story}` - Story file path provided by user when calling this task
|
|
48
|
+
|
|
49
|
+
**Action:** Validate and load the story document
|
|
50
|
+
|
|
51
|
+
- [ ] Check if `{story}` parameter was provided when task was called
|
|
52
|
+
- [ ] If NOT provided, use elicitation below to prompt user
|
|
53
|
+
- [ ] If provided, verify file exists at the specified path
|
|
54
|
+
- [ ] Load story file content
|
|
55
|
+
- [ ] Extract story metadata (title, status, Jira key)
|
|
56
|
+
- [ ] Verify Jira issue key exists in story metadata
|
|
57
|
+
- [ ] Parse tasks and subtasks structure
|
|
58
|
+
|
|
59
|
+
```elicit
|
|
60
|
+
path: Prompt for story file if not provided as parameter
|
|
61
|
+
condition: Only show if {story} parameter is missing
|
|
62
|
+
format: |
|
|
63
|
+
Which story should be updated in Jira?
|
|
64
|
+
|
|
65
|
+
Options:
|
|
66
|
+
1. Specify file path (e.g., `docs/stories/1.1.user-authentication.story.md`)
|
|
67
|
+
2. Search for story by name
|
|
68
|
+
3. Use story from current context
|
|
69
|
+
|
|
70
|
+
Enter selection (1-3) or file path:
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
**Expected Story Structure:**
|
|
74
|
+
```markdown
|
|
75
|
+
# Story: [Story Title]
|
|
76
|
+
|
|
77
|
+
**Jira Issue Key:** PROJ-123
|
|
78
|
+
**Status:** Ready for Review
|
|
79
|
+
|
|
80
|
+
## Tasks and Subtasks
|
|
81
|
+
|
|
82
|
+
- [x] Task 1
|
|
83
|
+
- [x] Subtask 1.1
|
|
84
|
+
- [x] Subtask 1.2
|
|
85
|
+
- [x] Task 2
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
#### Step 2: Validate Local Completion
|
|
89
|
+
|
|
90
|
+
**Action:** Check that all tasks and subtasks are marked complete
|
|
91
|
+
|
|
92
|
+
- [ ] Parse all task lines (starting with `- [ ]` or `- [x]`)
|
|
93
|
+
- [ ] Parse all subtask lines (indented tasks)
|
|
94
|
+
- [ ] Count total tasks and subtasks
|
|
95
|
+
- [ ] Count completed tasks and subtasks
|
|
96
|
+
- [ ] Verify 100% completion
|
|
97
|
+
|
|
98
|
+
**Validation Logic:**
|
|
99
|
+
```
|
|
100
|
+
Total Tasks: {{task_count}}
|
|
101
|
+
Completed Tasks: {{completed_count}}
|
|
102
|
+
Completion Rate: {{percentage}}%
|
|
103
|
+
|
|
104
|
+
Status: {{PASS/FAIL}}
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
**If Validation Fails:**
|
|
108
|
+
```output
|
|
109
|
+
❌ Cannot update story status - incomplete tasks detected:
|
|
110
|
+
|
|
111
|
+
Pending Tasks:
|
|
112
|
+
- [ ] {{task_name_1}}
|
|
113
|
+
- [ ] {{subtask_name_1.1}}
|
|
114
|
+
- [ ] {{task_name_2}}
|
|
115
|
+
|
|
116
|
+
Please complete all tasks before updating Jira status.
|
|
117
|
+
|
|
118
|
+
HALT execution.
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
#### Step 3: Load Jira Configuration
|
|
122
|
+
|
|
123
|
+
**Action:** Read configuration for Jira connection details
|
|
124
|
+
|
|
125
|
+
- [ ] Load `.bmad-core/data/jira-preferences.md`
|
|
126
|
+
- [ ] Load `docs/jira-conf.md`
|
|
127
|
+
- [ ] Extract provider, project key, cloud ID
|
|
128
|
+
- [ ] Verify all required connection details present
|
|
129
|
+
|
|
130
|
+
**Required Configuration in `docs/jira-conf.md`:**
|
|
131
|
+
```markdown
|
|
132
|
+
**Project Key:** PM
|
|
133
|
+
**Project Name:** Prueba MCP
|
|
134
|
+
**Cloud ID:** 3b04e1a3-a260-4679-bdc8-0440507fbe26
|
|
135
|
+
**Jira URL:** https://siesa-test-sandbox.atlassian.net
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
**If Configuration Missing:**
|
|
139
|
+
```output
|
|
140
|
+
⚠️ Jira configuration not found in `docs/jira-conf.md`.
|
|
141
|
+
|
|
142
|
+
Please run the `*jira-setup` command first to configure project-specific Jira integration.
|
|
143
|
+
|
|
144
|
+
Required details:
|
|
145
|
+
- Project Key
|
|
146
|
+
- Cloud ID
|
|
147
|
+
- Jira URL
|
|
148
|
+
|
|
149
|
+
HALT execution until configuration is complete.
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### Phase 2: QA Gate Validation (Conditional)
|
|
153
|
+
|
|
154
|
+
#### Step 4: Check for QA Gates
|
|
155
|
+
|
|
156
|
+
**Action:** Determine if story has QA gate requirements
|
|
157
|
+
|
|
158
|
+
- [ ] Search story content for QA gate references
|
|
159
|
+
- [ ] Check for `## QA Gates` section
|
|
160
|
+
- [ ] Check for gate status fields
|
|
161
|
+
- [ ] Identify if validation needed for "Done" transition
|
|
162
|
+
|
|
163
|
+
**Detection Pattern:**
|
|
164
|
+
```markdown
|
|
165
|
+
## QA Gates
|
|
166
|
+
|
|
167
|
+
### Gate: [Gate Name]
|
|
168
|
+
- **Status:** PASS | FAIL | CONCERN | WAIVED
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
#### Step 5: Validate QA Gates (If Transitioning to "Done")
|
|
172
|
+
|
|
173
|
+
**Action:** If target status is "Done" and QA gates exist, validate them
|
|
174
|
+
|
|
175
|
+
- [ ] Parse all QA gate sections
|
|
176
|
+
- [ ] Extract gate names and status values
|
|
177
|
+
- [ ] Check each gate status
|
|
178
|
+
- [ ] Verify no FAIL, CONCERN, or WAIVED states
|
|
179
|
+
- [ ] Confirm all gates show PASS
|
|
180
|
+
|
|
181
|
+
**Validation Logic:**
|
|
182
|
+
```
|
|
183
|
+
QA Gate Validation:
|
|
184
|
+
{{gate_name_1}}: {{status_1}}
|
|
185
|
+
{{gate_name_2}}: {{status_2}}
|
|
186
|
+
|
|
187
|
+
Overall Status: {{PASS/FAIL}}
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
**If QA Gates Fail:**
|
|
191
|
+
```output
|
|
192
|
+
❌ Cannot transition to Done - QA gate requirements not met:
|
|
193
|
+
|
|
194
|
+
QA Gate Status:
|
|
195
|
+
- {{gate_name_1}}: {{status}} ❌
|
|
196
|
+
- {{gate_name_2}}: {{status}} ❌
|
|
197
|
+
|
|
198
|
+
Requirements for Done:
|
|
199
|
+
✓ All gates must show status: PASS
|
|
200
|
+
✗ Cannot have: FAIL, CONCERN, or WAIVED
|
|
201
|
+
|
|
202
|
+
Please resolve QA issues before marking story as Done.
|
|
203
|
+
|
|
204
|
+
HALT execution.
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
**If QA Gates Pass:**
|
|
208
|
+
```output
|
|
209
|
+
✅ QA Gates Validation: PASSED
|
|
210
|
+
|
|
211
|
+
All quality gates show PASS status. Story is ready for Done transition.
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
### Phase 3: Load or Fetch Available Statuses
|
|
215
|
+
|
|
216
|
+
#### Step 6: Check for Cached Statuses in jira-conf.md
|
|
217
|
+
|
|
218
|
+
**Action:** Check if statuses are already cached in configuration
|
|
219
|
+
|
|
220
|
+
- [ ] Read `docs/jira-conf.md` file
|
|
221
|
+
- [ ] Look for "Available Story Statuses" section
|
|
222
|
+
- [ ] Check if section exists and contains status list (lines starting with `-`)
|
|
223
|
+
- [ ] If statuses found: parse and use them (go to Step 8)
|
|
224
|
+
- [ ] If statuses NOT found: proceed to Step 7 to fetch from Jira
|
|
225
|
+
|
|
226
|
+
**Expected Cached Format:**
|
|
227
|
+
```markdown
|
|
228
|
+
## Available Story Statuses
|
|
229
|
+
|
|
230
|
+
- To Do
|
|
231
|
+
- In Progress
|
|
232
|
+
- Done
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
#### Step 7: Fetch Statuses from Jira via MCP (If Not Cached)
|
|
236
|
+
|
|
237
|
+
**Action:** Query Jira MCP to get available statuses for the project
|
|
238
|
+
|
|
239
|
+
- [ ] Call Jira MCP to get project statuses or workflow information
|
|
240
|
+
- [ ] Extract list of status names from response
|
|
241
|
+
- [ ] Build formatted status list
|
|
242
|
+
- [ ] Proceed to Step 7b to cache them
|
|
243
|
+
|
|
244
|
+
**MCP Call Options:**
|
|
245
|
+
|
|
246
|
+
Option 1 - Get statuses from an existing issue:
|
|
247
|
+
```
|
|
248
|
+
Tool: mcp_gitkraken_issues_get_detail
|
|
249
|
+
Parameters:
|
|
250
|
+
- provider: jira
|
|
251
|
+
- issue_id: {{jira_key}}
|
|
252
|
+
- project_name: {{project_key}}
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
Option 2 - Query project metadata (if available in MCP):
|
|
256
|
+
```
|
|
257
|
+
Tool: mcp_jira_get_project_statuses (if exists)
|
|
258
|
+
Parameters:
|
|
259
|
+
- project_key: {{project_key}}
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
**Extract Statuses from Response:**
|
|
263
|
+
```json
|
|
264
|
+
{
|
|
265
|
+
"transitions": [
|
|
266
|
+
{"id": "10", "name": "To Do"},
|
|
267
|
+
{"id": "20", "name": "In Progress"},
|
|
268
|
+
{"id": "30", "name": "Done"}
|
|
269
|
+
]
|
|
270
|
+
}
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
- Parse transition names or status names
|
|
274
|
+
- Deduplicate status list
|
|
275
|
+
- Sort alphabetically or by workflow order
|
|
276
|
+
|
|
277
|
+
**If MCP Call Fails:**
|
|
278
|
+
```output
|
|
279
|
+
❌ Unable to retrieve statuses from Jira via MCP.
|
|
280
|
+
|
|
281
|
+
Possible causes:
|
|
282
|
+
- MCP connection issue
|
|
283
|
+
- Invalid Jira credentials
|
|
284
|
+
- No issues exist in project to query
|
|
285
|
+
|
|
286
|
+
Manual Configuration Required:
|
|
287
|
+
Please add statuses manually to `docs/jira-conf.md`:
|
|
288
|
+
|
|
289
|
+
## Available Story Statuses
|
|
290
|
+
|
|
291
|
+
- To Do
|
|
292
|
+
- In Progress
|
|
293
|
+
- Done
|
|
294
|
+
|
|
295
|
+
HALT execution.
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
#### Step 7b: Cache Statuses in jira-conf.md
|
|
299
|
+
|
|
300
|
+
**Action:** Write fetched statuses to configuration file for future use
|
|
301
|
+
|
|
302
|
+
- [ ] Read current `docs/jira-conf.md` content
|
|
303
|
+
- [ ] Locate insertion point (after Jira URL, before closing notes)
|
|
304
|
+
- [ ] Format statuses as markdown list
|
|
305
|
+
- [ ] Insert "Available Story Statuses" section
|
|
306
|
+
- [ ] Write updated content back to file
|
|
307
|
+
|
|
308
|
+
**Insert Format:**
|
|
309
|
+
```markdown
|
|
310
|
+
## Available Story Statuses
|
|
311
|
+
|
|
312
|
+
_Automatically retrieved from Jira on {{date}}. Edit this list if your workflow changes._
|
|
313
|
+
|
|
314
|
+
{{#each statuses}}
|
|
315
|
+
- {{name}}
|
|
316
|
+
{{/each}}
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
**Success Output:**
|
|
320
|
+
```output
|
|
321
|
+
✅ Statuses retrieved from Jira and cached in jira-conf.md
|
|
322
|
+
|
|
323
|
+
Found {{status_count}} statuses:
|
|
324
|
+
{{#each statuses}}
|
|
325
|
+
- {{name}}
|
|
326
|
+
{{/each}}
|
|
327
|
+
|
|
328
|
+
These statuses are now cached for future use.
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
#### Step 8: Present Available Statuses to User
|
|
332
|
+
|
|
333
|
+
```elicit
|
|
334
|
+
path: Select target status
|
|
335
|
+
format: |
|
|
336
|
+
Story "{{story_title}}" is ready for status update.
|
|
337
|
+
|
|
338
|
+
Current Status: {{current_status}}
|
|
339
|
+
Jira Issue: {{jira_key}}
|
|
340
|
+
|
|
341
|
+
Available Statuses:
|
|
342
|
+
{{#each statuses}}
|
|
343
|
+
{{@index}}. {{name}}
|
|
344
|
+
{{/each}}
|
|
345
|
+
|
|
346
|
+
Select target status (enter number):
|
|
347
|
+
```
|
|
348
|
+
|
|
349
|
+
**Action:** Wait for user selection and validate input
|
|
350
|
+
|
|
351
|
+
- [ ] Display numbered list of statuses from jira-conf.md
|
|
352
|
+
- [ ] Accept user input (number)
|
|
353
|
+
- [ ] Validate selection is within range (1 to status count)
|
|
354
|
+
- [ ] Extract selected status name
|
|
355
|
+
|
|
356
|
+
#### Step 9: Confirm Transition
|
|
357
|
+
|
|
358
|
+
```elicit
|
|
359
|
+
path: Confirm status update
|
|
360
|
+
format: |
|
|
361
|
+
Ready to update story in Jira:
|
|
362
|
+
|
|
363
|
+
Story: {{story_title}}
|
|
364
|
+
Jira Issue: {{jira_key}}
|
|
365
|
+
Current Status: {{current_status}}
|
|
366
|
+
New Status: {{selected_status}}
|
|
367
|
+
|
|
368
|
+
All Prerequisites Validated:
|
|
369
|
+
✅ All tasks completed
|
|
370
|
+
{{#if qaGatesRequired}}✅ QA gates passed{{/if}}
|
|
371
|
+
✅ Jira connection configured
|
|
372
|
+
|
|
373
|
+
Proceed with update? (yes/no):
|
|
374
|
+
```
|
|
375
|
+
|
|
376
|
+
### Phase 4: Execute Jira Transition
|
|
377
|
+
|
|
378
|
+
#### Step 10: Update Jira Issue Status
|
|
379
|
+
|
|
380
|
+
**Action:** Use MCP Jira integration to update the issue status
|
|
381
|
+
|
|
382
|
+
- [ ] Extract Jira issue key from story metadata
|
|
383
|
+
- [ ] Extract selected status name from user choice
|
|
384
|
+
- [ ] Call Jira MCP to update issue status
|
|
385
|
+
- [ ] Add automation comment
|
|
386
|
+
- [ ] Verify status update succeeded
|
|
387
|
+
|
|
388
|
+
**MCP Call Pattern:**
|
|
389
|
+
```
|
|
390
|
+
Tool: mcp_gitkraken_issues_update_status (or equivalent Jira MCP tool)
|
|
391
|
+
Parameters:
|
|
392
|
+
- provider: {{jira_provider}}
|
|
393
|
+
- issue_id: {{jira_key}}
|
|
394
|
+
- status: {{selected_status_name}}
|
|
395
|
+
- comment: "Story status updated via BMAD automation"
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
**Expected Response:**
|
|
399
|
+
```json
|
|
400
|
+
{
|
|
401
|
+
"success": true,
|
|
402
|
+
"issue_key": "PROJ-123",
|
|
403
|
+
"new_status": "Done",
|
|
404
|
+
"transition_date": "2025-12-11T10:30:00Z"
|
|
405
|
+
}
|
|
406
|
+
```
|
|
407
|
+
|
|
408
|
+
#### Step 11: Update Local Story File
|
|
409
|
+
|
|
410
|
+
**Action:** Update the status field in the story document
|
|
411
|
+
|
|
412
|
+
- [ ] Read current story file content
|
|
413
|
+
- [ ] Locate status field line
|
|
414
|
+
- [ ] Replace status value with new status
|
|
415
|
+
- [ ] Write updated content back to file
|
|
416
|
+
- [ ] Preserve all other content unchanged
|
|
417
|
+
|
|
418
|
+
**Update Pattern:**
|
|
419
|
+
```markdown
|
|
420
|
+
Before:
|
|
421
|
+
**Status:** Ready for Review
|
|
422
|
+
|
|
423
|
+
After:
|
|
424
|
+
**Status:** Done
|
|
425
|
+
```
|
|
426
|
+
|
|
427
|
+
**File Update Logic:**
|
|
428
|
+
- Use precise string replacement
|
|
429
|
+
- Match exact indentation and formatting
|
|
430
|
+
- Only modify status field
|
|
431
|
+
- Preserve markdown structure
|
|
432
|
+
|
|
433
|
+
### Phase 5: Completion & Reporting
|
|
434
|
+
|
|
435
|
+
#### Step 12: Generate Completion Report
|
|
436
|
+
|
|
437
|
+
**Action:** Provide clear confirmation of completed action
|
|
438
|
+
|
|
439
|
+
```output
|
|
440
|
+
✅ Story Status Updated Successfully
|
|
441
|
+
|
|
442
|
+
Story: {{story_title}}
|
|
443
|
+
Jira Issue: {{jira_key}}
|
|
444
|
+
|
|
445
|
+
Previous Status: {{old_status}}
|
|
446
|
+
New Status: {{new_status}}
|
|
447
|
+
|
|
448
|
+
Updated:
|
|
449
|
+
✅ Jira issue transitioned
|
|
450
|
+
✅ Local story file updated
|
|
451
|
+
|
|
452
|
+
Timestamp: {{completion_timestamp}}
|
|
453
|
+
|
|
454
|
+
Next Steps:
|
|
455
|
+
{{#if new_status_is_done}}
|
|
456
|
+
- Story is marked as Done
|
|
457
|
+
- Implementation cycle complete
|
|
458
|
+
{{else}}
|
|
459
|
+
- Continue workflow in new status
|
|
460
|
+
- Monitor story progress in Jira
|
|
461
|
+
{{/if}}
|
|
462
|
+
```
|
|
463
|
+
|
|
464
|
+
**Completion Checklist:**
|
|
465
|
+
- [ ] Jira issue successfully transitioned
|
|
466
|
+
- [ ] Local story file status updated
|
|
467
|
+
- [ ] User notified of completion
|
|
468
|
+
- [ ] No errors or warnings
|
|
469
|
+
|
|
470
|
+
## Error Handling
|
|
471
|
+
|
|
472
|
+
### Common Errors and Solutions
|
|
473
|
+
|
|
474
|
+
**Error: Missing Jira Issue Key**
|
|
475
|
+
```output
|
|
476
|
+
❌ Story file does not contain Jira issue key.
|
|
477
|
+
|
|
478
|
+
Expected format:
|
|
479
|
+
**Jira Issue Key:** PROJ-123
|
|
480
|
+
|
|
481
|
+
Please sync story to Jira first using sync-story-to-jira task.
|
|
482
|
+
```
|
|
483
|
+
|
|
484
|
+
**Error: Invalid Transition**
|
|
485
|
+
```output
|
|
486
|
+
❌ Selected transition not available for current issue status.
|
|
487
|
+
|
|
488
|
+
Available transitions for {{current_status}}:
|
|
489
|
+
- {{transition_1}}
|
|
490
|
+
- {{transition_2}}
|
|
491
|
+
|
|
492
|
+
Please select a valid transition.
|
|
493
|
+
```
|
|
494
|
+
|
|
495
|
+
**Error: Jira Connection Failed**
|
|
496
|
+
```output
|
|
497
|
+
❌ Unable to connect to Jira.
|
|
498
|
+
|
|
499
|
+
Possible causes:
|
|
500
|
+
- Invalid credentials in jira-preferences.md
|
|
501
|
+
- Network connectivity issues
|
|
502
|
+
- Jira API rate limit exceeded
|
|
503
|
+
|
|
504
|
+
Please verify Jira configuration and try again.
|
|
505
|
+
```
|
|
506
|
+
|
|
507
|
+
**Error: Permission Denied**
|
|
508
|
+
```output
|
|
509
|
+
❌ Insufficient permissions to transition issue {{jira_key}}.
|
|
510
|
+
|
|
511
|
+
Required permissions:
|
|
512
|
+
- Transition Issues
|
|
513
|
+
- Edit Issues
|
|
514
|
+
|
|
515
|
+
Please contact your Jira administrator.
|
|
516
|
+
```
|
|
517
|
+
|
|
518
|
+
## Output Format
|
|
519
|
+
|
|
520
|
+
### Success Output Template
|
|
521
|
+
```markdown
|
|
522
|
+
## Story Status Update Report
|
|
523
|
+
|
|
524
|
+
**Story:** {{story_title}}
|
|
525
|
+
**Jira Issue:** {{jira_key}}
|
|
526
|
+
**File:** {{story_file_path}}
|
|
527
|
+
|
|
528
|
+
### Validation Results
|
|
529
|
+
✅ All tasks completed ({{task_count}}/{{task_count}})
|
|
530
|
+
{{#if qaGatesPresent}}✅ QA gates passed ({{gate_count}}/{{gate_count}}){{/if}}
|
|
531
|
+
|
|
532
|
+
### Transition Details
|
|
533
|
+
- **Previous Status:** {{old_status}}
|
|
534
|
+
- **New Status:** {{new_status}}
|
|
535
|
+
- **Transition Date:** {{timestamp}}
|
|
536
|
+
- **Updated By:** BMAD Automation
|
|
537
|
+
|
|
538
|
+
### Actions Completed
|
|
539
|
+
1. ✅ Validated local task completion
|
|
540
|
+
{{#if qaGatesPresent}}2. ✅ Validated QA gate requirements{{/if}}
|
|
541
|
+
3. ✅ Transitioned Jira issue
|
|
542
|
+
4. ✅ Updated local story file
|
|
543
|
+
|
|
544
|
+
---
|
|
545
|
+
Story successfully transitioned to {{new_status}}.
|
|
546
|
+
```
|
|
547
|
+
|
|
548
|
+
## Configuration Reference
|
|
549
|
+
|
|
550
|
+
### Required Configuration Files
|
|
551
|
+
|
|
552
|
+
**`docs/jira-conf.md`:**
|
|
553
|
+
```markdown
|
|
554
|
+
# Jira Project Configuration
|
|
555
|
+
|
|
556
|
+
**Project Key:** PM
|
|
557
|
+
**Project Name:** Prueba MCP
|
|
558
|
+
**Cloud ID:** 3b04e1a3-a260-4679-bdc8-0440507fbe26
|
|
559
|
+
**Jira URL:** https://siesa-test-sandbox.atlassian.net
|
|
560
|
+
```
|
|
561
|
+
|
|
562
|
+
**`.bmad-core/data/jira-preferences.md`:**
|
|
563
|
+
Must contain Jira connection details and authentication credentials.
|
|
564
|
+
|
|
565
|
+
### How Statuses are Managed (Smart Caching)
|
|
566
|
+
|
|
567
|
+
This task uses **intelligent status caching** to balance efficiency and accuracy:
|
|
568
|
+
|
|
569
|
+
**Flow:**
|
|
570
|
+
1. First checks if statuses are cached in `docs/jira-conf.md`
|
|
571
|
+
2. If cached: Uses cached statuses (fast, no API calls)
|
|
572
|
+
3. If NOT cached: Queries Jira via MCP to fetch current statuses
|
|
573
|
+
4. Caches fetched statuses in `jira-conf.md` for future use
|
|
574
|
+
5. Presents statuses to user for selection
|
|
575
|
+
|
|
576
|
+
**Benefits:**
|
|
577
|
+
- ✅ **First-run auto-discovery**: Automatically fetches statuses from Jira on first use
|
|
578
|
+
- ✅ **Token-efficient**: Cached statuses avoid repeated MCP calls
|
|
579
|
+
- ✅ **Always accurate**: Sources from Jira, not hardcoded
|
|
580
|
+
- ✅ **Transparent**: Cached in readable markdown format
|
|
581
|
+
- ✅ **Updatable**: Edit `jira-conf.md` if workflow changes
|
|
582
|
+
- ✅ **Zero manual setup**: No need to manually configure statuses
|
|
583
|
+
|
|
584
|
+
**Refresh Cached Statuses:**
|
|
585
|
+
If your Jira workflow changes, you can:
|
|
586
|
+
- Delete the "Available Story Statuses" section from `jira-conf.md` and re-run command to re-fetch
|
|
587
|
+
- Or manually edit the status list in `jira-conf.md`
|
|
588
|
+
|
|
589
|
+
**Technical Note:**
|
|
590
|
+
Statuses are retrieved by querying an existing Jira issue's available transitions. This ensures only valid, workflow-approved statuses are presented.
|
|
591
|
+
|
|
592
|
+
## Notes
|
|
593
|
+
|
|
594
|
+
- This task is non-destructive - it only updates status, not content
|
|
595
|
+
- QA gate validation only enforced when transitioning to "Done"
|
|
596
|
+
- Task completion must be 100% before any transition
|
|
597
|
+
- Local story file is updated to match Jira status
|
|
598
|
+
- All transitions are logged in Jira with automation comment
|
|
599
|
+
- User can configure custom transitions per project
|
|
600
|
+
- Task validates before executing to prevent invalid state changes
|