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

@@ -11,60 +11,75 @@
<critical>Routes to 3-solutioning for architecture (platform-specific decisions handled there)</critical>
<critical>If users mention technical details, append to technical_preferences with timestamp</critical>
<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 GDD workflow requires an existing workflow status file to understand your project context.
The GDD 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 GDD.
</output>
<action>Exit workflow - cannot proceed without status file</action>
</check>
<check if="exists">
<action>Load status file and proceed to Step 1</action>
</check>
<check if="status_exists == true">
<action>Store {{status_file_path}} for later updates</action>
<check if="project_type != 'game'">
<output>**Incorrect Workflow for Software Projects**
Your project is type: {{project_type}}
**Correct workflows for software projects:**
- Level 0-1: `tech-spec` (Architect agent)
- Level 2-4: `prd` (PM agent)
{{#if project_level <= 1}}
Use: `tech-spec`
{{else}}
Use: `prd`
{{/if}}
</output>
<action>Exit and redirect to appropriate workflow</action>
</check>
</check>
</step>
<step n="0.5" goal="Validate workflow sequencing">
<invoke-workflow path="{project-root}/bmad/bmm/workflows/1-analysis/workflow-status">
<param>mode: validate</param>
<param>calling_workflow: gdd</param>
</invoke-workflow>
<check if="warning != ''">
<output>{{warning}}</output>
<ask>Continue with GDD anyway? (y/n)</ask>
<check if="n">
<output>{{suggestion}}</output>
<action>Exit workflow</action>
</check>
</check>
</step>
<step n="1" goal="Load context and determine game type">
<action>Load bmm-workflow-status.md</action>
<action>Confirm project_type == "game"</action>
<check if="project_type != game">
<error>This workflow is for game projects only. Software projects should use PRD or tech-spec workflows.</error>
<output>**Incorrect Workflow for Software Projects**
Your status file indicates project_type: {{project_type}}
**Correct workflows for software projects:**
- Level 0-1: `tech-spec` (run with Architect agent)
- Level 2-4: `prd` (run with PM agent)
{{#if project_level <= 1}}
Run: `bmad architect tech-spec`
{{else}}
Run: `bmad pm prd`
{{/if}}
</output>
<action>Exit and redirect user to appropriate software workflow</action>
</check>
<action>Use {{project_type}} and {{project_level}} from status data</action>
<check if="continuation_mode == true">
<action>Load existing GDD.md and check completion status</action>
@@ -306,7 +321,30 @@ For each {{placeholder}} in the fragment, elicit and capture that information.
</step>
<step n="15" goal="Generate solutioning handoff and next steps">
<step n="15" goal="Update status and populate story sequence">
<action>Load {{status_file_path}}</action>
<template-output file="{{status_file_path}}">current_workflow</template-output>
<action>Set to: "gdd - Complete"</action>
<template-output file="{{status_file_path}}">phase_2_complete</template-output>
<action>Set to: true</action>
<template-output file="{{status_file_path}}">progress_percentage</template-output>
<action>Increment appropriately based on level</action>
<template-output file="{{status_file_path}}">decisions_log</template-output>
<action>Add entry: "- **{{date}}**: Completed GDD workflow. Created bmm-GDD.md and bmm-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>
</step>
<step n="16" goal="Generate solutioning handoff and next steps">
<action>Check if game-type fragment contained narrative tags indicating narrative importance</action>

View File

@@ -10,6 +10,23 @@
<critical>If users mention gameplay mechanics, note them but keep focus on narrative</critical>
<critical>Facilitate good brainstorming techniques throughout with the user, pushing them to come up with much of the narrative you will help weave together. The goal is for the user to feel that they crafted the narrative and story arc unless they push you to do it all or indicate YOLO</critical>
<step n="0" goal="Check for workflow status">
<invoke-workflow path="{project-root}/bmad/bmm/workflows/1-analysis/workflow-status">
<param>mode: init-check</param>
</invoke-workflow>
<check if="status_exists == true">
<action>Store {{status_file_path}} for later updates</action>
<action>Set tracking_mode = true</action>
</check>
<check if="status_exists == false">
<action>Set tracking_mode = false</action>
<output>Note: Running without workflow tracking. Run `workflow-init` to enable progress tracking.</output>
</check>
</step>
<step n="1" goal="Load GDD context and assess narrative complexity">
<action>Load GDD.md from {output_folder}</action>
@@ -522,4 +539,21 @@ Which would you like?</ask>
</step>
<step n="17" goal="Update status if tracking enabled">
<check if="tracking_mode == true">
<action>Load {{status_file_path}}</action>
<template-output file="{{status_file_path}}">current_workflow</template-output>
<action>Set to: "narrative - Complete"</action>
<template-output file="{{status_file_path}}">decisions_log</template-output>
<action>Add entry: "- **{{date}}**: Completed narrative workflow. Created bmm-narrative-design.md with detailed story and character documentation."</action>
<action>Save {{status_file_path}}</action>
<output>Status tracking updated.</output>
</check>
</step>
</workflow>

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>

View File

@@ -10,74 +10,90 @@
<critical>Project analysis already completed - proceeding directly to technical specification</critical>
<critical>NO PRD generated - uses tech_spec_template + story templates</critical>
<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 tech-spec workflow requires an existing workflow status file to understand your project context.
The tech-spec 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 tech spec.
</output>
<action>Exit workflow - cannot proceed without status file</action>
</check>
<check if="exists">
<action>Load status file and 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}}**
Tech-spec is for Level 0-1 projects. Level 2-4 should use PRD workflow.
**Correct workflow:** `prd` (PM agent)
</output>
<action>Exit and redirect to prd</action>
</check>
<check if="project_type == game">
<output>**Incorrect Workflow for Game Projects**
Game projects should use GDD workflow instead of tech-spec.
**Correct workflow:** `gdd` (PM agent)
</output>
<action>Exit and redirect to gdd</action>
</check>
</check>
</step>
<step n="0.5" goal="Validate workflow sequencing">
<invoke-workflow path="{project-root}/bmad/bmm/workflows/1-analysis/workflow-status">
<param>mode: validate</param>
<param>calling_workflow: tech-spec</param>
</invoke-workflow>
<check if="warning != ''">
<output>{{warning}}</output>
<ask>Continue with tech-spec anyway? (y/n)</ask>
<check if="n">
<output>{{suggestion}}</output>
<action>Exit workflow</action>
</check>
</check>
</step>
<step n="1" goal="Confirm project scope and update tracking">
<action>Load bmm-workflow-status.md from {output_folder}/bmm-workflow-status.md</action>
<action>Verify project_level is 0 or 1</action>
<action>Use {{project_level}} from status data</action>
<check if="project_level >= 2">
<error>This workflow is for Level 0-1 only. Level 2-4 should use PRD workflow.</error>
<output>**Incorrect Workflow for Your Level**
Your status file indicates Level {{project_level}}.
**Correct workflow:** `prd` (run with PM agent)
Run: `bmad pm prd`
</output>
<action>Exit and redirect user to prd workflow</action>
</check>
<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>
<action>Update Workflow Status Tracker:</action>
<action>Update Workflow Status:</action>
<template-output file="{{status_file_path}}">current_workflow</template-output>
<check if="project_level == 0">
<action>Set current_workflow = "tech-spec (Level 0 - generating tech spec)"</action>
<action>Set to: "tech-spec (Level 0 - generating tech spec)"</action>
</check>
<check if="project_level == 1">
<action>Set current_workflow = "tech-spec (Level 1 - generating tech spec)"</action>
<action>Set to: "tech-spec (Level 1 - generating tech spec)"</action>
</check>
<action>Set progress_percentage = 20%</action>
<action>Save bmm-workflow-status.md</action>
<template-output file="{{status_file_path}}">progress_percentage</template-output>
<action>Set to: 20%</action>
<action>Save {{status_file_path}}</action>
<check if="project_level == 0">
<action>Confirm Level 0 - Single atomic change</action>
@@ -96,9 +112,10 @@ Run: `bmad pm gdd`
<critical>Generate tech-spec.md - this is the TECHNICAL SOURCE OF TRUTH</critical>
<critical>ALL TECHNICAL DECISIONS MUST BE DEFINITIVE - NO AMBIGUITY ALLOWED</critical>
<action>Update progress in bmm-workflow-status.md:</action>
<action>Set progress_percentage = 40%</action>
<action>Save bmm-workflow-status.md</action>
<action>Update progress:</action>
<template-output file="{{status_file_path}}">progress_percentage</template-output>
<action>Set to: 40%</action>
<action>Save {{status_file_path}}</action>
<action>Initialize and write out tech-spec.md using tech_spec_template</action>
@@ -164,7 +181,7 @@ Run cohesion validation? (y/n)</ask>
<step n="4" goal="Generate user stories based on project level">
<action>Load bmm-workflow-status.md to determine project_level</action>
<action>Use {{project_level}} from status data</action>
<check if="project_level == 0">
<action>Invoke instructions-level0-story.md to generate single user story</action>

View File

@@ -9,6 +9,23 @@
<critical>Uses ux-spec-template.md for structured output generation</critical>
<critical>Can optionally generate AI Frontend Prompts for tools like Vercel v0, Lovable.ai</critical>
<step n="0" goal="Check for workflow status">
<invoke-workflow path="{project-root}/bmad/bmm/workflows/1-analysis/workflow-status">
<param>mode: init-check</param>
</invoke-workflow>
<check if="status_exists == true">
<action>Store {{status_file_path}} for later updates</action>
<action>Set tracking_mode = true</action>
</check>
<check if="status_exists == false">
<action>Set tracking_mode = false</action>
<output>Note: Running without workflow tracking. Run `workflow-init` to enable progress tracking.</output>
</check>
</step>
<step n="1" goal="Load context and analyze project requirements">
<action>Determine workflow mode (standalone or integrated)</action>
@@ -367,4 +384,21 @@ Select option (1-3):</ask>
</step>
<step n="12" goal="Update status if tracking enabled">
<check if="tracking_mode == true">
<action>Load {{status_file_path}}</action>
<template-output file="{{status_file_path}}">current_workflow</template-output>
<action>Set to: "ux - Complete"</action>
<template-output file="{{status_file_path}}">decisions_log</template-output>
<action>Add entry: "- **{{date}}**: Completed UX workflow. Created bmm-ux-spec.md with comprehensive UX/UI specifications."</action>
<action>Save {{status_file_path}}</action>
<output>Status tracking updated.</output>
</check>
</step>
</workflow>