all workflows aware
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Create Story - Workflow Instructions (Spec-compliant, non-interactive by default)
|
||||
|
||||
```xml
|
||||
````xml
|
||||
<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>
|
||||
<critical>This workflow creates or updates the next user story from epics/PRD and architecture context, saving to the configured stories directory and optionally invoking Story Context.</critical>
|
||||
@@ -120,5 +120,63 @@
|
||||
<action>Report created/updated story path</action>
|
||||
</step>
|
||||
|
||||
<step n="9" goal="Update status file on completion">
|
||||
<action>Search {output_folder}/ for files matching pattern: project-workflow-status*.md</action>
|
||||
<action>Find the most recent file (by date in filename)</action>
|
||||
|
||||
<check if="status file exists">
|
||||
<action>Load the status file</action>
|
||||
|
||||
<template-output file="{{status_file_path}}">current_step</template-output>
|
||||
<action>Set to: "create-story (Story {{story_id}})"</action>
|
||||
|
||||
<template-output file="{{status_file_path}}">current_workflow</template-output>
|
||||
<action>Set to: "create-story (Story {{story_id}}) - Complete"</action>
|
||||
|
||||
<template-output file="{{status_file_path}}">progress_percentage</template-output>
|
||||
<action>Calculate per-story weight: remaining_40_percent / total_stories / 5</action>
|
||||
<action>Increment by: {{per_story_weight}} * 2 (create-story weight is ~2% per story)</action>
|
||||
|
||||
<template-output file="{{status_file_path}}">decisions_log</template-output>
|
||||
<action>Add entry:</action>
|
||||
```
|
||||
- **{{date}}**: Completed create-story for Story {{story_id}} ({{story_title}}). Story file: {{story_file}}. Status: Draft (needs review via story-ready). Next: Review and approve story.
|
||||
```
|
||||
|
||||
<output>**✅ Story Created Successfully**
|
||||
|
||||
**Story Details:**
|
||||
- Story ID: {{story_id}}
|
||||
- File: {{story_file}}
|
||||
- Status: Draft (needs review)
|
||||
|
||||
**Status file updated:**
|
||||
- Current step: create-story (Story {{story_id}}) ✓
|
||||
- Progress: {{new_progress_percentage}}%
|
||||
|
||||
**Next Steps:**
|
||||
1. Review the drafted story in {{story_file}}
|
||||
2. When satisfied, run `story-ready` to approve for development
|
||||
3. Or edit the story file and re-run `create-story` to update
|
||||
|
||||
Check status anytime with: `workflow-status`
|
||||
</output>
|
||||
</check>
|
||||
|
||||
<check if="status file not found">
|
||||
<output>**✅ Story Created Successfully**
|
||||
|
||||
**Story Details:**
|
||||
- Story ID: {{story_id}}
|
||||
- File: {{story_file}}
|
||||
- Status: Draft
|
||||
|
||||
Note: Running in standalone mode (no status file).
|
||||
|
||||
To track progress across workflows, run `workflow-status` first.
|
||||
</output>
|
||||
</check>
|
||||
</step>
|
||||
|
||||
</workflow>
|
||||
```
|
||||
````
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Develop Story - Workflow Instructions
|
||||
|
||||
```xml
|
||||
````xml
|
||||
<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>
|
||||
<critical>Only modify the story file in these areas: Tasks/Subtasks checkboxes, Dev Agent Record (Debug Log, Completion Notes), File List, Change Log, and Status</critical>
|
||||
@@ -11,19 +11,44 @@
|
||||
|
||||
<workflow>
|
||||
|
||||
<step n="1" goal="Load story and select next task">
|
||||
<action>If {{story_path}} was explicitly provided and is valid → use it. Otherwise, attempt auto-discovery.</action>
|
||||
<action>Auto-discovery: Read {{story_dir}} from config (dev_story_location). If invalid/missing or contains no .md files, ASK user to provide either: (a) a story file path, or (b) a directory to scan.</action>
|
||||
<action>If a directory is provided, list story markdown files recursively under that directory matching pattern: "story-*.md".</action>
|
||||
<action>Sort candidates by last modified time (newest first) and take the top {{story_selection_limit}} items.</action>
|
||||
<ask>Present the list with index, filename, and modified time. Ask: "Select a story (1-{{story_selection_limit}}) or enter a path:"</ask>
|
||||
<action>Resolve the selected item into {{story_path}}</action>
|
||||
<action>Read the COMPLETE story file from {{story_path}}</action>
|
||||
<action>Parse sections: Story, Acceptance Criteria, Tasks/Subtasks (including subtasks), Dev Notes, Dev Agent Record, File List, Change Log, Status</action>
|
||||
<action>Identify the first incomplete task (unchecked [ ]) in Tasks/Subtasks; if subtasks exist, treat all subtasks as part of the selected task scope</action>
|
||||
<check>If no incomplete tasks found → "All tasks completed - proceed to completion sequence" and <goto step="6">Continue</goto></check>
|
||||
<check>If story file inaccessible → HALT: "Cannot develop story without access to story file"</check>
|
||||
<check>If task requirements ambiguous → ASK user to clarify; if unresolved, HALT: "Task requirements must be clear before implementation"</check>
|
||||
<step n="1" goal="Load story from status file IN PROGRESS section">
|
||||
<action>Read {output_folder}/project-workflow-status.md (if exists)</action>
|
||||
<action>Navigate to "### Implementation Progress (Phase 4 Only)" section</action>
|
||||
<action>Find "#### IN PROGRESS (Approved for Development)" section</action>
|
||||
|
||||
<check if="IN PROGRESS section has a story">
|
||||
<action>Extract story information:</action>
|
||||
- current_story_id: The story ID (e.g., "1.1", "auth-feature-1", "login-fix")
|
||||
- current_story_title: The story title
|
||||
- current_story_file: The exact story file path
|
||||
- current_story_context_file: The context file path (if exists)
|
||||
|
||||
<critical>DO NOT SEARCH for stories - the status file tells you exactly which story is IN PROGRESS</critical>
|
||||
|
||||
<action>Set {{story_path}} = {story_dir}/{current_story_file}</action>
|
||||
<action>Read the COMPLETE story file from {{story_path}}</action>
|
||||
<action>Parse sections: Story, Acceptance Criteria, Tasks/Subtasks (including subtasks), Dev Notes, Dev Agent Record, File List, Change Log, Status</action>
|
||||
<action>Identify the first incomplete task (unchecked [ ]) in Tasks/Subtasks; if subtasks exist, treat all subtasks as part of the selected task scope</action>
|
||||
<check>If no incomplete tasks found → "All tasks completed - proceed to completion sequence" and <goto step="6">Continue</goto></check>
|
||||
<check>If story file inaccessible → HALT: "Cannot develop story without access to story file"</check>
|
||||
<check>If task requirements ambiguous → ASK user to clarify; if unresolved, HALT: "Task requirements must be clear before implementation"</check>
|
||||
</check>
|
||||
|
||||
<check if="IN PROGRESS section is empty OR status file not found">
|
||||
<action>Fall back to legacy auto-discovery:</action>
|
||||
<action>If {{story_path}} was explicitly provided and is valid → use it. Otherwise, attempt auto-discovery.</action>
|
||||
<action>Auto-discovery: Read {{story_dir}} from config (dev_story_location). If invalid/missing or contains no .md files, ASK user to provide either: (a) a story file path, or (b) a directory to scan.</action>
|
||||
<action>If a directory is provided, list story markdown files recursively under that directory matching pattern: "story-*.md".</action>
|
||||
<action>Sort candidates by last modified time (newest first) and take the top {{story_selection_limit}} items.</action>
|
||||
<ask>Present the list with index, filename, and modified time. Ask: "Select a story (1-{{story_selection_limit}}) or enter a path:"</ask>
|
||||
<action>Resolve the selected item into {{story_path}}</action>
|
||||
<action>Read the COMPLETE story file from {{story_path}}</action>
|
||||
<action>Parse sections: Story, Acceptance Criteria, Tasks/Subtasks (including subtasks), Dev Notes, Dev Agent Record, File List, Change Log, Status</action>
|
||||
<action>Identify the first incomplete task (unchecked [ ]) in Tasks/Subtasks; if subtasks exist, treat all subtasks as part of the selected task scope</action>
|
||||
<check>If no incomplete tasks found → "All tasks completed - proceed to completion sequence" and <goto step="6">Continue</goto></check>
|
||||
<check>If story file inaccessible → HALT: "Cannot develop story without access to story file"</check>
|
||||
<check>If task requirements ambiguous → ASK user to clarify; if unresolved, HALT: "Task requirements must be clear before implementation"</check>
|
||||
</check>
|
||||
</step>
|
||||
|
||||
<step n="2" goal="Plan and implement task">
|
||||
@@ -83,5 +108,65 @@
|
||||
<action>Communicate that the story is Ready for Review</action>
|
||||
</step>
|
||||
|
||||
<step n="8" goal="Update status file on completion">
|
||||
<action>Search {output_folder}/ for files matching pattern: project-workflow-status*.md</action>
|
||||
<action>Find the most recent file (by date in filename)</action>
|
||||
|
||||
<check if="status file exists">
|
||||
<action>Load the status file</action>
|
||||
|
||||
<template-output file="{{status_file_path}}">current_step</template-output>
|
||||
<action>Set to: "dev-story (Story {{current_story_id}})"</action>
|
||||
|
||||
<template-output file="{{status_file_path}}">current_workflow</template-output>
|
||||
<action>Set to: "dev-story (Story {{current_story_id}}) - Complete (Ready for Review)"</action>
|
||||
|
||||
<template-output file="{{status_file_path}}">progress_percentage</template-output>
|
||||
<action>Calculate per-story weight: remaining_40_percent / total_stories / 5</action>
|
||||
<action>Increment by: {{per_story_weight}} * 5 (dev-story weight is ~5% per story - largest weight)</action>
|
||||
|
||||
<template-output file="{{status_file_path}}">decisions_log</template-output>
|
||||
<action>Add entry:</action>
|
||||
```
|
||||
- **{{date}}**: Completed dev-story for Story {{current_story_id}} ({{current_story_title}}). All tasks complete, tests passing. Story status: Ready for Review. Next: User reviews and runs story-approved when satisfied with implementation.
|
||||
```
|
||||
|
||||
<output>**✅ Story Implementation Complete**
|
||||
|
||||
**Story Details:**
|
||||
- Story ID: {{current_story_id}}
|
||||
- Title: {{current_story_title}}
|
||||
- File: {{story_path}}
|
||||
- Status: Ready for Review
|
||||
|
||||
**Status file updated:**
|
||||
- Current step: dev-story (Story {{current_story_id}}) ✓
|
||||
- Progress: {{new_progress_percentage}}%
|
||||
|
||||
**Next Steps:**
|
||||
1. Review the implemented story and test the changes
|
||||
2. Verify all acceptance criteria are met
|
||||
3. When satisfied, run `story-approved` to mark story complete and advance the queue
|
||||
|
||||
Or check status anytime with: `workflow-status`
|
||||
</output>
|
||||
</check>
|
||||
|
||||
<check if="status file not found">
|
||||
<output>**✅ Story Implementation Complete**
|
||||
|
||||
**Story Details:**
|
||||
- Story ID: {{current_story_id}}
|
||||
- Title: {{current_story_title}}
|
||||
- File: {{story_path}}
|
||||
- Status: Ready for Review
|
||||
|
||||
Note: Running in standalone mode (no status file).
|
||||
|
||||
To track progress across workflows, run `workflow-status` first.
|
||||
</output>
|
||||
</check>
|
||||
</step>
|
||||
|
||||
</workflow>
|
||||
```
|
||||
````
|
||||
|
||||
@@ -15,7 +15,35 @@ FACILITATION NOTES:
|
||||
|
||||
<workflow>
|
||||
|
||||
<step n="1" goal="Epic Context Discovery">
|
||||
<step n="1" goal="Check and load workflow status file">
|
||||
<action>Search {output_folder}/ for files matching pattern: project-workflow-status*.md</action>
|
||||
<action>Find the most recent file (by date in filename: project-workflow-status-YYYY-MM-DD.md)</action>
|
||||
|
||||
<check if="exists">
|
||||
<action>Load the status file</action>
|
||||
<action>Set status_file_found = true</action>
|
||||
<action>Store status_file_path for later updates</action>
|
||||
</check>
|
||||
|
||||
<check if="not exists">
|
||||
<ask>**No workflow status file found.**
|
||||
|
||||
This workflow conducts epic retrospective (optional Phase 4 workflow).
|
||||
|
||||
Options:
|
||||
|
||||
1. Run workflow-status first to create the status file (recommended for progress tracking)
|
||||
2. Continue in standalone mode (no progress tracking)
|
||||
3. Exit
|
||||
|
||||
What would you like to do?</ask>
|
||||
<action>If user chooses option 1 → HALT with message: "Please run workflow-status first, then return to retrospective"</action>
|
||||
<action>If user chooses option 2 → Set standalone_mode = true and continue</action>
|
||||
<action>If user chooses option 3 → HALT</action>
|
||||
</check>
|
||||
</step>
|
||||
|
||||
<step n="2" goal="Epic Context Discovery">
|
||||
<action>Identify the completed epic</action>
|
||||
|
||||
<ask>Which epic has just been completed? (Enter epic number, e.g., "003" or auto-detect from highest completed story)</ask>
|
||||
@@ -370,6 +398,72 @@ See you at sprint planning once prep work is done!"
|
||||
<action>Remind user to schedule prep sprint if needed</action>
|
||||
</step>
|
||||
|
||||
<step n="9" goal="Update status file on completion">
|
||||
<action>Search {output_folder}/ for files matching pattern: project-workflow-status*.md</action>
|
||||
<action>Find the most recent file (by date in filename)</action>
|
||||
|
||||
<check if="status file exists">
|
||||
<action>Load the status file</action>
|
||||
|
||||
<template-output file="{{status_file_path}}">current_step</template-output>
|
||||
<action>Set to: "retrospective (Epic {{completed_number}})"</action>
|
||||
|
||||
<template-output file="{{status_file_path}}">current_workflow</template-output>
|
||||
<action>Set to: "retrospective (Epic {{completed_number}}) - Complete"</action>
|
||||
|
||||
<template-output file="{{status_file_path}}">progress_percentage</template-output>
|
||||
<action>Increment by: 5% (optional epic boundary workflow)</action>
|
||||
|
||||
<template-output file="{{status_file_path}}">decisions_log</template-output>
|
||||
<action>Add entry:</action>
|
||||
|
||||
```
|
||||
- **{{date}}**: Completed retrospective for Epic {{completed_number}}. Action items: {{action_count}}. Preparation tasks: {{prep_task_count}}. Critical path items: {{critical_count}}. Next: Execute preparation sprint before beginning Epic {{next_number}}.
|
||||
```
|
||||
|
||||
<output>**✅ Retrospective Complete**
|
||||
|
||||
**Epic Review:**
|
||||
|
||||
- Epic {{completed_number}}: {{epic_title}} reviewed
|
||||
- Action Items: {{action_count}}
|
||||
- Preparation Tasks: {{prep_task_count}}
|
||||
- Critical Path Items: {{critical_count}}
|
||||
|
||||
**Status file updated:**
|
||||
|
||||
- Current step: retrospective (Epic {{completed_number}}) ✓
|
||||
- Progress: {{new_progress_percentage}}%
|
||||
|
||||
**Next Steps:**
|
||||
|
||||
1. Review retrospective summary: {output_folder}/retrospectives/epic-{{completed_number}}-retro-{{date}}.md
|
||||
2. Execute preparation sprint (Est: {{prep_days}} days)
|
||||
3. Complete critical path items before Epic {{next_number}}
|
||||
4. Begin Epic {{next_number}} planning when preparation complete
|
||||
|
||||
Check status anytime with: `workflow-status`
|
||||
</output>
|
||||
</check>
|
||||
|
||||
<check if="status file not found">
|
||||
<output>**✅ Retrospective Complete**
|
||||
|
||||
**Epic Review:**
|
||||
|
||||
- Epic {{completed_number}}: {{epic_title}} reviewed
|
||||
- Retrospective saved: {output_folder}/retrospectives/epic-{{completed_number}}-retro-{{date}}.md
|
||||
|
||||
Note: Running in standalone mode (no status file).
|
||||
|
||||
**Next Steps:**
|
||||
|
||||
1. Execute preparation sprint
|
||||
2. Begin Epic {{next_number}} planning
|
||||
</output>
|
||||
</check>
|
||||
</step>
|
||||
|
||||
</workflow>
|
||||
|
||||
<facilitation-guidelines>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Senior Developer Review - Workflow Instructions
|
||||
|
||||
```xml
|
||||
````xml
|
||||
<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>
|
||||
<critical>This workflow performs a Senior Developer Review on a story flagged Ready for Review, appends structured review notes, and can update the story status based on the outcome.</critical>
|
||||
@@ -10,7 +10,34 @@
|
||||
|
||||
<workflow>
|
||||
|
||||
<step n="1" goal="Locate story and verify review status">
|
||||
<step n="1" goal="Check and load workflow status file">
|
||||
<action>Search {output_folder}/ for files matching pattern: project-workflow-status*.md</action>
|
||||
<action>Find the most recent file (by date in filename: project-workflow-status-YYYY-MM-DD.md)</action>
|
||||
|
||||
<check if="exists">
|
||||
<action>Load the status file</action>
|
||||
<action>Set status_file_found = true</action>
|
||||
<action>Store status_file_path for later updates</action>
|
||||
</check>
|
||||
|
||||
<check if="not exists">
|
||||
<ask>**No workflow status file found.**
|
||||
|
||||
This workflow performs Senior Developer Review on a story (optional Phase 4 workflow).
|
||||
|
||||
Options:
|
||||
1. Run workflow-status first to create the status file (recommended for progress tracking)
|
||||
2. Continue in standalone mode (no progress tracking)
|
||||
3. Exit
|
||||
|
||||
What would you like to do?</ask>
|
||||
<action>If user chooses option 1 → HALT with message: "Please run workflow-status first, then return to review-story"</action>
|
||||
<action>If user chooses option 2 → Set standalone_mode = true and continue</action>
|
||||
<action>If user chooses option 3 → HALT</action>
|
||||
</check>
|
||||
</step>
|
||||
|
||||
<step n="2" goal="Locate story and verify review status">
|
||||
<action>If {{story_path}} was provided → use it. Else auto-discover from {{story_dir}} by listing files matching pattern: "story-*.md" (recursive), sort by last modified (newest first), present top {{story_selection_limit}}.</action>
|
||||
<ask optional="true" if="{{non_interactive}} == false">Select a story (1-{{story_selection_limit}}) or enter a path:</ask>
|
||||
<action>Resolve {{story_path}} and read the COMPLETE file.</action>
|
||||
@@ -172,5 +199,64 @@
|
||||
<action>Report workflow completion.</action>
|
||||
</step>
|
||||
|
||||
<step n="10" goal="Update status file on completion">
|
||||
<action>Search {output_folder}/ for files matching pattern: project-workflow-status*.md</action>
|
||||
<action>Find the most recent file (by date in filename)</action>
|
||||
|
||||
<check if="status file exists">
|
||||
<action>Load the status file</action>
|
||||
|
||||
<template-output file="{{status_file_path}}">current_step</template-output>
|
||||
<action>Set to: "review-story (Story {{epic_num}}.{{story_num}})"</action>
|
||||
|
||||
<template-output file="{{status_file_path}}">current_workflow</template-output>
|
||||
<action>Set to: "review-story (Story {{epic_num}}.{{story_num}}) - Complete"</action>
|
||||
|
||||
<template-output file="{{status_file_path}}">progress_percentage</template-output>
|
||||
<action>Calculate per-story weight: remaining_40_percent / total_stories / 5</action>
|
||||
<action>Increment by: {{per_story_weight}} * 2 (review-story ~2% per story)</action>
|
||||
|
||||
<template-output file="{{status_file_path}}">decisions_log</template-output>
|
||||
<action>Add entry:</action>
|
||||
```
|
||||
- **{{date}}**: Completed review-story for Story {{epic_num}}.{{story_num}}. Review outcome: {{outcome}}. Action items: {{action_item_count}}. Next: Address review feedback if needed, then continue with story-approved when ready.
|
||||
```
|
||||
|
||||
<output>**✅ Story Review Complete**
|
||||
|
||||
**Story Details:**
|
||||
- Story: {{epic_num}}.{{story_num}}
|
||||
- Review Outcome: {{outcome}}
|
||||
- Action Items: {{action_item_count}}
|
||||
|
||||
**Status file updated:**
|
||||
- Current step: review-story (Story {{epic_num}}.{{story_num}}) ✓
|
||||
- Progress: {{new_progress_percentage}}%
|
||||
|
||||
**Next Steps:**
|
||||
1. Review the Senior Developer Review notes appended to story
|
||||
2. Address any action items or changes requested
|
||||
3. When ready, run `story-approved` to mark story complete
|
||||
|
||||
Check status anytime with: `workflow-status`
|
||||
</output>
|
||||
</check>
|
||||
|
||||
<check if="status file not found">
|
||||
<output>**✅ Story Review Complete**
|
||||
|
||||
**Story Details:**
|
||||
- Story: {{epic_num}}.{{story_num}}
|
||||
- Review Outcome: {{outcome}}
|
||||
|
||||
Note: Running in standalone mode (no status file).
|
||||
|
||||
**Next Steps:**
|
||||
1. Review the Senior Developer Review notes
|
||||
2. Address any action items
|
||||
</output>
|
||||
</check>
|
||||
</step>
|
||||
|
||||
</workflow>
|
||||
```
|
||||
````
|
||||
|
||||
@@ -149,7 +149,7 @@ If BACKLOG had 1 story and is now empty:
|
||||
|
||||
</step>
|
||||
|
||||
<step n="4" goal="Update Decision Log and Next Action">
|
||||
<step n="4" goal="Update Decision Log, Progress, and Next Action">
|
||||
|
||||
<action>Add to "## Decision Log" section:</action>
|
||||
|
||||
@@ -157,6 +157,19 @@ If BACKLOG had 1 story and is now empty:
|
||||
- **{{date}}**: Story {{current_story_id}} ({{current_story_title}}) approved and marked done by DEV agent. Moved from IN PROGRESS → DONE. {{#if todo_story}}Story {{todo_story_id}} moved from TODO → IN PROGRESS.{{/if}} {{#if next_backlog_story}}Story {{next_backlog_story_id}} moved from BACKLOG → TODO.{{/if}}
|
||||
```
|
||||
|
||||
<template-output file="{{status_file_path}}">current_step</template-output>
|
||||
<action>Set to: "story-approved (Story {{current_story_id}})"</action>
|
||||
|
||||
<template-output file="{{status_file_path}}">current_workflow</template-output>
|
||||
<action>Set to: "story-approved (Story {{current_story_id}}) - Complete"</action>
|
||||
|
||||
<template-output file="{{status_file_path}}">progress_percentage</template-output>
|
||||
<action>Calculate per-story weight: remaining_40_percent / total_stories / 5</action>
|
||||
<action>Increment by: {{per_story_weight}} \* 1 (story-approved weight is ~1% per story)</action>
|
||||
<check if="all stories complete">
|
||||
<action>Set progress_percentage = 100%</action>
|
||||
</check>
|
||||
|
||||
<action>Update "### Next Action Required" section:</action>
|
||||
|
||||
<check if="todo_story exists">
|
||||
|
||||
@@ -1,13 +1,65 @@
|
||||
<!-- BMAD BMM Story Context Assembly Instructions (v6) -->
|
||||
|
||||
```xml
|
||||
````xml
|
||||
<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>
|
||||
<critical>This workflow assembles a Story Context XML for a single user story by extracting ACs, tasks, relevant docs/code, interfaces, constraints, and testing guidance to support implementation.</critical>
|
||||
<critical>Default execution mode: #yolo (non-interactive). Only ask if {{non_interactive}} == false. If auto-discovery fails, HALT and request 'story_path' or 'story_dir'.</critical>
|
||||
|
||||
<workflow>
|
||||
<step n="1" goal="Locate story and initialize output">
|
||||
<step n="1" goal="Check and load workflow status file">
|
||||
<action>Search {output_folder}/ for files matching pattern: project-workflow-status*.md</action>
|
||||
<action>Find the most recent file (by date in filename: project-workflow-status-YYYY-MM-DD.md)</action>
|
||||
|
||||
<check if="exists">
|
||||
<action>Load the status file</action>
|
||||
<action>Extract key information:</action>
|
||||
- current_step: What workflow was last run
|
||||
- next_step: What workflow should run next
|
||||
- planned_workflow: The complete workflow journey table
|
||||
- progress_percentage: Current progress
|
||||
- IN PROGRESS story: The story being worked on (from Implementation Progress section)
|
||||
|
||||
<action>Set status_file_found = true</action>
|
||||
<action>Store status_file_path for later updates</action>
|
||||
|
||||
<check if='next_step != "story-context" AND current_step != "story-ready"'>
|
||||
<ask>**⚠️ Workflow Sequence Note**
|
||||
|
||||
Status file shows:
|
||||
- Current step: {{current_step}}
|
||||
- Expected next: {{next_step}}
|
||||
|
||||
This workflow (story-context) is typically run after story-ready.
|
||||
|
||||
Options:
|
||||
1. Continue anyway (story-context is optional)
|
||||
2. Exit and run the expected workflow: {{next_step}}
|
||||
3. Check status with workflow-status
|
||||
|
||||
What would you like to do?</ask>
|
||||
<action>If user chooses exit → HALT with message: "Run workflow-status to see current state"</action>
|
||||
</check>
|
||||
</check>
|
||||
|
||||
<check if="not exists">
|
||||
<ask>**No workflow status file found.**
|
||||
|
||||
The status file tracks progress across all workflows and provides context about which story to work on.
|
||||
|
||||
Options:
|
||||
1. Run workflow-status first to create the status file (recommended)
|
||||
2. Continue in standalone mode (no progress tracking)
|
||||
3. Exit
|
||||
|
||||
What would you like to do?</ask>
|
||||
<action>If user chooses option 1 → HALT with message: "Please run workflow-status first, then return to story-context"</action>
|
||||
<action>If user chooses option 2 → Set standalone_mode = true and continue</action>
|
||||
<action>If user chooses option 3 → HALT</action>
|
||||
</check>
|
||||
</step>
|
||||
|
||||
<step n="2" goal="Locate story and initialize output">
|
||||
<action>If {{story_path}} provided and valid → use it; else auto-discover from {{story_dir}}.</action>
|
||||
<action>Auto-discovery: read {{story_dir}} (dev_story_location). If invalid/missing or contains no .md files, ASK for a story file path or directory to scan.</action>
|
||||
<action>If a directory is provided, list markdown files named "story-*.md" recursively; sort by last modified time; display top {{story_selection_limit}} with index, filename, path, modified time.</action>
|
||||
@@ -21,7 +73,7 @@
|
||||
<template-output file="{default_output_file}">so_that</template-output>
|
||||
</step>
|
||||
|
||||
<step n="2" goal="Collect relevant documentation">
|
||||
<step n="3" goal="Collect relevant documentation">
|
||||
<action>Scan docs and src module docs for items relevant to this story's domain: search keywords from story title, ACs, and tasks<</action>
|
||||
<action>Prefer authoritative sources: PRD, Architecture, Front-end Spec, Testing standards, module-specific docs.</action>
|
||||
<template-output file="{default_output_file}">
|
||||
@@ -29,7 +81,7 @@
|
||||
</template-output>
|
||||
</step>
|
||||
|
||||
<step n="3" goal="Analyze existing code, interfaces, and constraints">
|
||||
<step n="4" goal="Analyze existing code, interfaces, and constraints">
|
||||
<action>Search source tree for modules, files, and symbols matching story intent and AC keywords (controllers, services, components, tests).</action>
|
||||
<action>Identify existing interfaces/APIs the story should reuse rather than recreate.</action>
|
||||
<action>Extract development constraints from Dev Notes and architecture (patterns, layers, testing requirements).</action>
|
||||
@@ -40,7 +92,7 @@
|
||||
</template-output>
|
||||
</step>
|
||||
|
||||
<step n="4" goal="Gather dependencies and frameworks">
|
||||
<step n="5" goal="Gather dependencies and frameworks">
|
||||
<action>Detect dependency manifests and frameworks in the repo:
|
||||
- Node: package.json (dependencies/devDependencies)
|
||||
- Python: pyproject.toml/requirements.txt
|
||||
@@ -52,7 +104,7 @@
|
||||
</template-output>
|
||||
</step>
|
||||
|
||||
<step n="5" goal="Testing standards and ideas">
|
||||
<step n="6" goal="Testing standards and ideas">
|
||||
<action>From Dev Notes, architecture docs, testing docs, and existing tests, extract testing standards (frameworks, patterns, locations).</action>
|
||||
<template-output file="{default_output_file}">
|
||||
Populate tests.standards with a concise paragraph
|
||||
@@ -61,16 +113,77 @@
|
||||
</template-output>
|
||||
</step>
|
||||
|
||||
<step n="6" goal="Validate and save">
|
||||
<step n="7" goal="Validate and save">
|
||||
<action>Validate output XML structure and content.</action>
|
||||
<invoke-task>Validate against checklist at {installed_path}/checklist.md using bmad/core/tasks/validate-workflow.xml</invoke-task>
|
||||
</step>
|
||||
|
||||
<step n="7" goal="Update story status and context reference">
|
||||
<step n="8" goal="Update story status and context reference">
|
||||
<action>Open {{story_path}}; if Status == 'Draft' then set to 'ContextReadyDraft'; otherwise leave unchanged.</action>
|
||||
<action>Under 'Dev Agent Record' → 'Context Reference' (create if missing), add or update a list item for {default_output_file}.</action>
|
||||
<action>Save the story file.</action>
|
||||
</step>
|
||||
|
||||
<step n="9" goal="Update status file on completion">
|
||||
<action>Search {output_folder}/ for files matching pattern: project-workflow-status*.md</action>
|
||||
<action>Find the most recent file (by date in filename)</action>
|
||||
|
||||
<check if="status file exists">
|
||||
<action>Load the status file</action>
|
||||
|
||||
<template-output file="{{status_file_path}}">current_step</template-output>
|
||||
<action>Set to: "story-context (Story {{story_id}})"</action>
|
||||
|
||||
<template-output file="{{status_file_path}}">current_workflow</template-output>
|
||||
<action>Set to: "story-context (Story {{story_id}}) - Complete"</action>
|
||||
|
||||
<template-output file="{{status_file_path}}">progress_percentage</template-output>
|
||||
<action>Calculate per-story weight: remaining_40_percent / total_stories / 5</action>
|
||||
<action>Increment by: {{per_story_weight}} * 1 (story-context weight is ~1% per story)</action>
|
||||
|
||||
<template-output file="{{status_file_path}}">decisions_log</template-output>
|
||||
<action>Add entry:</action>
|
||||
```
|
||||
- **{{date}}**: Completed story-context for Story {{story_id}} ({{story_title}}). Context file: {{default_output_file}}. Next: DEV agent should run dev-story to implement.
|
||||
```
|
||||
|
||||
<output>**✅ Story Context Generated Successfully**
|
||||
|
||||
**Story Details:**
|
||||
- Story ID: {{story_id}}
|
||||
- Title: {{story_title}}
|
||||
- Context File: {{default_output_file}}
|
||||
|
||||
**Status file updated:**
|
||||
- Current step: story-context (Story {{story_id}}) ✓
|
||||
- Progress: {{new_progress_percentage}}%
|
||||
|
||||
**Next Steps:**
|
||||
1. Load DEV agent (bmad/bmm/agents/dev.md)
|
||||
2. Run `dev-story` workflow to implement the story
|
||||
3. The context file will provide comprehensive implementation guidance
|
||||
|
||||
Check status anytime with: `workflow-status`
|
||||
</output>
|
||||
</check>
|
||||
|
||||
<check if="status file not found">
|
||||
<output>**✅ Story Context Generated Successfully**
|
||||
|
||||
**Story Details:**
|
||||
- Story ID: {{story_id}}
|
||||
- Title: {{story_title}}
|
||||
- Context File: {{default_output_file}}
|
||||
|
||||
Note: Running in standalone mode (no status file).
|
||||
|
||||
To track progress across workflows, run `workflow-status` first.
|
||||
|
||||
**Next Steps:**
|
||||
1. Load DEV agent and run `dev-story` to implement
|
||||
</output>
|
||||
</check>
|
||||
</step>
|
||||
|
||||
</workflow>
|
||||
```
|
||||
````
|
||||
|
||||
@@ -92,7 +92,7 @@ If BACKLOG had 1 story and is now empty:
|
||||
|
||||
</step>
|
||||
|
||||
<step n="4" goal="Update Decision Log and Next Action">
|
||||
<step n="4" goal="Update Decision Log, Progress, and Next Action">
|
||||
|
||||
<action>Add to "## Decision Log" section:</action>
|
||||
|
||||
@@ -100,6 +100,16 @@ If BACKLOG had 1 story and is now empty:
|
||||
- **{{date}}**: Story {{todo_story_id}} ({{todo_story_title}}) marked ready for development by SM agent. Moved from TODO → IN PROGRESS. {{#if next_story}}Next story {{next_story_id}} moved from BACKLOG → TODO.{{/if}}
|
||||
```
|
||||
|
||||
<template-output file="{{status_file_path}}">current_step</template-output>
|
||||
<action>Set to: "story-ready (Story {{todo_story_id}})"</action>
|
||||
|
||||
<template-output file="{{status_file_path}}">current_workflow</template-output>
|
||||
<action>Set to: "story-ready (Story {{todo_story_id}}) - Complete"</action>
|
||||
|
||||
<template-output file="{{status_file_path}}">progress_percentage</template-output>
|
||||
<action>Calculate per-story weight: remaining_40_percent / total_stories / 5</action>
|
||||
<action>Increment by: {{per_story_weight}} \* 1 (story-ready weight is ~1% per story)</action>
|
||||
|
||||
<action>Update "### Next Action Required" section:</action>
|
||||
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user