BMAD-METHOD/src/core/tasks/workflow.xml

269 lines
14 KiB
XML
Raw Normal View History

<task id="{bmad_folder}/core/tasks/workflow.xml" name="Execute Workflow">
<objective>Execute given workflow by loading its configuration, following instructions, and producing output</objective>
<llm critical="true">
<mandate>Always read COMPLETE files - NEVER use offset/limit when reading any workflow related files</mandate>
<mandate>Instructions are MANDATORY - either as file path, steps or embedded list in YAML, XML or markdown</mandate>
<mandate>Execute ALL steps in instructions IN EXACT ORDER</mandate>
<mandate>Save to template output file after EVERY "template-output" tag</mandate>
<mandate>NEVER delegate a step - YOU are responsible for every steps execution</mandate>
</llm>
<WORKFLOW-RULES critical="true">
<rule n="1">Steps execute in exact numerical order (1, 2, 3...)</rule>
<rule n="2">Optional steps: Ask user unless #yolo mode active</rule>
<rule n="3">Template-output tags: Save content → Show user → Get approval before continuing</rule>
refactor: comprehensive workflow modernization and standardization ## Major Improvements ### 1. Elicitation System Modernization - Removed legacy `<elicit-required />` tag from workflow.xml - Replaced with direct `<invoke-task halt="true">{project-root}/bmad/core/tasks/adv-elicit.xml</invoke-task>` pattern - More explicit, self-documenting, and eliminates indirection layer - Added strategic elicitation points across all planning workflows: - PRD: After success criteria, scope, functional requirements, and final review - Create-Epics-And-Stories: After epic proposals and each epic's stories - Architecture: After decisions, structure, patterns, implementation patterns, and final doc - Updated audit-workflow tag scanner to remove obsolete elicit-required reference ### 2. Input Document Discovery Streamlined - Replaced verbose 19-line "Input Document Discovery" sections with single critical tag - New format: `<critical>Input documents specified in workflow.yaml input_file_patterns...</critical>` - Eliminates duplication - workflow.yaml already defines patterns - Updated across 6 workflows (PRD, create-epics-and-stories, architecture, tech-spec, UX, gate-check) - Saved ~114 lines of repeated bloat ### 3. Scale System Migration (Levels 0-4 → 3 Tracks) - Updated PRD workflow from "Level 0-4" to "Quick Flow / BMad Method / Enterprise Method" - Changed `project_level` variable to `project_track` - Removed `target_scale` variable (no longer needed) - Updated workflow.yaml descriptions to reference tracks not levels - Updated checklist from "Level 2" and "Level 3-4" to "BMad Method" and "Enterprise Method" - Aligns with new scale-adaptive-system.md (3-track methodology) ### 4. Epic/Story Template Standardization - Replaced hardcoded 8-epic template with clean repeating pattern using N/M variables - Added BDD-style acceptance criteria (Given/When/Then/And) - Removed instructional bloat from templates (moved to instructions.md where it belongs) - Template shows OUTPUT structure, instructions show PROCESS - Applied to both create-epics-and-stories and tech-spec workflows - Templates now use HTML comments to indicate repeating sections ### 5. Workflow.yaml Pattern Consistency - Standardized input_file_patterns across all workflows - Separated `recommended_inputs` (semantic WHAT) from `input_file_patterns` (file discovery WHERE) - Removed duplication between recommended_inputs file paths and input_file_patterns - Create-epics-and-stories now uses proper whole/sharded pattern like architecture workflow - Solutioning-gate-check cleaned up to use semantic descriptions not file paths ## Files Changed (18) - Core: workflow.xml (removed elicit-required tag and references) - Audit workflow: Updated tag pattern scanner - PRD workflow: Elicitation points, track migration, input discovery - Create-epics-and-stories: Template rebuild, BDD format, elicitation, input patterns - Tech-spec: Template rebuild, BDD format, input discovery - UX Design: Input discovery streamlined - Architecture: Elicitation at 5 key decision points, input discovery - Gate-check: Input pattern cleanup, input discovery ## Impact - More consistent elicitation across workflows - Cleaner, more maintainable templates - Better separation of concerns (templates vs instructions) - Aligned with v6 3-track scale system - Reduced bloat and duplication significantly
2025-11-04 00:09:19 -06:00
<rule n="4">User must approve each major section before continuing UNLESS #yolo mode active</rule>
</WORKFLOW-RULES>
<flow>
<step n="1" title="Load and Initialize Workflow">
<substep n="1a" title="Load Configuration and Resolve Variables">
<action>Read workflow.yaml from provided path</action>
<mandate>Load config_source (REQUIRED for all modules)</mandate>
<phase n="1">Load external config from config_source path</phase>
<phase n="2">Resolve all {config_source}: references with values from config</phase>
<phase n="3">Resolve system variables (date:system-generated) and paths ({project-root}, {installed_path})</phase>
<phase n="4">Ask user for input of any variables that are still unknown</phase>
</substep>
<substep n="1b" title="Load Required Components">
<mandate>Instructions: Read COMPLETE file from path OR embedded list (REQUIRED)</mandate>
<check>If template path → Read COMPLETE template file</check>
<check>If validation path → Note path for later loading when needed</check>
<check>If template: false → Mark as action-workflow (else template-workflow)</check>
<note>Data files (csv, json) → Store paths only, load on-demand when instructions reference them</note>
</substep>
<substep n="1c" title="Initialize Output" if="template-workflow">
<action>Resolve default_output_file path with all variables and {{date}}</action>
<action>Create output directory if doesn't exist</action>
<action>If template-workflow → Write template to output file with placeholders</action>
<action>If action-workflow → Skip file creation</action>
</substep>
</step>
<step n="2" title="Process Each Instruction Step">
<iterate>For each step in instructions:</iterate>
<substep n="2a" title="Handle Step Attributes">
<check>If optional="true" and NOT #yolo → Ask user to include</check>
<check>If if="condition" → Evaluate condition</check>
<check>If for-each="item" → Repeat step for each item</check>
<check>If repeat="n" → Repeat step n times</check>
</substep>
<substep n="2b" title="Execute Step Content">
<action>Process step instructions (markdown or XML tags)</action>
<action>Replace {{variables}} with values (ask user if unknown)</action>
<execute-tags>
<tag>action xml tag → Perform the action</tag>
<tag>check if="condition" xml tag → Conditional block wrapping actions (requires closing &lt;/check&gt;)</tag>
<tag>ask xml tag → Prompt user and WAIT for response</tag>
<tag>invoke-workflow xml tag → Execute another workflow with given inputs</tag>
<tag>invoke-task xml tag → Execute specified task</tag>
feat(workflows): Implement intelligent file discovery protocol and Phase 4 BMGD workflows ## Core Workflow Engine Enhancements ### discover_inputs Protocol (MAJOR) - Added reusable `discover_inputs` protocol to workflow.xml for intelligent file loading - Supports three loading strategies: - FULL_LOAD: Load all shards for PRD, Architecture, UX (changed pattern from /index.md to /*/*.md) - SELECTIVE_LOAD: Load specific shard via template variable (e.g., epic-{{epic_num}}.md) - INDEX_GUIDED: Load index, analyze TOC, intelligently load relevant docs (with "DO NOT BE LAZY" mandate) - Auto-discovers whole vs sharded documents with proper fallback - Provides transparent reporting of loaded content with file counts - Invoked via <invoke-protocol name="discover_inputs" /> tag in workflow instructions ### Advanced Elicitation Improvements - Renamed adv-elicit.xml to advanced-elicitation.xml for clarity - Updated all references across agents and commands ### Shard Document Tool Enhancement - Added Step 6: Handle Original Document with three options: - [d] Delete - Remove original (recommended, prevents confusion) - [m] Move to archive - Backup original to archive folder - [k] Keep - Warning about defeating sharding purpose - Prevents issue where both whole and sharded versions exist, confusing discover_inputs protocol ## BMM Module - Input File Pattern Standardization ### Phase 1 - Analysis (1 workflow) - product-brief: Added load_strategy (FULL_LOAD for research/brainstorming, INDEX_GUIDED for document_project) - Updated instructions.md to use invoke-protocol, replaced manual fuzzy matching ### Phase 2 - Planning (4 workflows) - prd: Added load_strategy, updated instructions to reference {product_brief_content}, {research_content} - create-ux-design: Added load_strategy, removed fuzzy matching from instructions - tech-spec: Added load_strategy for brownfield context discovery - All epics patterns updated to support SELECTIVE_LOAD for specific epic shards ### Phase 3 - Solutioning (2 workflows) - architecture: Added load_strategy, updated instructions to use pre-loaded {prd_content}, {epics_content}, {ux_design_content} - solutioning-gate-check: Added load_strategy, replaced manual discovery with protocol invocation ### Phase 4 - Implementation (8 workflows) - code-review: Added load_strategy, fixed sharded patterns to /*/*.md, added step 1.5 for protocol - correct-course: Added complete input_file_patterns section (was missing), added step 0.5 - create-story: Added load_strategy, updated to SELECTIVE_LOAD for epics, added step 1.5 - dev-story: Added complete input_file_patterns section (was missing), added step 0.5 - epic-tech-context: Added load_strategy, updated PRD extraction to use {prd_content}, added step 1.5 - retrospective: Added load_strategy for architecture/prd (FULL_LOAD), epics (SELECTIVE_LOAD), added step 0.5 - sprint-planning: Fixed sharded pattern to load ALL epics (/*/*.md), added step 0.5 - story-context: Added load_strategy, updated doc collection to reference pre-loaded content, added step 1.5 ### Sprint Artifacts Path Corrections - story-done: Added missing sprint_artifacts variable, fixed sprint_status path from {context_dir} to {sprint_artifacts} - story-ready: Added missing sprint_artifacts variable - story-context: Fixed undefined {context_dir} -> {sprint_artifacts} - correct-course: Added sprint_artifacts and sprint_status variables ## BMGD Module - Phase 4 Production Workflows (NEW) Added complete Phase 4 implementation workflows for game development: - code-review: Senior developer review for completed game features - correct-course: Sprint change management for game projects - create-story: Story generation for game mechanics/features - dev-story: Feature implementation workflow - epic-tech-context: Technical spec generation per game epic - retrospective: Epic completion review and lessons learned - sprint-planning: Game development sprint status tracking - story-context: Dynamic context assembly for game stories - story-done: Story completion workflow - story-ready: Story readiness workflow All BMGD workflows follow BMM patterns with game-specific adaptations. ## Agent Updates ### BMM Agents - Updated all 7 BMM agents (analyst, architect, dev, pm, sm, tea, tech-writer, ux-designer) - Standardized web bundle configurations ### BMGD Agents - Updated 4 game development agents (game-architect, game-designer, game-dev, game-scrum-master) - Aligned with BMM agent structure ### CIS Agents - Updated 5 creative intelligence agents for consistency ## Documentation & Configuration - Updated CHANGELOG.md with Phase 4 workflow additions - Updated files-manifest.csv and task-manifest.csv - Updated .claude commands for all agents - Fixed formatting issues from previous commits ## Breaking Changes NONE - All changes are backward compatible. Workflows without input_file_patterns continue to work. Workflows with input_file_patterns now benefit from intelligent auto-loading. ## Migration Notes Existing workflows can gradually adopt discover_inputs protocol by: 1. Adding load_strategy to existing input_file_patterns in workflow.yaml 2. Adding <invoke-protocol name="discover_inputs" /> step in instructions.md 3. Replacing manual file loading with references to {pattern_name_content} variables
2025-11-12 19:18:38 -06:00
<tag>invoke-protocol name="protocol_name" xml tag → Execute reusable protocol from protocols section</tag>
<tag>goto step="x" → Jump to specified step</tag>
</execute-tags>
</substep>
<substep n="2c" title="Handle template-output Tags">
<if tag="template-output">
<mandate>Generate content for this section</mandate>
<mandate>Save to file (Write first time, Edit subsequent)</mandate>
<action>Display generated content</action>
<ask> [a] Advanced Elicitation, [c] Continue, [p] Party-Mode, [y] YOLO the rest of this document only. WAIT for response. <if
response="a">
<action>Start the advanced elicitation workflow {project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml</action>
feat(workflows): Implement intelligent file discovery protocol and Phase 4 BMGD workflows ## Core Workflow Engine Enhancements ### discover_inputs Protocol (MAJOR) - Added reusable `discover_inputs` protocol to workflow.xml for intelligent file loading - Supports three loading strategies: - FULL_LOAD: Load all shards for PRD, Architecture, UX (changed pattern from /index.md to /*/*.md) - SELECTIVE_LOAD: Load specific shard via template variable (e.g., epic-{{epic_num}}.md) - INDEX_GUIDED: Load index, analyze TOC, intelligently load relevant docs (with "DO NOT BE LAZY" mandate) - Auto-discovers whole vs sharded documents with proper fallback - Provides transparent reporting of loaded content with file counts - Invoked via <invoke-protocol name="discover_inputs" /> tag in workflow instructions ### Advanced Elicitation Improvements - Renamed adv-elicit.xml to advanced-elicitation.xml for clarity - Updated all references across agents and commands ### Shard Document Tool Enhancement - Added Step 6: Handle Original Document with three options: - [d] Delete - Remove original (recommended, prevents confusion) - [m] Move to archive - Backup original to archive folder - [k] Keep - Warning about defeating sharding purpose - Prevents issue where both whole and sharded versions exist, confusing discover_inputs protocol ## BMM Module - Input File Pattern Standardization ### Phase 1 - Analysis (1 workflow) - product-brief: Added load_strategy (FULL_LOAD for research/brainstorming, INDEX_GUIDED for document_project) - Updated instructions.md to use invoke-protocol, replaced manual fuzzy matching ### Phase 2 - Planning (4 workflows) - prd: Added load_strategy, updated instructions to reference {product_brief_content}, {research_content} - create-ux-design: Added load_strategy, removed fuzzy matching from instructions - tech-spec: Added load_strategy for brownfield context discovery - All epics patterns updated to support SELECTIVE_LOAD for specific epic shards ### Phase 3 - Solutioning (2 workflows) - architecture: Added load_strategy, updated instructions to use pre-loaded {prd_content}, {epics_content}, {ux_design_content} - solutioning-gate-check: Added load_strategy, replaced manual discovery with protocol invocation ### Phase 4 - Implementation (8 workflows) - code-review: Added load_strategy, fixed sharded patterns to /*/*.md, added step 1.5 for protocol - correct-course: Added complete input_file_patterns section (was missing), added step 0.5 - create-story: Added load_strategy, updated to SELECTIVE_LOAD for epics, added step 1.5 - dev-story: Added complete input_file_patterns section (was missing), added step 0.5 - epic-tech-context: Added load_strategy, updated PRD extraction to use {prd_content}, added step 1.5 - retrospective: Added load_strategy for architecture/prd (FULL_LOAD), epics (SELECTIVE_LOAD), added step 0.5 - sprint-planning: Fixed sharded pattern to load ALL epics (/*/*.md), added step 0.5 - story-context: Added load_strategy, updated doc collection to reference pre-loaded content, added step 1.5 ### Sprint Artifacts Path Corrections - story-done: Added missing sprint_artifacts variable, fixed sprint_status path from {context_dir} to {sprint_artifacts} - story-ready: Added missing sprint_artifacts variable - story-context: Fixed undefined {context_dir} -> {sprint_artifacts} - correct-course: Added sprint_artifacts and sprint_status variables ## BMGD Module - Phase 4 Production Workflows (NEW) Added complete Phase 4 implementation workflows for game development: - code-review: Senior developer review for completed game features - correct-course: Sprint change management for game projects - create-story: Story generation for game mechanics/features - dev-story: Feature implementation workflow - epic-tech-context: Technical spec generation per game epic - retrospective: Epic completion review and lessons learned - sprint-planning: Game development sprint status tracking - story-context: Dynamic context assembly for game stories - story-done: Story completion workflow - story-ready: Story readiness workflow All BMGD workflows follow BMM patterns with game-specific adaptations. ## Agent Updates ### BMM Agents - Updated all 7 BMM agents (analyst, architect, dev, pm, sm, tea, tech-writer, ux-designer) - Standardized web bundle configurations ### BMGD Agents - Updated 4 game development agents (game-architect, game-designer, game-dev, game-scrum-master) - Aligned with BMM agent structure ### CIS Agents - Updated 5 creative intelligence agents for consistency ## Documentation & Configuration - Updated CHANGELOG.md with Phase 4 workflow additions - Updated files-manifest.csv and task-manifest.csv - Updated .claude commands for all agents - Fixed formatting issues from previous commits ## Breaking Changes NONE - All changes are backward compatible. Workflows without input_file_patterns continue to work. Workflows with input_file_patterns now benefit from intelligent auto-loading. ## Migration Notes Existing workflows can gradually adopt discover_inputs protocol by: 1. Adding load_strategy to existing input_file_patterns in workflow.yaml 2. Adding <invoke-protocol name="discover_inputs" /> step in instructions.md 3. Replacing manual file loading with references to {pattern_name_content} variables
2025-11-12 19:18:38 -06:00
</if>
<if
response="c">
<action>Continue to next step</action>
</if>
<if response="p">
<action>Start the party-mode workflow {project-root}/{bmad_folder}/core/workflows/party-mode/workflow.yaml</action>
feat(workflows): Implement intelligent file discovery protocol and Phase 4 BMGD workflows ## Core Workflow Engine Enhancements ### discover_inputs Protocol (MAJOR) - Added reusable `discover_inputs` protocol to workflow.xml for intelligent file loading - Supports three loading strategies: - FULL_LOAD: Load all shards for PRD, Architecture, UX (changed pattern from /index.md to /*/*.md) - SELECTIVE_LOAD: Load specific shard via template variable (e.g., epic-{{epic_num}}.md) - INDEX_GUIDED: Load index, analyze TOC, intelligently load relevant docs (with "DO NOT BE LAZY" mandate) - Auto-discovers whole vs sharded documents with proper fallback - Provides transparent reporting of loaded content with file counts - Invoked via <invoke-protocol name="discover_inputs" /> tag in workflow instructions ### Advanced Elicitation Improvements - Renamed adv-elicit.xml to advanced-elicitation.xml for clarity - Updated all references across agents and commands ### Shard Document Tool Enhancement - Added Step 6: Handle Original Document with three options: - [d] Delete - Remove original (recommended, prevents confusion) - [m] Move to archive - Backup original to archive folder - [k] Keep - Warning about defeating sharding purpose - Prevents issue where both whole and sharded versions exist, confusing discover_inputs protocol ## BMM Module - Input File Pattern Standardization ### Phase 1 - Analysis (1 workflow) - product-brief: Added load_strategy (FULL_LOAD for research/brainstorming, INDEX_GUIDED for document_project) - Updated instructions.md to use invoke-protocol, replaced manual fuzzy matching ### Phase 2 - Planning (4 workflows) - prd: Added load_strategy, updated instructions to reference {product_brief_content}, {research_content} - create-ux-design: Added load_strategy, removed fuzzy matching from instructions - tech-spec: Added load_strategy for brownfield context discovery - All epics patterns updated to support SELECTIVE_LOAD for specific epic shards ### Phase 3 - Solutioning (2 workflows) - architecture: Added load_strategy, updated instructions to use pre-loaded {prd_content}, {epics_content}, {ux_design_content} - solutioning-gate-check: Added load_strategy, replaced manual discovery with protocol invocation ### Phase 4 - Implementation (8 workflows) - code-review: Added load_strategy, fixed sharded patterns to /*/*.md, added step 1.5 for protocol - correct-course: Added complete input_file_patterns section (was missing), added step 0.5 - create-story: Added load_strategy, updated to SELECTIVE_LOAD for epics, added step 1.5 - dev-story: Added complete input_file_patterns section (was missing), added step 0.5 - epic-tech-context: Added load_strategy, updated PRD extraction to use {prd_content}, added step 1.5 - retrospective: Added load_strategy for architecture/prd (FULL_LOAD), epics (SELECTIVE_LOAD), added step 0.5 - sprint-planning: Fixed sharded pattern to load ALL epics (/*/*.md), added step 0.5 - story-context: Added load_strategy, updated doc collection to reference pre-loaded content, added step 1.5 ### Sprint Artifacts Path Corrections - story-done: Added missing sprint_artifacts variable, fixed sprint_status path from {context_dir} to {sprint_artifacts} - story-ready: Added missing sprint_artifacts variable - story-context: Fixed undefined {context_dir} -> {sprint_artifacts} - correct-course: Added sprint_artifacts and sprint_status variables ## BMGD Module - Phase 4 Production Workflows (NEW) Added complete Phase 4 implementation workflows for game development: - code-review: Senior developer review for completed game features - correct-course: Sprint change management for game projects - create-story: Story generation for game mechanics/features - dev-story: Feature implementation workflow - epic-tech-context: Technical spec generation per game epic - retrospective: Epic completion review and lessons learned - sprint-planning: Game development sprint status tracking - story-context: Dynamic context assembly for game stories - story-done: Story completion workflow - story-ready: Story readiness workflow All BMGD workflows follow BMM patterns with game-specific adaptations. ## Agent Updates ### BMM Agents - Updated all 7 BMM agents (analyst, architect, dev, pm, sm, tea, tech-writer, ux-designer) - Standardized web bundle configurations ### BMGD Agents - Updated 4 game development agents (game-architect, game-designer, game-dev, game-scrum-master) - Aligned with BMM agent structure ### CIS Agents - Updated 5 creative intelligence agents for consistency ## Documentation & Configuration - Updated CHANGELOG.md with Phase 4 workflow additions - Updated files-manifest.csv and task-manifest.csv - Updated .claude commands for all agents - Fixed formatting issues from previous commits ## Breaking Changes NONE - All changes are backward compatible. Workflows without input_file_patterns continue to work. Workflows with input_file_patterns now benefit from intelligent auto-loading. ## Migration Notes Existing workflows can gradually adopt discover_inputs protocol by: 1. Adding load_strategy to existing input_file_patterns in workflow.yaml 2. Adding <invoke-protocol name="discover_inputs" /> step in instructions.md 3. Replacing manual file loading with references to {pattern_name_content} variables
2025-11-12 19:18:38 -06:00
</if>
<if
response="y">
feat(workflows): Implement intelligent file discovery protocol and Phase 4 BMGD workflows ## Core Workflow Engine Enhancements ### discover_inputs Protocol (MAJOR) - Added reusable `discover_inputs` protocol to workflow.xml for intelligent file loading - Supports three loading strategies: - FULL_LOAD: Load all shards for PRD, Architecture, UX (changed pattern from /index.md to /*/*.md) - SELECTIVE_LOAD: Load specific shard via template variable (e.g., epic-{{epic_num}}.md) - INDEX_GUIDED: Load index, analyze TOC, intelligently load relevant docs (with "DO NOT BE LAZY" mandate) - Auto-discovers whole vs sharded documents with proper fallback - Provides transparent reporting of loaded content with file counts - Invoked via <invoke-protocol name="discover_inputs" /> tag in workflow instructions ### Advanced Elicitation Improvements - Renamed adv-elicit.xml to advanced-elicitation.xml for clarity - Updated all references across agents and commands ### Shard Document Tool Enhancement - Added Step 6: Handle Original Document with three options: - [d] Delete - Remove original (recommended, prevents confusion) - [m] Move to archive - Backup original to archive folder - [k] Keep - Warning about defeating sharding purpose - Prevents issue where both whole and sharded versions exist, confusing discover_inputs protocol ## BMM Module - Input File Pattern Standardization ### Phase 1 - Analysis (1 workflow) - product-brief: Added load_strategy (FULL_LOAD for research/brainstorming, INDEX_GUIDED for document_project) - Updated instructions.md to use invoke-protocol, replaced manual fuzzy matching ### Phase 2 - Planning (4 workflows) - prd: Added load_strategy, updated instructions to reference {product_brief_content}, {research_content} - create-ux-design: Added load_strategy, removed fuzzy matching from instructions - tech-spec: Added load_strategy for brownfield context discovery - All epics patterns updated to support SELECTIVE_LOAD for specific epic shards ### Phase 3 - Solutioning (2 workflows) - architecture: Added load_strategy, updated instructions to use pre-loaded {prd_content}, {epics_content}, {ux_design_content} - solutioning-gate-check: Added load_strategy, replaced manual discovery with protocol invocation ### Phase 4 - Implementation (8 workflows) - code-review: Added load_strategy, fixed sharded patterns to /*/*.md, added step 1.5 for protocol - correct-course: Added complete input_file_patterns section (was missing), added step 0.5 - create-story: Added load_strategy, updated to SELECTIVE_LOAD for epics, added step 1.5 - dev-story: Added complete input_file_patterns section (was missing), added step 0.5 - epic-tech-context: Added load_strategy, updated PRD extraction to use {prd_content}, added step 1.5 - retrospective: Added load_strategy for architecture/prd (FULL_LOAD), epics (SELECTIVE_LOAD), added step 0.5 - sprint-planning: Fixed sharded pattern to load ALL epics (/*/*.md), added step 0.5 - story-context: Added load_strategy, updated doc collection to reference pre-loaded content, added step 1.5 ### Sprint Artifacts Path Corrections - story-done: Added missing sprint_artifacts variable, fixed sprint_status path from {context_dir} to {sprint_artifacts} - story-ready: Added missing sprint_artifacts variable - story-context: Fixed undefined {context_dir} -> {sprint_artifacts} - correct-course: Added sprint_artifacts and sprint_status variables ## BMGD Module - Phase 4 Production Workflows (NEW) Added complete Phase 4 implementation workflows for game development: - code-review: Senior developer review for completed game features - correct-course: Sprint change management for game projects - create-story: Story generation for game mechanics/features - dev-story: Feature implementation workflow - epic-tech-context: Technical spec generation per game epic - retrospective: Epic completion review and lessons learned - sprint-planning: Game development sprint status tracking - story-context: Dynamic context assembly for game stories - story-done: Story completion workflow - story-ready: Story readiness workflow All BMGD workflows follow BMM patterns with game-specific adaptations. ## Agent Updates ### BMM Agents - Updated all 7 BMM agents (analyst, architect, dev, pm, sm, tea, tech-writer, ux-designer) - Standardized web bundle configurations ### BMGD Agents - Updated 4 game development agents (game-architect, game-designer, game-dev, game-scrum-master) - Aligned with BMM agent structure ### CIS Agents - Updated 5 creative intelligence agents for consistency ## Documentation & Configuration - Updated CHANGELOG.md with Phase 4 workflow additions - Updated files-manifest.csv and task-manifest.csv - Updated .claude commands for all agents - Fixed formatting issues from previous commits ## Breaking Changes NONE - All changes are backward compatible. Workflows without input_file_patterns continue to work. Workflows with input_file_patterns now benefit from intelligent auto-loading. ## Migration Notes Existing workflows can gradually adopt discover_inputs protocol by: 1. Adding load_strategy to existing input_file_patterns in workflow.yaml 2. Adding <invoke-protocol name="discover_inputs" /> step in instructions.md 3. Replacing manual file loading with references to {pattern_name_content} variables
2025-11-12 19:18:38 -06:00
<action>Enter #yolo mode for the rest of the workflow</action>
</if>
</ask>
</if>
</substep>
<substep n="2d" title="Step Completion">
<check>If no special tags and NOT #yolo:</check>
<ask>Continue to next step? (y/n/edit)</ask>
</substep>
</step>
<step n="3" title="Completion">
<check>If checklist exists → Run validation</check>
<check>If template: false → Confirm actions completed</check>
<check>Else → Confirm document saved to output path</check>
<action>Report workflow completion</action>
</step>
</flow>
<execution-modes>
<mode name="normal">Full user interaction at all decision points</mode>
feat(workflows): Implement intelligent file discovery protocol and Phase 4 BMGD workflows ## Core Workflow Engine Enhancements ### discover_inputs Protocol (MAJOR) - Added reusable `discover_inputs` protocol to workflow.xml for intelligent file loading - Supports three loading strategies: - FULL_LOAD: Load all shards for PRD, Architecture, UX (changed pattern from /index.md to /*/*.md) - SELECTIVE_LOAD: Load specific shard via template variable (e.g., epic-{{epic_num}}.md) - INDEX_GUIDED: Load index, analyze TOC, intelligently load relevant docs (with "DO NOT BE LAZY" mandate) - Auto-discovers whole vs sharded documents with proper fallback - Provides transparent reporting of loaded content with file counts - Invoked via <invoke-protocol name="discover_inputs" /> tag in workflow instructions ### Advanced Elicitation Improvements - Renamed adv-elicit.xml to advanced-elicitation.xml for clarity - Updated all references across agents and commands ### Shard Document Tool Enhancement - Added Step 6: Handle Original Document with three options: - [d] Delete - Remove original (recommended, prevents confusion) - [m] Move to archive - Backup original to archive folder - [k] Keep - Warning about defeating sharding purpose - Prevents issue where both whole and sharded versions exist, confusing discover_inputs protocol ## BMM Module - Input File Pattern Standardization ### Phase 1 - Analysis (1 workflow) - product-brief: Added load_strategy (FULL_LOAD for research/brainstorming, INDEX_GUIDED for document_project) - Updated instructions.md to use invoke-protocol, replaced manual fuzzy matching ### Phase 2 - Planning (4 workflows) - prd: Added load_strategy, updated instructions to reference {product_brief_content}, {research_content} - create-ux-design: Added load_strategy, removed fuzzy matching from instructions - tech-spec: Added load_strategy for brownfield context discovery - All epics patterns updated to support SELECTIVE_LOAD for specific epic shards ### Phase 3 - Solutioning (2 workflows) - architecture: Added load_strategy, updated instructions to use pre-loaded {prd_content}, {epics_content}, {ux_design_content} - solutioning-gate-check: Added load_strategy, replaced manual discovery with protocol invocation ### Phase 4 - Implementation (8 workflows) - code-review: Added load_strategy, fixed sharded patterns to /*/*.md, added step 1.5 for protocol - correct-course: Added complete input_file_patterns section (was missing), added step 0.5 - create-story: Added load_strategy, updated to SELECTIVE_LOAD for epics, added step 1.5 - dev-story: Added complete input_file_patterns section (was missing), added step 0.5 - epic-tech-context: Added load_strategy, updated PRD extraction to use {prd_content}, added step 1.5 - retrospective: Added load_strategy for architecture/prd (FULL_LOAD), epics (SELECTIVE_LOAD), added step 0.5 - sprint-planning: Fixed sharded pattern to load ALL epics (/*/*.md), added step 0.5 - story-context: Added load_strategy, updated doc collection to reference pre-loaded content, added step 1.5 ### Sprint Artifacts Path Corrections - story-done: Added missing sprint_artifacts variable, fixed sprint_status path from {context_dir} to {sprint_artifacts} - story-ready: Added missing sprint_artifacts variable - story-context: Fixed undefined {context_dir} -> {sprint_artifacts} - correct-course: Added sprint_artifacts and sprint_status variables ## BMGD Module - Phase 4 Production Workflows (NEW) Added complete Phase 4 implementation workflows for game development: - code-review: Senior developer review for completed game features - correct-course: Sprint change management for game projects - create-story: Story generation for game mechanics/features - dev-story: Feature implementation workflow - epic-tech-context: Technical spec generation per game epic - retrospective: Epic completion review and lessons learned - sprint-planning: Game development sprint status tracking - story-context: Dynamic context assembly for game stories - story-done: Story completion workflow - story-ready: Story readiness workflow All BMGD workflows follow BMM patterns with game-specific adaptations. ## Agent Updates ### BMM Agents - Updated all 7 BMM agents (analyst, architect, dev, pm, sm, tea, tech-writer, ux-designer) - Standardized web bundle configurations ### BMGD Agents - Updated 4 game development agents (game-architect, game-designer, game-dev, game-scrum-master) - Aligned with BMM agent structure ### CIS Agents - Updated 5 creative intelligence agents for consistency ## Documentation & Configuration - Updated CHANGELOG.md with Phase 4 workflow additions - Updated files-manifest.csv and task-manifest.csv - Updated .claude commands for all agents - Fixed formatting issues from previous commits ## Breaking Changes NONE - All changes are backward compatible. Workflows without input_file_patterns continue to work. Workflows with input_file_patterns now benefit from intelligent auto-loading. ## Migration Notes Existing workflows can gradually adopt discover_inputs protocol by: 1. Adding load_strategy to existing input_file_patterns in workflow.yaml 2. Adding <invoke-protocol name="discover_inputs" /> step in instructions.md 3. Replacing manual file loading with references to {pattern_name_content} variables
2025-11-12 19:18:38 -06:00
<mode name="#yolo">Skip all confirmations and elicitation, minimize prompts and try to produce all of the workflow automatically by
simulating the remaining discussions with an simulated expert user</mode>
</execution-modes>
<supported-tags desc="Instructions can use these tags">
<structural>
<tag>step n="X" goal="..." - Define step with number and goal</tag>
<tag>optional="true" - Step can be skipped</tag>
<tag>if="condition" - Conditional execution</tag>
<tag>for-each="collection" - Iterate over items</tag>
<tag>repeat="n" - Repeat n times</tag>
</structural>
<execution>
<tag>action - Required action to perform</tag>
<tag>action if="condition" - Single conditional action (inline, no closing tag needed)</tag>
<tag>check if="condition"&gt;...&lt;/check&gt; - Conditional block wrapping multiple items (closing tag required)</tag>
<tag>ask - Get user input (wait for response)</tag>
<tag>goto - Jump to another step</tag>
<tag>invoke-workflow - Call another workflow</tag>
<tag>invoke-task - Call a task</tag>
feat(workflows): Implement intelligent file discovery protocol and Phase 4 BMGD workflows ## Core Workflow Engine Enhancements ### discover_inputs Protocol (MAJOR) - Added reusable `discover_inputs` protocol to workflow.xml for intelligent file loading - Supports three loading strategies: - FULL_LOAD: Load all shards for PRD, Architecture, UX (changed pattern from /index.md to /*/*.md) - SELECTIVE_LOAD: Load specific shard via template variable (e.g., epic-{{epic_num}}.md) - INDEX_GUIDED: Load index, analyze TOC, intelligently load relevant docs (with "DO NOT BE LAZY" mandate) - Auto-discovers whole vs sharded documents with proper fallback - Provides transparent reporting of loaded content with file counts - Invoked via <invoke-protocol name="discover_inputs" /> tag in workflow instructions ### Advanced Elicitation Improvements - Renamed adv-elicit.xml to advanced-elicitation.xml for clarity - Updated all references across agents and commands ### Shard Document Tool Enhancement - Added Step 6: Handle Original Document with three options: - [d] Delete - Remove original (recommended, prevents confusion) - [m] Move to archive - Backup original to archive folder - [k] Keep - Warning about defeating sharding purpose - Prevents issue where both whole and sharded versions exist, confusing discover_inputs protocol ## BMM Module - Input File Pattern Standardization ### Phase 1 - Analysis (1 workflow) - product-brief: Added load_strategy (FULL_LOAD for research/brainstorming, INDEX_GUIDED for document_project) - Updated instructions.md to use invoke-protocol, replaced manual fuzzy matching ### Phase 2 - Planning (4 workflows) - prd: Added load_strategy, updated instructions to reference {product_brief_content}, {research_content} - create-ux-design: Added load_strategy, removed fuzzy matching from instructions - tech-spec: Added load_strategy for brownfield context discovery - All epics patterns updated to support SELECTIVE_LOAD for specific epic shards ### Phase 3 - Solutioning (2 workflows) - architecture: Added load_strategy, updated instructions to use pre-loaded {prd_content}, {epics_content}, {ux_design_content} - solutioning-gate-check: Added load_strategy, replaced manual discovery with protocol invocation ### Phase 4 - Implementation (8 workflows) - code-review: Added load_strategy, fixed sharded patterns to /*/*.md, added step 1.5 for protocol - correct-course: Added complete input_file_patterns section (was missing), added step 0.5 - create-story: Added load_strategy, updated to SELECTIVE_LOAD for epics, added step 1.5 - dev-story: Added complete input_file_patterns section (was missing), added step 0.5 - epic-tech-context: Added load_strategy, updated PRD extraction to use {prd_content}, added step 1.5 - retrospective: Added load_strategy for architecture/prd (FULL_LOAD), epics (SELECTIVE_LOAD), added step 0.5 - sprint-planning: Fixed sharded pattern to load ALL epics (/*/*.md), added step 0.5 - story-context: Added load_strategy, updated doc collection to reference pre-loaded content, added step 1.5 ### Sprint Artifacts Path Corrections - story-done: Added missing sprint_artifacts variable, fixed sprint_status path from {context_dir} to {sprint_artifacts} - story-ready: Added missing sprint_artifacts variable - story-context: Fixed undefined {context_dir} -> {sprint_artifacts} - correct-course: Added sprint_artifacts and sprint_status variables ## BMGD Module - Phase 4 Production Workflows (NEW) Added complete Phase 4 implementation workflows for game development: - code-review: Senior developer review for completed game features - correct-course: Sprint change management for game projects - create-story: Story generation for game mechanics/features - dev-story: Feature implementation workflow - epic-tech-context: Technical spec generation per game epic - retrospective: Epic completion review and lessons learned - sprint-planning: Game development sprint status tracking - story-context: Dynamic context assembly for game stories - story-done: Story completion workflow - story-ready: Story readiness workflow All BMGD workflows follow BMM patterns with game-specific adaptations. ## Agent Updates ### BMM Agents - Updated all 7 BMM agents (analyst, architect, dev, pm, sm, tea, tech-writer, ux-designer) - Standardized web bundle configurations ### BMGD Agents - Updated 4 game development agents (game-architect, game-designer, game-dev, game-scrum-master) - Aligned with BMM agent structure ### CIS Agents - Updated 5 creative intelligence agents for consistency ## Documentation & Configuration - Updated CHANGELOG.md with Phase 4 workflow additions - Updated files-manifest.csv and task-manifest.csv - Updated .claude commands for all agents - Fixed formatting issues from previous commits ## Breaking Changes NONE - All changes are backward compatible. Workflows without input_file_patterns continue to work. Workflows with input_file_patterns now benefit from intelligent auto-loading. ## Migration Notes Existing workflows can gradually adopt discover_inputs protocol by: 1. Adding load_strategy to existing input_file_patterns in workflow.yaml 2. Adding <invoke-protocol name="discover_inputs" /> step in instructions.md 3. Replacing manual file loading with references to {pattern_name_content} variables
2025-11-12 19:18:38 -06:00
<tag>invoke-protocol - Execute a reusable protocol (e.g., discover_inputs)</tag>
</execution>
<output>
<tag>template-output - Save content checkpoint</tag>
<tag>critical - Cannot be skipped</tag>
<tag>example - Show example output</tag>
</output>
</supported-tags>
<conditional-execution-patterns desc="When to use each pattern">
<pattern type="single-action">
<use-case>One action with a condition</use-case>
<syntax>&lt;action if="condition"&gt;Do something&lt;/action&gt;</syntax>
<example>&lt;action if="file exists"&gt;Load the file&lt;/action&gt;</example>
<rationale>Cleaner and more concise for single items</rationale>
</pattern>
<pattern type="multi-action-block">
<use-case>Multiple actions/tags under same condition</use-case>
<syntax>&lt;check if="condition"&gt;
feat(workflows): Implement intelligent file discovery protocol and Phase 4 BMGD workflows ## Core Workflow Engine Enhancements ### discover_inputs Protocol (MAJOR) - Added reusable `discover_inputs` protocol to workflow.xml for intelligent file loading - Supports three loading strategies: - FULL_LOAD: Load all shards for PRD, Architecture, UX (changed pattern from /index.md to /*/*.md) - SELECTIVE_LOAD: Load specific shard via template variable (e.g., epic-{{epic_num}}.md) - INDEX_GUIDED: Load index, analyze TOC, intelligently load relevant docs (with "DO NOT BE LAZY" mandate) - Auto-discovers whole vs sharded documents with proper fallback - Provides transparent reporting of loaded content with file counts - Invoked via <invoke-protocol name="discover_inputs" /> tag in workflow instructions ### Advanced Elicitation Improvements - Renamed adv-elicit.xml to advanced-elicitation.xml for clarity - Updated all references across agents and commands ### Shard Document Tool Enhancement - Added Step 6: Handle Original Document with three options: - [d] Delete - Remove original (recommended, prevents confusion) - [m] Move to archive - Backup original to archive folder - [k] Keep - Warning about defeating sharding purpose - Prevents issue where both whole and sharded versions exist, confusing discover_inputs protocol ## BMM Module - Input File Pattern Standardization ### Phase 1 - Analysis (1 workflow) - product-brief: Added load_strategy (FULL_LOAD for research/brainstorming, INDEX_GUIDED for document_project) - Updated instructions.md to use invoke-protocol, replaced manual fuzzy matching ### Phase 2 - Planning (4 workflows) - prd: Added load_strategy, updated instructions to reference {product_brief_content}, {research_content} - create-ux-design: Added load_strategy, removed fuzzy matching from instructions - tech-spec: Added load_strategy for brownfield context discovery - All epics patterns updated to support SELECTIVE_LOAD for specific epic shards ### Phase 3 - Solutioning (2 workflows) - architecture: Added load_strategy, updated instructions to use pre-loaded {prd_content}, {epics_content}, {ux_design_content} - solutioning-gate-check: Added load_strategy, replaced manual discovery with protocol invocation ### Phase 4 - Implementation (8 workflows) - code-review: Added load_strategy, fixed sharded patterns to /*/*.md, added step 1.5 for protocol - correct-course: Added complete input_file_patterns section (was missing), added step 0.5 - create-story: Added load_strategy, updated to SELECTIVE_LOAD for epics, added step 1.5 - dev-story: Added complete input_file_patterns section (was missing), added step 0.5 - epic-tech-context: Added load_strategy, updated PRD extraction to use {prd_content}, added step 1.5 - retrospective: Added load_strategy for architecture/prd (FULL_LOAD), epics (SELECTIVE_LOAD), added step 0.5 - sprint-planning: Fixed sharded pattern to load ALL epics (/*/*.md), added step 0.5 - story-context: Added load_strategy, updated doc collection to reference pre-loaded content, added step 1.5 ### Sprint Artifacts Path Corrections - story-done: Added missing sprint_artifacts variable, fixed sprint_status path from {context_dir} to {sprint_artifacts} - story-ready: Added missing sprint_artifacts variable - story-context: Fixed undefined {context_dir} -> {sprint_artifacts} - correct-course: Added sprint_artifacts and sprint_status variables ## BMGD Module - Phase 4 Production Workflows (NEW) Added complete Phase 4 implementation workflows for game development: - code-review: Senior developer review for completed game features - correct-course: Sprint change management for game projects - create-story: Story generation for game mechanics/features - dev-story: Feature implementation workflow - epic-tech-context: Technical spec generation per game epic - retrospective: Epic completion review and lessons learned - sprint-planning: Game development sprint status tracking - story-context: Dynamic context assembly for game stories - story-done: Story completion workflow - story-ready: Story readiness workflow All BMGD workflows follow BMM patterns with game-specific adaptations. ## Agent Updates ### BMM Agents - Updated all 7 BMM agents (analyst, architect, dev, pm, sm, tea, tech-writer, ux-designer) - Standardized web bundle configurations ### BMGD Agents - Updated 4 game development agents (game-architect, game-designer, game-dev, game-scrum-master) - Aligned with BMM agent structure ### CIS Agents - Updated 5 creative intelligence agents for consistency ## Documentation & Configuration - Updated CHANGELOG.md with Phase 4 workflow additions - Updated files-manifest.csv and task-manifest.csv - Updated .claude commands for all agents - Fixed formatting issues from previous commits ## Breaking Changes NONE - All changes are backward compatible. Workflows without input_file_patterns continue to work. Workflows with input_file_patterns now benefit from intelligent auto-loading. ## Migration Notes Existing workflows can gradually adopt discover_inputs protocol by: 1. Adding load_strategy to existing input_file_patterns in workflow.yaml 2. Adding <invoke-protocol name="discover_inputs" /> step in instructions.md 3. Replacing manual file loading with references to {pattern_name_content} variables
2025-11-12 19:18:38 -06:00
&lt;action&gt;First action&lt;/action&gt;
&lt;action&gt;Second action&lt;/action&gt;
&lt;/check&gt;</syntax>
<example>&lt;check if="validation fails"&gt;
feat(workflows): Implement intelligent file discovery protocol and Phase 4 BMGD workflows ## Core Workflow Engine Enhancements ### discover_inputs Protocol (MAJOR) - Added reusable `discover_inputs` protocol to workflow.xml for intelligent file loading - Supports three loading strategies: - FULL_LOAD: Load all shards for PRD, Architecture, UX (changed pattern from /index.md to /*/*.md) - SELECTIVE_LOAD: Load specific shard via template variable (e.g., epic-{{epic_num}}.md) - INDEX_GUIDED: Load index, analyze TOC, intelligently load relevant docs (with "DO NOT BE LAZY" mandate) - Auto-discovers whole vs sharded documents with proper fallback - Provides transparent reporting of loaded content with file counts - Invoked via <invoke-protocol name="discover_inputs" /> tag in workflow instructions ### Advanced Elicitation Improvements - Renamed adv-elicit.xml to advanced-elicitation.xml for clarity - Updated all references across agents and commands ### Shard Document Tool Enhancement - Added Step 6: Handle Original Document with three options: - [d] Delete - Remove original (recommended, prevents confusion) - [m] Move to archive - Backup original to archive folder - [k] Keep - Warning about defeating sharding purpose - Prevents issue where both whole and sharded versions exist, confusing discover_inputs protocol ## BMM Module - Input File Pattern Standardization ### Phase 1 - Analysis (1 workflow) - product-brief: Added load_strategy (FULL_LOAD for research/brainstorming, INDEX_GUIDED for document_project) - Updated instructions.md to use invoke-protocol, replaced manual fuzzy matching ### Phase 2 - Planning (4 workflows) - prd: Added load_strategy, updated instructions to reference {product_brief_content}, {research_content} - create-ux-design: Added load_strategy, removed fuzzy matching from instructions - tech-spec: Added load_strategy for brownfield context discovery - All epics patterns updated to support SELECTIVE_LOAD for specific epic shards ### Phase 3 - Solutioning (2 workflows) - architecture: Added load_strategy, updated instructions to use pre-loaded {prd_content}, {epics_content}, {ux_design_content} - solutioning-gate-check: Added load_strategy, replaced manual discovery with protocol invocation ### Phase 4 - Implementation (8 workflows) - code-review: Added load_strategy, fixed sharded patterns to /*/*.md, added step 1.5 for protocol - correct-course: Added complete input_file_patterns section (was missing), added step 0.5 - create-story: Added load_strategy, updated to SELECTIVE_LOAD for epics, added step 1.5 - dev-story: Added complete input_file_patterns section (was missing), added step 0.5 - epic-tech-context: Added load_strategy, updated PRD extraction to use {prd_content}, added step 1.5 - retrospective: Added load_strategy for architecture/prd (FULL_LOAD), epics (SELECTIVE_LOAD), added step 0.5 - sprint-planning: Fixed sharded pattern to load ALL epics (/*/*.md), added step 0.5 - story-context: Added load_strategy, updated doc collection to reference pre-loaded content, added step 1.5 ### Sprint Artifacts Path Corrections - story-done: Added missing sprint_artifacts variable, fixed sprint_status path from {context_dir} to {sprint_artifacts} - story-ready: Added missing sprint_artifacts variable - story-context: Fixed undefined {context_dir} -> {sprint_artifacts} - correct-course: Added sprint_artifacts and sprint_status variables ## BMGD Module - Phase 4 Production Workflows (NEW) Added complete Phase 4 implementation workflows for game development: - code-review: Senior developer review for completed game features - correct-course: Sprint change management for game projects - create-story: Story generation for game mechanics/features - dev-story: Feature implementation workflow - epic-tech-context: Technical spec generation per game epic - retrospective: Epic completion review and lessons learned - sprint-planning: Game development sprint status tracking - story-context: Dynamic context assembly for game stories - story-done: Story completion workflow - story-ready: Story readiness workflow All BMGD workflows follow BMM patterns with game-specific adaptations. ## Agent Updates ### BMM Agents - Updated all 7 BMM agents (analyst, architect, dev, pm, sm, tea, tech-writer, ux-designer) - Standardized web bundle configurations ### BMGD Agents - Updated 4 game development agents (game-architect, game-designer, game-dev, game-scrum-master) - Aligned with BMM agent structure ### CIS Agents - Updated 5 creative intelligence agents for consistency ## Documentation & Configuration - Updated CHANGELOG.md with Phase 4 workflow additions - Updated files-manifest.csv and task-manifest.csv - Updated .claude commands for all agents - Fixed formatting issues from previous commits ## Breaking Changes NONE - All changes are backward compatible. Workflows without input_file_patterns continue to work. Workflows with input_file_patterns now benefit from intelligent auto-loading. ## Migration Notes Existing workflows can gradually adopt discover_inputs protocol by: 1. Adding load_strategy to existing input_file_patterns in workflow.yaml 2. Adding <invoke-protocol name="discover_inputs" /> step in instructions.md 3. Replacing manual file loading with references to {pattern_name_content} variables
2025-11-12 19:18:38 -06:00
&lt;action&gt;Log error&lt;/action&gt;
&lt;goto step="1"&gt;Retry&lt;/goto&gt;
&lt;/check&gt;</example>
<rationale>Explicit scope boundaries prevent ambiguity</rationale>
</pattern>
<pattern type="nested-conditions">
<use-case>Else/alternative branches</use-case>
<syntax>&lt;check if="condition A"&gt;...&lt;/check&gt;
feat(workflows): Implement intelligent file discovery protocol and Phase 4 BMGD workflows ## Core Workflow Engine Enhancements ### discover_inputs Protocol (MAJOR) - Added reusable `discover_inputs` protocol to workflow.xml for intelligent file loading - Supports three loading strategies: - FULL_LOAD: Load all shards for PRD, Architecture, UX (changed pattern from /index.md to /*/*.md) - SELECTIVE_LOAD: Load specific shard via template variable (e.g., epic-{{epic_num}}.md) - INDEX_GUIDED: Load index, analyze TOC, intelligently load relevant docs (with "DO NOT BE LAZY" mandate) - Auto-discovers whole vs sharded documents with proper fallback - Provides transparent reporting of loaded content with file counts - Invoked via <invoke-protocol name="discover_inputs" /> tag in workflow instructions ### Advanced Elicitation Improvements - Renamed adv-elicit.xml to advanced-elicitation.xml for clarity - Updated all references across agents and commands ### Shard Document Tool Enhancement - Added Step 6: Handle Original Document with three options: - [d] Delete - Remove original (recommended, prevents confusion) - [m] Move to archive - Backup original to archive folder - [k] Keep - Warning about defeating sharding purpose - Prevents issue where both whole and sharded versions exist, confusing discover_inputs protocol ## BMM Module - Input File Pattern Standardization ### Phase 1 - Analysis (1 workflow) - product-brief: Added load_strategy (FULL_LOAD for research/brainstorming, INDEX_GUIDED for document_project) - Updated instructions.md to use invoke-protocol, replaced manual fuzzy matching ### Phase 2 - Planning (4 workflows) - prd: Added load_strategy, updated instructions to reference {product_brief_content}, {research_content} - create-ux-design: Added load_strategy, removed fuzzy matching from instructions - tech-spec: Added load_strategy for brownfield context discovery - All epics patterns updated to support SELECTIVE_LOAD for specific epic shards ### Phase 3 - Solutioning (2 workflows) - architecture: Added load_strategy, updated instructions to use pre-loaded {prd_content}, {epics_content}, {ux_design_content} - solutioning-gate-check: Added load_strategy, replaced manual discovery with protocol invocation ### Phase 4 - Implementation (8 workflows) - code-review: Added load_strategy, fixed sharded patterns to /*/*.md, added step 1.5 for protocol - correct-course: Added complete input_file_patterns section (was missing), added step 0.5 - create-story: Added load_strategy, updated to SELECTIVE_LOAD for epics, added step 1.5 - dev-story: Added complete input_file_patterns section (was missing), added step 0.5 - epic-tech-context: Added load_strategy, updated PRD extraction to use {prd_content}, added step 1.5 - retrospective: Added load_strategy for architecture/prd (FULL_LOAD), epics (SELECTIVE_LOAD), added step 0.5 - sprint-planning: Fixed sharded pattern to load ALL epics (/*/*.md), added step 0.5 - story-context: Added load_strategy, updated doc collection to reference pre-loaded content, added step 1.5 ### Sprint Artifacts Path Corrections - story-done: Added missing sprint_artifacts variable, fixed sprint_status path from {context_dir} to {sprint_artifacts} - story-ready: Added missing sprint_artifacts variable - story-context: Fixed undefined {context_dir} -> {sprint_artifacts} - correct-course: Added sprint_artifacts and sprint_status variables ## BMGD Module - Phase 4 Production Workflows (NEW) Added complete Phase 4 implementation workflows for game development: - code-review: Senior developer review for completed game features - correct-course: Sprint change management for game projects - create-story: Story generation for game mechanics/features - dev-story: Feature implementation workflow - epic-tech-context: Technical spec generation per game epic - retrospective: Epic completion review and lessons learned - sprint-planning: Game development sprint status tracking - story-context: Dynamic context assembly for game stories - story-done: Story completion workflow - story-ready: Story readiness workflow All BMGD workflows follow BMM patterns with game-specific adaptations. ## Agent Updates ### BMM Agents - Updated all 7 BMM agents (analyst, architect, dev, pm, sm, tea, tech-writer, ux-designer) - Standardized web bundle configurations ### BMGD Agents - Updated 4 game development agents (game-architect, game-designer, game-dev, game-scrum-master) - Aligned with BMM agent structure ### CIS Agents - Updated 5 creative intelligence agents for consistency ## Documentation & Configuration - Updated CHANGELOG.md with Phase 4 workflow additions - Updated files-manifest.csv and task-manifest.csv - Updated .claude commands for all agents - Fixed formatting issues from previous commits ## Breaking Changes NONE - All changes are backward compatible. Workflows without input_file_patterns continue to work. Workflows with input_file_patterns now benefit from intelligent auto-loading. ## Migration Notes Existing workflows can gradually adopt discover_inputs protocol by: 1. Adding load_strategy to existing input_file_patterns in workflow.yaml 2. Adding <invoke-protocol name="discover_inputs" /> step in instructions.md 3. Replacing manual file loading with references to {pattern_name_content} variables
2025-11-12 19:18:38 -06:00
&lt;check if="else"&gt;...&lt;/check&gt;</syntax>
<rationale>Clear branching logic with explicit blocks</rationale>
</pattern>
</conditional-execution-patterns>
feat(workflows): Implement intelligent file discovery protocol and Phase 4 BMGD workflows ## Core Workflow Engine Enhancements ### discover_inputs Protocol (MAJOR) - Added reusable `discover_inputs` protocol to workflow.xml for intelligent file loading - Supports three loading strategies: - FULL_LOAD: Load all shards for PRD, Architecture, UX (changed pattern from /index.md to /*/*.md) - SELECTIVE_LOAD: Load specific shard via template variable (e.g., epic-{{epic_num}}.md) - INDEX_GUIDED: Load index, analyze TOC, intelligently load relevant docs (with "DO NOT BE LAZY" mandate) - Auto-discovers whole vs sharded documents with proper fallback - Provides transparent reporting of loaded content with file counts - Invoked via <invoke-protocol name="discover_inputs" /> tag in workflow instructions ### Advanced Elicitation Improvements - Renamed adv-elicit.xml to advanced-elicitation.xml for clarity - Updated all references across agents and commands ### Shard Document Tool Enhancement - Added Step 6: Handle Original Document with three options: - [d] Delete - Remove original (recommended, prevents confusion) - [m] Move to archive - Backup original to archive folder - [k] Keep - Warning about defeating sharding purpose - Prevents issue where both whole and sharded versions exist, confusing discover_inputs protocol ## BMM Module - Input File Pattern Standardization ### Phase 1 - Analysis (1 workflow) - product-brief: Added load_strategy (FULL_LOAD for research/brainstorming, INDEX_GUIDED for document_project) - Updated instructions.md to use invoke-protocol, replaced manual fuzzy matching ### Phase 2 - Planning (4 workflows) - prd: Added load_strategy, updated instructions to reference {product_brief_content}, {research_content} - create-ux-design: Added load_strategy, removed fuzzy matching from instructions - tech-spec: Added load_strategy for brownfield context discovery - All epics patterns updated to support SELECTIVE_LOAD for specific epic shards ### Phase 3 - Solutioning (2 workflows) - architecture: Added load_strategy, updated instructions to use pre-loaded {prd_content}, {epics_content}, {ux_design_content} - solutioning-gate-check: Added load_strategy, replaced manual discovery with protocol invocation ### Phase 4 - Implementation (8 workflows) - code-review: Added load_strategy, fixed sharded patterns to /*/*.md, added step 1.5 for protocol - correct-course: Added complete input_file_patterns section (was missing), added step 0.5 - create-story: Added load_strategy, updated to SELECTIVE_LOAD for epics, added step 1.5 - dev-story: Added complete input_file_patterns section (was missing), added step 0.5 - epic-tech-context: Added load_strategy, updated PRD extraction to use {prd_content}, added step 1.5 - retrospective: Added load_strategy for architecture/prd (FULL_LOAD), epics (SELECTIVE_LOAD), added step 0.5 - sprint-planning: Fixed sharded pattern to load ALL epics (/*/*.md), added step 0.5 - story-context: Added load_strategy, updated doc collection to reference pre-loaded content, added step 1.5 ### Sprint Artifacts Path Corrections - story-done: Added missing sprint_artifacts variable, fixed sprint_status path from {context_dir} to {sprint_artifacts} - story-ready: Added missing sprint_artifacts variable - story-context: Fixed undefined {context_dir} -> {sprint_artifacts} - correct-course: Added sprint_artifacts and sprint_status variables ## BMGD Module - Phase 4 Production Workflows (NEW) Added complete Phase 4 implementation workflows for game development: - code-review: Senior developer review for completed game features - correct-course: Sprint change management for game projects - create-story: Story generation for game mechanics/features - dev-story: Feature implementation workflow - epic-tech-context: Technical spec generation per game epic - retrospective: Epic completion review and lessons learned - sprint-planning: Game development sprint status tracking - story-context: Dynamic context assembly for game stories - story-done: Story completion workflow - story-ready: Story readiness workflow All BMGD workflows follow BMM patterns with game-specific adaptations. ## Agent Updates ### BMM Agents - Updated all 7 BMM agents (analyst, architect, dev, pm, sm, tea, tech-writer, ux-designer) - Standardized web bundle configurations ### BMGD Agents - Updated 4 game development agents (game-architect, game-designer, game-dev, game-scrum-master) - Aligned with BMM agent structure ### CIS Agents - Updated 5 creative intelligence agents for consistency ## Documentation & Configuration - Updated CHANGELOG.md with Phase 4 workflow additions - Updated files-manifest.csv and task-manifest.csv - Updated .claude commands for all agents - Fixed formatting issues from previous commits ## Breaking Changes NONE - All changes are backward compatible. Workflows without input_file_patterns continue to work. Workflows with input_file_patterns now benefit from intelligent auto-loading. ## Migration Notes Existing workflows can gradually adopt discover_inputs protocol by: 1. Adding load_strategy to existing input_file_patterns in workflow.yaml 2. Adding <invoke-protocol name="discover_inputs" /> step in instructions.md 3. Replacing manual file loading with references to {pattern_name_content} variables
2025-11-12 19:18:38 -06:00
<protocols desc="Reusable workflow protocols that can be invoked via invoke-protocol tag">
<protocol name="discover_inputs" desc="Smart file discovery and loading based on input_file_patterns">
<objective>Intelligently load project files (whole or sharded) based on workflow's input_file_patterns configuration</objective>
<critical>Only execute if workflow.yaml contains input_file_patterns section</critical>
<flow>
<step n="1" title="Parse Input File Patterns">
<action>Read input_file_patterns from loaded workflow.yaml</action>
<action>For each pattern group (prd, architecture, epics, etc.), note the load_strategy if present</action>
</step>
<step n="2" title="Load Files Using Smart Strategies">
<iterate>For each pattern in input_file_patterns:</iterate>
<substep n="2a" title="Try Whole Document First">
<action>Attempt glob match on 'whole' pattern (e.g., "{output_folder}/*prd*.md")</action>
<check if="matches found">
<action>Load ALL matching files completely (no offset/limit)</action>
<action>Store content in variable: {pattern_name_content} (e.g., {prd_content})</action>
<action>Mark pattern as RESOLVED, skip to next pattern</action>
</check>
</substep>
<substep n="2b" title="Try Sharded Document if Whole Not Found">
<check if="no whole matches AND sharded pattern exists">
<action>Determine load_strategy from pattern config (defaults to FULL_LOAD if not specified)</action>
<strategy name="FULL_LOAD">
<desc>Load ALL files in sharded directory - used for PRD, Architecture, UX, brownfield docs</desc>
<action>Use glob pattern to find ALL .md files (e.g., "{output_folder}/*architecture*/*.md")</action>
<action>Load EVERY matching file completely</action>
<action>Concatenate content in logical order (index.md first if exists, then alphabetical)</action>
<action>Store in variable: {pattern_name_content}</action>
</strategy>
<strategy name="SELECTIVE_LOAD">
<desc>Load specific shard using template variable - example: used for epics with {{epic_num}}</desc>
feat(workflows): Implement intelligent file discovery protocol and Phase 4 BMGD workflows ## Core Workflow Engine Enhancements ### discover_inputs Protocol (MAJOR) - Added reusable `discover_inputs` protocol to workflow.xml for intelligent file loading - Supports three loading strategies: - FULL_LOAD: Load all shards for PRD, Architecture, UX (changed pattern from /index.md to /*/*.md) - SELECTIVE_LOAD: Load specific shard via template variable (e.g., epic-{{epic_num}}.md) - INDEX_GUIDED: Load index, analyze TOC, intelligently load relevant docs (with "DO NOT BE LAZY" mandate) - Auto-discovers whole vs sharded documents with proper fallback - Provides transparent reporting of loaded content with file counts - Invoked via <invoke-protocol name="discover_inputs" /> tag in workflow instructions ### Advanced Elicitation Improvements - Renamed adv-elicit.xml to advanced-elicitation.xml for clarity - Updated all references across agents and commands ### Shard Document Tool Enhancement - Added Step 6: Handle Original Document with three options: - [d] Delete - Remove original (recommended, prevents confusion) - [m] Move to archive - Backup original to archive folder - [k] Keep - Warning about defeating sharding purpose - Prevents issue where both whole and sharded versions exist, confusing discover_inputs protocol ## BMM Module - Input File Pattern Standardization ### Phase 1 - Analysis (1 workflow) - product-brief: Added load_strategy (FULL_LOAD for research/brainstorming, INDEX_GUIDED for document_project) - Updated instructions.md to use invoke-protocol, replaced manual fuzzy matching ### Phase 2 - Planning (4 workflows) - prd: Added load_strategy, updated instructions to reference {product_brief_content}, {research_content} - create-ux-design: Added load_strategy, removed fuzzy matching from instructions - tech-spec: Added load_strategy for brownfield context discovery - All epics patterns updated to support SELECTIVE_LOAD for specific epic shards ### Phase 3 - Solutioning (2 workflows) - architecture: Added load_strategy, updated instructions to use pre-loaded {prd_content}, {epics_content}, {ux_design_content} - solutioning-gate-check: Added load_strategy, replaced manual discovery with protocol invocation ### Phase 4 - Implementation (8 workflows) - code-review: Added load_strategy, fixed sharded patterns to /*/*.md, added step 1.5 for protocol - correct-course: Added complete input_file_patterns section (was missing), added step 0.5 - create-story: Added load_strategy, updated to SELECTIVE_LOAD for epics, added step 1.5 - dev-story: Added complete input_file_patterns section (was missing), added step 0.5 - epic-tech-context: Added load_strategy, updated PRD extraction to use {prd_content}, added step 1.5 - retrospective: Added load_strategy for architecture/prd (FULL_LOAD), epics (SELECTIVE_LOAD), added step 0.5 - sprint-planning: Fixed sharded pattern to load ALL epics (/*/*.md), added step 0.5 - story-context: Added load_strategy, updated doc collection to reference pre-loaded content, added step 1.5 ### Sprint Artifacts Path Corrections - story-done: Added missing sprint_artifacts variable, fixed sprint_status path from {context_dir} to {sprint_artifacts} - story-ready: Added missing sprint_artifacts variable - story-context: Fixed undefined {context_dir} -> {sprint_artifacts} - correct-course: Added sprint_artifacts and sprint_status variables ## BMGD Module - Phase 4 Production Workflows (NEW) Added complete Phase 4 implementation workflows for game development: - code-review: Senior developer review for completed game features - correct-course: Sprint change management for game projects - create-story: Story generation for game mechanics/features - dev-story: Feature implementation workflow - epic-tech-context: Technical spec generation per game epic - retrospective: Epic completion review and lessons learned - sprint-planning: Game development sprint status tracking - story-context: Dynamic context assembly for game stories - story-done: Story completion workflow - story-ready: Story readiness workflow All BMGD workflows follow BMM patterns with game-specific adaptations. ## Agent Updates ### BMM Agents - Updated all 7 BMM agents (analyst, architect, dev, pm, sm, tea, tech-writer, ux-designer) - Standardized web bundle configurations ### BMGD Agents - Updated 4 game development agents (game-architect, game-designer, game-dev, game-scrum-master) - Aligned with BMM agent structure ### CIS Agents - Updated 5 creative intelligence agents for consistency ## Documentation & Configuration - Updated CHANGELOG.md with Phase 4 workflow additions - Updated files-manifest.csv and task-manifest.csv - Updated .claude commands for all agents - Fixed formatting issues from previous commits ## Breaking Changes NONE - All changes are backward compatible. Workflows without input_file_patterns continue to work. Workflows with input_file_patterns now benefit from intelligent auto-loading. ## Migration Notes Existing workflows can gradually adopt discover_inputs protocol by: 1. Adding load_strategy to existing input_file_patterns in workflow.yaml 2. Adding <invoke-protocol name="discover_inputs" /> step in instructions.md 3. Replacing manual file loading with references to {pattern_name_content} variables
2025-11-12 19:18:38 -06:00
<action>Check for template variables in sharded_single pattern (e.g., {{epic_num}})</action>
<action>If variable undefined, ask user for value OR infer from context</action>
<action>Resolve template to specific file path</action>
<action>Load that specific file</action>
<action>Store in variable: {pattern_name_content}</action>
</strategy>
<strategy name="INDEX_GUIDED">
<desc>Load index.md, analyze structure and description of each doc in the index, then intelligently load relevant docs</desc>
<mandate>DO NOT BE LAZY - use best judgment to load documents that might have relevant information, even if only a 5% chance</mandate>
feat(workflows): Implement intelligent file discovery protocol and Phase 4 BMGD workflows ## Core Workflow Engine Enhancements ### discover_inputs Protocol (MAJOR) - Added reusable `discover_inputs` protocol to workflow.xml for intelligent file loading - Supports three loading strategies: - FULL_LOAD: Load all shards for PRD, Architecture, UX (changed pattern from /index.md to /*/*.md) - SELECTIVE_LOAD: Load specific shard via template variable (e.g., epic-{{epic_num}}.md) - INDEX_GUIDED: Load index, analyze TOC, intelligently load relevant docs (with "DO NOT BE LAZY" mandate) - Auto-discovers whole vs sharded documents with proper fallback - Provides transparent reporting of loaded content with file counts - Invoked via <invoke-protocol name="discover_inputs" /> tag in workflow instructions ### Advanced Elicitation Improvements - Renamed adv-elicit.xml to advanced-elicitation.xml for clarity - Updated all references across agents and commands ### Shard Document Tool Enhancement - Added Step 6: Handle Original Document with three options: - [d] Delete - Remove original (recommended, prevents confusion) - [m] Move to archive - Backup original to archive folder - [k] Keep - Warning about defeating sharding purpose - Prevents issue where both whole and sharded versions exist, confusing discover_inputs protocol ## BMM Module - Input File Pattern Standardization ### Phase 1 - Analysis (1 workflow) - product-brief: Added load_strategy (FULL_LOAD for research/brainstorming, INDEX_GUIDED for document_project) - Updated instructions.md to use invoke-protocol, replaced manual fuzzy matching ### Phase 2 - Planning (4 workflows) - prd: Added load_strategy, updated instructions to reference {product_brief_content}, {research_content} - create-ux-design: Added load_strategy, removed fuzzy matching from instructions - tech-spec: Added load_strategy for brownfield context discovery - All epics patterns updated to support SELECTIVE_LOAD for specific epic shards ### Phase 3 - Solutioning (2 workflows) - architecture: Added load_strategy, updated instructions to use pre-loaded {prd_content}, {epics_content}, {ux_design_content} - solutioning-gate-check: Added load_strategy, replaced manual discovery with protocol invocation ### Phase 4 - Implementation (8 workflows) - code-review: Added load_strategy, fixed sharded patterns to /*/*.md, added step 1.5 for protocol - correct-course: Added complete input_file_patterns section (was missing), added step 0.5 - create-story: Added load_strategy, updated to SELECTIVE_LOAD for epics, added step 1.5 - dev-story: Added complete input_file_patterns section (was missing), added step 0.5 - epic-tech-context: Added load_strategy, updated PRD extraction to use {prd_content}, added step 1.5 - retrospective: Added load_strategy for architecture/prd (FULL_LOAD), epics (SELECTIVE_LOAD), added step 0.5 - sprint-planning: Fixed sharded pattern to load ALL epics (/*/*.md), added step 0.5 - story-context: Added load_strategy, updated doc collection to reference pre-loaded content, added step 1.5 ### Sprint Artifacts Path Corrections - story-done: Added missing sprint_artifacts variable, fixed sprint_status path from {context_dir} to {sprint_artifacts} - story-ready: Added missing sprint_artifacts variable - story-context: Fixed undefined {context_dir} -> {sprint_artifacts} - correct-course: Added sprint_artifacts and sprint_status variables ## BMGD Module - Phase 4 Production Workflows (NEW) Added complete Phase 4 implementation workflows for game development: - code-review: Senior developer review for completed game features - correct-course: Sprint change management for game projects - create-story: Story generation for game mechanics/features - dev-story: Feature implementation workflow - epic-tech-context: Technical spec generation per game epic - retrospective: Epic completion review and lessons learned - sprint-planning: Game development sprint status tracking - story-context: Dynamic context assembly for game stories - story-done: Story completion workflow - story-ready: Story readiness workflow All BMGD workflows follow BMM patterns with game-specific adaptations. ## Agent Updates ### BMM Agents - Updated all 7 BMM agents (analyst, architect, dev, pm, sm, tea, tech-writer, ux-designer) - Standardized web bundle configurations ### BMGD Agents - Updated 4 game development agents (game-architect, game-designer, game-dev, game-scrum-master) - Aligned with BMM agent structure ### CIS Agents - Updated 5 creative intelligence agents for consistency ## Documentation & Configuration - Updated CHANGELOG.md with Phase 4 workflow additions - Updated files-manifest.csv and task-manifest.csv - Updated .claude commands for all agents - Fixed formatting issues from previous commits ## Breaking Changes NONE - All changes are backward compatible. Workflows without input_file_patterns continue to work. Workflows with input_file_patterns now benefit from intelligent auto-loading. ## Migration Notes Existing workflows can gradually adopt discover_inputs protocol by: 1. Adding load_strategy to existing input_file_patterns in workflow.yaml 2. Adding <invoke-protocol name="discover_inputs" /> step in instructions.md 3. Replacing manual file loading with references to {pattern_name_content} variables
2025-11-12 19:18:38 -06:00
<action>Load index.md from sharded directory</action>
<action>Parse table of contents, links, section headers</action>
<action>Analyze workflow's purpose and objective</action>
<action>Identify which linked/referenced documents are likely relevant</action>
<example>If workflow is about authentication and index shows "Auth Overview", "Payment Setup", "Deployment" → Load auth
docs, consider deployment docs, skip payment</example>
feat(workflows): Implement intelligent file discovery protocol and Phase 4 BMGD workflows ## Core Workflow Engine Enhancements ### discover_inputs Protocol (MAJOR) - Added reusable `discover_inputs` protocol to workflow.xml for intelligent file loading - Supports three loading strategies: - FULL_LOAD: Load all shards for PRD, Architecture, UX (changed pattern from /index.md to /*/*.md) - SELECTIVE_LOAD: Load specific shard via template variable (e.g., epic-{{epic_num}}.md) - INDEX_GUIDED: Load index, analyze TOC, intelligently load relevant docs (with "DO NOT BE LAZY" mandate) - Auto-discovers whole vs sharded documents with proper fallback - Provides transparent reporting of loaded content with file counts - Invoked via <invoke-protocol name="discover_inputs" /> tag in workflow instructions ### Advanced Elicitation Improvements - Renamed adv-elicit.xml to advanced-elicitation.xml for clarity - Updated all references across agents and commands ### Shard Document Tool Enhancement - Added Step 6: Handle Original Document with three options: - [d] Delete - Remove original (recommended, prevents confusion) - [m] Move to archive - Backup original to archive folder - [k] Keep - Warning about defeating sharding purpose - Prevents issue where both whole and sharded versions exist, confusing discover_inputs protocol ## BMM Module - Input File Pattern Standardization ### Phase 1 - Analysis (1 workflow) - product-brief: Added load_strategy (FULL_LOAD for research/brainstorming, INDEX_GUIDED for document_project) - Updated instructions.md to use invoke-protocol, replaced manual fuzzy matching ### Phase 2 - Planning (4 workflows) - prd: Added load_strategy, updated instructions to reference {product_brief_content}, {research_content} - create-ux-design: Added load_strategy, removed fuzzy matching from instructions - tech-spec: Added load_strategy for brownfield context discovery - All epics patterns updated to support SELECTIVE_LOAD for specific epic shards ### Phase 3 - Solutioning (2 workflows) - architecture: Added load_strategy, updated instructions to use pre-loaded {prd_content}, {epics_content}, {ux_design_content} - solutioning-gate-check: Added load_strategy, replaced manual discovery with protocol invocation ### Phase 4 - Implementation (8 workflows) - code-review: Added load_strategy, fixed sharded patterns to /*/*.md, added step 1.5 for protocol - correct-course: Added complete input_file_patterns section (was missing), added step 0.5 - create-story: Added load_strategy, updated to SELECTIVE_LOAD for epics, added step 1.5 - dev-story: Added complete input_file_patterns section (was missing), added step 0.5 - epic-tech-context: Added load_strategy, updated PRD extraction to use {prd_content}, added step 1.5 - retrospective: Added load_strategy for architecture/prd (FULL_LOAD), epics (SELECTIVE_LOAD), added step 0.5 - sprint-planning: Fixed sharded pattern to load ALL epics (/*/*.md), added step 0.5 - story-context: Added load_strategy, updated doc collection to reference pre-loaded content, added step 1.5 ### Sprint Artifacts Path Corrections - story-done: Added missing sprint_artifacts variable, fixed sprint_status path from {context_dir} to {sprint_artifacts} - story-ready: Added missing sprint_artifacts variable - story-context: Fixed undefined {context_dir} -> {sprint_artifacts} - correct-course: Added sprint_artifacts and sprint_status variables ## BMGD Module - Phase 4 Production Workflows (NEW) Added complete Phase 4 implementation workflows for game development: - code-review: Senior developer review for completed game features - correct-course: Sprint change management for game projects - create-story: Story generation for game mechanics/features - dev-story: Feature implementation workflow - epic-tech-context: Technical spec generation per game epic - retrospective: Epic completion review and lessons learned - sprint-planning: Game development sprint status tracking - story-context: Dynamic context assembly for game stories - story-done: Story completion workflow - story-ready: Story readiness workflow All BMGD workflows follow BMM patterns with game-specific adaptations. ## Agent Updates ### BMM Agents - Updated all 7 BMM agents (analyst, architect, dev, pm, sm, tea, tech-writer, ux-designer) - Standardized web bundle configurations ### BMGD Agents - Updated 4 game development agents (game-architect, game-designer, game-dev, game-scrum-master) - Aligned with BMM agent structure ### CIS Agents - Updated 5 creative intelligence agents for consistency ## Documentation & Configuration - Updated CHANGELOG.md with Phase 4 workflow additions - Updated files-manifest.csv and task-manifest.csv - Updated .claude commands for all agents - Fixed formatting issues from previous commits ## Breaking Changes NONE - All changes are backward compatible. Workflows without input_file_patterns continue to work. Workflows with input_file_patterns now benefit from intelligent auto-loading. ## Migration Notes Existing workflows can gradually adopt discover_inputs protocol by: 1. Adding load_strategy to existing input_file_patterns in workflow.yaml 2. Adding <invoke-protocol name="discover_inputs" /> step in instructions.md 3. Replacing manual file loading with references to {pattern_name_content} variables
2025-11-12 19:18:38 -06:00
<action>Load all identified relevant documents</action>
<action>Store combined content in variable: {pattern_name_content}</action>
<note>When in doubt, LOAD IT - context is valuable, being thorough is better than missing critical info</note>
</strategy>
</check>
</substep>
<substep n="2c" title="Handle Not Found">
<check if="no matches for whole OR sharded">
<action>Set {pattern_name_content} to empty string</action>
<action>Note in session: "No {pattern_name} files found" (not an error, just unavailable, offer use change to provide)</action>
feat(workflows): Implement intelligent file discovery protocol and Phase 4 BMGD workflows ## Core Workflow Engine Enhancements ### discover_inputs Protocol (MAJOR) - Added reusable `discover_inputs` protocol to workflow.xml for intelligent file loading - Supports three loading strategies: - FULL_LOAD: Load all shards for PRD, Architecture, UX (changed pattern from /index.md to /*/*.md) - SELECTIVE_LOAD: Load specific shard via template variable (e.g., epic-{{epic_num}}.md) - INDEX_GUIDED: Load index, analyze TOC, intelligently load relevant docs (with "DO NOT BE LAZY" mandate) - Auto-discovers whole vs sharded documents with proper fallback - Provides transparent reporting of loaded content with file counts - Invoked via <invoke-protocol name="discover_inputs" /> tag in workflow instructions ### Advanced Elicitation Improvements - Renamed adv-elicit.xml to advanced-elicitation.xml for clarity - Updated all references across agents and commands ### Shard Document Tool Enhancement - Added Step 6: Handle Original Document with three options: - [d] Delete - Remove original (recommended, prevents confusion) - [m] Move to archive - Backup original to archive folder - [k] Keep - Warning about defeating sharding purpose - Prevents issue where both whole and sharded versions exist, confusing discover_inputs protocol ## BMM Module - Input File Pattern Standardization ### Phase 1 - Analysis (1 workflow) - product-brief: Added load_strategy (FULL_LOAD for research/brainstorming, INDEX_GUIDED for document_project) - Updated instructions.md to use invoke-protocol, replaced manual fuzzy matching ### Phase 2 - Planning (4 workflows) - prd: Added load_strategy, updated instructions to reference {product_brief_content}, {research_content} - create-ux-design: Added load_strategy, removed fuzzy matching from instructions - tech-spec: Added load_strategy for brownfield context discovery - All epics patterns updated to support SELECTIVE_LOAD for specific epic shards ### Phase 3 - Solutioning (2 workflows) - architecture: Added load_strategy, updated instructions to use pre-loaded {prd_content}, {epics_content}, {ux_design_content} - solutioning-gate-check: Added load_strategy, replaced manual discovery with protocol invocation ### Phase 4 - Implementation (8 workflows) - code-review: Added load_strategy, fixed sharded patterns to /*/*.md, added step 1.5 for protocol - correct-course: Added complete input_file_patterns section (was missing), added step 0.5 - create-story: Added load_strategy, updated to SELECTIVE_LOAD for epics, added step 1.5 - dev-story: Added complete input_file_patterns section (was missing), added step 0.5 - epic-tech-context: Added load_strategy, updated PRD extraction to use {prd_content}, added step 1.5 - retrospective: Added load_strategy for architecture/prd (FULL_LOAD), epics (SELECTIVE_LOAD), added step 0.5 - sprint-planning: Fixed sharded pattern to load ALL epics (/*/*.md), added step 0.5 - story-context: Added load_strategy, updated doc collection to reference pre-loaded content, added step 1.5 ### Sprint Artifacts Path Corrections - story-done: Added missing sprint_artifacts variable, fixed sprint_status path from {context_dir} to {sprint_artifacts} - story-ready: Added missing sprint_artifacts variable - story-context: Fixed undefined {context_dir} -> {sprint_artifacts} - correct-course: Added sprint_artifacts and sprint_status variables ## BMGD Module - Phase 4 Production Workflows (NEW) Added complete Phase 4 implementation workflows for game development: - code-review: Senior developer review for completed game features - correct-course: Sprint change management for game projects - create-story: Story generation for game mechanics/features - dev-story: Feature implementation workflow - epic-tech-context: Technical spec generation per game epic - retrospective: Epic completion review and lessons learned - sprint-planning: Game development sprint status tracking - story-context: Dynamic context assembly for game stories - story-done: Story completion workflow - story-ready: Story readiness workflow All BMGD workflows follow BMM patterns with game-specific adaptations. ## Agent Updates ### BMM Agents - Updated all 7 BMM agents (analyst, architect, dev, pm, sm, tea, tech-writer, ux-designer) - Standardized web bundle configurations ### BMGD Agents - Updated 4 game development agents (game-architect, game-designer, game-dev, game-scrum-master) - Aligned with BMM agent structure ### CIS Agents - Updated 5 creative intelligence agents for consistency ## Documentation & Configuration - Updated CHANGELOG.md with Phase 4 workflow additions - Updated files-manifest.csv and task-manifest.csv - Updated .claude commands for all agents - Fixed formatting issues from previous commits ## Breaking Changes NONE - All changes are backward compatible. Workflows without input_file_patterns continue to work. Workflows with input_file_patterns now benefit from intelligent auto-loading. ## Migration Notes Existing workflows can gradually adopt discover_inputs protocol by: 1. Adding load_strategy to existing input_file_patterns in workflow.yaml 2. Adding <invoke-protocol name="discover_inputs" /> step in instructions.md 3. Replacing manual file loading with references to {pattern_name_content} variables
2025-11-12 19:18:38 -06:00
</check>
</substep>
</step>
<step n="3" title="Report Discovery Results">
<action>List all loaded content variables with file counts</action>
<example>
✓ Loaded {prd_content} from 1 file: PRD.md
✓ Loaded {architecture_content} from 5 sharded files: architecture/index.md, architecture/system-design.md, ...
✓ Loaded {epics_content} from selective load: epics/epic-3.md
○ No ux_design files found
</example>
<note>This gives workflow transparency into what context is available</note>
</step>
</flow>
<usage-in-instructions>
<example desc="Typical usage in workflow instructions.md">
&lt;step n="0" goal="Discover and load project context"&gt;
&lt;invoke-protocol name="discover_inputs" /&gt;
feat(workflows): Implement intelligent file discovery protocol and Phase 4 BMGD workflows ## Core Workflow Engine Enhancements ### discover_inputs Protocol (MAJOR) - Added reusable `discover_inputs` protocol to workflow.xml for intelligent file loading - Supports three loading strategies: - FULL_LOAD: Load all shards for PRD, Architecture, UX (changed pattern from /index.md to /*/*.md) - SELECTIVE_LOAD: Load specific shard via template variable (e.g., epic-{{epic_num}}.md) - INDEX_GUIDED: Load index, analyze TOC, intelligently load relevant docs (with "DO NOT BE LAZY" mandate) - Auto-discovers whole vs sharded documents with proper fallback - Provides transparent reporting of loaded content with file counts - Invoked via <invoke-protocol name="discover_inputs" /> tag in workflow instructions ### Advanced Elicitation Improvements - Renamed adv-elicit.xml to advanced-elicitation.xml for clarity - Updated all references across agents and commands ### Shard Document Tool Enhancement - Added Step 6: Handle Original Document with three options: - [d] Delete - Remove original (recommended, prevents confusion) - [m] Move to archive - Backup original to archive folder - [k] Keep - Warning about defeating sharding purpose - Prevents issue where both whole and sharded versions exist, confusing discover_inputs protocol ## BMM Module - Input File Pattern Standardization ### Phase 1 - Analysis (1 workflow) - product-brief: Added load_strategy (FULL_LOAD for research/brainstorming, INDEX_GUIDED for document_project) - Updated instructions.md to use invoke-protocol, replaced manual fuzzy matching ### Phase 2 - Planning (4 workflows) - prd: Added load_strategy, updated instructions to reference {product_brief_content}, {research_content} - create-ux-design: Added load_strategy, removed fuzzy matching from instructions - tech-spec: Added load_strategy for brownfield context discovery - All epics patterns updated to support SELECTIVE_LOAD for specific epic shards ### Phase 3 - Solutioning (2 workflows) - architecture: Added load_strategy, updated instructions to use pre-loaded {prd_content}, {epics_content}, {ux_design_content} - solutioning-gate-check: Added load_strategy, replaced manual discovery with protocol invocation ### Phase 4 - Implementation (8 workflows) - code-review: Added load_strategy, fixed sharded patterns to /*/*.md, added step 1.5 for protocol - correct-course: Added complete input_file_patterns section (was missing), added step 0.5 - create-story: Added load_strategy, updated to SELECTIVE_LOAD for epics, added step 1.5 - dev-story: Added complete input_file_patterns section (was missing), added step 0.5 - epic-tech-context: Added load_strategy, updated PRD extraction to use {prd_content}, added step 1.5 - retrospective: Added load_strategy for architecture/prd (FULL_LOAD), epics (SELECTIVE_LOAD), added step 0.5 - sprint-planning: Fixed sharded pattern to load ALL epics (/*/*.md), added step 0.5 - story-context: Added load_strategy, updated doc collection to reference pre-loaded content, added step 1.5 ### Sprint Artifacts Path Corrections - story-done: Added missing sprint_artifacts variable, fixed sprint_status path from {context_dir} to {sprint_artifacts} - story-ready: Added missing sprint_artifacts variable - story-context: Fixed undefined {context_dir} -> {sprint_artifacts} - correct-course: Added sprint_artifacts and sprint_status variables ## BMGD Module - Phase 4 Production Workflows (NEW) Added complete Phase 4 implementation workflows for game development: - code-review: Senior developer review for completed game features - correct-course: Sprint change management for game projects - create-story: Story generation for game mechanics/features - dev-story: Feature implementation workflow - epic-tech-context: Technical spec generation per game epic - retrospective: Epic completion review and lessons learned - sprint-planning: Game development sprint status tracking - story-context: Dynamic context assembly for game stories - story-done: Story completion workflow - story-ready: Story readiness workflow All BMGD workflows follow BMM patterns with game-specific adaptations. ## Agent Updates ### BMM Agents - Updated all 7 BMM agents (analyst, architect, dev, pm, sm, tea, tech-writer, ux-designer) - Standardized web bundle configurations ### BMGD Agents - Updated 4 game development agents (game-architect, game-designer, game-dev, game-scrum-master) - Aligned with BMM agent structure ### CIS Agents - Updated 5 creative intelligence agents for consistency ## Documentation & Configuration - Updated CHANGELOG.md with Phase 4 workflow additions - Updated files-manifest.csv and task-manifest.csv - Updated .claude commands for all agents - Fixed formatting issues from previous commits ## Breaking Changes NONE - All changes are backward compatible. Workflows without input_file_patterns continue to work. Workflows with input_file_patterns now benefit from intelligent auto-loading. ## Migration Notes Existing workflows can gradually adopt discover_inputs protocol by: 1. Adding load_strategy to existing input_file_patterns in workflow.yaml 2. Adding <invoke-protocol name="discover_inputs" /> step in instructions.md 3. Replacing manual file loading with references to {pattern_name_content} variables
2025-11-12 19:18:38 -06:00
&lt;/step&gt;
&lt;step n="1" goal="Analyze requirements"&gt;
&lt;action&gt;Review {prd_content} for functional requirements&lt;/action&gt;
&lt;action&gt;Cross-reference with {architecture_content} for technical constraints&lt;/action&gt;
feat(workflows): Implement intelligent file discovery protocol and Phase 4 BMGD workflows ## Core Workflow Engine Enhancements ### discover_inputs Protocol (MAJOR) - Added reusable `discover_inputs` protocol to workflow.xml for intelligent file loading - Supports three loading strategies: - FULL_LOAD: Load all shards for PRD, Architecture, UX (changed pattern from /index.md to /*/*.md) - SELECTIVE_LOAD: Load specific shard via template variable (e.g., epic-{{epic_num}}.md) - INDEX_GUIDED: Load index, analyze TOC, intelligently load relevant docs (with "DO NOT BE LAZY" mandate) - Auto-discovers whole vs sharded documents with proper fallback - Provides transparent reporting of loaded content with file counts - Invoked via <invoke-protocol name="discover_inputs" /> tag in workflow instructions ### Advanced Elicitation Improvements - Renamed adv-elicit.xml to advanced-elicitation.xml for clarity - Updated all references across agents and commands ### Shard Document Tool Enhancement - Added Step 6: Handle Original Document with three options: - [d] Delete - Remove original (recommended, prevents confusion) - [m] Move to archive - Backup original to archive folder - [k] Keep - Warning about defeating sharding purpose - Prevents issue where both whole and sharded versions exist, confusing discover_inputs protocol ## BMM Module - Input File Pattern Standardization ### Phase 1 - Analysis (1 workflow) - product-brief: Added load_strategy (FULL_LOAD for research/brainstorming, INDEX_GUIDED for document_project) - Updated instructions.md to use invoke-protocol, replaced manual fuzzy matching ### Phase 2 - Planning (4 workflows) - prd: Added load_strategy, updated instructions to reference {product_brief_content}, {research_content} - create-ux-design: Added load_strategy, removed fuzzy matching from instructions - tech-spec: Added load_strategy for brownfield context discovery - All epics patterns updated to support SELECTIVE_LOAD for specific epic shards ### Phase 3 - Solutioning (2 workflows) - architecture: Added load_strategy, updated instructions to use pre-loaded {prd_content}, {epics_content}, {ux_design_content} - solutioning-gate-check: Added load_strategy, replaced manual discovery with protocol invocation ### Phase 4 - Implementation (8 workflows) - code-review: Added load_strategy, fixed sharded patterns to /*/*.md, added step 1.5 for protocol - correct-course: Added complete input_file_patterns section (was missing), added step 0.5 - create-story: Added load_strategy, updated to SELECTIVE_LOAD for epics, added step 1.5 - dev-story: Added complete input_file_patterns section (was missing), added step 0.5 - epic-tech-context: Added load_strategy, updated PRD extraction to use {prd_content}, added step 1.5 - retrospective: Added load_strategy for architecture/prd (FULL_LOAD), epics (SELECTIVE_LOAD), added step 0.5 - sprint-planning: Fixed sharded pattern to load ALL epics (/*/*.md), added step 0.5 - story-context: Added load_strategy, updated doc collection to reference pre-loaded content, added step 1.5 ### Sprint Artifacts Path Corrections - story-done: Added missing sprint_artifacts variable, fixed sprint_status path from {context_dir} to {sprint_artifacts} - story-ready: Added missing sprint_artifacts variable - story-context: Fixed undefined {context_dir} -> {sprint_artifacts} - correct-course: Added sprint_artifacts and sprint_status variables ## BMGD Module - Phase 4 Production Workflows (NEW) Added complete Phase 4 implementation workflows for game development: - code-review: Senior developer review for completed game features - correct-course: Sprint change management for game projects - create-story: Story generation for game mechanics/features - dev-story: Feature implementation workflow - epic-tech-context: Technical spec generation per game epic - retrospective: Epic completion review and lessons learned - sprint-planning: Game development sprint status tracking - story-context: Dynamic context assembly for game stories - story-done: Story completion workflow - story-ready: Story readiness workflow All BMGD workflows follow BMM patterns with game-specific adaptations. ## Agent Updates ### BMM Agents - Updated all 7 BMM agents (analyst, architect, dev, pm, sm, tea, tech-writer, ux-designer) - Standardized web bundle configurations ### BMGD Agents - Updated 4 game development agents (game-architect, game-designer, game-dev, game-scrum-master) - Aligned with BMM agent structure ### CIS Agents - Updated 5 creative intelligence agents for consistency ## Documentation & Configuration - Updated CHANGELOG.md with Phase 4 workflow additions - Updated files-manifest.csv and task-manifest.csv - Updated .claude commands for all agents - Fixed formatting issues from previous commits ## Breaking Changes NONE - All changes are backward compatible. Workflows without input_file_patterns continue to work. Workflows with input_file_patterns now benefit from intelligent auto-loading. ## Migration Notes Existing workflows can gradually adopt discover_inputs protocol by: 1. Adding load_strategy to existing input_file_patterns in workflow.yaml 2. Adding <invoke-protocol name="discover_inputs" /> step in instructions.md 3. Replacing manual file loading with references to {pattern_name_content} variables
2025-11-12 19:18:38 -06:00
&lt;/step&gt;
</example>
</usage-in-instructions>
</protocol>
</protocols>
<llm final="true">
<mandate>This is the complete workflow execution engine</mandate>
<mandate>You MUST Follow instructions exactly as written and maintain conversation context between steps</mandate>
<mandate>If confused, re-read this task, the workflow yaml, and any yaml indicated files</mandate>
</llm>
</task>