2025-10-12 16:59:54 -05:00
|
|
|
# Story Approved Workflow Instructions (DEV Agent)
|
|
|
|
|
|
2025-10-16 08:58:09 -05:00
|
|
|
<critical>The workflow execution engine is governed by: {project_root}/bmad/core/tasks/workflow.xml</critical>
|
|
|
|
|
<critical>You MUST have already loaded and processed: {installed_path}/workflow.yaml</critical>
|
2025-10-17 20:33:38 -05:00
|
|
|
<critical>Communicate all responses in {communication_language} and language MUST be tailored to {user_skill_level}</critical>
|
|
|
|
|
<critical>Generate all documents in {document_output_language}</critical>
|
2025-10-16 08:58:09 -05:00
|
|
|
|
2025-10-12 16:59:54 -05:00
|
|
|
<workflow>
|
|
|
|
|
|
|
|
|
|
<critical>This workflow is run by DEV agent AFTER user confirms a story is approved (Definition of Done is complete)</critical>
|
2025-10-21 22:25:26 -05:00
|
|
|
<critical>Workflow: Update story file status to Done</critical>
|
2025-10-12 16:59:54 -05:00
|
|
|
|
2025-10-25 14:26:30 -05:00
|
|
|
<step n="1" goal="Find reviewed story to mark done" tag="sprint-status">
|
2025-10-12 16:59:54 -05:00
|
|
|
|
2025-10-21 23:03:46 -05:00
|
|
|
<action>If {{story_path}} is provided → use it directly; extract story_key from filename or metadata; GOTO mark_done</action>
|
2025-10-12 16:59:54 -05:00
|
|
|
|
2025-10-25 14:26:30 -05:00
|
|
|
<critical>MUST read COMPLETE sprint-status.yaml file from start to end to preserve order</critical>
|
|
|
|
|
<action>Load the FULL file: {{output_folder}}/sprint-status.yaml</action>
|
|
|
|
|
<action>Read ALL lines from beginning to end - do not skip any content</action>
|
|
|
|
|
<action>Parse the development_status section completely</action>
|
2025-10-12 16:59:54 -05:00
|
|
|
|
2025-10-25 14:26:30 -05:00
|
|
|
<action>Find ALL stories (reading in order from top to bottom) where:
|
2025-10-21 23:03:46 -05:00
|
|
|
|
2025-10-25 14:26:30 -05:00
|
|
|
- Key matches pattern: number-number-name (e.g., "1-2-user-auth")
|
|
|
|
|
- NOT an epic key (epic-X) or retrospective (epic-X-retrospective)
|
|
|
|
|
- Status value equals "review"
|
|
|
|
|
</action>
|
|
|
|
|
|
|
|
|
|
<action>Collect up to 10 review story keys in order (limit for display purposes)</action>
|
|
|
|
|
<action>Count total review stories found</action>
|
|
|
|
|
|
|
|
|
|
<check if="no review stories found">
|
2025-10-21 23:03:46 -05:00
|
|
|
<output>📋 No stories in review status found
|
|
|
|
|
|
|
|
|
|
All stories are either still in development or already done.
|
|
|
|
|
|
|
|
|
|
**Options:**
|
|
|
|
|
|
|
|
|
|
1. Run `dev-story` to implement stories
|
|
|
|
|
2. Run `review-story` if stories need review first
|
|
|
|
|
3. Check sprint-status.yaml for current story states
|
|
|
|
|
</output>
|
|
|
|
|
<action>HALT</action>
|
|
|
|
|
</check>
|
|
|
|
|
|
|
|
|
|
<action>Display available reviewed stories:
|
|
|
|
|
|
2025-10-25 14:26:30 -05:00
|
|
|
**Stories Ready to Mark Done ({{review_count}} found):**
|
2025-10-21 23:03:46 -05:00
|
|
|
|
2025-10-25 14:26:30 -05:00
|
|
|
{{list_of_review_story_keys}}
|
2025-10-12 16:59:54 -05:00
|
|
|
|
2025-10-21 23:03:46 -05:00
|
|
|
</action>
|
2025-10-12 16:59:54 -05:00
|
|
|
|
2025-10-21 23:03:46 -05:00
|
|
|
<ask>Select the story to mark as Done (enter story key or number):</ask>
|
2025-10-12 16:59:54 -05:00
|
|
|
|
2025-10-21 23:03:46 -05:00
|
|
|
<action>Resolve selected story_key from user input</action>
|
|
|
|
|
<action>Find matching story file in {{story_dir}} using story_key pattern</action>
|
2025-10-12 16:59:54 -05:00
|
|
|
|
2025-10-21 23:03:46 -05:00
|
|
|
<anchor id="mark_done" />
|
|
|
|
|
|
|
|
|
|
<action>Read the story file from resolved path</action>
|
|
|
|
|
<action>Extract story_id and story_title from the file</action>
|
|
|
|
|
|
|
|
|
|
<action>Find the "Status:" line (usually at the top)</action>
|
2025-10-25 15:41:13 -05:00
|
|
|
<action>Update story file: Change Status to "done"</action>
|
2025-10-21 23:03:46 -05:00
|
|
|
|
|
|
|
|
<action>Add completion notes to Dev Agent Record section:</action>
|
|
|
|
|
<action>Find "## Dev Agent Record" section and add:
|
2025-10-12 16:59:54 -05:00
|
|
|
|
|
|
|
|
```
|
|
|
|
|
### Completion Notes
|
|
|
|
|
**Completed:** {{date}}
|
2025-10-21 22:25:26 -05:00
|
|
|
**Definition of Done:** All acceptance criteria met, code reviewed, tests passing
|
2025-10-12 16:59:54 -05:00
|
|
|
```
|
|
|
|
|
|
2025-10-21 23:03:46 -05:00
|
|
|
</action>
|
|
|
|
|
|
2025-10-12 16:59:54 -05:00
|
|
|
<action>Save the story file</action>
|
2025-10-25 14:26:30 -05:00
|
|
|
</step>
|
2025-10-12 16:59:54 -05:00
|
|
|
|
2025-10-25 14:26:30 -05:00
|
|
|
<step n="2" goal="Update sprint status to done" tag="sprint-status">
|
|
|
|
|
<action>Load the FULL file: {{output_folder}}/sprint-status.yaml</action>
|
|
|
|
|
<action>Find development_status key matching {{story_key}}</action>
|
|
|
|
|
<action>Verify current status is "review" (expected previous state)</action>
|
|
|
|
|
<action>Update development_status[{{story_key}}] = "done"</action>
|
|
|
|
|
<action>Save file, preserving ALL comments and structure including STATUS DEFINITIONS</action>
|
2025-10-21 23:03:46 -05:00
|
|
|
|
2025-10-25 14:26:30 -05:00
|
|
|
<check if="story key not found in file">
|
|
|
|
|
<output>⚠️ Story file updated, but could not update sprint-status: {{story_key}} not found
|
2025-10-21 23:03:46 -05:00
|
|
|
|
|
|
|
|
Story is marked Done in file, but sprint-status.yaml may be out of sync.
|
|
|
|
|
</output>
|
|
|
|
|
</check>
|
|
|
|
|
|
2025-10-12 16:59:54 -05:00
|
|
|
</step>
|
|
|
|
|
|
2025-10-25 14:26:30 -05:00
|
|
|
<step n="3" goal="Confirm completion to user">
|
2025-10-12 16:59:54 -05:00
|
|
|
|
2025-10-21 22:25:26 -05:00
|
|
|
<output>**Story Approved and Marked Done, {user_name}!**
|
2025-10-12 16:59:54 -05:00
|
|
|
|
2025-10-25 15:41:13 -05:00
|
|
|
✅ Story file updated: `{{story_file}}` → Status: done
|
2025-10-25 14:26:30 -05:00
|
|
|
✅ Sprint status updated: review → done
|
2025-10-12 16:59:54 -05:00
|
|
|
|
|
|
|
|
**Completed Story:**
|
2025-10-17 23:44:43 -05:00
|
|
|
|
2025-10-21 22:25:26 -05:00
|
|
|
- **ID:** {{story_id}}
|
2025-10-21 23:03:46 -05:00
|
|
|
- **Key:** {{story_key}}
|
2025-10-21 22:25:26 -05:00
|
|
|
- **Title:** {{story_title}}
|
|
|
|
|
- **File:** `{{story_file}}`
|
2025-10-12 16:59:54 -05:00
|
|
|
- **Completed:** {{date}}
|
|
|
|
|
|
|
|
|
|
**Next Steps:**
|
2025-10-17 23:44:43 -05:00
|
|
|
|
2025-10-21 22:25:26 -05:00
|
|
|
1. Continue with next story in your backlog
|
2025-10-21 23:03:46 -05:00
|
|
|
- Run `create-story` for next backlog story
|
|
|
|
|
- Or run `dev-story` if ready stories exist
|
|
|
|
|
2. Check epic completion status
|
|
|
|
|
- Run `retrospective` workflow to check if epic is complete
|
|
|
|
|
- Epic retrospective will verify all stories are done
|
|
|
|
|
</output>
|
2025-10-12 16:59:54 -05:00
|
|
|
|
|
|
|
|
</step>
|
|
|
|
|
|
|
|
|
|
</workflow>
|
|
|
|
|
```
|