arch alignment with workflows

This commit is contained in:
Brian Madison
2025-10-17 16:44:06 -05:00
parent 9519eae666
commit ffd354b605
20 changed files with 2111 additions and 1247 deletions

View File

@@ -9,66 +9,76 @@
<workflow>
<step n="0" goal="Check for workflow status file - REQUIRED">
<step n="0" goal="Validate workflow and extract project configuration">
<action>Check if bmm-workflow-status.md exists in {output_folder}/</action>
<invoke-workflow path="{project-root}/bmad/bmm/workflows/1-analysis/workflow-status">
<param>mode: data</param>
<param>data_request: project_config</param>
</invoke-workflow>
<check if="not exists">
<check if="status_exists == false">
<output>**⚠️ No Workflow Status File Found**
The PRD workflow requires an existing workflow status file to understand your project context.
The PRD workflow requires a status file to understand your project context.
Please run `workflow-status` first to:
Please run `workflow-init` first to:
- Map out your complete workflow journey
- Determine project type and level
- Create the status file with your planned workflow
- Define your project type and level
- Map out your workflow journey
- Create the status file
**To proceed:**
Run: `workflow-init`
Run: `bmad analyst workflow-status`
After completing workflow planning, you'll be directed back to this workflow.
After setup, return here to create your PRD.
</output>
<action>Exit workflow - cannot proceed without status file</action>
</check>
<check if="exists">
<action>Load status file: {status_file}</action>
<action>Proceed to Step 1</action>
<check if="status_exists == true">
<action>Store {{status_file_path}} for later updates</action>
<check if="project_level < 2">
<output>**Incorrect Workflow for Level {{project_level}}**
PRD is for Level 2-4 projects. Level 0-1 should use tech-spec directly.
**Correct workflow:** `tech-spec` (Architect agent)
</output>
<action>Exit and redirect to tech-spec</action>
</check>
<check if="project_type == game">
<output>**Incorrect Workflow for Game Projects**
Game projects should use GDD workflow instead of PRD.
**Correct workflow:** `gdd` (PM agent)
</output>
<action>Exit and redirect to gdd</action>
</check>
</check>
</step>
<step n="1" goal="Initialize and load context">
<step n="0.5" goal="Validate workflow sequencing">
<action>Extract project context from status file</action>
<action>Verify project_level is 2, 3, or 4</action>
<invoke-workflow path="{project-root}/bmad/bmm/workflows/1-analysis/workflow-status">
<param>mode: validate</param>
<param>calling_workflow: prd</param>
</invoke-workflow>
<check if="project_level < 2">
<error>This workflow is for Level 2-4 only. Level 0-1 should use tech-spec workflow.</error>
<output>**Incorrect Workflow for Your Level**
Your status file indicates Level {{project_level}}.
**Correct workflow:** `tech-spec` (run with Architect agent)
Run: `bmad architect tech-spec`
</output>
<action>Exit and redirect user to tech-spec workflow</action>
<check if="warning != ''">
<output>{{warning}}</output>
<ask>Continue with PRD anyway? (y/n)</ask>
<check if="n">
<output>{{suggestion}}</output>
<action>Exit workflow</action>
</check>
</check>
</step>
<check if="project_type == game">
<error>This workflow is for software projects. Game projects should use GDD workflow.</error>
<output>**Incorrect Workflow for Game Projects**
**Correct workflow:** `gdd` (run with PM agent)
Run: `bmad pm gdd`
</output>
<action>Exit and redirect user to gdd workflow</action>
</check>
<step n="1" goal="Initialize PRD context">
<action>Use {{project_level}} from status data</action>
<action>Check for existing PRD.md in {output_folder}</action>
<check if="PRD.md exists">
@@ -392,39 +402,53 @@ For each epic from the epic list, expand with full story details:
</step>
<step n="10" goal="Update workflow status and complete">
<step n="10" goal="Update status and complete">
<action>Update {status_file} with completion status</action>
<action>Load {{status_file_path}}</action>
<template-output file="bmm-workflow-status.md">prd_completion_update</template-output>
<template-output file="{{status_file_path}}">current_workflow</template-output>
<action>Set to: "prd - Complete"</action>
**✅ PRD Workflow Complete, {user_name}!**
<template-output file="{{status_file_path}}">phase_2_complete</template-output>
<action>Set to: true</action>
<template-output file="{{status_file_path}}">decisions_log</template-output>
<action>Add entry: "- **{{date}}**: Completed PRD workflow. Created PRD.md and epics.md with full story breakdown."</action>
<action>Populate STORIES_SEQUENCE from epics.md story list</action>
<action>Count total stories and update story counts</action>
<action>Save {{status_file_path}}</action>
<output>**✅ PRD Workflow Complete, {user_name}!**
**Deliverables Created:**
1. ✅ PRD.md - Strategic product requirements document
2. ✅ epics.md - Tactical implementation roadmap with story breakdown
1. ✅ bmm-PRD.md - Strategic product requirements document
2. ✅ bmm-epics.md - Tactical implementation roadmap with story breakdown
**Next Steps:**
<check if="level == 2">
- Review PRD and epics with stakeholders
- **Next:** Run tech-spec workflow for lightweight technical planning
- Then proceed to implementation (create-story workflow)
</check>
{{#if project_level == 2}}
<check if="level >= 3">
- Review PRD and epics with stakeholders
- **Next:** Run solution-architecture workflow for full technical design
- Then proceed to implementation (create-story workflow)
</check>
- Review PRD and epics with stakeholders
- **Next:** Run `tech-spec` for lightweight technical planning
- Then proceed to implementation
{{/if}}
<ask>Would you like to:
{{#if project_level >= 3}}
- Review PRD and epics with stakeholders
- **Next:** Run `solution-architecture` for full technical design
- Then proceed to implementation
{{/if}}
Would you like to:
1. Review/refine any section
2. Proceed to next phase (tech-spec for Level 2, solution-architecture for Level 3-4)
2. Proceed to next phase
3. Exit and review documents
</ask>
</output>
</step>