bmad初始化

This commit is contained in:
2025-11-01 19:22:39 +08:00
parent 5b21dc0bd5
commit 426ae41f54
447 changed files with 80633 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
category,method_name,description,output_pattern
advanced,Tree of Thoughts,Explore multiple reasoning paths simultaneously then evaluate and select the best - perfect for complex problems with multiple valid approaches where finding the optimal path matters,paths → evaluation → selection
advanced,Graph of Thoughts,Model reasoning as an interconnected network of ideas to reveal hidden relationships - ideal for systems thinking and discovering emergent patterns in complex multi-factor situations,nodes → connections → patterns
advanced,Thread of Thought,Maintain coherent reasoning across long contexts by weaving a continuous narrative thread - essential for RAG systems and maintaining consistency in lengthy analyses,context → thread → synthesis
advanced,Self-Consistency Validation,Generate multiple independent approaches then compare for consistency - crucial for high-stakes decisions where verification and consensus building matter,approaches → comparison → consensus
advanced,Meta-Prompting Analysis,Step back to analyze the approach structure and methodology itself - valuable for optimizing prompts and improving problem-solving strategies,current → analysis → optimization
advanced,Reasoning via Planning,Build a reasoning tree guided by world models and goal states - excellent for strategic planning and sequential decision-making tasks,model → planning → strategy
collaboration,Stakeholder Round Table,Convene multiple personas to contribute diverse perspectives - essential for requirements gathering and finding balanced solutions across competing interests,perspectives → synthesis → alignment
collaboration,Expert Panel Review,Assemble domain experts for deep specialized analysis - ideal when technical depth and peer review quality are needed,expert views → consensus → recommendations
competitive,Red Team vs Blue Team,Adversarial attack-defend analysis to find vulnerabilities - critical for security testing and building robust solutions through adversarial thinking,defense → attack → hardening
core,Expand or Contract for Audience,Dynamically adjust detail level and technical depth for target audience - essential when content needs to match specific reader capabilities,audience → adjustments → refined content
core,Critique and Refine,Systematic review to identify strengths and weaknesses then improve - standard quality check for drafts needing polish and enhancement,strengths/weaknesses → improvements → refined version
core,Explain Reasoning,Walk through step-by-step thinking to show how conclusions were reached - crucial for transparency and helping others understand complex logic,steps → logic → conclusion
core,First Principles Analysis,Strip away assumptions to rebuild from fundamental truths - breakthrough technique for innovation and solving seemingly impossible problems,assumptions → truths → new approach
core,5 Whys Deep Dive,Repeatedly ask why to drill down to root causes - simple but powerful for understanding failures and fixing problems at their source,why chain → root cause → solution
core,Socratic Questioning,Use targeted questions to reveal hidden assumptions and guide discovery - excellent for teaching and helping others reach insights themselves,questions → revelations → understanding
creative,Reverse Engineering,Work backwards from desired outcome to find implementation path - powerful for goal achievement and understanding how to reach specific endpoints,end state → steps backward → path forward
creative,What If Scenarios,Explore alternative realities to understand possibilities and implications - valuable for contingency planning and creative exploration,scenarios → implications → insights
creative,SCAMPER Method,Apply seven creativity lenses (Substitute/Combine/Adapt/Modify/Put/Eliminate/Reverse) - systematic ideation for product innovation and improvement,S→C→A→M→P→E→R
learning,Feynman Technique,Explain complex concepts simply as if teaching a child - the ultimate test of true understanding and excellent for knowledge transfer,complex → simple → gaps → mastery
learning,Active Recall Testing,Test understanding without references to verify true knowledge - essential for identifying gaps and reinforcing mastery,test → gaps → reinforcement
narrative,Unreliable Narrator Mode,Question assumptions and biases by adopting skeptical perspective - crucial for detecting hidden agendas and finding balanced truth,perspective → biases → balanced view
optimization,Speedrun Optimization,Find the fastest most efficient path by eliminating waste - perfect when time pressure demands maximum efficiency,current → bottlenecks → optimized
optimization,New Game Plus,Revisit challenges with enhanced capabilities from prior experience - excellent for iterative improvement and mastery building,initial → enhanced → improved
optimization,Roguelike Permadeath,Treat decisions as irreversible to force careful high-stakes analysis - ideal for critical decisions with no second chances,decision → consequences → execution
philosophical,Occam's Razor Application,Find the simplest sufficient explanation by eliminating unnecessary complexity - essential for debugging and theory selection,options → simplification → selection
philosophical,Trolley Problem Variations,Explore ethical trade-offs through moral dilemmas - valuable for understanding values and making difficult ethical decisions,dilemma → analysis → decision
quantum,Observer Effect Consideration,Analyze how the act of measurement changes what's being measured - important for understanding metrics impact and self-aware systems,unmeasured → observation → impact
retrospective,Hindsight Reflection,Imagine looking back from the future to gain perspective - powerful for project reviews and extracting wisdom from experience,future view → insights → application
retrospective,Lessons Learned Extraction,Systematically identify key takeaways and actionable improvements - essential for knowledge transfer and continuous improvement,experience → lessons → actions
risk,Identify Potential Risks,Brainstorm what could go wrong across all categories - fundamental for project planning and deployment preparation,categories → risks → mitigations
risk,Challenge from Critical Perspective,Play devil's advocate to stress-test ideas and find weaknesses - essential for overcoming groupthink and building robust solutions,assumptions → challenges → strengthening
risk,Failure Mode Analysis,Systematically explore how each component could fail - critical for reliability engineering and safety-critical systems,components → failures → prevention
risk,Pre-mortem Analysis,Imagine future failure then work backwards to prevent it - powerful technique for risk mitigation before major launches,failure scenario → causes → prevention
scientific,Peer Review Simulation,Apply rigorous academic evaluation standards - ensures quality through methodology review and critical assessment,methodology → analysis → recommendations
scientific,Reproducibility Check,Verify results can be replicated independently - fundamental for reliability and scientific validity,method → replication → validation
structural,Dependency Mapping,Visualize interconnections to understand requirements and impacts - essential for complex systems and integration planning,components → dependencies → impacts
structural,Information Architecture Review,Optimize organization and hierarchy for better user experience - crucial for fixing navigation and findability problems,current → pain points → restructure
structural,Skeleton of Thought,Create structure first then expand branches in parallel - efficient for generating long content quickly with good organization,skeleton → branches → integration
1 category method_name description output_pattern
2 advanced Tree of Thoughts Explore multiple reasoning paths simultaneously then evaluate and select the best - perfect for complex problems with multiple valid approaches where finding the optimal path matters paths → evaluation → selection
3 advanced Graph of Thoughts Model reasoning as an interconnected network of ideas to reveal hidden relationships - ideal for systems thinking and discovering emergent patterns in complex multi-factor situations nodes → connections → patterns
4 advanced Thread of Thought Maintain coherent reasoning across long contexts by weaving a continuous narrative thread - essential for RAG systems and maintaining consistency in lengthy analyses context → thread → synthesis
5 advanced Self-Consistency Validation Generate multiple independent approaches then compare for consistency - crucial for high-stakes decisions where verification and consensus building matter approaches → comparison → consensus
6 advanced Meta-Prompting Analysis Step back to analyze the approach structure and methodology itself - valuable for optimizing prompts and improving problem-solving strategies current → analysis → optimization
7 advanced Reasoning via Planning Build a reasoning tree guided by world models and goal states - excellent for strategic planning and sequential decision-making tasks model → planning → strategy
8 collaboration Stakeholder Round Table Convene multiple personas to contribute diverse perspectives - essential for requirements gathering and finding balanced solutions across competing interests perspectives → synthesis → alignment
9 collaboration Expert Panel Review Assemble domain experts for deep specialized analysis - ideal when technical depth and peer review quality are needed expert views → consensus → recommendations
10 competitive Red Team vs Blue Team Adversarial attack-defend analysis to find vulnerabilities - critical for security testing and building robust solutions through adversarial thinking defense → attack → hardening
11 core Expand or Contract for Audience Dynamically adjust detail level and technical depth for target audience - essential when content needs to match specific reader capabilities audience → adjustments → refined content
12 core Critique and Refine Systematic review to identify strengths and weaknesses then improve - standard quality check for drafts needing polish and enhancement strengths/weaknesses → improvements → refined version
13 core Explain Reasoning Walk through step-by-step thinking to show how conclusions were reached - crucial for transparency and helping others understand complex logic steps → logic → conclusion
14 core First Principles Analysis Strip away assumptions to rebuild from fundamental truths - breakthrough technique for innovation and solving seemingly impossible problems assumptions → truths → new approach
15 core 5 Whys Deep Dive Repeatedly ask why to drill down to root causes - simple but powerful for understanding failures and fixing problems at their source why chain → root cause → solution
16 core Socratic Questioning Use targeted questions to reveal hidden assumptions and guide discovery - excellent for teaching and helping others reach insights themselves questions → revelations → understanding
17 creative Reverse Engineering Work backwards from desired outcome to find implementation path - powerful for goal achievement and understanding how to reach specific endpoints end state → steps backward → path forward
18 creative What If Scenarios Explore alternative realities to understand possibilities and implications - valuable for contingency planning and creative exploration scenarios → implications → insights
19 creative SCAMPER Method Apply seven creativity lenses (Substitute/Combine/Adapt/Modify/Put/Eliminate/Reverse) - systematic ideation for product innovation and improvement S→C→A→M→P→E→R
20 learning Feynman Technique Explain complex concepts simply as if teaching a child - the ultimate test of true understanding and excellent for knowledge transfer complex → simple → gaps → mastery
21 learning Active Recall Testing Test understanding without references to verify true knowledge - essential for identifying gaps and reinforcing mastery test → gaps → reinforcement
22 narrative Unreliable Narrator Mode Question assumptions and biases by adopting skeptical perspective - crucial for detecting hidden agendas and finding balanced truth perspective → biases → balanced view
23 optimization Speedrun Optimization Find the fastest most efficient path by eliminating waste - perfect when time pressure demands maximum efficiency current → bottlenecks → optimized
24 optimization New Game Plus Revisit challenges with enhanced capabilities from prior experience - excellent for iterative improvement and mastery building initial → enhanced → improved
25 optimization Roguelike Permadeath Treat decisions as irreversible to force careful high-stakes analysis - ideal for critical decisions with no second chances decision → consequences → execution
26 philosophical Occam's Razor Application Find the simplest sufficient explanation by eliminating unnecessary complexity - essential for debugging and theory selection options → simplification → selection
27 philosophical Trolley Problem Variations Explore ethical trade-offs through moral dilemmas - valuable for understanding values and making difficult ethical decisions dilemma → analysis → decision
28 quantum Observer Effect Consideration Analyze how the act of measurement changes what's being measured - important for understanding metrics impact and self-aware systems unmeasured → observation → impact
29 retrospective Hindsight Reflection Imagine looking back from the future to gain perspective - powerful for project reviews and extracting wisdom from experience future view → insights → application
30 retrospective Lessons Learned Extraction Systematically identify key takeaways and actionable improvements - essential for knowledge transfer and continuous improvement experience → lessons → actions
31 risk Identify Potential Risks Brainstorm what could go wrong across all categories - fundamental for project planning and deployment preparation categories → risks → mitigations
32 risk Challenge from Critical Perspective Play devil's advocate to stress-test ideas and find weaknesses - essential for overcoming groupthink and building robust solutions assumptions → challenges → strengthening
33 risk Failure Mode Analysis Systematically explore how each component could fail - critical for reliability engineering and safety-critical systems components → failures → prevention
34 risk Pre-mortem Analysis Imagine future failure then work backwards to prevent it - powerful technique for risk mitigation before major launches failure scenario → causes → prevention
35 scientific Peer Review Simulation Apply rigorous academic evaluation standards - ensures quality through methodology review and critical assessment methodology → analysis → recommendations
36 scientific Reproducibility Check Verify results can be replicated independently - fundamental for reliability and scientific validity method → replication → validation
37 structural Dependency Mapping Visualize interconnections to understand requirements and impacts - essential for complex systems and integration planning components → dependencies → impacts
38 structural Information Architecture Review Optimize organization and hierarchy for better user experience - crucial for fixing navigation and findability problems current → pain points → restructure
39 structural Skeleton of Thought Create structure first then expand branches in parallel - efficient for generating long content quickly with good organization skeleton → branches → integration

View File

@@ -0,0 +1,104 @@
<task id="bmad/core/tasks/adv-elicit.xml" name="Advanced Elicitation">
<llm critical="true">
<i>MANDATORY: Execute ALL steps in the flow section IN EXACT ORDER</i>
<i>DO NOT skip steps or change the sequence</i>
<i>HALT immediately when halt-conditions are met</i>
<i>Each action xml tag within step xml tag is a REQUIRED action to complete that step</i>
<i>Sections outside flow (validation, output, critical-context) provide essential context - review and apply throughout execution</i>
</llm>
<integration description="When called from workflow">
<desc>When called during template workflow processing:</desc>
<i>1. Receive the current section content that was just generated</i>
<i>2. Apply elicitation methods iteratively to enhance that specific content</i>
<i>3. Return the enhanced version back when user selects 'x' to proceed and return back</i>
<i>4. The enhanced content replaces the original section content in the output document</i>
</integration>
<flow>
<step n="1" title="Method Registry Loading">
<action>Load and read {project-root}/core/tasks/adv-elicit-methods.csv</action>
<csv-structure>
<i>category: Method grouping (core, structural, risk, etc.)</i>
<i>method_name: Display name for the method</i>
<i>description: Rich explanation of what the method does, when to use it, and why it's valuable</i>
<i>output_pattern: Flexible flow guide using → arrows (e.g., "analysis → insights → action")</i>
</csv-structure>
<context-analysis>
<i>Use conversation history</i>
<i>Analyze: content type, complexity, stakeholder needs, risk level, and creative potential</i>
</context-analysis>
<smart-selection>
<i>1. Analyze context: Content type, complexity, stakeholder needs, risk level, creative potential</i>
<i>2. Parse descriptions: Understand each method's purpose from the rich descriptions in CSV</i>
<i>3. Select 5 methods: Choose methods that best match the context based on their descriptions</i>
<i>4. Balance approach: Include mix of foundational and specialized techniques as appropriate</i>
</smart-selection>
</step>
<step n="2" title="Present Options and Handle Responses">
<format>
**Advanced Elicitation Options**
Choose a number (1-5), r to shuffle, or x to proceed:
1. [Method Name]
2. [Method Name]
3. [Method Name]
4. [Method Name]
5. [Method Name]
r. Reshuffle the list with 5 new options
x. Proceed / No Further Actions
</format>
<response-handling>
<case n="1-5">
<i>Execute the selected method using its description from the CSV</i>
<i>Adapt the method's complexity and output format based on the current context</i>
<i>Apply the method creatively to the current section content being enhanced</i>
<i>Display the enhanced version showing what the method revealed or improved</i>
<i>CRITICAL: Ask the user if they would like to apply the changes to the doc (y/n/other) and HALT to await response.</i>
<i>CRITICAL: ONLY if Yes, apply the changes. IF No, discard your memory of the proposed changes. If any other reply, try best to
follow the instructions given by the user.</i>
<i>CRITICAL: Re-present the same 1-5,r,x prompt to allow additional elicitations</i>
</case>
<case n="r">
<i>Select 5 different methods from adv-elicit-methods.csv, present new list with same prompt format</i>
</case>
<case n="x">
<i>Complete elicitation and proceed</i>
<i>Return the fully enhanced content back to create-doc.md</i>
<i>The enhanced content becomes the final version for that section</i>
<i>Signal completion back to create-doc.md to continue with next section</i>
</case>
<case n="direct-feedback">
<i>Apply changes to current section content and re-present choices</i>
</case>
<case n="multiple-numbers">
<i>Execute methods in sequence on the content, then re-offer choices</i>
</case>
</response-handling>
</step>
<step n="3" title="Execution Guidelines">
<i>Method execution: Use the description from CSV to understand and apply each method</i>
<i>Output pattern: Use the pattern as a flexible guide (e.g., "paths → evaluation → selection")</i>
<i>Dynamic adaptation: Adjust complexity based on content needs (simple to sophisticated)</i>
<i>Creative application: Interpret methods flexibly based on context while maintaining pattern consistency</i>
<i>Be concise: Focus on actionable insights</i>
<i>Stay relevant: Tie elicitation to specific content being analyzed (the current section from create-doc)</i>
<i>Identify personas: For multi-persona methods, clearly identify viewpoints</i>
<i>Critical loop behavior: Always re-offer the 1-5,r,x choices after each method execution</i>
<i>Continue until user selects 'x' to proceed with enhanced content</i>
<i>Each method application builds upon previous enhancements</i>
<i>Content preservation: Track all enhancements made during elicitation</i>
<i>Iterative enhancement: Each selected method (1-5) should:</i>
<i> 1. Apply to the current enhanced version of the content</i>
<i> 2. Show the improvements made</i>
<i> 3. Return to the prompt for additional elicitations or completion</i>
</step>
</flow>
</task>

View File

@@ -0,0 +1,65 @@
<task id="bmad/core/tasks/index-docs" name="Index Docs"
description="Generates or updates an index.md of all documents in the specified directory" webskip="true" standalone="true">
<llm critical="true">
<i>MANDATORY: Execute ALL steps in the flow section IN EXACT ORDER</i>
<i>DO NOT skip steps or change the sequence</i>
<i>HALT immediately when halt-conditions are met</i>
<i>Each action xml tag within step xml tag is a REQUIRED action to complete that step</i>
<i>Sections outside flow (validation, output, critical-context) provide essential context - review and apply throughout execution</i>
</llm>
<flow>
<step n="1" title="Scan Directory">
<i>List all files and subdirectories in the target location</i>
</step>
<step n="2" title="Group Content">
<i>Organize files by type, purpose, or subdirectory</i>
</step>
<step n="3" title="Generate Descriptions">
<i>Read each file to understand its actual purpose and create brief (3-10 word) descriptions based on the content, not just the
filename</i>
</step>
<step n="4" title="Create/Update Index">
<i>Write or update index.md with organized file listings</i>
</step>
</flow>
<output-format>
<example>
# Directory Index
## Files
- **[filename.ext](./filename.ext)** - Brief description
- **[another-file.ext](./another-file.ext)** - Brief description
## Subdirectories
### subfolder/
- **[file1.ext](./subfolder/file1.ext)** - Brief description
- **[file2.ext](./subfolder/file2.ext)** - Brief description
### another-folder/
- **[file3.ext](./another-folder/file3.ext)** - Brief description
</example>
</output-format>
<halt-conditions critical="true">
<i>HALT if target directory does not exist or is inaccessible</i>
<i>HALT if user does not have write permissions to create index.md</i>
</halt-conditions>
<validation>
<i>Use relative paths starting with ./</i>
<i>Group similar files together</i>
<i>Read file contents to generate accurate descriptions - don't guess from filenames</i>
<i>Keep descriptions concise but informative (3-10 words)</i>
<i>Sort alphabetically within groups</i>
<i>Skip hidden files (starting with .) unless specified</i>
</validation>
</task>

View File

@@ -0,0 +1,89 @@
<task id="bmad/core/tasks/validate-workflow.xml" name="Validate Workflow Output">
<objective>Run a checklist against a document with thorough analysis and produce a validation report</objective>
<inputs>
<input name="workflow" desc="Workflow path containing checklist.md" />
<input name="checklist" desc="Checklist to validate against (defaults to workflow's checklist.md)" />
<input name="document" desc="Document to validate (ask user if not specified)" />
</inputs>
<flow>
<step n="1" title="Setup">
<action>If checklist not provided, load checklist.md from workflow location</action>
<action>Try to fuzzy match for files similar to the input document name or if user did not provide the document. If document not
provided or unsure, ask user: "Which document should I validate?"</action>
<action>Load both the checklist and document</action>
</step>
<step n="2" title="Validate" critical="true">
<mandate>For EVERY checklist item, WITHOUT SKIPPING ANY:</mandate>
<for-each-item>
<action>Read requirement carefully</action>
<action>Search document for evidence along with any ancillary loaded documents or artifacts (quotes with line numbers)</action>
<action>Analyze deeply - look for explicit AND implied coverage</action>
<mark-as>
✓ PASS - Requirement fully met (provide evidence)
⚠ PARTIAL - Some coverage but incomplete (explain gaps)
✗ FAIL - Not met or severely deficient (explain why)
N/A - Not applicable (explain reason)
</mark-as>
</for-each-item>
<critical>DO NOT SKIP ANY SECTIONS OR ITEMS</critical>
</step>
<step n="3" title="Generate Report">
<action>Create validation-report-{timestamp}.md in document's folder</action>
<report-format>
# Validation Report
**Document:** {document-path}
**Checklist:** {checklist-path}
**Date:** {timestamp}
## Summary
- Overall: X/Y passed (Z%)
- Critical Issues: {count}
## Section Results
### {Section Name}
Pass Rate: X/Y (Z%)
{For each item:}
[MARK] {Item description}
Evidence: {Quote with line# or explanation}
{If FAIL/PARTIAL: Impact: {why this matters}}
## Failed Items
{All ✗ items with recommendations}
## Partial Items
{All ⚠ items with what's missing}
## Recommendations
1. Must Fix: {critical failures}
2. Should Improve: {important gaps}
3. Consider: {minor improvements}
</report-format>
</step>
<step n="4" title="Summary for User">
<action>Present section-by-section summary</action>
<action>Highlight all critical issues</action>
<action>Provide path to saved report</action>
<action>HALT - do not continue unless user asks</action>
</step>
</flow>
<critical-rules>
<rule>NEVER skip sections - validate EVERYTHING</rule>
<rule>ALWAYS provide evidence (quotes + line numbers) for marks</rule>
<rule>Think deeply about each requirement - don't rush</rule>
<rule>Save report to document's folder automatically</rule>
<rule>HALT after presenting summary - wait for user</rule>
</critical-rules>
</task>

View File

@@ -0,0 +1,166 @@
<task id="bmad/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>
<rule n="4">Elicit tags: Execute immediately unless #yolo mode (which skips ALL elicitation)</rule>
<rule n="5">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>
<tag>goto step="x" → Jump to specified step</tag>
</execute-tags>
</substep>
<substep n="2c" title="Handle Special Output Tags">
<if tag="template-output">
<mandate>Generate content for this section</mandate>
<mandate>Save to file (Write first time, Edit subsequent)</mandate>
<action>Show checkpoint separator: ━━━━━━━━━━━━━━━━━━━━━━━</action>
<action>Display generated content</action>
<ask>Continue [c] or Edit [e]? WAIT for response</ask>
</if>
<if tag="elicit-required">
<mandate critical="true">YOU MUST READ the file at {project-root}/bmad/core/tasks/adv-elicit.xml using Read tool BEFORE presenting
any elicitation menu</mandate>
<action>Load and run task {project-root}/bmad/core/tasks/adv-elicit.xml with current context</action>
<action>Show elicitation menu 5 relevant options (list 1-5 options, Continue [c] or Reshuffle [r])</action>
<mandate>HALT and WAIT for user selection</mandate>
</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>
<mode name="#yolo">Skip optional sections, skip all elicitation, minimize prompts</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>
</execution>
<output>
<tag>template-output - Save content checkpoint</tag>
<tag>elicit-required - Trigger enhancement</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;
&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;
&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;
&lt;check if="else"&gt;...&lt;/check&gt;</syntax>
<rationale>Clear branching logic with explicit blocks</rationale>
</pattern>
</conditional-execution-patterns>
<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>