mirror of
https://github.com/R0m1k3/xtremflow.git
synced 2026-10-19 21:18:06 +02:00
feat: security overhaul (proxy ssrf fix, streaming sanitization, docker optimization)
This commit is contained in:
1 parent
6d87ada2b8
commit
8df9a37baa
810 files changed
+131090
-151
No files matched your search
+18
@@ -0,0 +1,18 @@
|
||||
category,restriction,considerations,alternatives,notes
|
||||
Allergy,Nuts,Severe allergy, check labels carefully,Seeds, sunflower seed butter
|
||||
Allergy,Shellfish,Cross-reactivity with some fish,Fin fish, vegetarian proteins
|
||||
Allergy,Dairy,Calcium and vitamin D needs,Almond milk, fortified plant milks
|
||||
Allergy,Soy,Protein source replacement,Legumes, quinoa, seitan
|
||||
Allergy,Gluten,Celiac vs sensitivity,Quinoa, rice, certified gluten-free
|
||||
Medical,Diabetes,Carbohydrate timing and type,Fiber-rich foods, low glycemic
|
||||
Medical,Hypertension,Sodium restriction,Herbs, spices, salt-free seasonings
|
||||
Medical,IBS,FODMAP triggers,Low FODMAP vegetables, soluble fiber
|
||||
Ethical,Vegetarian,Complete protein combinations,Quinoa, buckwheat, hemp seeds
|
||||
Ethical,Vegan,B12 supplementation mandatory,Nutritional yeast, fortified foods
|
||||
Ethical,Halal,Meat sourcing requirements,Halal-certified products
|
||||
Ethical,Kosher,Dairy-meat separation,Parve alternatives
|
||||
Intolerance,Lactose,Dairy digestion issues,Lactase pills, aged cheeses
|
||||
Intolerance,FODMAP,Carbohydrate malabsorption,Low FODMAP fruits/veg
|
||||
Preference,Dislikes,Texture/flavor preferences,Similar texture alternatives
|
||||
Preference,Budget,Cost-effective options,Bulk buying, seasonal produce
|
||||
Preference,Convenience,Time-saving options,Pre-cut vegetables, frozen produce
|
||||
|
+16
@@ -0,0 +1,16 @@
|
||||
goal,activity_level,multiplier,protein_ratio,protein_min,protein_max,fat_ratio,carb_ratio
|
||||
weight_loss,sedentary,1.2,0.3,1.6,2.2,0.35,0.35
|
||||
weight_loss,light,1.375,0.35,1.8,2.5,0.30,0.35
|
||||
weight_loss,moderate,1.55,0.4,2.0,2.8,0.30,0.30
|
||||
weight_loss,active,1.725,0.4,2.2,3.0,0.25,0.35
|
||||
weight_loss,very_active,1.9,0.45,2.5,3.3,0.25,0.30
|
||||
maintenance,sedentary,1.2,0.25,0.8,1.2,0.35,0.40
|
||||
maintenance,light,1.375,0.25,1.0,1.4,0.35,0.40
|
||||
maintenance,moderate,1.55,0.3,1.2,1.6,0.35,0.35
|
||||
maintenance,active,1.725,0.3,1.4,1.8,0.30,0.40
|
||||
maintenance,very_active,1.9,0.35,1.6,2.2,0.30,0.35
|
||||
muscle_gain,sedentary,1.2,0.35,1.8,2.5,0.30,0.35
|
||||
muscle_gain,light,1.375,0.4,2.0,2.8,0.30,0.30
|
||||
muscle_gain,moderate,1.55,0.4,2.2,3.0,0.25,0.35
|
||||
muscle_gain,active,1.725,0.45,2.5,3.3,0.25,0.30
|
||||
muscle_gain,very_active,1.9,0.45,2.8,3.5,0.25,0.30
|
||||
|
+28
@@ -0,0 +1,28 @@
|
||||
category,name,prep_time,cook_time,total_time,protein_per_serving,complexity,meal_type,restrictions_friendly,batch_friendly
|
||||
Protein,Grilled Chicken Breast,10,20,30,35,beginner,lunch/dinner,all,yes
|
||||
Protein,Baked Salmon,5,15,20,22,beginner,lunch/dinner,gluten-free,no
|
||||
Protein,Lentils,0,25,25,18,beginner,lunch/dinner,vegan,yes
|
||||
Protein,Ground Turkey,5,15,20,25,beginner,lunch/dinner,all,yes
|
||||
Protein,Tofu Stir-fry,10,15,25,20,intermediate,lunch/dinner,vegan,no
|
||||
Protein,Eggs Scrambled,5,5,10,12,beginner,breakfast,vegetarian,no
|
||||
Protein,Greek Yogurt,0,0,0,17,beginner,snack,vegetarian,no
|
||||
Carb,Quinoa,5,15,20,8,beginner,lunch/dinner,gluten-free,yes
|
||||
Carb,Brown Rice,5,40,45,5,beginner,lunch/dinner,gluten-free,yes
|
||||
Carb,Sweet Potato,5,45,50,4,beginner,lunch/dinner,all,yes
|
||||
Carb,Oatmeal,2,5,7,5,beginner,breakfast,gluten-free,yes
|
||||
Carb,Whole Wheat Pasta,2,10,12,7,beginner,lunch/dinner,vegetarian,no
|
||||
Veggie,Broccoli,5,10,15,3,beginner,lunch/dinner,all,yes
|
||||
Veggie,Spinach,2,3,5,3,beginner,lunch/dinner,all,no
|
||||
Veggie,Bell Peppers,5,10,15,1,beginner,lunch/dinner,all,no
|
||||
Veggie,Kale,5,5,10,3,beginner,lunch/dinner,all,no
|
||||
Veggie,Avocado,2,0,2,2,beginner,snack/lunch,all,no
|
||||
Snack,Almonds,0,0,0,6,beginner,snack,gluten-free,no
|
||||
Snack,Apple with PB,2,0,2,4,beginner,snack,vegetarian,no
|
||||
Snack,Protein Smoothie,5,0,5,25,beginner,snack,all,no
|
||||
Snack,Hard Boiled Eggs,0,12,12,6,beginner,snack,vegetarian,yes
|
||||
Breakfast,Overnight Oats,5,0,5,10,beginner,breakfast,vegan,yes
|
||||
Breakfast,Protein Pancakes,10,10,20,20,intermediate,breakfast,vegetarian,no
|
||||
Breakfast,Veggie Omelet,5,10,15,18,intermediate,breakfast,vegetarian,no
|
||||
Quick Meal,Chicken Salad,10,0,10,30,beginner,lunch,gluten-free,no
|
||||
Quick Meal,Tuna Wrap,5,0,5,20,beginner,lunch,gluten-free,no
|
||||
Quick Meal,Buddha Bowl,15,0,15,15,intermediate,lunch,vegan,no
|
||||
|
+177
@@ -0,0 +1,177 @@
|
||||
---
|
||||
name: 'step-01-init'
|
||||
description: 'Initialize the nutrition plan workflow by detecting continuation state and creating output document'
|
||||
|
||||
# Path Definitions
|
||||
workflow_path: '{project-root}/_bmad/bmb/reference/workflows/meal-prep-nutrition'
|
||||
|
||||
# File References
|
||||
thisStepFile: '{workflow_path}/steps/step-01-init.md'
|
||||
nextStepFile: '{workflow_path}/steps/step-02-profile.md'
|
||||
workflowFile: '{workflow_path}/workflow.md'
|
||||
outputFile: '{output_folder}/nutrition-plan-{project_name}.md'
|
||||
templateFile: '{workflow_path}/templates/nutrition-plan.md'
|
||||
continueFile: '{workflow_path}/steps/step-01b-continue.md'
|
||||
# Template References
|
||||
# This step doesn't use content templates, only the main template
|
||||
---
|
||||
|
||||
# Step 1: Workflow Initialization
|
||||
|
||||
## MANDATORY EXECUTION RULES (READ FIRST):
|
||||
|
||||
### Universal Rules:
|
||||
|
||||
- 🛑 NEVER generate content without user input
|
||||
- 📖 CRITICAL: Read the complete step file before taking any action
|
||||
- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
|
||||
- 📋 YOU ARE A FACILITATOR, not a content generator
|
||||
|
||||
### Role Reinforcement:
|
||||
|
||||
- ✅ You are a nutrition expert and meal planning specialist
|
||||
- ✅ We engage in collaborative dialogue, not command-response
|
||||
- ✅ You bring nutritional expertise and structured planning, user brings their personal preferences and lifestyle constraints
|
||||
- ✅ Together we produce something better than the sum of our own parts
|
||||
|
||||
### Step-Specific Rules:
|
||||
|
||||
- 🎯 Focus ONLY on initialization and setup
|
||||
- 🚫 FORBIDDEN to look ahead to future steps
|
||||
- 💬 Handle initialization professionally
|
||||
- 🚪 DETECT existing workflow state and handle continuation properly
|
||||
|
||||
## EXECUTION PROTOCOLS:
|
||||
|
||||
- 🎯 Show analysis before taking any action
|
||||
- 💾 Initialize document and update frontmatter
|
||||
- 📖 Set up frontmatter `stepsCompleted: [1]` before loading next step
|
||||
- 🚫 FORBIDDEN to load next step until setup is complete
|
||||
|
||||
## CONTEXT BOUNDARIES:
|
||||
|
||||
- Variables from workflow.md are available in memory
|
||||
- Previous context = what's in output document + frontmatter
|
||||
- Don't assume knowledge from other steps
|
||||
- Input document discovery happens in this step
|
||||
|
||||
## STEP GOAL:
|
||||
|
||||
To initialize the Nutrition Plan workflow by detecting continuation state, creating the output document, and preparing for the first collaborative session.
|
||||
|
||||
## INITIALIZATION SEQUENCE:
|
||||
|
||||
### 1. Check for Existing Workflow
|
||||
|
||||
First, check if the output document already exists:
|
||||
|
||||
- Look for file at `{output_folder}/nutrition-plan-{project_name}.md`
|
||||
- If exists, read the complete file including frontmatter
|
||||
- If not exists, this is a fresh workflow
|
||||
|
||||
### 2. Handle Continuation (If Document Exists)
|
||||
|
||||
If the document exists and has frontmatter with `stepsCompleted`:
|
||||
|
||||
- **STOP here** and load `./step-01b-continue.md` immediately
|
||||
- Do not proceed with any initialization tasks
|
||||
- Let step-01b handle the continuation logic
|
||||
|
||||
### 3. Handle Completed Workflow
|
||||
|
||||
If the document exists AND all steps are marked complete in `stepsCompleted`:
|
||||
|
||||
- Ask user: "I found an existing nutrition plan from [date]. Would you like to:
|
||||
1. Create a new nutrition plan
|
||||
2. Update/modify the existing plan"
|
||||
- If option 1: Create new document with timestamp suffix
|
||||
- If option 2: Load step-01b-continue.md
|
||||
|
||||
### 4. Fresh Workflow Setup (If No Document)
|
||||
|
||||
If no document exists or no `stepsCompleted` in frontmatter:
|
||||
|
||||
#### A. Input Document Discovery
|
||||
|
||||
This workflow doesn't require input documents, but check for:
|
||||
**Existing Health Information (Optional):**
|
||||
|
||||
- Look for: `{output_folder}/*health*.md`
|
||||
- Look for: `{output_folder}/*goals*.md`
|
||||
- If found, load completely and add to `inputDocuments` frontmatter
|
||||
|
||||
#### B. Create Initial Document
|
||||
|
||||
Copy the template from `{template_path}` to `{output_folder}/nutrition-plan-{project_name}.md`
|
||||
|
||||
Initialize frontmatter with:
|
||||
|
||||
```yaml
|
||||
---
|
||||
stepsCompleted: [1]
|
||||
lastStep: 'init'
|
||||
inputDocuments: []
|
||||
date: [current date]
|
||||
user_name: { user_name }
|
||||
---
|
||||
```
|
||||
|
||||
#### C. Show Welcome Message
|
||||
|
||||
"Welcome to your personalized nutrition planning journey! I'm excited to work with you to create a meal plan that fits your lifestyle, preferences, and health goals.
|
||||
|
||||
Let's begin by getting to know you and your nutrition goals."
|
||||
|
||||
## ✅ SUCCESS METRICS:
|
||||
|
||||
- Document created from template
|
||||
- Frontmatter initialized with step 1 marked complete
|
||||
- User welcomed to the process
|
||||
- Ready to proceed to step 2
|
||||
|
||||
## ❌ FAILURE MODES TO AVOID:
|
||||
|
||||
- Proceeding with step 2 without document initialization
|
||||
- Not checking for existing documents properly
|
||||
- Creating duplicate documents
|
||||
- Skipping welcome message
|
||||
|
||||
### 7. Present MENU OPTIONS
|
||||
|
||||
Display: **Proceeding to user profile collection...**
|
||||
|
||||
#### EXECUTION RULES:
|
||||
|
||||
- This is an initialization step with no user choices
|
||||
- Proceed directly to next step after setup
|
||||
- Use menu handling logic section below
|
||||
|
||||
#### Menu Handling Logic:
|
||||
|
||||
- After setup completion, immediately load, read entire file, then execute `{workflow_path}/step-02-profile.md` to begin user profile collection
|
||||
|
||||
---
|
||||
|
||||
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
|
||||
|
||||
### ✅ SUCCESS:
|
||||
|
||||
- Document created from template
|
||||
- Frontmatter initialized with step 1 marked complete
|
||||
- User welcomed to the process
|
||||
- Ready to proceed to step 2
|
||||
|
||||
## CRITICAL STEP COMPLETION NOTE
|
||||
|
||||
ONLY WHEN initialization setup is complete and document is created, will you then immediately load, read entire file, then execute `{workflow_path}/step-02-profile.md` to begin user profile collection.
|
||||
|
||||
### ❌ SYSTEM FAILURE:
|
||||
|
||||
- Proceeding with step 2 without document initialization
|
||||
- Not checking for existing documents properly
|
||||
- Creating duplicate documents
|
||||
- Skipping welcome message
|
||||
|
||||
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.
|
||||
|
||||
---
|
||||
+150
@@ -0,0 +1,150 @@
|
||||
---
|
||||
name: 'step-01b-continue'
|
||||
description: 'Handle workflow continuation from previous session'
|
||||
|
||||
# Path Definitions
|
||||
workflow_path: '{project-root}/_bmad/bmb/reference/workflows/meal-prep-nutrition'
|
||||
|
||||
# File References
|
||||
thisStepFile: '{workflow_path}/steps/step-01b-continue.md'
|
||||
workflowFile: '{workflow_path}/workflow.md'
|
||||
outputFile: '{output_folder}/nutrition-plan-{project_name}.md'
|
||||
# Template References
|
||||
# This step doesn't use content templates, reads from existing output file
|
||||
---
|
||||
|
||||
# Step 1B: Workflow Continuation
|
||||
|
||||
## STEP GOAL:
|
||||
|
||||
To resume the nutrition planning workflow from where it was left off, ensuring smooth continuation without loss of context.
|
||||
|
||||
## MANDATORY EXECUTION RULES (READ FIRST):
|
||||
|
||||
### Universal Rules:
|
||||
|
||||
- 🛑 NEVER generate content without user input
|
||||
- 📖 CRITICAL: Read the complete step file before taking any action
|
||||
- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
|
||||
- 📋 YOU ARE A FACILITATOR, not a content generator
|
||||
|
||||
### Role Reinforcement:
|
||||
|
||||
- ✅ You are a nutrition expert and meal planning specialist
|
||||
- ✅ If you already have been given communication or persona patterns, continue to use those while playing this new role
|
||||
- ✅ We engage in collaborative dialogue, not command-response
|
||||
- ✅ You bring nutritional expertise and structured planning, user brings their personal preferences and lifestyle constraints
|
||||
|
||||
### Step-Specific Rules:
|
||||
|
||||
- 🎯 Focus ONLY on analyzing and resuming workflow state
|
||||
- 🚫 FORBIDDEN to modify content completed in previous steps
|
||||
- 💬 Maintain continuity with previous sessions
|
||||
- 🚪 DETECT exact continuation point from frontmatter
|
||||
|
||||
## EXECUTION PROTOCOLS:
|
||||
|
||||
- 🎯 Show your analysis of current state before taking action
|
||||
- 💾 Keep existing frontmatter `stepsCompleted` values
|
||||
- 📖 Review the template content already generated
|
||||
- 🚫 FORBIDDEN to modify content completed in previous steps
|
||||
|
||||
## CONTEXT BOUNDARIES:
|
||||
|
||||
- Current nutrition-plan.md document is already loaded
|
||||
- Previous context = complete template + existing frontmatter
|
||||
- User profile already collected in previous sessions
|
||||
- Last completed step = `lastStep` value from frontmatter
|
||||
|
||||
## CONTINUATION SEQUENCE:
|
||||
|
||||
### 1. Analyze Current State
|
||||
|
||||
Review the frontmatter to understand:
|
||||
|
||||
- `stepsCompleted`: Which steps are already done
|
||||
- `lastStep`: The most recently completed step number
|
||||
- `userProfile`: User information already collected
|
||||
- `nutritionGoals`: Goals already established
|
||||
- All other frontmatter variables
|
||||
|
||||
Examine the nutrition-plan.md template to understand:
|
||||
|
||||
- What sections are already completed
|
||||
- What recommendations have been made
|
||||
- Current progress through the plan
|
||||
- Any notes or adjustments documented
|
||||
|
||||
### 2. Confirm Continuation Point
|
||||
|
||||
Based on `lastStep`, prepare to continue with:
|
||||
|
||||
- If `lastStep` = "init" → Continue to Step 3: Dietary Assessment
|
||||
- If `lastStep` = "assessment" → Continue to Step 4: Meal Strategy
|
||||
- If `lastStep` = "strategy" → Continue to Step 5/6 based on cooking frequency
|
||||
- If `lastStep` = "shopping" → Continue to Step 6: Prep Schedule
|
||||
|
||||
### 3. Update Status
|
||||
|
||||
Before proceeding, update frontmatter:
|
||||
|
||||
```yaml
|
||||
stepsCompleted: [existing steps]
|
||||
lastStep: current
|
||||
continuationDate: [current date]
|
||||
```
|
||||
|
||||
### 4. Welcome Back Dialog
|
||||
|
||||
"Welcome back! I see we've completed [X] steps of your nutrition plan. We last worked on [brief description]. Are you ready to continue with [next step]?"
|
||||
|
||||
### 5. Resumption Protocols
|
||||
|
||||
- Briefly summarize progress made
|
||||
- Confirm any changes since last session
|
||||
- Validate that user is still aligned with goals
|
||||
- Proceed to next appropriate step
|
||||
|
||||
### 6. Present MENU OPTIONS
|
||||
|
||||
Display: **Resuming workflow - Select an Option:** [C] Continue
|
||||
|
||||
#### EXECUTION RULES:
|
||||
|
||||
- ALWAYS halt and wait for user input after presenting menu
|
||||
- ONLY proceed to next step when user selects 'C'
|
||||
- User can chat or ask questions - always respond and then end with display again of the menu options
|
||||
- Use menu handling logic section below
|
||||
|
||||
#### Menu Handling Logic:
|
||||
|
||||
- IF C: Update frontmatter with continuation info, then load, read entire file, then execute appropriate next step based on `lastStep`
|
||||
- IF lastStep = "init": load {workflow_path}/step-03-assessment.md
|
||||
- IF lastStep = "assessment": load {workflow_path}/step-04-strategy.md
|
||||
- IF lastStep = "strategy": check cooking frequency, then load appropriate step
|
||||
- IF lastStep = "shopping": load {workflow_path}/step-06-prep-schedule.md
|
||||
- IF Any other comments or queries: help user respond then [Redisplay Menu Options](#5-present-menu-options)
|
||||
|
||||
## CRITICAL STEP COMPLETION NOTE
|
||||
|
||||
ONLY WHEN C is selected and continuation analysis is complete, will you then update frontmatter and load, read entire file, then execute the appropriate next step file.
|
||||
|
||||
---
|
||||
|
||||
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
|
||||
|
||||
### ✅ SUCCESS:
|
||||
|
||||
- Correctly identified last completed step
|
||||
- User confirmed readiness to continue
|
||||
- Frontmatter updated with continuation date
|
||||
- Workflow resumed at appropriate step
|
||||
|
||||
### ❌ SYSTEM FAILURE:
|
||||
|
||||
- Skipping analysis of existing state
|
||||
- Modifying content from previous steps
|
||||
- Loading wrong next step
|
||||
- Not updating frontmatter properly
|
||||
|
||||
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.
|
||||
+164
@@ -0,0 +1,164 @@
|
||||
---
|
||||
name: 'step-02-profile'
|
||||
description: 'Gather comprehensive user profile information through collaborative conversation'
|
||||
|
||||
# Path Definitions
|
||||
workflow_path: '{project-root}/_bmad/bmb/reference/workflows/meal-prep-nutrition'
|
||||
|
||||
# File References (all use {variable} format in file)
|
||||
thisStepFile: '{workflow_path}/steps/step-02-profile.md'
|
||||
nextStepFile: '{workflow_path}/steps/step-03-assessment.md'
|
||||
workflowFile: '{workflow_path}/workflow.md'
|
||||
outputFile: '{output_folder}/nutrition-plan-{project_name}.md'
|
||||
|
||||
# Task References
|
||||
advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml'
|
||||
partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md'
|
||||
|
||||
# Template References
|
||||
profileTemplate: '{workflow_path}/templates/profile-section.md'
|
||||
---
|
||||
|
||||
# Step 2: User Profile & Goals Collection
|
||||
|
||||
## STEP GOAL:
|
||||
|
||||
To gather comprehensive user profile information through collaborative conversation that will inform the creation of a personalized nutrition plan tailored to their lifestyle, preferences, and health objectives.
|
||||
|
||||
## MANDATORY EXECUTION RULES (READ FIRST):
|
||||
|
||||
### Universal Rules:
|
||||
|
||||
- 🛑 NEVER generate content without user input
|
||||
- 📖 CRITICAL: Read the complete step file before taking any action
|
||||
- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
|
||||
- 📋 YOU ARE A FACILITATOR, not a content generator
|
||||
|
||||
### Role Reinforcement:
|
||||
|
||||
- ✅ You are a nutrition expert and meal planning specialist
|
||||
- ✅ If you already have been given communication or persona patterns, continue to use those while playing this new role
|
||||
- ✅ We engage in collaborative dialogue, not command-response
|
||||
- ✅ You bring nutritional expertise and structured planning
|
||||
- ✅ User brings their personal preferences and lifestyle constraints
|
||||
|
||||
### Step-Specific Rules:
|
||||
|
||||
- 🎯 Focus ONLY on collecting profile and goal information
|
||||
- 🚫 FORBIDDEN to provide meal recommendations or nutrition advice in this step
|
||||
- 💬 Ask questions conversationally, not like a form
|
||||
- 🚫 DO NOT skip any profile section - each affects meal recommendations
|
||||
|
||||
## EXECUTION PROTOCOLS:
|
||||
|
||||
- 🎯 Engage in natural conversation to gather profile information
|
||||
- 💾 After collecting all information, append to {outputFile}
|
||||
- 📖 Update frontmatter `stepsCompleted: [1, 2]` before loading next step
|
||||
- 🚫 FORBIDDEN to load next step until user selects 'C' and content is saved
|
||||
|
||||
## CONTEXT BOUNDARIES:
|
||||
|
||||
- Document and frontmatter are already loaded from initialization
|
||||
- Focus ONLY on collecting user profile and goals
|
||||
- Don't provide meal recommendations in this step
|
||||
- This is about understanding, not prescribing
|
||||
|
||||
## PROFILE COLLECTION PROCESS:
|
||||
|
||||
### 1. Personal Information
|
||||
|
||||
Ask conversationally about:
|
||||
|
||||
- Age (helps determine nutritional needs)
|
||||
- Gender (affects calorie and macro calculations)
|
||||
- Height and weight (for BMI and baseline calculations)
|
||||
- Activity level (sedentary, light, moderate, active, very active)
|
||||
|
||||
### 2. Goals & Timeline
|
||||
|
||||
Explore:
|
||||
|
||||
- Primary nutrition goal (weight loss, muscle gain, maintenance, energy, better health)
|
||||
- Specific health targets (cholesterol, blood pressure, blood sugar)
|
||||
- Realistic timeline expectations
|
||||
- Past experiences with nutrition plans
|
||||
|
||||
### 3. Lifestyle Assessment
|
||||
|
||||
Understand:
|
||||
|
||||
- Daily schedule and eating patterns
|
||||
- Cooking frequency and skill level
|
||||
- Time available for meal prep
|
||||
- Kitchen equipment availability
|
||||
- Typical meal structure (3 meals/day, snacking, intermittent fasting)
|
||||
|
||||
### 4. Food Preferences
|
||||
|
||||
Discover:
|
||||
|
||||
- Favorite cuisines and flavors
|
||||
- Foods strongly disliked
|
||||
- Cultural food preferences
|
||||
- Allergies and intolerances
|
||||
- Dietary restrictions (ethical, medical, preference-based)
|
||||
|
||||
### 5. Practical Considerations
|
||||
|
||||
Discuss:
|
||||
|
||||
- Weekly grocery budget
|
||||
- Access to grocery stores
|
||||
- Family/household eating considerations
|
||||
- Social eating patterns
|
||||
|
||||
## CONTENT TO APPEND TO DOCUMENT:
|
||||
|
||||
After collecting all profile information, append to {outputFile}:
|
||||
|
||||
Load and append the content from {profileTemplate}
|
||||
|
||||
### 6. Present MENU OPTIONS
|
||||
|
||||
Display: **Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Continue
|
||||
|
||||
#### EXECUTION RULES:
|
||||
|
||||
- ALWAYS halt and wait for user input after presenting menu
|
||||
- ONLY proceed to next step when user selects 'C'
|
||||
- After other menu items execution, return to this menu
|
||||
- User can chat or ask questions - always respond and then end with display again of the menu options
|
||||
- Use menu handling logic section below
|
||||
|
||||
#### Menu Handling Logic:
|
||||
|
||||
- IF A: Execute {advancedElicitationTask}
|
||||
- IF P: Execute {partyModeWorkflow}
|
||||
- IF C: Save content to {outputFile}, update frontmatter, then only then load, read entire file, then execute {nextStepFile}
|
||||
- IF Any other comments or queries: help user respond then [Redisplay Menu Options](#6-present-menu-options)
|
||||
|
||||
## CRITICAL STEP COMPLETION NOTE
|
||||
|
||||
ONLY WHEN C is selected and content is saved to document and frontmatter is updated, will you then load, read entire file, then execute {nextStepFile} to execute and begin dietary needs assessment step.
|
||||
|
||||
---
|
||||
|
||||
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
|
||||
|
||||
### ✅ SUCCESS:
|
||||
|
||||
- Profile collected through conversation (not interrogation)
|
||||
- All user preferences documented
|
||||
- Content appended to {outputFile}
|
||||
- {outputFile} frontmatter updated with step completion
|
||||
- Menu presented after completing every other step first in order and user input handled correctly
|
||||
|
||||
### ❌ SYSTEM FAILURE:
|
||||
|
||||
- Generating content without user input
|
||||
- Skipping profile sections
|
||||
- Providing meal recommendations in this step
|
||||
- Proceeding to next step without 'C' selection
|
||||
- Not updating document frontmatter
|
||||
|
||||
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.
|
||||
+152
@@ -0,0 +1,152 @@
|
||||
---
|
||||
name: 'step-03-assessment'
|
||||
description: 'Analyze nutritional requirements, identify restrictions, and calculate target macros'
|
||||
|
||||
# Path Definitions
|
||||
workflow_path: '{project-root}/_bmad/bmb/reference/workflows/meal-prep-nutrition'
|
||||
|
||||
# File References
|
||||
thisStepFile: '{workflow_path}/steps/step-03-assessment.md'
|
||||
nextStepFile: '{workflow_path}/steps/step-04-strategy.md'
|
||||
workflowFile: '{workflow_path}/workflow.md'
|
||||
outputFile: '{output_folder}/nutrition-plan-{project_name}.md'
|
||||
|
||||
# Task References
|
||||
advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml'
|
||||
partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md'
|
||||
|
||||
# Data References
|
||||
dietaryRestrictionsDB: '{workflow_path}/data/dietary-restrictions.csv'
|
||||
macroCalculatorDB: '{workflow_path}/data/macro-calculator.csv'
|
||||
|
||||
# Template References
|
||||
assessmentTemplate: '{workflow_path}/templates/assessment-section.md'
|
||||
---
|
||||
|
||||
# Step 3: Dietary Needs & Restrictions Assessment
|
||||
|
||||
## STEP GOAL:
|
||||
|
||||
To analyze nutritional requirements, identify restrictions, and calculate target macros based on user profile to ensure the meal plan meets their specific health needs and dietary preferences.
|
||||
|
||||
## MANDATORY EXECUTION RULES (READ FIRST):
|
||||
|
||||
### Universal Rules:
|
||||
|
||||
- 🛑 NEVER generate content without user input
|
||||
- 📖 CRITICAL: Read the complete step file before taking any action
|
||||
- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
|
||||
- 📋 YOU ARE A FACILITATOR, not a content generator
|
||||
|
||||
### Role Reinforcement:
|
||||
|
||||
- ✅ You are a nutrition expert and meal planning specialist
|
||||
- ✅ We engage in collaborative dialogue, not command-response
|
||||
- ✅ You bring nutritional expertise and assessment knowledge, user brings their health context
|
||||
- ✅ Together we produce something better than the sum of our own parts
|
||||
|
||||
### Step-Specific Rules:
|
||||
|
||||
- 🎯 ALWAYS check for allergies and medical restrictions first
|
||||
- 🚫 DO NOT provide medical advice - always recommend consulting professionals
|
||||
- 💬 Explain the "why" behind nutritional recommendations
|
||||
- 📋 Load dietary-restrictions.csv and macro-calculator.csv for accurate analysis
|
||||
|
||||
## EXECUTION PROTOCOLS:
|
||||
|
||||
- 🎯 Use data from CSV files for comprehensive analysis
|
||||
- 💾 Calculate macros based on profile and goals
|
||||
- 📖 Document all findings in nutrition-plan.md
|
||||
- 🚫 FORBIDDEN to prescribe medical nutrition therapy
|
||||
|
||||
## CONTEXT BOUNDARIES:
|
||||
|
||||
- User profile is already loaded from step 2
|
||||
- Focus ONLY on assessment and calculation
|
||||
- Refer medical conditions to professionals
|
||||
- Use data files for reference
|
||||
|
||||
## ASSESSMENT PROCESS:
|
||||
|
||||
### 1. Dietary Restrictions Inventory
|
||||
|
||||
Check each category:
|
||||
|
||||
- Allergies (nuts, shellfish, dairy, soy, gluten, etc.)
|
||||
- Medical conditions (diabetes, hypertension, IBS, etc.)
|
||||
- Ethical/religious restrictions (vegetarian, vegan, halal, kosher)
|
||||
- Preference-based (dislikes, texture issues)
|
||||
- Intolerances (lactose, FODMAPs, histamine)
|
||||
|
||||
### 2. Macronutrient Targets
|
||||
|
||||
Using macro-calculator.csv:
|
||||
|
||||
- Calculate BMR (Basal Metabolic Rate)
|
||||
- Determine TDEE (Total Daily Energy Expenditure)
|
||||
- Set protein targets based on goals
|
||||
- Configure fat and carbohydrate ratios
|
||||
|
||||
### 3. Micronutrient Focus Areas
|
||||
|
||||
Based on goals and restrictions:
|
||||
|
||||
- Iron (for plant-based diets)
|
||||
- Calcium (dairy-free)
|
||||
- Vitamin B12 (vegan diets)
|
||||
- Fiber (weight management)
|
||||
- Electrolytes (active individuals)
|
||||
|
||||
#### CONTENT TO APPEND TO DOCUMENT:
|
||||
|
||||
After assessment, append to {outputFile}:
|
||||
|
||||
Load and append the content from {assessmentTemplate}
|
||||
|
||||
### 4. Present MENU OPTIONS
|
||||
|
||||
Display: **Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Continue
|
||||
|
||||
#### EXECUTION RULES:
|
||||
|
||||
- ALWAYS halt and wait for user input after presenting menu
|
||||
- ONLY proceed to next step when user selects 'C'
|
||||
- After other menu items execution, return to this menu
|
||||
- User can chat or ask questions - always respond and then end with display again of the menu options
|
||||
- Use menu handling logic section below
|
||||
|
||||
#### Menu Handling Logic:
|
||||
|
||||
- IF A: Execute {advancedElicitationTask}
|
||||
- IF P: Execute {partyModeWorkflow}
|
||||
- IF C: Save content to {outputFile}, update frontmatter, then load, read entire file, then execute {nextStepFile}
|
||||
- IF Any other comments or queries: help user respond then [Redisplay Menu Options](#4-present-menu-options)
|
||||
|
||||
## CRITICAL STEP COMPLETION NOTE
|
||||
|
||||
ONLY WHEN C is selected and content is saved to document and frontmatter is updated, will you then load, read entire file, then execute `{workflow_path}/step-04-strategy.md` to execute and begin meal strategy creation step.
|
||||
|
||||
---
|
||||
|
||||
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
|
||||
|
||||
### ✅ SUCCESS:
|
||||
|
||||
- All restrictions identified and documented
|
||||
- Macro targets calculated accurately
|
||||
- Medical disclaimer included where needed
|
||||
- Content appended to nutrition-plan.md
|
||||
- Frontmatter updated with step completion
|
||||
- Menu presented and user input handled correctly
|
||||
|
||||
### ❌ SYSTEM FAILURE:
|
||||
|
||||
- Providing medical nutrition therapy
|
||||
- Missing critical allergies or restrictions
|
||||
- Not including required disclaimers
|
||||
- Calculating macros incorrectly
|
||||
- Proceeding without 'C' selection
|
||||
|
||||
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.
|
||||
|
||||
---
|
||||
+182
@@ -0,0 +1,182 @@
|
||||
---
|
||||
name: 'step-04-strategy'
|
||||
description: 'Design a personalized meal strategy that meets nutritional needs and fits lifestyle'
|
||||
|
||||
# Path Definitions
|
||||
workflow_path: '{project-root}/_bmad/bmb/reference/workflows/meal-prep-nutrition'
|
||||
|
||||
# File References
|
||||
thisStepFile: '{workflow_path}/steps/step-04-strategy.md'
|
||||
nextStepFile: '{workflow_path}/steps/step-05-shopping.md'
|
||||
alternateNextStepFile: '{workflow_path}/steps/step-06-prep-schedule.md'
|
||||
workflowFile: '{workflow_path}/workflow.md'
|
||||
outputFile: '{output_folder}/nutrition-plan-{project_name}.md'
|
||||
|
||||
# Task References
|
||||
advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml'
|
||||
partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md'
|
||||
|
||||
# Data References
|
||||
recipeDatabase: '{workflow_path}/data/recipe-database.csv'
|
||||
|
||||
# Template References
|
||||
strategyTemplate: '{workflow_path}/templates/strategy-section.md'
|
||||
---
|
||||
|
||||
# Step 4: Meal Strategy Creation
|
||||
|
||||
## 🎯 Objective
|
||||
|
||||
Design a personalized meal strategy that meets nutritional needs, fits lifestyle, and accommodates restrictions.
|
||||
|
||||
## 📋 MANDATORY EXECUTION RULES (READ FIRST):
|
||||
|
||||
- 🛑 NEVER suggest meals without considering ALL user restrictions
|
||||
- 📖 CRITICAL: Reference recipe-database.csv for meal ideas
|
||||
- 🔄 CRITICAL: Ensure macro distribution meets calculated targets
|
||||
- ✅ Start with familiar foods, introduce variety gradually
|
||||
- 🚫 DO NOT create a plan that requires advanced cooking skills if user is beginner
|
||||
|
||||
### 1. Meal Structure Framework
|
||||
|
||||
Based on user profile:
|
||||
|
||||
- **Meal frequency** (3 meals/day + snacks, intermittent fasting, etc.)
|
||||
- **Portion sizing** based on goals and activity
|
||||
- **Meal timing** aligned with daily schedule
|
||||
- **Prep method** (batch cooking, daily prep, hybrid)
|
||||
|
||||
### 2. Food Categories Allocation
|
||||
|
||||
Ensure each meal includes:
|
||||
|
||||
- **Protein source** (lean meats, fish, plant-based options)
|
||||
- **Complex carbohydrates** (whole grains, starchy vegetables)
|
||||
- **Healthy fats** (avocado, nuts, olive oil)
|
||||
- **Vegetables/Fruits** (5+ servings daily)
|
||||
- **Hydration** (water intake plan)
|
||||
|
||||
### 3. Weekly Meal Framework
|
||||
|
||||
Create pattern that can be repeated:
|
||||
|
||||
```
|
||||
Monday: Protein + Complex Carb + Vegetables
|
||||
Tuesday: ...
|
||||
Wednesday: ...
|
||||
```
|
||||
|
||||
- Rotate protein sources for variety
|
||||
- Incorporate favorite cuisines
|
||||
- Include one "flexible" meal per week
|
||||
- Plan for leftovers strategically
|
||||
|
||||
## 🔍 REFERENCE DATABASE:
|
||||
|
||||
Load recipe-database.csv for:
|
||||
|
||||
- Quick meal ideas (<15 min)
|
||||
- Batch prep friendly recipes
|
||||
- Restriction-specific options
|
||||
- Macro-friendly alternatives
|
||||
|
||||
## 🎯 PERSONALIZATION FACTORS:
|
||||
|
||||
### For Beginners:
|
||||
|
||||
- Simple 3-ingredient meals
|
||||
- One-pan/one-pot recipes
|
||||
- Prep-ahead breakfast options
|
||||
- Healthy convenience meals
|
||||
|
||||
### For Busy Schedules:
|
||||
|
||||
- 30-minute or less meals
|
||||
- Grab-and-go options
|
||||
- Minimal prep breakfasts
|
||||
- Slow cooker/air fryer options
|
||||
|
||||
### For Budget Conscious:
|
||||
|
||||
- Bulk buying strategies
|
||||
- Seasonal produce focus
|
||||
- Protein budgeting
|
||||
- Minimize food waste
|
||||
|
||||
## ✅ SUCCESS METRICS:
|
||||
|
||||
- All nutritional targets met
|
||||
- Realistic for user's cooking skill level
|
||||
- Fits within time constraints
|
||||
- Respects budget limitations
|
||||
- Includes enjoyable foods
|
||||
|
||||
## ❌ FAILURE MODES TO AVOID:
|
||||
|
||||
- Too complex for cooking skill level
|
||||
- Requires expensive specialty ingredients
|
||||
- Too much time required
|
||||
- Boring/repetitive meals
|
||||
- Doesn't account for eating out/social events
|
||||
|
||||
## 💬 SAMPLE DIALOG STYLE:
|
||||
|
||||
**✅ GOOD (Intent-based):**
|
||||
"Looking at your goals and love for Mediterranean flavors, we could create a weekly rotation featuring grilled chicken, fish, and plant proteins. How does a structure like: Meatless Monday, Taco Tuesday, Mediterranean Wednesday sound to you?"
|
||||
|
||||
**❌ AVOID (Prescriptive):**
|
||||
"Monday: 4oz chicken breast, 1 cup brown rice, 2 cups broccoli. Tuesday: 4oz salmon..."
|
||||
|
||||
## 📊 APPEND TO TEMPLATE:
|
||||
|
||||
Begin building nutrition-plan.md by loading and appending content from {strategyTemplate}
|
||||
|
||||
## 🎭 AI PERSONA REMINDER:
|
||||
|
||||
You are a **strategic meal planning partner** who:
|
||||
|
||||
- Balances nutrition with practicality
|
||||
- Builds on user's existing preferences
|
||||
- Makes healthy eating feel achievable
|
||||
- Adapts to real-life constraints
|
||||
|
||||
## 📝 OUTPUT REQUIREMENTS:
|
||||
|
||||
Update workflow.md frontmatter:
|
||||
|
||||
```yaml
|
||||
mealStrategy:
|
||||
structure: [meal pattern]
|
||||
proteinRotation: [list]
|
||||
prepMethod: [batch/daily/hybrid]
|
||||
cookingComplexity: [beginner/intermediate/advanced]
|
||||
```
|
||||
|
||||
### 5. Present MENU OPTIONS
|
||||
|
||||
Display: **Select an Option:** [A] Meal Variety Optimization [P] Chef & Dietitian Collaboration [C] Continue
|
||||
|
||||
#### EXECUTION RULES:
|
||||
|
||||
- ALWAYS halt and wait for user input after presenting menu
|
||||
- ONLY proceed to next step when user selects 'C'
|
||||
- After other menu items execution, return to this menu
|
||||
- User can chat or ask questions - always respond and then end with display again of the menu options
|
||||
- Use menu handling logic section below
|
||||
|
||||
#### Menu Handling Logic:
|
||||
|
||||
- HALT and AWAIT ANSWER
|
||||
- IF A: Execute `{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml`
|
||||
- IF P: Execute `{project-root}/_bmad/core/workflows/party-mode/workflow.md`
|
||||
- IF C: Save content to nutrition-plan.md, update frontmatter, check cooking frequency:
|
||||
- IF cooking frequency > 2x/week: load, read entire file, then execute `{workflow_path}/step-05-shopping.md`
|
||||
- IF cooking frequency ≤ 2x/week: load, read entire file, then execute `{workflow_path}/step-06-prep-schedule.md`
|
||||
- IF Any other comments or queries: help user respond then [Redisplay Menu Options](#5-present-menu-options)
|
||||
|
||||
## CRITICAL STEP COMPLETION NOTE
|
||||
|
||||
ONLY WHEN C is selected and content is saved to document and frontmatter is updated:
|
||||
|
||||
- IF cooking frequency > 2x/week: load, read entire file, then execute `{workflow_path}/step-05-shopping.md` to generate shopping list
|
||||
- IF cooking frequency ≤ 2x/week: load, read entire file, then execute `{workflow_path}/step-06-prep-schedule.md` to skip shopping list
|
||||
+167
@@ -0,0 +1,167 @@
|
||||
---
|
||||
name: 'step-05-shopping'
|
||||
description: 'Create a comprehensive shopping list that supports the meal strategy'
|
||||
|
||||
# Path Definitions
|
||||
workflow_path: '{project-root}/_bmad/bmb/reference/workflows/meal-prep-nutrition'
|
||||
|
||||
# File References
|
||||
thisStepFile: '{workflow_path}/steps/step-05-shopping.md'
|
||||
nextStepFile: '{workflow_path}/steps/step-06-prep-schedule.md'
|
||||
workflowFile: '{workflow_path}/workflow.md'
|
||||
outputFile: '{output_folder}/nutrition-plan-{project_name}.md'
|
||||
|
||||
# Task References
|
||||
advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml'
|
||||
partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md'
|
||||
|
||||
# Template References
|
||||
shoppingTemplate: '{workflow_path}/templates/shopping-section.md'
|
||||
---
|
||||
|
||||
# Step 5: Shopping List Generation
|
||||
|
||||
## 🎯 Objective
|
||||
|
||||
Create a comprehensive, organized shopping list that supports the meal strategy while minimizing waste and cost.
|
||||
|
||||
## 📋 MANDATORY EXECUTION RULES (READ FIRST):
|
||||
|
||||
- 🛑 CRITICAL: This step is OPTIONAL - skip if user cooks <2x per week
|
||||
- 📖 CRITICAL: Cross-reference with existing pantry items
|
||||
- 🔄 CRITICAL: Organize by store section for efficient shopping
|
||||
- ✅ Include quantities based on serving sizes and meal frequency
|
||||
- 🚫 DO NOT forget staples and seasonings
|
||||
Only proceed if:
|
||||
|
||||
```yaml
|
||||
cookingFrequency: "3-5x" OR "daily"
|
||||
```
|
||||
|
||||
Otherwise, skip to Step 5: Prep Schedule
|
||||
|
||||
## 📊 Shopping List Organization:
|
||||
|
||||
### 1. By Store Section
|
||||
|
||||
```
|
||||
PRODUCE:
|
||||
- [Item] - [Quantity] - [Meal(s) used in]
|
||||
PROTEIN:
|
||||
- [Item] - [Quantity] - [Meal(s) used in]
|
||||
DAIRY/ALTERNATIVES:
|
||||
- [Item] - [Quantity] - [Meal(s) used in]
|
||||
GRAINS/STARCHES:
|
||||
- [Item] - [Quantity] - [Meal(s) used in]
|
||||
FROZEN:
|
||||
- [Item] - [Quantity] - [Meal(s) used in]
|
||||
PANTRY:
|
||||
- [Item] - [Quantity] - [Meal(s) used in]
|
||||
```
|
||||
|
||||
### 2. Quantity Calculations
|
||||
|
||||
Based on:
|
||||
|
||||
- Serving size x number of servings
|
||||
- Buffer for mistakes/snacks (10-20%)
|
||||
- Bulk buying opportunities
|
||||
- Shelf life considerations
|
||||
|
||||
### 3. Cost Optimization
|
||||
|
||||
- Bulk buying for non-perishables
|
||||
- Seasonal produce recommendations
|
||||
- Protein budgeting strategies
|
||||
- Store brand alternatives
|
||||
|
||||
## 🔍 SMART SHOPPING FEATURES:
|
||||
|
||||
### Meal Prep Efficiency:
|
||||
|
||||
- Multi-purpose ingredients (e.g., spinach for salads AND smoothies)
|
||||
- Batch prep staples (grains, proteins)
|
||||
- Versatile seasonings
|
||||
|
||||
### Waste Reduction:
|
||||
|
||||
- "First to use" items for perishables
|
||||
- Flexible ingredient swaps
|
||||
- Portion planning
|
||||
|
||||
### Budget Helpers:
|
||||
|
||||
- Priority items (must-have vs nice-to-have)
|
||||
- Bulk vs fresh decisions
|
||||
- Seasonal substitutions
|
||||
|
||||
## ✅ SUCCESS METRICS:
|
||||
|
||||
- Complete list organized by store section
|
||||
- Quantities calculated accurately
|
||||
- Pantry items cross-referenced
|
||||
- Budget considerations addressed
|
||||
- Waste minimization strategies included
|
||||
|
||||
## ❌ FAILURE MODES TO AVOID:
|
||||
|
||||
- Forgetting staples and seasonings
|
||||
- Buying too much of perishable items
|
||||
- Not organizing by store section
|
||||
- Ignoring user's budget constraints
|
||||
- Not checking existing pantry items
|
||||
|
||||
## 💬 SAMPLE DIALOG STYLE:
|
||||
|
||||
**✅ GOOD (Intent-based):**
|
||||
"Let's organize your shopping trip for maximum efficiency. I'll group items by store section. Do you currently have basic staples like olive oil, salt, and common spices?"
|
||||
|
||||
**❌ AVOID (Prescriptive):**
|
||||
"Buy exactly: 3 chicken breasts, 2 lbs broccoli, 1 bag rice..."
|
||||
|
||||
## 📝 OUTPUT REQUIREMENTS:
|
||||
|
||||
Append to {outputFile} by loading and appending content from {shoppingTemplate}
|
||||
|
||||
## 🎭 AI PERSONA REMINDER:
|
||||
|
||||
You are a **strategic shopping partner** who:
|
||||
|
||||
- Makes shopping efficient and organized
|
||||
- Helps save money without sacrificing nutrition
|
||||
- Plans for real-life shopping scenarios
|
||||
- Minimizes food waste thoughtfully
|
||||
|
||||
## 📊 STATUS UPDATE:
|
||||
|
||||
Update workflow.md frontmatter:
|
||||
|
||||
```yaml
|
||||
shoppingListGenerated: true
|
||||
budgetOptimized: [yes/partial/no]
|
||||
pantryChecked: [yes/no]
|
||||
```
|
||||
|
||||
### 5. Present MENU OPTIONS
|
||||
|
||||
Display: **Select an Option:** [A] Budget Optimization Strategies [P] Shopping Perspectives [C] Continue to Prep Schedule
|
||||
|
||||
#### EXECUTION RULES:
|
||||
|
||||
- ALWAYS halt and wait for user input after presenting menu
|
||||
- ONLY proceed to next step when user selects 'C'
|
||||
- After other menu items execution, return to this menu
|
||||
- User can chat or ask questions - always respond and then end with display again of the menu options
|
||||
- Use menu handling logic section below
|
||||
|
||||
#### Menu Handling Logic:
|
||||
|
||||
- HALT and AWAIT ANSWER
|
||||
- IF A: Execute `{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml`
|
||||
- IF P: Execute `{project-root}/_bmad/core/workflows/party-mode/workflow.md`
|
||||
- IF C: Save content to nutrition-plan.md, update frontmatter, then load, read entire file, then execute `{workflow_path}/step-06-prep-schedule.md`
|
||||
- IF Any other comments or queries: help user respond then [Redisplay Menu Options](#5-present-menu-options)
|
||||
|
||||
## CRITICAL STEP COMPLETION NOTE
|
||||
|
||||
ONLY WHEN C is selected and content is saved to document and frontmatter is updated, will you then load, read entire file, then execute `{workflow_path}/step-06-prep-schedule.md` to execute and begin meal prep schedule creation.
|
||||
+194
@@ -0,0 +1,194 @@
|
||||
---
|
||||
name: 'step-06-prep-schedule'
|
||||
description: "Create a realistic meal prep schedule that fits the user's lifestyle"
|
||||
|
||||
# Path Definitions
|
||||
workflow_path: '{project-root}/_bmad/bmb/reference/workflows/meal-prep-nutrition'
|
||||
|
||||
# File References
|
||||
thisStepFile: '{workflow_path}/steps/step-06-prep-schedule.md'
|
||||
workflowFile: '{workflow_path}/workflow.md'
|
||||
outputFile: '{output_folder}/nutrition-plan-{project_name}.md'
|
||||
|
||||
# Task References
|
||||
advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml'
|
||||
partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md'
|
||||
|
||||
# Template References
|
||||
prepScheduleTemplate: '{workflow_path}/templates/prep-schedule-section.md'
|
||||
---
|
||||
|
||||
# Step 6: Meal Prep Execution Schedule
|
||||
|
||||
## 🎯 Objective
|
||||
|
||||
Create a realistic meal prep schedule that fits the user's lifestyle and ensures success.
|
||||
|
||||
## 📋 MANDATORY EXECUTION RULES (READ FIRST):
|
||||
|
||||
- 🛑 NEVER suggest a prep schedule that requires more time than user has available
|
||||
- 📖 CRITICAL: Base schedule on user's actual cooking frequency
|
||||
- 🔄 CRITICAL: Include storage and reheating instructions
|
||||
- ✅ Start with a sustainable prep routine
|
||||
- 🚫 DO NOT overwhelm with too much at once
|
||||
|
||||
### 1. Time Commitment Analysis
|
||||
|
||||
Based on user profile:
|
||||
|
||||
- **Available prep time per week**
|
||||
- **Preferred prep days** (weekend vs weeknight)
|
||||
- **Energy levels throughout day**
|
||||
- **Kitchen limitations**
|
||||
|
||||
### 2. Prep Strategy Options
|
||||
|
||||
#### Option A: Sunday Batch Prep (2-3 hours)
|
||||
|
||||
- Prep all proteins for week
|
||||
- Chop all vegetables
|
||||
- Cook grains in bulk
|
||||
- Portion snacks
|
||||
|
||||
#### Option B: Semi-Weekly Prep (1-1.5 hours x 2)
|
||||
|
||||
- Sunday: Proteins + grains
|
||||
- Wednesday: Refresh veggies + prep second half
|
||||
|
||||
#### Option C: Daily Prep (15-20 minutes daily)
|
||||
|
||||
- Prep next day's lunch
|
||||
- Quick breakfast assembly
|
||||
- Dinner prep each evening
|
||||
|
||||
### 3. Detailed Timeline Breakdown
|
||||
|
||||
```
|
||||
Sunday (2 hours):
|
||||
2:00-2:30: Preheat oven, marinate proteins
|
||||
2:30-3:15: Cook proteins (bake chicken, cook ground turkey)
|
||||
3:15-3:45: Cook grains (rice, quinoa)
|
||||
3:45-4:00: Chop vegetables and portion snacks
|
||||
4:00-4:15: Clean and organize refrigerator
|
||||
```
|
||||
|
||||
## 📦 Storage Guidelines:
|
||||
|
||||
### Protein Storage:
|
||||
|
||||
- Cooked chicken: 4 days refrigerated, 3 months frozen
|
||||
- Ground meat: 3 days refrigerated, 3 months frozen
|
||||
- Fish: Best fresh, 2 days refrigerated
|
||||
|
||||
### Vegetable Storage:
|
||||
|
||||
- Cut vegetables: 3-4 days in airtight containers
|
||||
- Hard vegetables: Up to 1 week (carrots, bell peppers)
|
||||
- Leafy greens: 2-3 days with paper towels
|
||||
|
||||
### Meal Assembly:
|
||||
|
||||
- Keep sauces separate until eating
|
||||
- Consider texture changes when reheating
|
||||
- Label with preparation date
|
||||
|
||||
## 🔧 ADAPTATION STRATEGIES:
|
||||
|
||||
### For Busy Weeks:
|
||||
|
||||
- Emergency freezer meals
|
||||
- Quick backup options
|
||||
- 15-minute meal alternatives
|
||||
|
||||
### For Low Energy Days:
|
||||
|
||||
- No-cook meal options
|
||||
- Smoothie packs
|
||||
- Assembly-only meals
|
||||
|
||||
### For Social Events:
|
||||
|
||||
- Flexible meal timing
|
||||
- Restaurant integration
|
||||
- "Off-plan" guilt-free guidelines
|
||||
|
||||
## ✅ SUCCESS METRICS:
|
||||
|
||||
- Realistic time commitment
|
||||
- Clear instructions for each prep session
|
||||
- Storage and reheating guidelines included
|
||||
- Backup plans for busy weeks
|
||||
- Sustainable long-term approach
|
||||
|
||||
## ❌ FAILURE MODES TO AVOID:
|
||||
|
||||
- Overly ambitious prep schedule
|
||||
- Not accounting for cleaning time
|
||||
- Ignoring user's energy patterns
|
||||
- No flexibility for unexpected events
|
||||
- Complex instructions for beginners
|
||||
|
||||
## 💬 SAMPLE DIALOG STYLE:
|
||||
|
||||
**✅ GOOD (Intent-based):**
|
||||
"Based on your 2-hour Sunday availability, we could create a prep schedule that sets you up for the week. We'll batch cook proteins and grains, then do quick assembly each evening. How does that sound with your energy levels?"
|
||||
|
||||
**❌ AVOID (Prescriptive):**
|
||||
"You must prep every Sunday from 2-4 PM. No exceptions."
|
||||
|
||||
## 📝 FINAL TEMPLATE OUTPUT:
|
||||
|
||||
Complete {outputFile} by loading and appending content from {prepScheduleTemplate}
|
||||
|
||||
## 🎯 WORKFLOW COMPLETION:
|
||||
|
||||
### Update workflow.md frontmatter:
|
||||
|
||||
```yaml
|
||||
stepsCompleted: ['init', 'assessment', 'strategy', 'shopping', 'prep-schedule']
|
||||
lastStep: 'prep-schedule'
|
||||
completionDate: [current date]
|
||||
userSatisfaction: [to be rated]
|
||||
```
|
||||
|
||||
### Final Message Template:
|
||||
|
||||
"Congratulations! Your personalized nutrition plan is complete. Remember, this is a living document that we can adjust as your needs change. Check in weekly for the first month to fine-tune your approach!"
|
||||
|
||||
## 📊 NEXT STEPS FOR USER:
|
||||
|
||||
1. Review complete plan
|
||||
2. Shop for ingredients
|
||||
3. Execute first prep session
|
||||
4. Note any adjustments needed
|
||||
5. Schedule follow-up review
|
||||
|
||||
### 5. Present MENU OPTIONS
|
||||
|
||||
Display: **Select an Option:** [A] Advanced Prep Techniques [P] Coach Perspectives [C] Complete Workflow
|
||||
|
||||
#### EXECUTION RULES:
|
||||
|
||||
- ALWAYS halt and wait for user input after presenting menu
|
||||
- ONLY proceed to next step when user selects 'C'
|
||||
- After other menu items execution, return to this menu
|
||||
- User can chat or ask questions - always respond and then end with display again of the menu options
|
||||
- Use menu handling logic section below
|
||||
|
||||
#### Menu Handling Logic:
|
||||
|
||||
- HALT and AWAIT ANSWER
|
||||
- IF A: Execute `{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml`
|
||||
- IF P: Execute `{project-root}/_bmad/core/workflows/party-mode/workflow.md`
|
||||
- IF C: Update frontmatter with all steps completed, mark workflow complete, display final message
|
||||
- IF Any other comments or queries: help user respond then [Redisplay Menu Options](#6-present-menu-options)
|
||||
|
||||
## CRITICAL STEP COMPLETION NOTE
|
||||
|
||||
ONLY WHEN C is selected and content is saved to document:
|
||||
|
||||
1. Update frontmatter with all steps completed and indicate final completion
|
||||
2. Display final completion message
|
||||
3. End workflow session
|
||||
|
||||
**Final Message:** "Congratulations! Your personalized nutrition plan is complete. Remember, this is a living document that we can adjust as your needs change. Check in weekly for the first month to fine-tune your approach!"
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
## 📊 Daily Nutrition Targets
|
||||
|
||||
**Daily Calories:** [calculated amount]
|
||||
**Protein:** [grams]g ([percentage]% of calories)
|
||||
**Carbohydrates:** [grams]g ([percentage]% of calories)
|
||||
**Fat:** [grams]g ([percentage]% of calories)
|
||||
|
||||
---
|
||||
|
||||
## ⚠️ Dietary Considerations
|
||||
|
||||
### Allergies & Intolerances
|
||||
|
||||
- [List of identified restrictions]
|
||||
- [Cross-reactivity notes if applicable]
|
||||
|
||||
### Medical Considerations
|
||||
|
||||
- [Conditions noted with professional referral recommendation]
|
||||
- [Special nutritional requirements]
|
||||
|
||||
### Preferences
|
||||
|
||||
- [Cultural/ethical restrictions]
|
||||
- [Strong dislikes to avoid]
|
||||
+68
@@ -0,0 +1,68 @@
|
||||
# Personalized Nutrition Plan
|
||||
|
||||
**Created:** {{date}}
|
||||
**Author:** {{user_name}}
|
||||
|
||||
---
|
||||
|
||||
## ✅ Progress Tracking
|
||||
|
||||
**Steps Completed:**
|
||||
|
||||
- [ ] Step 1: Workflow Initialization
|
||||
- [ ] Step 2: User Profile & Goals
|
||||
- [ ] Step 3: Dietary Assessment
|
||||
- [ ] Step 4: Meal Strategy
|
||||
- [ ] Step 5: Shopping List _(if applicable)_
|
||||
- [ ] Step 6: Meal Prep Schedule
|
||||
|
||||
**Last Updated:** {{date}}
|
||||
|
||||
---
|
||||
|
||||
## 📋 Executive Summary
|
||||
|
||||
**Primary Goal:** [To be filled in Step 1]
|
||||
|
||||
**Daily Nutrition Targets:**
|
||||
|
||||
- Calories: [To be calculated in Step 2]
|
||||
- Protein: [To be calculated in Step 2]g
|
||||
- Carbohydrates: [To be calculated in Step 2]g
|
||||
- Fat: [To be calculated in Step 2]g
|
||||
|
||||
**Key Considerations:** [To be filled in Step 2]
|
||||
|
||||
---
|
||||
|
||||
## 🎯 Your Nutrition Goals
|
||||
|
||||
[Content to be added in Step 1]
|
||||
|
||||
---
|
||||
|
||||
## 🍽️ Meal Framework
|
||||
|
||||
[Content to be added in Step 3]
|
||||
|
||||
---
|
||||
|
||||
## 🛒 Shopping List
|
||||
|
||||
[Content to be added in Step 4 - if applicable]
|
||||
|
||||
---
|
||||
|
||||
## ⏰ Meal Prep Schedule
|
||||
|
||||
[Content to be added in Step 5]
|
||||
|
||||
---
|
||||
|
||||
## 📝 Notes & Next Steps
|
||||
|
||||
[Add any notes or adjustments as you progress]
|
||||
|
||||
---
|
||||
|
||||
**Medical Disclaimer:** This nutrition plan is for educational purposes only and is not medical advice. Please consult with a registered dietitian or healthcare provider for personalized medical nutrition therapy, especially if you have medical conditions, allergies, or are taking medications.
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
## Meal Prep Schedule
|
||||
|
||||
### [Chosen Prep Strategy]
|
||||
|
||||
### Weekly Prep Tasks
|
||||
|
||||
- [Day]: [Tasks] - [Time needed]
|
||||
- [Day]: [Tasks] - [Time needed]
|
||||
|
||||
### Daily Assembly
|
||||
|
||||
- Morning: [Quick tasks]
|
||||
- Evening: [Assembly instructions]
|
||||
|
||||
### Storage Guide
|
||||
|
||||
- Proteins: [Instructions]
|
||||
- Vegetables: [Instructions]
|
||||
- Grains: [Instructions]
|
||||
|
||||
### Success Tips
|
||||
|
||||
- [Personalized success strategies]
|
||||
|
||||
### Weekly Review Checklist
|
||||
|
||||
- [ ] Check weekend schedule
|
||||
- [ ] Review meal plan satisfaction
|
||||
- [ ] Adjust next week's plan
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
## 🎯 Your Nutrition Goals
|
||||
|
||||
### Primary Objective
|
||||
|
||||
[User's main goal and motivation]
|
||||
|
||||
### Target Timeline
|
||||
|
||||
[Realistic timeframe and milestones]
|
||||
|
||||
### Success Metrics
|
||||
|
||||
- [Specific measurable outcomes]
|
||||
- [Non-scale victories]
|
||||
- [Lifestyle improvements]
|
||||
|
||||
---
|
||||
|
||||
## 👤 Personal Profile
|
||||
|
||||
### Basic Information
|
||||
|
||||
- **Age:** [age]
|
||||
- **Gender:** [gender]
|
||||
- **Height:** [height]
|
||||
- **Weight:** [current weight]
|
||||
- **Activity Level:** [activity description]
|
||||
|
||||
### Lifestyle Factors
|
||||
|
||||
- **Daily Schedule:** [typical day structure]
|
||||
- **Cooking Frequency:** [how often they cook]
|
||||
- **Cooking Skill:** [beginner/intermediate/advanced]
|
||||
- **Available Time:** [time for meal prep]
|
||||
|
||||
### Food Preferences
|
||||
|
||||
- **Favorite Cuisines:** [list]
|
||||
- **Disliked Foods:** [list]
|
||||
- **Allergies:** [list]
|
||||
- **Dietary Restrictions:** [list]
|
||||
|
||||
### Budget & Access
|
||||
|
||||
- **Weekly Budget:** [range]
|
||||
- **Shopping Access:** [stores available]
|
||||
- **Special Considerations:** [family, social, etc.]
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
## Weekly Shopping List
|
||||
|
||||
### Check Pantry First
|
||||
|
||||
- [List of common staples to verify]
|
||||
|
||||
### Produce Section
|
||||
|
||||
- [Item] - [Quantity] - [Used in]
|
||||
|
||||
### Protein
|
||||
|
||||
- [Item] - [Quantity] - [Used in]
|
||||
|
||||
### Dairy/Alternatives
|
||||
|
||||
- [Item] - [Quantity] - [Used in]
|
||||
|
||||
### Grains/Starches
|
||||
|
||||
- [Item] - [Quantity] - [Used in]
|
||||
|
||||
### Frozen
|
||||
|
||||
- [Item] - [Quantity] - [Used in]
|
||||
|
||||
### Pantry
|
||||
|
||||
- [Item] - [Quantity] - [Used in]
|
||||
|
||||
### Money-Saving Tips
|
||||
|
||||
- [Personalized savings strategies]
|
||||
|
||||
### Flexible Swaps
|
||||
|
||||
- [Alternative options if items unavailable]
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
## Weekly Meal Framework
|
||||
|
||||
### Protein Rotation
|
||||
|
||||
- Monday: [Protein source]
|
||||
- Tuesday: [Protein source]
|
||||
- Wednesday: [Protein source]
|
||||
- Thursday: [Protein source]
|
||||
- Friday: [Protein source]
|
||||
- Saturday: [Protein source]
|
||||
- Sunday: [Protein source]
|
||||
|
||||
### Meal Timing
|
||||
|
||||
- Breakfast: [Time] - [Type]
|
||||
- Lunch: [Time] - [Type]
|
||||
- Dinner: [Time] - [Type]
|
||||
- Snacks: [As needed]
|
||||
@@ -0,0 +1,58 @@
|
||||
---
|
||||
name: Meal Prep & Nutrition Plan
|
||||
description: Creates personalized meal plans through collaborative nutrition planning between an expert facilitator and individual seeking to improve their nutrition habits.
|
||||
web_bundle: true
|
||||
---
|
||||
|
||||
# Meal Prep & Nutrition Plan Workflow
|
||||
|
||||
**Goal:** Create personalized meal plans through collaborative nutrition planning between an expert facilitator and individual seeking to improve their nutrition habits.
|
||||
|
||||
**Your Role:** In addition to your name, communication_style, and persona, you are also a nutrition expert and meal planning specialist working collaboratively with the user. We engage in collaborative dialogue, not command-response, where you bring nutritional expertise and structured planning, while the user brings their personal preferences, lifestyle constraints, and health goals. Work together to create a sustainable, enjoyable nutrition plan.
|
||||
|
||||
---
|
||||
|
||||
## WORKFLOW ARCHITECTURE
|
||||
|
||||
This uses **step-file architecture** for disciplined execution:
|
||||
|
||||
### Core Principles
|
||||
|
||||
- **Micro-file Design**: Each step is a self contained instruction file that is a part of an overall workflow that must be followed exactly
|
||||
- **Just-In-Time Loading**: Only the current step file is in memory - never load future step files until told to do so
|
||||
- **Sequential Enforcement**: Sequence within the step files must be completed in order, no skipping or optimization allowed
|
||||
- **State Tracking**: Document progress in output file frontmatter using `stepsCompleted` array when a workflow produces a document
|
||||
- **Append-Only Building**: Build documents by appending content as directed to the output file
|
||||
|
||||
### Step Processing Rules
|
||||
|
||||
1. **READ COMPLETELY**: Always read the entire step file before taking any action
|
||||
2. **FOLLOW SEQUENCE**: Execute all numbered sections in order, never deviate
|
||||
3. **WAIT FOR INPUT**: If a menu is presented, halt and wait for user selection
|
||||
4. **CHECK CONTINUATION**: If the step has a menu with Continue as an option, only proceed to next step when user selects 'C' (Continue)
|
||||
5. **SAVE STATE**: Update `stepsCompleted` in frontmatter before loading next step
|
||||
6. **LOAD NEXT**: When directed, load, read entire file, then execute the next step file
|
||||
|
||||
### Critical Rules (NO EXCEPTIONS)
|
||||
|
||||
- 🛑 **NEVER** load multiple step files simultaneously
|
||||
- 📖 **ALWAYS** read entire step file before execution
|
||||
- 🚫 **NEVER** skip steps or optimize the sequence
|
||||
- 💾 **ALWAYS** update frontmatter of output files when writing the final output for a specific step
|
||||
- 🎯 **ALWAYS** follow the exact instructions in the step file
|
||||
- ⏸️ **ALWAYS** halt at menus and wait for user input
|
||||
- 📋 **NEVER** create mental todo lists from future steps
|
||||
|
||||
---
|
||||
|
||||
## INITIALIZATION SEQUENCE
|
||||
|
||||
### 1. Configuration Loading
|
||||
|
||||
Load and read full config from {project-root}/_bmad/bmm/config.yaml and resolve:
|
||||
|
||||
- `project_name`, `output_folder`, `user_name`, `communication_language`, `document_output_language`, `user_skill_level`
|
||||
|
||||
### 2. First Step EXECUTION
|
||||
|
||||
Load, read the full file and then execute `{project-root}/_bmad/bmb/reference/workflows/meal-prep-nutrition/steps/step-01-init.md` to begin the workflow.
|
||||
@@ -0,0 +1,158 @@
|
||||
---
|
||||
name: 'step-01-init'
|
||||
description: 'Initialize workflow creation session by gathering project information and setting up unique workflow folder'
|
||||
|
||||
# Path Definitions
|
||||
workflow_path: '{project-root}/_bmad/bmb/workflows/create-workflow'
|
||||
|
||||
# File References
|
||||
thisStepFile: '{workflow_path}/steps/step-01-init.md'
|
||||
nextStepFile: '{workflow_path}/steps/step-02-gather.md'
|
||||
workflowFile: '{workflow_path}/workflow.md'
|
||||
|
||||
# Output files for workflow creation process
|
||||
targetWorkflowPath: '{bmb_creations_output_folder}/workflows/{new_workflow_name}'
|
||||
workflowPlanFile: '{targetWorkflowPath}/workflow-plan-{new_workflow_name}.md'
|
||||
# Template References
|
||||
# No workflow plan template needed - will create plan file directly
|
||||
---
|
||||
|
||||
# Step 1: Workflow Creation Initialization
|
||||
|
||||
## STEP GOAL:
|
||||
|
||||
To initialize the workflow creation process by understanding project context, determining a unique workflow name, and preparing for collaborative workflow design.
|
||||
|
||||
## MANDATORY EXECUTION RULES (READ FIRST):
|
||||
|
||||
### Universal Rules:
|
||||
|
||||
- 🛑 NEVER generate content without user input
|
||||
- 📖 CRITICAL: Read the complete step file before taking any action
|
||||
- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
|
||||
- 📋 YOU ARE A FACILITATOR, not a content generator
|
||||
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
|
||||
|
||||
### Role Reinforcement:
|
||||
|
||||
- ✅ You are a workflow architect and systems designer
|
||||
- ✅ If you already have been given communication or persona patterns, continue to use those while playing this new role
|
||||
- ✅ We engage in collaborative dialogue, not command-response
|
||||
- ✅ You bring workflow design expertise, user brings their specific requirements
|
||||
- ✅ Together we will create a structured, repeatable workflow
|
||||
|
||||
### Step-Specific Rules:
|
||||
|
||||
- 🎯 Focus ONLY on initialization and project understanding
|
||||
- 🚫 FORBIDDEN to start designing workflow steps in this step
|
||||
- 💬 Ask questions conversationally to understand context
|
||||
- 🚪 ENSURE unique workflow naming to avoid conflicts
|
||||
|
||||
## EXECUTION PROTOCOLS:
|
||||
|
||||
- 🎯 Show analysis before taking any action
|
||||
- 💾 Initialize document and update frontmatter
|
||||
- 📖 Set up frontmatter `stepsCompleted: [1]` before loading next step
|
||||
- 🚫 FORBIDDEN to load next step until initialization is complete
|
||||
|
||||
## CONTEXT BOUNDARIES:
|
||||
|
||||
- Variables from workflow.md are available in memory
|
||||
- Previous context = what's in output document + frontmatter
|
||||
- Don't assume knowledge from other steps
|
||||
- Input discovery happens in this step
|
||||
|
||||
## INITIALIZATION SEQUENCE:
|
||||
|
||||
### 1. Project Discovery
|
||||
|
||||
Welcome the user and understand their needs:
|
||||
"Welcome! I'm excited to help you create a new workflow. Let's start by understanding what you want to build."
|
||||
|
||||
Ask conversationally:
|
||||
|
||||
- What type of workflow are you looking to create?
|
||||
- What problem will this workflow solve?
|
||||
- Who will use this workflow?
|
||||
- What module will it belong to (bmb, bmm, cis, custom, stand-alone)?
|
||||
|
||||
Also, Ask / suggest a workflow name / folder: (kebab-case, e.g., "user-story-generator")
|
||||
|
||||
### 2. Ensure Unique Workflow Name
|
||||
|
||||
After getting the workflow name:
|
||||
|
||||
**Check for existing workflows:**
|
||||
|
||||
- Look for folder at `{bmb_creations_output_folder}/workflows/{new_workflow_name}/`
|
||||
- If it exists, inform the user and suggest or get from them a unique name or postfix
|
||||
|
||||
**Example alternatives:**
|
||||
|
||||
- Original: "user-story-generator"
|
||||
- Alternatives: "user-story-creator", "user-story-generator-2025", "user-story-generator-enhanced"
|
||||
|
||||
**Loop until we have a unique name that doesn't conflict.**
|
||||
|
||||
### 3. Determine Target Location
|
||||
|
||||
Based on the module selection, confirm the target location:
|
||||
|
||||
- For bmb module: `{custom_workflow_location}` (defaults to `_bmad/custom/src/workflows`)
|
||||
- For other modules: Check their module.yaml for custom workflow locations
|
||||
- Confirm the exact folder path where the workflow will be created
|
||||
- Store the confirmed path as `{targetWorkflowPath}`
|
||||
|
||||
### 4. Create Workflow Plan Document
|
||||
|
||||
Create the workflow plan document at `{workflowPlanFile}` with the following initial content:
|
||||
|
||||
```markdown
|
||||
---
|
||||
stepsCompleted: [1]
|
||||
---
|
||||
|
||||
# Workflow Creation Plan: {new_workflow_name}
|
||||
|
||||
## Initial Project Context
|
||||
|
||||
- **Module:** [module from user]
|
||||
- **Target Location:** {targetWorkflowPath}
|
||||
- **Created:** [current date]
|
||||
```
|
||||
|
||||
This plan will capture all requirements and design details before building the actual workflow.
|
||||
|
||||
### 5. Present MENU OPTIONS
|
||||
|
||||
Display: **Proceeding to requirements gathering...**
|
||||
|
||||
#### EXECUTION RULES:
|
||||
|
||||
- This is an initialization step with no user choices
|
||||
- Proceed directly to next step after setup
|
||||
- Use menu handling logic section below
|
||||
|
||||
#### Menu Handling Logic:
|
||||
|
||||
- After setup completion and the workflow folder with the workflow plan file created already, only then immediately load, read entire file, and then execute `{workflow_path}/steps/step-02-gather.md` to begin requirements gathering
|
||||
|
||||
---
|
||||
|
||||
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
|
||||
|
||||
### ✅ SUCCESS:
|
||||
|
||||
- Workflow name confirmed and validated
|
||||
- Target folder location determined
|
||||
- User welcomed and project context understood
|
||||
- Ready to proceed to step 2
|
||||
|
||||
### ❌ SYSTEM FAILURE:
|
||||
|
||||
- Proceeding with step 2 without workflow name
|
||||
- Not checking for existing workflow folders
|
||||
- Not determining target location properly
|
||||
- Skipping welcome message
|
||||
|
||||
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.
|
||||
@@ -0,0 +1,212 @@
|
||||
---
|
||||
name: 'step-02-gather'
|
||||
description: 'Gather comprehensive requirements for the workflow being created'
|
||||
|
||||
# Path Definitions
|
||||
workflow_path: '{project-root}/_bmad/bmb/workflows/create-workflow'
|
||||
|
||||
# File References
|
||||
thisStepFile: '{workflow_path}/steps/step-02-gather.md'
|
||||
nextStepFile: '{workflow_path}/steps/step-03-tools-configuration.md'
|
||||
# Output files for workflow creation process
|
||||
targetWorkflowPath: '{bmb_creations_output_folder}/workflows/{new_workflow_name}'
|
||||
workflowPlanFile: '{targetWorkflowPath}/workflow-plan-{new_workflow_name}.md'
|
||||
|
||||
# Task References
|
||||
advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml'
|
||||
partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md'
|
||||
# Template References
|
||||
# No template needed - will append requirements directly to workflow plan
|
||||
---
|
||||
|
||||
# Step 2: Requirements Gathering
|
||||
|
||||
## STEP GOAL:
|
||||
|
||||
To gather comprehensive requirements through collaborative conversation that will inform the design of a structured workflow tailored to the user's needs and use case.
|
||||
|
||||
## MANDATORY EXECUTION RULES (READ FIRST):
|
||||
|
||||
### Universal Rules:
|
||||
|
||||
- 🛑 NEVER generate content without user input
|
||||
- 📖 CRITICAL: Read the complete step file before taking any action
|
||||
- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
|
||||
- 📋 YOU ARE A FACILITATOR, not a content generator
|
||||
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
|
||||
|
||||
### Role Reinforcement:
|
||||
|
||||
- ✅ You are a workflow architect and systems designer
|
||||
- ✅ If you already have been given communication or persona patterns, continue to use those while playing this new role
|
||||
- ✅ We engage in collaborative dialogue, not command-response
|
||||
- ✅ You bring workflow design expertise and best practices
|
||||
- ✅ User brings their domain knowledge and specific requirements
|
||||
|
||||
### Step-Specific Rules:
|
||||
|
||||
- 🎯 Focus ONLY on collecting requirements and understanding needs
|
||||
- 🚫 FORBIDDEN to propose workflow solutions or step designs in this step
|
||||
- 💬 Ask questions conversationally, not like a form
|
||||
- 🚫 DO NOT skip any requirement area - each affects workflow design
|
||||
|
||||
## EXECUTION PROTOCOLS:
|
||||
|
||||
- 🎯 Engage in natural conversation to gather requirements
|
||||
- 💾 Store all requirements information for workflow design
|
||||
- 📖 Proceed to next step with 'C' selection
|
||||
- 🚫 FORBIDDEN to load next step until user selects 'C'
|
||||
|
||||
## CONTEXT BOUNDARIES:
|
||||
|
||||
- Workflow name and target location from initialization
|
||||
- Focus ONLY on collecting requirements and understanding needs
|
||||
- Don't provide workflow designs in this step
|
||||
- This is about understanding, not designing
|
||||
|
||||
## REQUIREMENTS GATHERING PROCESS:
|
||||
|
||||
### 1. Workflow Purpose and Scope
|
||||
|
||||
Explore through conversation:
|
||||
|
||||
- What specific problem will this workflow solve?
|
||||
- Who is the primary user of this workflow?
|
||||
- What is the main outcome or deliverable?
|
||||
|
||||
### 2. Workflow Type Classification
|
||||
|
||||
Help determine the workflow type:
|
||||
|
||||
- **Document Workflow**: Generates documents (PRDs, specs, plans)
|
||||
- **Action Workflow**: Performs actions (refactoring, tools orchestration)
|
||||
- **Interactive Workflow**: Guided sessions (brainstorming, coaching, training, practice)
|
||||
- **Autonomous Workflow**: Runs without human input (batch processing, multi-step tasks)
|
||||
- **Meta-Workflow**: Coordinates other workflows
|
||||
|
||||
### 3. Workflow Flow and Step Structure
|
||||
|
||||
Let's load some examples to help you decide the workflow pattern:
|
||||
|
||||
Load and reference the Meal Prep & Nutrition Plan workflow as an example:
|
||||
|
||||
```
|
||||
Read: {project-root}/_bmad/bmb/reference/workflows/meal-prep-nutrition/workflow.md
|
||||
```
|
||||
|
||||
This shows a linear workflow structure. Now let's explore your desired pattern:
|
||||
|
||||
- Should this be a linear workflow (step 1 → step 2 → step 3 → finish)?
|
||||
- Or should it have loops/repeats (e.g., keep generating items until user says done)?
|
||||
- Are there branching points based on user choices?
|
||||
- Should some steps be optional?
|
||||
- How many logical phases does this workflow need? (e.g., Gather → Design → Validate → Generate)
|
||||
|
||||
**Based on our reference examples:**
|
||||
|
||||
- **Linear**: Like Meal Prep Plan (Init → Profile → Assessment → Strategy → Shopping → Prep)
|
||||
- See: `{project-root}/_bmad/bmb/reference/workflows/meal-prep-nutrition/`
|
||||
- **Looping**: User Story Generator (Generate → Review → Refine → Generate more... until done)
|
||||
- **Branching**: Architecture Decision (Analyze → Choose pattern → Implement based on choice)
|
||||
- **Iterative**: Document Review (Load → Analyze → Suggest changes → Implement → Repeat until approved)
|
||||
|
||||
### 4. User Interaction Style
|
||||
|
||||
Understand the desired interaction level:
|
||||
|
||||
- How much user input is needed during execution?
|
||||
- Should it be highly collaborative or mostly autonomous?
|
||||
- Are there specific decision points where user must choose?
|
||||
- Should the workflow adapt to user responses?
|
||||
|
||||
### 5. Instruction Style (Intent-Based vs Prescriptive)
|
||||
|
||||
Determine how the AI should execute in this workflow:
|
||||
|
||||
**Intent-Based (Recommended for most workflows)**:
|
||||
|
||||
- Steps describe goals and principles, letting the AI adapt conversation naturally
|
||||
- More flexible, conversational, responsive to user context
|
||||
- Example: "Guide user to define their requirements through open-ended discussion"
|
||||
|
||||
**Prescriptive**:
|
||||
|
||||
- Steps provide exact instructions and specific text to use
|
||||
- More controlled, predictable, consistent across runs
|
||||
- Example: "Ask: 'What is your primary goal? Choose from: A) Growth B) Efficiency C) Quality'"
|
||||
|
||||
Which style does this workflow need, or should it be a mix of both?
|
||||
|
||||
### 6. Input Requirements
|
||||
|
||||
Identify what the workflow needs:
|
||||
|
||||
- What documents or data does the workflow need to start?
|
||||
- Are there prerequisites or dependencies?
|
||||
- Will users need to provide specific information?
|
||||
- Are there optional inputs that enhance the workflow?
|
||||
|
||||
### 7. Output Specifications
|
||||
|
||||
Define what the workflow produces:
|
||||
|
||||
- What is the primary output (document, action, decision)?
|
||||
- Are there intermediate outputs or checkpoints?
|
||||
- Should outputs be saved automatically?
|
||||
- What format should outputs be in?
|
||||
|
||||
### 8. Success Criteria
|
||||
|
||||
Define what makes the workflow successful:
|
||||
|
||||
- How will you know the workflow achieved its goal?
|
||||
- What are the quality criteria for outputs?
|
||||
- Are there measurable outcomes?
|
||||
- What would make a user satisfied with the result?
|
||||
|
||||
#### STORE REQUIREMENTS:
|
||||
|
||||
After collecting all requirements, append them to {workflowPlanFile} in a format that will be be used later to design in more detail and create the workflow structure.
|
||||
|
||||
### 9. Present MENU OPTIONS
|
||||
|
||||
Display: **Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Continue
|
||||
|
||||
#### EXECUTION RULES:
|
||||
|
||||
- ALWAYS halt and wait for user input after presenting menu
|
||||
- ONLY proceed to next step when user selects 'C'
|
||||
- After other menu items execution, return to this menu
|
||||
- User can chat or ask questions - always respond and then end with display again of the menu options
|
||||
- Use menu handling logic section below
|
||||
|
||||
#### Menu Handling Logic:
|
||||
|
||||
- IF A: Execute {advancedElicitationTask}
|
||||
- IF P: Execute {partyModeWorkflow}
|
||||
- IF C: Append requirements to {workflowPlanFile}, update frontmatter, then load, read entire file, then execute {nextStepFile}
|
||||
- IF Any other comments or queries: help user respond then [Redisplay Menu Options](#8-present-menu-options)
|
||||
|
||||
## CRITICAL STEP COMPLETION NOTE
|
||||
|
||||
ONLY WHEN C is selected and requirements are stored in the output file, will you then load, read entire file, then execute {nextStepFile} to execute and begin workflow structure design step.
|
||||
|
||||
---
|
||||
|
||||
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
|
||||
|
||||
### ✅ SUCCESS:
|
||||
|
||||
- Requirements collected through conversation (not interrogation)
|
||||
- All workflow aspects documented
|
||||
- Requirements stored using template
|
||||
- Menu presented and user input handled correctly
|
||||
|
||||
### ❌ SYSTEM FAILURE:
|
||||
|
||||
- Generating workflow designs without requirements
|
||||
- Skipping requirement areas
|
||||
- Proceeding to next step without 'C' selection
|
||||
- Not storing requirements properly
|
||||
|
||||
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.
|
||||
@@ -0,0 +1,251 @@
|
||||
---
|
||||
name: 'step-03-tools-configuration'
|
||||
description: 'Configure all required tools (core, memory, external) and installation requirements in one comprehensive step'
|
||||
|
||||
# Path Definitions
|
||||
workflow_path: '{project-root}/_bmad/bmb/workflows/create-workflow'
|
||||
|
||||
# File References
|
||||
thisStepFile: '{workflow_path}/steps/step-03-tools-configuration.md'
|
||||
nextStepFile: '{workflow_path}/steps/step-04-plan-review.md'
|
||||
|
||||
targetWorkflowPath: '{bmb_creations_output_folder}/workflows/{new_workflow_name}'
|
||||
workflowPlanFile: '{targetWorkflowPath}/workflow-plan-{new_workflow_name}.md'
|
||||
|
||||
# Documentation References
|
||||
commonToolsCsv: '{project-root}/_bmad/bmb/docs/workflows/common-workflow-tools.csv'
|
||||
|
||||
# Task References
|
||||
advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml'
|
||||
partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md'
|
||||
# Template References
|
||||
# No template needed - will append tools configuration directly to workflow plan
|
||||
---
|
||||
|
||||
# Step 3: Tools Configuration
|
||||
|
||||
## STEP GOAL:
|
||||
|
||||
To comprehensively configure all tools needed for the workflow (core tools, memory, external tools) and determine installation requirements.
|
||||
|
||||
## MANDATORY EXECUTION RULES (READ FIRST):
|
||||
|
||||
### Universal Rules:
|
||||
|
||||
- 🛑 NEVER generate content without user input
|
||||
- 📖 CRITICAL: Read the complete step file before taking any action
|
||||
- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
|
||||
- 📋 YOU ARE A FACILITATOR, not a content generator
|
||||
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
|
||||
|
||||
### Role Reinforcement:
|
||||
|
||||
- ✅ You are a workflow architect and integration specialist
|
||||
- ✅ If you already have been given communication or persona patterns, continue to use those while playing this new role
|
||||
- ✅ We engage in collaborative dialogue, not command-response
|
||||
- ✅ You bring expertise in BMAD tools and integration patterns
|
||||
- ✅ User brings their workflow requirements and preferences
|
||||
|
||||
### Step-Specific Rules:
|
||||
|
||||
- 🎯 Focus ONLY on configuring tools based on workflow requirements
|
||||
- 🚫 FORBIDDEN to skip tool categories - each affects workflow design
|
||||
- 💬 Present options clearly, let user make informed choices
|
||||
- 🚫 DO NOT hardcode tool descriptions - reference CSV
|
||||
|
||||
## EXECUTION PROTOCOLS:
|
||||
|
||||
- 🎯 Load tools dynamically from CSV, not hardcoded
|
||||
- 💾 Document all tool choices in workflow plan
|
||||
- 📖 Update frontmatter `stepsCompleted: [1, 2, 3]` before loading next step
|
||||
- 🚫 FORBIDDEN to load next step until user selects 'C'
|
||||
|
||||
## CONTEXT BOUNDARIES:
|
||||
|
||||
- Requirements from step 2 inform tool selection
|
||||
- All tool choices affect workflow design
|
||||
- This is the ONLY tools configuration step
|
||||
- Installation requirements affect implementation decisions
|
||||
|
||||
## TOOLS CONFIGURATION PROCESS:
|
||||
|
||||
### 1. Initialize Tools Configuration
|
||||
|
||||
"Configuring **Tools and Integrations**
|
||||
|
||||
Based on your workflow requirements, let's configure all the tools your workflow will need. This includes core BMAD tools, memory systems, and any external integrations."
|
||||
|
||||
### 2. Load and Present Available Tools
|
||||
|
||||
Load `{commonToolsCsv}` and present tools by category:
|
||||
|
||||
"**Available BMAD Tools and Integrations:**
|
||||
|
||||
**Core Tools (Always Available):**
|
||||
|
||||
- [List tools from CSV where propose='always', with descriptions]
|
||||
|
||||
**Optional Tools (Available When Needed):**
|
||||
|
||||
- [List tools from CSV where propose='example', with descriptions]
|
||||
|
||||
_Note: I'm loading these dynamically from our tools database to ensure you have the most current options._"
|
||||
|
||||
### 3. Configure Core BMAD Tools
|
||||
|
||||
"**Core BMAD Tools Configuration:**
|
||||
|
||||
These tools significantly enhance workflow quality and user experience:"
|
||||
|
||||
For each core tool from CSV (`propose='always'`):
|
||||
|
||||
1. **Party-Mode**
|
||||
- Use case: [description from CSV]
|
||||
- Where to integrate: [ask user for decision points, creative phases]
|
||||
|
||||
2. **Advanced Elicitation**
|
||||
- Use case: [description from CSV]
|
||||
- Where to integrate: [ask user for quality gates, review points]
|
||||
|
||||
3. **Brainstorming**
|
||||
- Use case: [description from CSV]
|
||||
- Where to integrate: [ask user for idea generation, innovation points]
|
||||
|
||||
### 4. Configure LLM Features
|
||||
|
||||
"**LLM Feature Integration:**
|
||||
|
||||
These capabilities enhance what your workflow can do:"
|
||||
|
||||
From CSV (`propose='always'` LLM features):
|
||||
|
||||
4. **Web-Browsing**
|
||||
- Capability: [description from CSV]
|
||||
- When needed: [ask user about real-time data needs]
|
||||
|
||||
5. **File I/O**
|
||||
- Capability: [description from CSV]
|
||||
- Operations: [ask user about file operations needed]
|
||||
|
||||
6. **Sub-Agents**
|
||||
- Capability: [description from CSV]
|
||||
- Use cases: [ask user about delegation needs]
|
||||
|
||||
7. **Sub-Processes**
|
||||
- Capability: [description from CSV]
|
||||
- Use cases: [ask user about parallel processing needs]
|
||||
|
||||
### 5. Configure Memory Systems
|
||||
|
||||
"**Memory and State Management:**
|
||||
|
||||
Determine if your workflow needs to maintain state between sessions:"
|
||||
|
||||
From CSV memory tools:
|
||||
|
||||
8. **Sidecar File**
|
||||
- Use case: [description from CSV]
|
||||
- Needed when: [ask about session continuity, agent initialization]
|
||||
|
||||
### 6. Configure External Tools (Optional)
|
||||
|
||||
"**External Integrations (Optional):**
|
||||
|
||||
These tools connect your workflow to external systems:"
|
||||
|
||||
From CSV (`propose='example'`):
|
||||
|
||||
- MCP integrations, database connections, APIs, etc.
|
||||
- For each relevant tool: present description and ask if needed
|
||||
- Note any installation requirements
|
||||
|
||||
### 7. Installation Requirements Assessment
|
||||
|
||||
"**Installation and Dependencies:**
|
||||
|
||||
Some tools require additional setup:"
|
||||
|
||||
Based on selected tools:
|
||||
|
||||
- Identify tools requiring installation
|
||||
- Assess user's comfort level with installations
|
||||
- Document installation requirements
|
||||
|
||||
### 8. Document Complete Tools Configuration
|
||||
|
||||
Append to {workflowPlanFile}:
|
||||
|
||||
```markdown
|
||||
## Tools Configuration
|
||||
|
||||
### Core BMAD Tools
|
||||
|
||||
- **Party-Mode**: [included/excluded] - Integration points: [specific phases]
|
||||
- **Advanced Elicitation**: [included/excluded] - Integration points: [specific phases]
|
||||
- **Brainstorming**: [included/excluded] - Integration points: [specific phases]
|
||||
|
||||
### LLM Features
|
||||
|
||||
- **Web-Browsing**: [included/excluded] - Use cases: [specific needs]
|
||||
- **File I/O**: [included/excluded] - Operations: [file management needs]
|
||||
- **Sub-Agents**: [included/excluded] - Use cases: [delegation needs]
|
||||
- **Sub-Processes**: [included/excluded] - Use cases: [parallel processing needs]
|
||||
|
||||
### Memory Systems
|
||||
|
||||
- **Sidecar File**: [included/excluded] - Purpose: [state management needs]
|
||||
|
||||
### External Integrations
|
||||
|
||||
- [List selected external tools with purposes]
|
||||
|
||||
### Installation Requirements
|
||||
|
||||
- [List tools requiring installation]
|
||||
- **User Installation Preference**: [willing/not willing]
|
||||
- **Alternative Options**: [if not installing certain tools]
|
||||
```
|
||||
|
||||
### 9. Present MENU OPTIONS
|
||||
|
||||
Display: **Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Continue
|
||||
|
||||
#### EXECUTION RULES:
|
||||
|
||||
- ALWAYS halt and wait for user input after presenting menu
|
||||
- ONLY proceed to next step when user selects 'C'
|
||||
- After other menu items execution, return to this menu
|
||||
- User can chat or ask questions - always respond and then end with display again of the menu options
|
||||
- Use menu handling logic section below
|
||||
|
||||
#### Menu Handling Logic:
|
||||
|
||||
- IF A: Execute {advancedElicitationTask}
|
||||
- IF P: Execute {partyModeWorkflow}
|
||||
- IF C: Save tools configuration to {workflowPlanFile}, update frontmatter, then load, read entire file, then execute {nextStepFile}
|
||||
- IF Any other comments or queries: help user respond then [Redisplay Menu Options](#9-present-menu-options)
|
||||
|
||||
## CRITICAL STEP COMPLETION NOTE
|
||||
|
||||
ONLY WHEN C is selected and tools configuration is saved will you load {nextStepFile} to review the complete plan.
|
||||
|
||||
---
|
||||
|
||||
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
|
||||
|
||||
### ✅ SUCCESS:
|
||||
|
||||
- All tool categories configured based on requirements
|
||||
- User made informed choices for each tool
|
||||
- Complete configuration documented in plan
|
||||
- Installation requirements identified
|
||||
- Ready to proceed to plan review
|
||||
|
||||
### ❌ SYSTEM FAILURE:
|
||||
|
||||
- Skipping tool categories
|
||||
- Hardcoding tool descriptions instead of using CSV
|
||||
- Not documenting user choices
|
||||
- Proceeding without user confirmation
|
||||
|
||||
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.
|
||||
@@ -0,0 +1,217 @@
|
||||
---
|
||||
name: 'step-04-plan-review'
|
||||
description: 'Review complete workflow plan (requirements + tools) and get user approval before design'
|
||||
|
||||
# Path Definitions
|
||||
workflow_path: '{project-root}/_bmad/bmb/workflows/create-workflow'
|
||||
|
||||
# File References
|
||||
thisStepFile: '{workflow_path}/steps/step-04-plan-review.md'
|
||||
nextStepFormDesign: '{workflow_path}/steps/step-05-output-format-design.md'
|
||||
nextStepDesign: '{workflow_path}/steps/step-06-design.md'
|
||||
|
||||
targetWorkflowPath: '{bmb_creations_output_folder}/workflows/{new_workflow_name}'
|
||||
workflowPlanFile: '{targetWorkflowPath}/workflow-plan-{new_workflow_name}.md'
|
||||
|
||||
# Task References
|
||||
advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml'
|
||||
partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md'
|
||||
# Template References
|
||||
# No template needed - will append review summary directly to workflow plan
|
||||
---
|
||||
|
||||
# Step 4: Plan Review and Approval
|
||||
|
||||
## STEP GOAL:
|
||||
|
||||
To present the complete workflow plan (requirements and tools configuration) for user review and approval before proceeding to design.
|
||||
|
||||
## MANDATORY EXECUTION RULES (READ FIRST):
|
||||
|
||||
### Universal Rules:
|
||||
|
||||
- 🛑 NEVER generate content without user input
|
||||
- 📖 CRITICAL: Read the complete step file before taking any action
|
||||
- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
|
||||
- 📋 YOU ARE A FACILITATOR, not a content generator
|
||||
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
|
||||
|
||||
### Role Reinforcement:
|
||||
|
||||
- ✅ You are a workflow architect and systems designer
|
||||
- ✅ If you already have been given communication or persona patterns, continue to use those while playing this new role
|
||||
- ✅ We engage in collaborative dialogue, not command-response
|
||||
- ✅ You bring expertise in workflow design review and quality assurance
|
||||
- ✅ User brings their specific requirements and approval authority
|
||||
|
||||
### Step-Specific Rules:
|
||||
|
||||
- 🎯 Focus ONLY on reviewing and refining the plan
|
||||
- 🚫 FORBIDDEN to start designing workflow steps in this step
|
||||
- 💬 Present plan clearly and solicit feedback
|
||||
- 🚫 DO NOT proceed to design without user approval
|
||||
|
||||
## EXECUTION PROTOCOLS:
|
||||
|
||||
- 🎯 Present complete plan summary from {workflowPlanFile}
|
||||
- 💾 Capture any modifications or refinements
|
||||
- 📖 Update frontmatter `stepsCompleted: [1, 2, 3, 4]` before loading next step
|
||||
- 🚫 FORBIDDEN to load next step until user approves plan
|
||||
|
||||
## CONTEXT BOUNDARIES:
|
||||
|
||||
- All requirements from step 2 are available
|
||||
- Tools configuration from step 3 is complete
|
||||
- Focus ONLY on review and approval
|
||||
- This is the final check before design phase
|
||||
|
||||
## PLAN REVIEW PROCESS:
|
||||
|
||||
### 1. Initialize Plan Review
|
||||
|
||||
"**Workflow Plan Review**
|
||||
|
||||
We've gathered all requirements and configured tools for your workflow. Let's review the complete plan to ensure it meets your needs before we start designing the workflow structure."
|
||||
|
||||
### 2. Present Complete Plan Summary
|
||||
|
||||
Load and present from {workflowPlanFile}:
|
||||
|
||||
"**Complete Workflow Plan: {new_workflow_name}**
|
||||
|
||||
**1. Project Overview:**
|
||||
|
||||
- [Present workflow purpose, user type, module from plan]
|
||||
|
||||
**2. Workflow Requirements:**
|
||||
|
||||
- [Present all gathered requirements]
|
||||
|
||||
**3. Tools Configuration:**
|
||||
|
||||
- [Present selected tools and integration points]
|
||||
|
||||
**4. Technical Specifications:**
|
||||
|
||||
- [Present technical constraints and requirements]
|
||||
|
||||
**5. Success Criteria:**
|
||||
|
||||
- [Present success metrics from requirements]"
|
||||
|
||||
### 3. Detailed Review by Category
|
||||
|
||||
"**Detailed Review:**
|
||||
|
||||
**A. Workflow Scope and Purpose**
|
||||
|
||||
- Is the workflow goal clearly defined?
|
||||
- Are the boundaries appropriate?
|
||||
- Any missing requirements?
|
||||
|
||||
**B. User Interaction Design**
|
||||
|
||||
- Does the interaction style match your needs?
|
||||
- Are collaboration points clear?
|
||||
- Any adjustments needed?
|
||||
|
||||
**C. Tools Integration**
|
||||
|
||||
- Are selected tools appropriate for your workflow?
|
||||
- Are integration points logical?
|
||||
- Any additional tools needed?
|
||||
|
||||
**D. Technical Feasibility**
|
||||
|
||||
- Are all requirements achievable?
|
||||
- Any technical constraints missing?
|
||||
- Installation requirements acceptable?"
|
||||
|
||||
### 4. Collect Feedback and Refinements
|
||||
|
||||
"**Review Feedback:**
|
||||
|
||||
Please review each section and provide feedback:
|
||||
|
||||
1. What looks good and should stay as-is?
|
||||
2. What needs modification or refinement?
|
||||
3. What's missing that should be added?
|
||||
4. Anything unclear or confusing?"
|
||||
|
||||
For each feedback item:
|
||||
|
||||
- Document the requested change
|
||||
- Discuss implications on workflow design
|
||||
- Confirm the refinement with user
|
||||
|
||||
### 5. Update Plan with Refinements
|
||||
|
||||
Update {workflowPlanFile} with any approved changes:
|
||||
|
||||
- Modify requirements section as needed
|
||||
- Update tools configuration if changed
|
||||
- Add any missing specifications
|
||||
- Ensure all changes are clearly documented
|
||||
|
||||
### 6. Output Document Check
|
||||
|
||||
"**Output Document Check:**
|
||||
|
||||
Before we proceed to design, does your workflow produce any output documents or files?
|
||||
|
||||
Based on your requirements:
|
||||
|
||||
- [Analyze if workflow produces documents/files]
|
||||
- Consider: Does it create reports, forms, stories, or any persistent output?"
|
||||
|
||||
**If NO:**
|
||||
"Great! Your workflow focuses on actions/interactions without document output. We'll proceed directly to designing the workflow steps."
|
||||
|
||||
**If YES:**
|
||||
"Perfect! Let's design your output format to ensure your workflow produces exactly what you need."
|
||||
|
||||
### 7. Present MENU OPTIONS
|
||||
|
||||
Display: **Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Continue to Design
|
||||
|
||||
#### EXECUTION RULES:
|
||||
|
||||
- ALWAYS halt and wait for user input after presenting menu
|
||||
- ONLY proceed to next step when user selects 'C'
|
||||
- After other menu items execution, return to this menu
|
||||
- User can chat or ask questions - always respond and then end with display again of the menu options
|
||||
- Use menu handling logic section below
|
||||
|
||||
#### Menu Handling Logic:
|
||||
|
||||
- IF A: Execute {advancedElicitationTask}
|
||||
- IF P: Execute {partyModeWorkflow}
|
||||
- IF C: Check if workflow produces documents:
|
||||
- If YES: Update frontmatter, then load nextStepFormDesign
|
||||
- If NO: Update frontmatter, then load nextStepDesign
|
||||
- IF Any other comments or queries: help user respond then [Redisplay Menu Options](#7-present-menu-options)
|
||||
|
||||
## CRITICAL STEP COMPLETION NOTE
|
||||
|
||||
ONLY WHEN C is selected AND the user has explicitly approved the plan and the plan document is updated as needed, then you load either {nextStepFormDesign} or {nextStepDesign}
|
||||
|
||||
---
|
||||
|
||||
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
|
||||
|
||||
### ✅ SUCCESS:
|
||||
|
||||
- Complete plan presented clearly from {workflowPlanFile}
|
||||
- User feedback collected and documented
|
||||
- All refinements incorporated
|
||||
- User explicitly approves the plan
|
||||
- Plan ready for design phase
|
||||
|
||||
### ❌ SYSTEM FAILURE:
|
||||
|
||||
- Not loading plan from {workflowPlanFile}
|
||||
- Skipping review categories
|
||||
- Proceeding without user approval
|
||||
- Not documenting refinements
|
||||
|
||||
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.
|
||||
@@ -0,0 +1,290 @@
|
||||
---
|
||||
name: 'step-05-output-format-design'
|
||||
description: 'Design the output format for workflows that produce documents or files'
|
||||
|
||||
# Path Definitions
|
||||
workflow_path: '{project-root}/_bmad/bmb/workflows/create-workflow'
|
||||
|
||||
# File References
|
||||
thisStepFile: '{workflow_path}/steps/step-05-output-format-design.md'
|
||||
nextStepFile: '{workflow_path}/steps/step-06-design.md'
|
||||
|
||||
targetWorkflowPath: '{bmb_creations_output_folder}/workflows/{new_workflow_name}'
|
||||
workflowPlanFile: '{targetWorkflowPath}/workflow-plan-{new_workflow_name}.md'
|
||||
|
||||
# Task References
|
||||
advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml'
|
||||
partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md'
|
||||
---
|
||||
|
||||
# Step 5: Output Format Design
|
||||
|
||||
## STEP GOAL:
|
||||
|
||||
To design and document the output format for workflows that produce documents or files, determining whether they need strict templates or flexible formatting.
|
||||
|
||||
## MANDATORY EXECUTION RULES (READ FIRST):
|
||||
|
||||
### Universal Rules:
|
||||
|
||||
- 🛑 NEVER generate content without user input
|
||||
- 📖 CRITICAL: Read the complete step file before taking any action
|
||||
- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
|
||||
- 📋 YOU ARE A FACILITATOR, not a content generator
|
||||
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
|
||||
|
||||
### Role Reinforcement:
|
||||
|
||||
- ✅ You are a workflow architect and output format specialist
|
||||
- ✅ If you already have been given communication or persona patterns, continue to use those while playing this new role
|
||||
- ✅ We engage in collaborative dialogue, not command-response
|
||||
- ✅ You bring expertise in document design and template creation
|
||||
- ✅ User brings their specific output requirements and preferences
|
||||
|
||||
### Step-Specific Rules:
|
||||
|
||||
- 🎯 Focus ONLY on output format design
|
||||
- 🚫 FORBIDDEN to design workflow steps in this step
|
||||
- 💬 Help user understand the format spectrum
|
||||
- 🚫 DO NOT proceed without clear format requirements
|
||||
|
||||
## EXECUTION PROTOCOLS:
|
||||
|
||||
- 🎯 Guide user through format spectrum with examples
|
||||
- 💾 Document format decisions in workflow plan
|
||||
- 📖 Update frontmatter `stepsCompleted: [1, 2, 3, 4, 5]` before loading next step
|
||||
- 🚫 FORBIDDEN to load next step until user selects 'C'
|
||||
|
||||
## CONTEXT BOUNDARIES:
|
||||
|
||||
- Approved plan from step 4 is available
|
||||
- Focus ONLY on output document formatting
|
||||
- Skip this step if workflow produces no documents
|
||||
- This step only runs when documents need structure
|
||||
|
||||
## OUTPUT FORMAT DESIGN PROCESS:
|
||||
|
||||
### 1. Initialize Output Format Discussion
|
||||
|
||||
"**Designing Your Output Format**
|
||||
|
||||
Based on your approved plan, your workflow will produce output documents. Let's design how these outputs should be formatted."
|
||||
|
||||
### 2. Present the Format Spectrum
|
||||
|
||||
"**Output Format Spectrum - Where does your workflow fit?**
|
||||
|
||||
**Strictly Structured Examples:**
|
||||
|
||||
- Government forms - exact fields, precise positions
|
||||
- Legal documents - must follow specific templates
|
||||
- Technical specifications - required sections, specific formats
|
||||
- Compliance reports - mandatory fields, validation rules
|
||||
|
||||
**Structured Examples:**
|
||||
|
||||
- Project reports - required sections, flexible content
|
||||
- Business proposals - consistent format, customizable sections
|
||||
- Technical documentation - standard structure, adaptable content
|
||||
- Research papers - IMRAD format, discipline-specific variations
|
||||
|
||||
**Semi-structured Examples:**
|
||||
|
||||
- Character sheets (D&D) - core stats + flexible background
|
||||
- Lesson plans - required components, flexible delivery
|
||||
- Recipes - ingredients/method format, flexible descriptions
|
||||
- Meeting minutes - agenda/attendees/actions, flexible details
|
||||
|
||||
**Free-form Examples:**
|
||||
|
||||
- Creative stories - narrative flow, minimal structure
|
||||
- Blog posts - title/body, organic organization
|
||||
- Personal journals - date/entry, free expression
|
||||
- Brainstorming outputs - ideas, flexible organization"
|
||||
|
||||
### 3. Determine Format Type
|
||||
|
||||
"**Which format type best fits your workflow?**
|
||||
|
||||
1. **Strict Template** - Must follow exact format with specific fields
|
||||
2. **Structured** - Required sections but flexible within each
|
||||
3. **Semi-structured** - Core sections plus optional additions
|
||||
4. **Free-form** - Content-driven with minimal structure
|
||||
|
||||
Please choose 1-4:"
|
||||
|
||||
### 4. Deep Dive Based on Choice
|
||||
|
||||
#### IF Strict Template (Choice 1):
|
||||
|
||||
"**Strict Template Design**
|
||||
|
||||
You need exact formatting. Let's define your requirements:
|
||||
|
||||
**Template Source Options:**
|
||||
A. Upload existing template/image to follow
|
||||
B. Create new template from scratch
|
||||
C. Use standard form (e.g., government, industry)
|
||||
D. AI proposes template based on your needs
|
||||
|
||||
**Template Requirements:**
|
||||
|
||||
- Exact field names and positions
|
||||
- Required vs optional fields
|
||||
- Validation rules
|
||||
- File format (PDF, DOCX, etc.)
|
||||
- Any legal/compliance considerations"
|
||||
|
||||
#### IF Structured (Choice 2):
|
||||
|
||||
"**Structured Document Design**
|
||||
|
||||
You need consistent sections with flexibility:
|
||||
|
||||
**Section Definition:**
|
||||
|
||||
- What sections are required?
|
||||
- Any optional sections?
|
||||
- Section ordering rules?
|
||||
- Cross-document consistency needs?
|
||||
|
||||
**Format Guidelines:**
|
||||
|
||||
- Any formatting standards (APA, MLA, corporate)?
|
||||
- Section header styles?
|
||||
- Content organization principles?"
|
||||
|
||||
#### IF Semi-structured (Choice 3):
|
||||
|
||||
"**Semi-structured Design**
|
||||
|
||||
Core sections with flexibility:
|
||||
|
||||
**Core Components:**
|
||||
|
||||
- What information must always appear?
|
||||
- Which parts can vary?
|
||||
- Any organizational preferences?
|
||||
|
||||
**Polishing Options:**
|
||||
|
||||
- Would you like automatic TOC generation?
|
||||
- Summary section at the end?
|
||||
- Consistent formatting options?"
|
||||
|
||||
#### IF Free-form (Choice 4):
|
||||
|
||||
"**Free-form Content Design**
|
||||
|
||||
Focus on content with minimal structure:
|
||||
|
||||
**Organization Needs:**
|
||||
|
||||
- Basic headers for readability?
|
||||
- Date/title information?
|
||||
- Any categorization needs?
|
||||
|
||||
**Final Polish Options:**
|
||||
|
||||
- Auto-generated summary?
|
||||
- TOC based on content?
|
||||
- Formatting for readability?"
|
||||
|
||||
### 5. Template Creation (if applicable)
|
||||
|
||||
For Strict/Structured workflows:
|
||||
|
||||
"**Template Creation Approach:**
|
||||
|
||||
A. **Design Together** - We'll create the template step by step
|
||||
B. **AI Proposes** - I'll suggest a structure based on your needs
|
||||
C. **Import Existing** - Use/upload your existing template
|
||||
|
||||
Which approach would you prefer?"
|
||||
|
||||
If A or B:
|
||||
|
||||
- Design/create template sections
|
||||
- Define placeholders
|
||||
- Specify field types and validation
|
||||
- Document template structure in plan
|
||||
|
||||
If C:
|
||||
|
||||
- Request file upload or detailed description
|
||||
- Analyze template structure
|
||||
- Document requirements
|
||||
|
||||
### 6. Document Format Decisions
|
||||
|
||||
Append to {workflowPlanFile}:
|
||||
|
||||
```markdown
|
||||
## Output Format Design
|
||||
|
||||
**Format Type**: [Strict/Structured/Semi-structured/Free-form]
|
||||
|
||||
**Output Requirements**:
|
||||
|
||||
- Document type: [report/form/story/etc]
|
||||
- File format: [PDF/MD/DOCX/etc]
|
||||
- Frequency: [single/batch/continuous]
|
||||
|
||||
**Structure Specifications**:
|
||||
[Detailed structure based on format type]
|
||||
|
||||
**Template Information**:
|
||||
|
||||
- Template source: [created/imported/standard]
|
||||
- Template file: [path if applicable]
|
||||
- Placeholders: [list if applicable]
|
||||
|
||||
**Special Considerations**:
|
||||
|
||||
- Legal/compliance requirements
|
||||
- Validation needs
|
||||
- Accessibility requirements
|
||||
```
|
||||
|
||||
### 7. Present MENU OPTIONS
|
||||
|
||||
Display: **Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Continue
|
||||
|
||||
#### EXECUTION RULES:
|
||||
|
||||
- ALWAYS halt and wait for user input after presenting menu
|
||||
- ONLY proceed to next step when user selects 'C'
|
||||
- After other menu items execution, return to this menu
|
||||
- User can chat or ask questions - always respond and then end with display again of the menu options
|
||||
- Use menu handling logic section below
|
||||
|
||||
#### Menu Handling Logic:
|
||||
|
||||
- IF A: Execute {advancedElicitationTask}
|
||||
- IF P: Execute {partyModeWorkflow}
|
||||
- IF C: Save output format design to {workflowPlanFile}, update frontmatter, then load, read entire file, then execute {nextStepFile}
|
||||
- IF Any other comments or queries: help user respond then [Redisplay Menu Options](#7-present-menu-options)
|
||||
|
||||
## CRITICAL STEP COMPLETION NOTE
|
||||
|
||||
ONLY WHEN C is selected and output format is documented will you load {nextStepFile} to begin workflow step design.
|
||||
|
||||
---
|
||||
|
||||
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
|
||||
|
||||
### ✅ SUCCESS:
|
||||
|
||||
- User understands format spectrum
|
||||
- Format type clearly identified
|
||||
- Template requirements documented (if applicable)
|
||||
- Output format saved in plan
|
||||
|
||||
### ❌ SYSTEM FAILURE:
|
||||
|
||||
- Not showing format examples
|
||||
- Skipping format requirements
|
||||
- Not documenting decisions in plan
|
||||
- Assuming format without asking
|
||||
|
||||
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.
|
||||
@@ -0,0 +1,272 @@
|
||||
---
|
||||
name: 'step-06-design'
|
||||
description: 'Design the workflow structure and step sequence based on gathered requirements, tools configuration, and output format'
|
||||
|
||||
# Path Definitions
|
||||
workflow_path: '{project-root}/_bmad/bmb/workflows/create-workflow'
|
||||
|
||||
# File References
|
||||
thisStepFile: '{workflow_path}/steps/step-06-design.md'
|
||||
nextStepFile: '{workflow_path}/steps/step-07-build.md'
|
||||
workflowFile: '{workflow_path}/workflow.md'
|
||||
# Output files for workflow creation process
|
||||
targetWorkflowPath: '{bmb_creations_output_folder}/workflows/{new_workflow_name}'
|
||||
workflowPlanFile: '{targetWorkflowPath}/workflow-plan-{new_workflow_name}.md'
|
||||
|
||||
# Task References
|
||||
advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml'
|
||||
partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md'
|
||||
# Template References
|
||||
# No template needed - will append design details directly to workflow plan
|
||||
---
|
||||
|
||||
# Step 6: Workflow Structure Design
|
||||
|
||||
## STEP GOAL:
|
||||
|
||||
To collaboratively design the workflow structure, step sequence, and interaction patterns based on the approved plan and output format requirements.
|
||||
|
||||
## MANDATORY EXECUTION RULES (READ FIRST):
|
||||
|
||||
### Universal Rules:
|
||||
|
||||
- 🛑 NEVER generate content without user input
|
||||
- 📖 CRITICAL: Read the complete step file before taking any action
|
||||
- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
|
||||
- 📋 YOU ARE A FACILITATOR, not a content generator
|
||||
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
|
||||
|
||||
### Role Reinforcement:
|
||||
|
||||
- ✅ You are a workflow architect and systems designer
|
||||
- ✅ If you already have been given communication or persona patterns, continue to use those while playing this new role
|
||||
- ✅ We engage in collaborative dialogue, not command-response
|
||||
- ✅ You bring workflow design patterns and architectural expertise
|
||||
- ✅ User brings their domain requirements and workflow preferences
|
||||
|
||||
### Step-Specific Rules:
|
||||
|
||||
- 🎯 Focus ONLY on designing structure, not implementation details
|
||||
- 🚫 FORBIDDEN to write actual step content or code in this step
|
||||
- 💬 Collaboratively design the flow and sequence
|
||||
- 🚫 DO NOT finalize design without user agreement
|
||||
|
||||
## EXECUTION PROTOCOLS:
|
||||
|
||||
- 🎯 Guide collaborative design process
|
||||
- 💾 After completing design, append to {workflowPlanFile}
|
||||
- 📖 Update plan frontmatter `stepsCompleted: [1, 2, 3, 4, 5, 6]` before loading next step
|
||||
- 🚫 FORBIDDEN to load next step until user selects 'C' and design is saved
|
||||
|
||||
## CONTEXT BOUNDARIES:
|
||||
|
||||
- Approved plan from step 4 is available and should inform design
|
||||
- Output format design from step 5 (if completed) guides structure
|
||||
- Load architecture documentation when needed for guidance
|
||||
- Focus ONLY on structure and flow design
|
||||
- Don't implement actual files in this step
|
||||
- This is about designing the blueprint, not building
|
||||
|
||||
## DESIGN REFERENCE MATERIALS:
|
||||
|
||||
When designing, you may load these documents as needed:
|
||||
|
||||
- `{project-root}/_bmad/bmb/docs/workflows/templates/step-template.md` - Step file structure
|
||||
- `{project-root}/_bmad/bmb/docs/workflows/templates/step-01-init-continuable-template.md` - Continuable init step template
|
||||
- `{project-root}/_bmad/bmb/docs/workflows/templates/step-1b-template.md` - Continuation step template
|
||||
- `{project-root}/_bmad/bmb/docs/workflows/templates/workflow-template.md` - Workflow configuration
|
||||
- `{project-root}/_bmad/bmb/reference/workflows/meal-prep-nutrition/workflow.md` - Complete example
|
||||
|
||||
## WORKFLOW DESIGN PROCESS:
|
||||
|
||||
### 1. Step Structure Design
|
||||
|
||||
Let's reference our step creation documentation for best practices:
|
||||
|
||||
Load and reference step-file architecture guide:
|
||||
|
||||
```
|
||||
Read: {project-root}/_bmad/bmb/docs/workflows/templates/step-template.md
|
||||
```
|
||||
|
||||
This shows the standard structure for step files. Also reference:
|
||||
|
||||
```
|
||||
Read: {project-root}/_bmad/bmb/docs/workflows/templates/step-1b-template.md
|
||||
```
|
||||
|
||||
This shows the continuation step pattern for workflows that might take multiple sessions.
|
||||
|
||||
Based on the approved plan, collaboratively design the info to answer the following for the build plan:
|
||||
|
||||
- How many major steps does this workflow need?
|
||||
- What is the goal of each step?
|
||||
- Which steps are optional vs required?
|
||||
- Should any steps repeat or loop?
|
||||
- What are the decision points within steps?
|
||||
|
||||
### 1a. Continuation Support Assessment
|
||||
|
||||
**Ask the user:**
|
||||
"Will this workflow potentially take multiple sessions to complete? Consider:
|
||||
|
||||
- Does this workflow generate a document/output file?
|
||||
- Might users need to pause and resume the workflow?
|
||||
- Does the workflow involve extensive data collection or analysis?
|
||||
- Are there complex decisions that might require multiple sessions?
|
||||
|
||||
If **YES** to any of these, we should include continuation support using step-01b-continue.md."
|
||||
|
||||
**If continuation support is needed:**
|
||||
|
||||
- Include step-01-init.md (with continuation detection logic)
|
||||
- Include step-01b-continue.md (for resuming workflows)
|
||||
- Ensure every step updates `stepsCompleted` in output frontmatter
|
||||
- Design the workflow to persist state between sessions
|
||||
|
||||
### 2. Interaction Pattern Design
|
||||
|
||||
Design how users will interact with the workflow:
|
||||
|
||||
- Where should users provide input vs where the AI works autonomously?
|
||||
- What type of menu options are needed at each step?
|
||||
- Should there be Advanced Elicitation or Party Mode options?
|
||||
- How will users know their progress?
|
||||
- What confirmation points are needed?
|
||||
|
||||
### 3. Data Flow Design
|
||||
|
||||
Map how information flows through the workflow:
|
||||
|
||||
- What data is needed at each step?
|
||||
- What outputs does each step produce?
|
||||
- How is state tracked between steps?
|
||||
- Where are checkpoints and saves needed?
|
||||
- How are errors or exceptions handled?
|
||||
|
||||
### 4. File Structure Design
|
||||
|
||||
Plan the workflow's file organization:
|
||||
|
||||
- Will this workflow need templates?
|
||||
- Are there data files required?
|
||||
- Is a validation checklist needed?
|
||||
- What supporting files will be useful?
|
||||
- How will variables be managed?
|
||||
|
||||
### 5. Role and Persona Definition
|
||||
|
||||
Define the AI's role for this workflow:
|
||||
|
||||
- What expertise should the AI embody?
|
||||
- How should the AI communicate with users?
|
||||
- What tone and style is appropriate?
|
||||
- How collaborative vs prescriptive should the AI be?
|
||||
|
||||
### 6. Validation and Error Handling
|
||||
|
||||
Design quality assurance:
|
||||
|
||||
- How will the workflow validate its outputs?
|
||||
- What happens if a user provides invalid input?
|
||||
- Are there checkpoints for review?
|
||||
- How can users recover from errors?
|
||||
- What constitutes successful completion?
|
||||
|
||||
### 7. Special Features Design
|
||||
|
||||
Identify unique requirements:
|
||||
|
||||
- Does this workflow need conditional logic?
|
||||
- Are there branch points based on user choices?
|
||||
- Should it integrate with other workflows?
|
||||
- Does it need to handle multiple scenarios?
|
||||
|
||||
### 8. Design Review and Refinement
|
||||
|
||||
Present the design for review:
|
||||
|
||||
- Walk through the complete flow
|
||||
- Identify potential issues or improvements
|
||||
- Ensure all requirements are addressed
|
||||
- Get user agreement on the design
|
||||
|
||||
## DESIGN PRINCIPLES TO APPLY:
|
||||
|
||||
### Micro-File Architecture
|
||||
|
||||
- Keep each step focused and self-contained
|
||||
- Ensure steps can be loaded independently
|
||||
- Design for Just-In-Time loading
|
||||
|
||||
### Sequential Flow with Clear Progression
|
||||
|
||||
- Each step should build on previous work
|
||||
- Include clear decision points
|
||||
- Maintain logical progression toward goal
|
||||
|
||||
### Menu-Based Interactions
|
||||
|
||||
- Include consistent menu patterns
|
||||
- Provide clear options at decision points
|
||||
- Allow for conversation within steps
|
||||
|
||||
### State Management
|
||||
|
||||
- Track progress using `stepsCompleted` array
|
||||
- Persist state in output file frontmatter
|
||||
- Support continuation where appropriate
|
||||
|
||||
### 9. Document Design in Plan
|
||||
|
||||
Append to {workflowPlanFile}:
|
||||
|
||||
- Complete step outline with names and purposes
|
||||
- Flow diagram or sequence description
|
||||
- Interaction patterns
|
||||
- File structure requirements
|
||||
- Special features and handling
|
||||
|
||||
### 10. Present MENU OPTIONS
|
||||
|
||||
Display: **Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Continue
|
||||
|
||||
#### EXECUTION RULES:
|
||||
|
||||
- ALWAYS halt and wait for user input after presenting menu
|
||||
- ONLY proceed to next step when user selects 'C'
|
||||
- After other menu items execution, return to this menu
|
||||
- User can chat or ask questions - always respond and then end with display again of the menu options
|
||||
- Use menu handling logic section below
|
||||
|
||||
#### Menu Handling Logic:
|
||||
|
||||
- IF A: Execute {advancedElicitationTask}
|
||||
- IF P: Execute {partyModeWorkflow}
|
||||
- IF C: Save design to {workflowPlanFile}, update frontmatter, then load, read entire file, then execute {nextStepFile}
|
||||
- IF Any other comments or queries: help user respond then [Redisplay Menu Options](#10-present-menu-options)
|
||||
|
||||
## CRITICAL STEP COMPLETION NOTE
|
||||
|
||||
ONLY WHEN C is selected and design is saved will you load {nextStepFile} to begin implementation.
|
||||
|
||||
---
|
||||
|
||||
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
|
||||
|
||||
### ✅ SUCCESS:
|
||||
|
||||
- Workflow structure designed collaboratively
|
||||
- All steps clearly defined and sequenced
|
||||
- Interaction patterns established
|
||||
- File structure planned
|
||||
- User agreement on design
|
||||
|
||||
### ❌ SYSTEM FAILURE:
|
||||
|
||||
- Designing without user collaboration
|
||||
- Skipping design principles
|
||||
- Not documenting design in plan
|
||||
- Proceeding without user agreement
|
||||
|
||||
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.
|
||||
@@ -0,0 +1,323 @@
|
||||
---
|
||||
name: 'step-07-build'
|
||||
description: 'Generate all workflow files based on the approved plan'
|
||||
|
||||
# Path Definitions
|
||||
workflow_path: '{project-root}/_bmad/bmb/workflows/create-workflow'
|
||||
|
||||
# File References
|
||||
thisStepFile: '{workflow_path}/steps/step-07-build.md'
|
||||
nextStepFile: '{workflow_path}/steps/step-08-review.md'
|
||||
workflowFile: '{workflow_path}/workflow.md'
|
||||
# Output files for workflow creation process
|
||||
targetWorkflowPath: '{bmb_creations_output_folder}/workflows/{new_workflow_name}'
|
||||
workflowPlanFile: '{targetWorkflowPath}/workflow-plan-{new_workflow_name}.md'
|
||||
|
||||
# Template References
|
||||
workflowTemplate: '{project-root}/_bmad/bmb/docs/workflows/templates/workflow-template.md'
|
||||
stepTemplate: '{project-root}/_bmad/bmb/docs/workflows/templates/step-template.md'
|
||||
stepInitContinuableTemplate: '{project-root}/_bmad/bmb/docs/workflows/templates/step-01-init-continuable-template.md'
|
||||
step1bTemplate: '{project-root}/_bmad/bmb/docs/workflows/templates/step-1b-template.md'
|
||||
# No content templates needed - will create content as needed during build
|
||||
# No build summary template needed - will append summary directly to workflow plan
|
||||
---
|
||||
|
||||
# Step 7: Workflow File Generation
|
||||
|
||||
## STEP GOAL:
|
||||
|
||||
To generate all the workflow files (workflow.md, step files, templates, and supporting files) based on the approved plan from the previous design step.
|
||||
|
||||
## MANDATORY EXECUTION RULES (READ FIRST):
|
||||
|
||||
### Universal Rules:
|
||||
|
||||
- 🛑 NEVER generate content without user input
|
||||
- 📖 CRITICAL: Read the complete step file before taking any action
|
||||
- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
|
||||
- 📋 YOU ARE A FACILITATOR, not a content generator
|
||||
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
|
||||
|
||||
### Role Reinforcement:
|
||||
|
||||
- ✅ You are a workflow architect and systems designer
|
||||
- ✅ If you already have been given communication or persona patterns, continue to use those while playing this new role
|
||||
- ✅ We engage in collaborative dialogue, not command-response
|
||||
- ✅ You bring implementation expertise and best practices
|
||||
- ✅ User brings their specific requirements and design approvals
|
||||
|
||||
### Step-Specific Rules:
|
||||
|
||||
- 🎯 Focus ONLY on generating files based on approved design
|
||||
- 🚫 FORBIDDEN to modify the design without user consent
|
||||
- 💬 Generate files collaboratively, getting approval at each stage
|
||||
- 🚪 CREATE files in the correct target location
|
||||
|
||||
## EXECUTION PROTOCOLS:
|
||||
|
||||
- 🎯 Generate files systematically from design
|
||||
- 💾 Document all generated files and their locations
|
||||
- 📖 Update frontmatter `stepsCompleted: [1, 2, 3, 4, 5, 6, 7]` before loading next step
|
||||
- 🚫 FORBIDDEN to load next step until user selects 'C' and build is complete
|
||||
|
||||
## CONTEXT BOUNDARIES:
|
||||
|
||||
- Approved plan from step 6 guides implementation
|
||||
- Generate files in target workflow location
|
||||
- Load templates and documentation as needed during build
|
||||
- Follow step-file architecture principles
|
||||
|
||||
## BUILD REFERENCE MATERIALS:
|
||||
|
||||
- When building each step file, you must follow template `{project-root}/_bmad/bmb/docs/workflows/templates/step-template.md`
|
||||
- When building continuable step-01-init.md files, use template `{project-root}/_bmad/bmb/docs/workflows/templates/step-01-init-continuable-template.md`
|
||||
- When building continuation steps, use template `{project-root}/_bmad/bmb/docs/workflows/templates/step-1b-template.md`
|
||||
- When building the main workflow.md file, you must follow template `{project-root}/_bmad/bmb/docs/workflows/templates/workflow-template.md`
|
||||
- Example step files from {project-root}/_bmad/bmb/reference/workflows/meal-prep-nutrition/workflow.md for patterns - this is an idealized workflow so all files can give good insight into format and structure to be followed
|
||||
|
||||
## FILE GENERATION SEQUENCE:
|
||||
|
||||
### 1. Confirm Build Readiness
|
||||
|
||||
Based on the approved plan, confirm:
|
||||
"I have your approved plan and I'm ready to generate the workflow files. The plan specifies creating:
|
||||
|
||||
- Main workflow.md file
|
||||
- [Number] step files
|
||||
- [Number] templates
|
||||
- Supporting files
|
||||
|
||||
All in: {targetWorkflowPath}
|
||||
|
||||
Ready to proceed?"
|
||||
|
||||
### 2. Create Directory Structure
|
||||
|
||||
Create the workflow folder structure in the target location:
|
||||
|
||||
```
|
||||
{bmb_creations_output_folder}/workflows/{workflow_name}/
|
||||
├── workflow.md
|
||||
├── steps/
|
||||
│ ├── step-01-init.md
|
||||
│ ├── step-01b-continue.md (if continuation support needed)
|
||||
│ ├── step-02-[name].md
|
||||
│ └── ...
|
||||
├── templates/
|
||||
│ └── [as needed]
|
||||
└── data/
|
||||
└── [as needed]
|
||||
```
|
||||
|
||||
For bmb module, this will be: `_bmad/custom/src/workflows/{workflow_name}/`
|
||||
For other modules, check their module.yaml for custom_workflow_location
|
||||
|
||||
### 3. Generate workflow.md
|
||||
|
||||
Load and follow {workflowTemplate}:
|
||||
|
||||
- Create workflow.md using template structure
|
||||
- Insert workflow name and description
|
||||
- Configure all path variables ({project-root}, _bmad, {workflow_path})
|
||||
- Set web_bundle flag to true unless user has indicated otherwise
|
||||
- Define role and goal
|
||||
- Include initialization path to step-01
|
||||
|
||||
### 4. Generate Step Files
|
||||
|
||||
#### 4a. Check for Continuation Support
|
||||
|
||||
**Check the workflow plan for continuation support:**
|
||||
|
||||
- Look for "continuation support: true" or similar flag
|
||||
- Check if step-01b-continue.md was included in the design
|
||||
- If workflow generates output documents, continuation is typically needed
|
||||
|
||||
#### 4b. Generate step-01-init.md (with continuation logic)
|
||||
|
||||
If continuation support is needed:
|
||||
|
||||
- Load and follow {stepInitContinuableTemplate}
|
||||
- This template automatically includes all required continuation detection logic
|
||||
- Customize with workflow-specific information:
|
||||
- Update workflow_path references
|
||||
- Set correct outputFile and templateFile paths
|
||||
- Adjust role and persona to match workflow type
|
||||
- Customize welcome message for workflow context
|
||||
- Configure input document discovery patterns (if any)
|
||||
- Template automatically handles:
|
||||
- continueFile reference in frontmatter
|
||||
- Logic to check for existing output files with stepsCompleted
|
||||
- Routing to step-01b-continue.md for continuation
|
||||
- Fresh workflow initialization
|
||||
|
||||
#### 4c. Generate step-01b-continue.md (if needed)
|
||||
|
||||
**If continuation support is required:**
|
||||
|
||||
- Load and follow {step1bTemplate}
|
||||
- Customize with workflow-specific information:
|
||||
- Update workflow_path references
|
||||
- Set correct outputFile path
|
||||
- Adjust role and persona to match workflow type
|
||||
- Customize welcome back message for workflow context
|
||||
- Ensure proper nextStep detection logic based on step numbers
|
||||
|
||||
#### 4d. Generate Remaining Step Files
|
||||
|
||||
For each remaining step in the design:
|
||||
|
||||
- Load and follow {stepTemplate}
|
||||
- Create step file using template structure
|
||||
- Customize with step-specific content
|
||||
- Ensure proper frontmatter with path references
|
||||
- Include appropriate menu handling and universal rules
|
||||
- Follow all mandatory rules and protocols from template
|
||||
- **Critical**: Ensure each step updates `stepsCompleted` array when completing
|
||||
|
||||
### 5. Generate Templates (If Needed)
|
||||
|
||||
For document workflows:
|
||||
|
||||
- Create template.md with proper structure
|
||||
- Include all variables from design
|
||||
- Ensure variable naming consistency
|
||||
|
||||
Remember that the output format design we aligned on chose one of the following - and what it means practically when creating the workflow steps:
|
||||
1. **Strict Template** - Must follow exact format with specific fields
|
||||
1. This is similar to the example where there are multiple template fragements that are specific with all fields to be in the final output.
|
||||
2. generally there will be 1 fragment to a step to complete in the overall template.
|
||||
2. **Structured** - Required sections but flexible within each
|
||||
1. Usually there will just be one template file - and in this mode it lists out all the section headings (generally level 2 sections in the md) with a handlebars style placeholder for each section.
|
||||
2. Step files responsible for a specific section will upon user Continue of that step ensure output is written to the templates proper section
|
||||
3. **Semi-structured** - Core sections plus optional additions
|
||||
1. Similar to the prior 2, but not all sections or content are listed in the template, some steps might offer various paths or options to go to different steps (or variance within a step) that can determine what sections end up in the final document
|
||||
4. **Free-form** - Content-driven with minimal structure
|
||||
1. These are the easiest and most flexible. The single template usually only has the front matter fence with a stepsCompleted array and maybe some other fields, and outside of the front matter just the level 1 doc title
|
||||
2. With free form, any step that could produce content just appends to the end of the document, so its progressively build in the order of ste[s completed.
|
||||
3. Its good to have in this type of workflow a final polish output doc type step that cohesively can update the doc built up in this progressive manner, improving flow, reducing duplication, and ensure all information is aligned and where it belongs.
|
||||
|
||||
### 6. Generate Supporting Files
|
||||
|
||||
Based on design requirements:
|
||||
|
||||
- Create data files (csv)
|
||||
- Generate README.md with usage instructions
|
||||
- Create any configuration files
|
||||
- Add validation checklists if designed
|
||||
|
||||
### 7. Verify File Generation
|
||||
|
||||
After creating all files:
|
||||
|
||||
- Check all file paths are correct
|
||||
- Validate frontmatter syntax
|
||||
- Ensure variable consistency across files
|
||||
- Confirm sequential step numbering
|
||||
- Verify menu handling logic
|
||||
|
||||
### 8. Document Generated Files
|
||||
|
||||
Create a summary of what was generated:
|
||||
|
||||
- List all files created with full paths
|
||||
- Note any customizations from templates
|
||||
- Identify any manual steps needed
|
||||
- Provide next steps for testing
|
||||
|
||||
## QUALITY CHECKS DURING BUILD:
|
||||
|
||||
### Frontmatter Validation
|
||||
|
||||
- All YAML syntax is correct
|
||||
- Required fields are present
|
||||
- Path variables use correct format
|
||||
- No hardcoded paths exist
|
||||
|
||||
### Step File Compliance
|
||||
|
||||
- Each step follows the template structure
|
||||
- All mandatory rules are included
|
||||
- Menu handling is properly implemented
|
||||
- Step numbering is sequential
|
||||
|
||||
### Cross-File Consistency
|
||||
|
||||
- Variable names match across files
|
||||
- Path references are consistent
|
||||
- Dependencies are correctly defined
|
||||
- No orphaned references exist
|
||||
|
||||
## BUILD PRINCIPLES:
|
||||
|
||||
### Follow Design Exactly
|
||||
|
||||
- Implement the design as approved
|
||||
- Don't add or remove steps without consultation
|
||||
- Maintain the interaction patterns designed
|
||||
- Preserve the data flow architecture
|
||||
|
||||
### Maintain Best Practices
|
||||
|
||||
- Keep step files focused and reasonably sized (typically 5-10KB)
|
||||
- Use collaborative dialogue patterns
|
||||
- Include proper error handling
|
||||
- Follow naming conventions
|
||||
|
||||
### Ensure Extensibility
|
||||
|
||||
- Design for future modifications
|
||||
- Include clear documentation
|
||||
- Make code readable and maintainable
|
||||
- Provide examples where helpful
|
||||
|
||||
## CONTENT TO APPEND TO PLAN:
|
||||
|
||||
After generating all files, append to {workflowPlanFile}:
|
||||
|
||||
Create a build summary including:
|
||||
|
||||
- List of all files created with full paths
|
||||
- Any customizations from templates
|
||||
- Manual steps needed
|
||||
- Next steps for testing
|
||||
|
||||
### 9. Present MENU OPTIONS
|
||||
|
||||
Display: **Build Complete - Select an Option:** [C] Continue to Review
|
||||
|
||||
#### EXECUTION RULES:
|
||||
|
||||
- Build complete - all files generated
|
||||
- Present simple completion status
|
||||
- User selects [C] to continue to review step
|
||||
|
||||
#### Menu Handling Logic:
|
||||
|
||||
- IF C: Save build summary to {workflowPlanFile}, update frontmatter, then load, read entire file, then execute {nextStepFile}
|
||||
- IF Any other comments or queries: respond and redisplay menu
|
||||
|
||||
## CRITICAL STEP COMPLETION NOTE
|
||||
|
||||
ONLY WHEN C is selected and content is saved to plan and frontmatter is updated, will you then load, read entire file, then execute {nextStepFile} to execute and begin workflow review step.
|
||||
|
||||
---
|
||||
|
||||
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
|
||||
|
||||
### ✅ SUCCESS:
|
||||
|
||||
- All workflow files generated in correct locations
|
||||
- Files follow step-file architecture principles
|
||||
- Plan implemented exactly as approved
|
||||
- Build documented in {workflowPlanFile}
|
||||
- Frontmatter updated with step completion
|
||||
|
||||
### ❌ SYSTEM FAILURE:
|
||||
|
||||
- Generating files without user approval
|
||||
- Deviating from approved plan
|
||||
- Creating files with incorrect paths
|
||||
- Not updating plan frontmatter
|
||||
|
||||
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.
|
||||
@@ -0,0 +1,285 @@
|
||||
---
|
||||
name: 'step-08-review'
|
||||
description: 'Review the generated workflow and provide final validation and next steps'
|
||||
|
||||
# Path Definitions
|
||||
workflow_path: '{project-root}/_bmad/bmb/workflows/create-workflow'
|
||||
|
||||
# File References
|
||||
thisStepFile: '{workflow_path}/steps/step-08-review.md'
|
||||
workflowFile: '{workflow_path}/workflow.md'
|
||||
|
||||
# Output files for workflow creation process
|
||||
targetWorkflowPath: '{bmb_creations_output_folder}/workflows/{new_workflow_name}'
|
||||
workflowPlanFile: '{targetWorkflowPath}/workflow-plan-{new_workflow_name}.md'
|
||||
|
||||
# Task References
|
||||
advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml'
|
||||
partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md'
|
||||
|
||||
# Template References
|
||||
# No review template needed - will append review summary directly to workflow plan
|
||||
# No completion template needed - will append completion details directly
|
||||
|
||||
# Next step reference
|
||||
nextStepFile: '{workflow_path}/steps/step-09-complete.md'
|
||||
---
|
||||
|
||||
# Step 8: Workflow Review and Completion
|
||||
|
||||
## STEP GOAL:
|
||||
|
||||
To review the generated workflow for completeness, accuracy, and adherence to best practices, then provide next steps for deployment and usage.
|
||||
|
||||
## MANDATORY EXECUTION RULES (READ FIRST):
|
||||
|
||||
### Universal Rules:
|
||||
|
||||
- 🛑 NEVER generate content without user input
|
||||
- 📖 CRITICAL: Read the complete step file before taking any action
|
||||
- 🔄 CRITICAL: Always read the complete step file before taking any action
|
||||
- 📋 YOU ARE A FACILITATOR, not a content generator
|
||||
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
|
||||
|
||||
### Role Reinforcement:
|
||||
|
||||
- ✅ You are a workflow architect and systems designer
|
||||
- ✅ If you already have been given communication or persona patterns, continue to use those while playing this new role
|
||||
- ✅ We engage in collaborative dialogue, not command-response
|
||||
- ✅ You bring quality assurance expertise and validation knowledge
|
||||
- ✅ User provides final approval and feedback
|
||||
|
||||
### Step-Specific Rules:
|
||||
|
||||
- 🎯 Focus ONLY on reviewing and validating generated workflow
|
||||
- 🚫 FORBIDDEN to make changes without user approval
|
||||
- 💬 Guide review process collaboratively
|
||||
- 🚪 COMPLETE the workflow creation process
|
||||
|
||||
## EXECUTION PROTOCOLS:
|
||||
|
||||
- 🎯 Conduct thorough review of generated workflow
|
||||
- 💾 Document review findings and completion status
|
||||
- 📖 Update frontmatter `stepsCompleted: [1, 2, 3, 4, 5, 6, 7, 8]` and mark complete
|
||||
- 🚫 This is the final step - no next step to load
|
||||
|
||||
## CONTEXT BOUNDARIES:
|
||||
|
||||
- Generated workflow files are available for review
|
||||
- Focus on validation and quality assurance
|
||||
- This step completes the workflow creation process
|
||||
- No file modifications without explicit user approval
|
||||
|
||||
## WORKFLOW REVIEW PROCESS:
|
||||
|
||||
### 1. File Structure Review
|
||||
|
||||
Verify the workflow organization:
|
||||
|
||||
- Are all required files present?
|
||||
- Is the directory structure correct?
|
||||
- Are file names following conventions?
|
||||
- Are paths properly configured?
|
||||
|
||||
### 2. Configuration Validation
|
||||
|
||||
Check workflow.yaml:
|
||||
|
||||
- Is all metadata correctly filled?
|
||||
- Are path variables properly formatted?
|
||||
- Is the standalone property set correctly?
|
||||
- Are all dependencies declared?
|
||||
|
||||
### 3. Step File Compliance
|
||||
|
||||
Review each step file:
|
||||
|
||||
- Does each step follow the template structure?
|
||||
- Are all mandatory rules included?
|
||||
- Is menu handling properly implemented?
|
||||
- Are frontmatter variables correct?
|
||||
- Are steps properly numbered?
|
||||
|
||||
### 4. Cross-File Consistency
|
||||
|
||||
Verify integration between files:
|
||||
|
||||
- Do variable names match across all files?
|
||||
- Are path references consistent?
|
||||
- Is the step sequence logical?
|
||||
- Are there any broken references?
|
||||
|
||||
### 5. Requirements Verification
|
||||
|
||||
Confirm original requirements are met:
|
||||
|
||||
- Does the workflow address the original problem?
|
||||
- Are all user types supported?
|
||||
- Are inputs and outputs as specified?
|
||||
- Is the interaction style as designed?
|
||||
|
||||
### 6. Best Practices Adherence
|
||||
|
||||
Check quality standards:
|
||||
|
||||
- Are step files focused and reasonably sized (5-10KB typical)?
|
||||
- Is collaborative dialogue implemented?
|
||||
- Is error handling included?
|
||||
- Are naming conventions followed?
|
||||
|
||||
### 7. Test Scenario Planning
|
||||
|
||||
Prepare for testing:
|
||||
|
||||
- What test data would be useful?
|
||||
- What scenarios should be tested?
|
||||
- How can the workflow be invoked?
|
||||
- What would indicate successful execution?
|
||||
|
||||
### 8. Deployment Preparation
|
||||
|
||||
Provide next steps:
|
||||
|
||||
- Installation requirements
|
||||
- Invocation commands
|
||||
- Testing procedures
|
||||
- Documentation needs
|
||||
|
||||
## REVIEW FINDINGS DOCUMENTATION:
|
||||
|
||||
### Issues Found
|
||||
|
||||
Document any issues discovered:
|
||||
|
||||
- **Critical Issues**: Must fix before use
|
||||
- **Warnings**: Should fix for better experience
|
||||
- **Suggestions**: Nice to have improvements
|
||||
|
||||
### Validation Results
|
||||
|
||||
Record validation outcomes:
|
||||
|
||||
- Configuration validation: PASSED/FAILED
|
||||
- Step compliance: PASSED/FAILED
|
||||
- Cross-file consistency: PASSED/FAILED
|
||||
- Requirements verification: PASSED/FAILED
|
||||
|
||||
### Recommendations
|
||||
|
||||
Provide specific recommendations:
|
||||
|
||||
- Immediate actions needed
|
||||
- Future improvements
|
||||
- Training needs
|
||||
- Maintenance considerations
|
||||
|
||||
## COMPLETION CHECKLIST:
|
||||
|
||||
### Final Validations
|
||||
|
||||
- [ ] All files generated successfully
|
||||
- [ ] No syntax errors in YAML
|
||||
- [ ] All paths are correct
|
||||
- [ ] Variables are consistent
|
||||
- [ ] Design requirements met
|
||||
- [ ] Best practices followed
|
||||
|
||||
### User Acceptance
|
||||
|
||||
- [ ] User has reviewed generated workflow
|
||||
- [ ] User approves of the implementation
|
||||
- [ ] User understands next steps
|
||||
- [ ] User satisfied with the result
|
||||
|
||||
### Documentation
|
||||
|
||||
- [ ] Build summary complete
|
||||
- [ ] Review findings documented
|
||||
- [ ] Next steps provided
|
||||
- [ ] Contact information for support
|
||||
|
||||
## CONTENT TO APPEND TO PLAN:
|
||||
|
||||
After completing review, append to {workflowPlanFile}:
|
||||
|
||||
Append review findings to {workflowPlanFile}:
|
||||
|
||||
Create a review summary including:
|
||||
|
||||
- Completeness check results
|
||||
- Accuracy validation
|
||||
- Compliance with best practices
|
||||
- Any issues found
|
||||
|
||||
Then append completion details:
|
||||
|
||||
- Final approval status
|
||||
- Deployment recommendations
|
||||
- Usage guidance
|
||||
|
||||
### 10. Present MENU OPTIONS
|
||||
|
||||
Display: **Select an Option:** [C] Continue to Completion
|
||||
|
||||
#### EXECUTION RULES:
|
||||
|
||||
- ALWAYS halt and wait for user input after presenting menu
|
||||
- ONLY proceed to next step when user selects 'C'
|
||||
- User can chat or ask questions - always respond and then end with display again of the menu options
|
||||
- Use menu handling logic section below
|
||||
|
||||
#### Menu Handling Logic:
|
||||
|
||||
- IF C: Save review to {workflowPlanFile}, update frontmatter, then load, read entire file, then execute {nextStepFile}
|
||||
- IF Any other comments or queries: help user respond then [Redisplay Menu Options](#10-present-menu-options)
|
||||
|
||||
## COMPLIANCE CHECK INSTRUCTIONS
|
||||
|
||||
When user selects [C], provide these instructions:
|
||||
|
||||
**🎯 Workflow Creation Complete! Your new workflow is ready at:**
|
||||
`{target_workflow_path}`
|
||||
|
||||
**⚠️ IMPORTANT - Run Compliance Check in New Context:**
|
||||
To validate your workflow meets BMAD standards:
|
||||
|
||||
1. **Start a new Claude conversation** (fresh context)
|
||||
2. **Use this command:** `/bmad:bmm:workflows:workflow-compliance-check`
|
||||
3. **Provide the path:** `{target_workflow_path}/workflow.md`
|
||||
4. **Follow the validation process** to identify and fix any violations
|
||||
|
||||
**Why New Context?**
|
||||
|
||||
- Compliance checking requires fresh analysis without workflow creation context
|
||||
- Ensures objective validation against template standards
|
||||
- Provides detailed violation reporting with specific fix recommendations
|
||||
|
||||
**Your workflow will be checked for:**
|
||||
|
||||
- Template compliance and structure
|
||||
- Step-by-step validation standards
|
||||
- File optimization and formatting
|
||||
- Meta-workflow best practices
|
||||
|
||||
Ready to validate when you are! [Start new context and run compliance check]
|
||||
|
||||
---
|
||||
|
||||
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
|
||||
|
||||
### ✅ SUCCESS:
|
||||
|
||||
- Generated workflow thoroughly reviewed
|
||||
- All validations performed
|
||||
- Issues documented with solutions
|
||||
- User approves final workflow
|
||||
- Complete documentation provided
|
||||
|
||||
### ❌ SYSTEM FAILURE:
|
||||
|
||||
- Skipping review steps
|
||||
- Not documenting findings
|
||||
- Ending without user approval
|
||||
- Not providing next steps
|
||||
|
||||
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.
|
||||
@@ -0,0 +1,188 @@
|
||||
---
|
||||
name: 'step-09-complete'
|
||||
description: 'Final completion and wrap-up of workflow creation process'
|
||||
|
||||
# Path Definitions
|
||||
workflow_path: '{project-root}/_bmad/bmb/workflows/create-workflow'
|
||||
|
||||
# File References
|
||||
thisStepFile: '{workflow_path}/steps/step-09-complete.md'
|
||||
workflowFile: '{workflow_path}/workflow.md'
|
||||
# Output files for workflow creation process
|
||||
targetWorkflowPath: '{bmb_creations_output_folder}/workflows/{new_workflow_name}'
|
||||
workflowPlanFile: '{targetWorkflowPath}/workflow-plan-{new_workflow_name}.md'
|
||||
completionFile: '{targetWorkflowPath}/completion-summary-{new_workflow_name}.md'
|
||||
---
|
||||
|
||||
# Step 9: Workflow Creation Complete
|
||||
|
||||
## STEP GOAL:
|
||||
|
||||
To complete the workflow creation process with a final summary, confirmation, and next steps for using the new workflow.
|
||||
|
||||
## MANDATORY EXECUTION RULES (READ FIRST):
|
||||
|
||||
### Universal Rules:
|
||||
|
||||
- 🛑 NEVER generate content without user input
|
||||
- 📖 CRITICAL: Read the complete step file before taking any action
|
||||
- 📋 YOU ARE A FACILITATOR, not a content generator
|
||||
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
|
||||
|
||||
### Role Reinforcement:
|
||||
|
||||
- ✅ You are a workflow architect and systems designer
|
||||
- ✅ If you already have been given communication or persona patterns, continue to use those while playing this new role
|
||||
- ✅ We engage in collaborative dialogue, not command-response
|
||||
- ✅ You bring expertise in workflow deployment and usage guidance
|
||||
- ✅ User brings their specific workflow needs
|
||||
|
||||
### Step-Specific Rules:
|
||||
|
||||
- 🎯 Focus ONLY on completion and next steps
|
||||
- 🚫 FORBIDDEN to modify the generated workflow
|
||||
- 💬 Provide clear guidance on how to use the workflow
|
||||
- 🚫 This is the final step - no next step to load
|
||||
|
||||
## EXECUTION PROTOCOLS:
|
||||
|
||||
- 🎯 Present completion summary
|
||||
- 💾 Create final completion documentation
|
||||
- 📖 Update plan frontmatter with completion status
|
||||
- 🚫 This is the final step
|
||||
|
||||
## CONTEXT BOUNDARIES:
|
||||
|
||||
- All previous steps are complete
|
||||
- Workflow has been generated and reviewed
|
||||
- Focus ONLY on completion and next steps
|
||||
- This step concludes the create-workflow process
|
||||
|
||||
## COMPLETION PROCESS:
|
||||
|
||||
### 1. Initialize Completion
|
||||
|
||||
"**Workflow Creation Complete!**
|
||||
|
||||
Congratulations! We've successfully created your new workflow. Let's finalize everything and ensure you have everything you need to start using it."
|
||||
|
||||
### 2. Final Summary
|
||||
|
||||
Present a complete summary of what was created:
|
||||
|
||||
**Workflow Created:** {new_workflow_name}
|
||||
**Location:** {targetWorkflowPath}
|
||||
**Files Generated:** [list from build step]
|
||||
|
||||
### 3. Create Completion Summary
|
||||
|
||||
Create {completionFile} with:
|
||||
|
||||
```markdown
|
||||
---
|
||||
workflowName: { new_workflow_name }
|
||||
creationDate: [current date]
|
||||
module: [module from plan]
|
||||
status: COMPLETE
|
||||
stepsCompleted: [1, 2, 3, 4, 5, 6, 7, 8, 9]
|
||||
---
|
||||
|
||||
# Workflow Creation Summary
|
||||
|
||||
## Workflow Information
|
||||
|
||||
- **Name:** {new_workflow_name}
|
||||
- **Module:** [module]
|
||||
- **Created:** [date]
|
||||
- **Location:** {targetWorkflowPath}
|
||||
|
||||
## Generated Files
|
||||
|
||||
[List all files created]
|
||||
|
||||
## Quick Start Guide
|
||||
|
||||
[How to run the new workflow]
|
||||
|
||||
## Next Steps
|
||||
|
||||
[Post-creation recommendations]
|
||||
```
|
||||
|
||||
### 4. Usage Guidance
|
||||
|
||||
Provide clear instructions on how to use the new workflow:
|
||||
|
||||
**How to Use Your New Workflow:**
|
||||
|
||||
1. **Running the Workflow:**
|
||||
- [Instructions based on workflow type]
|
||||
- [Initial setup if needed]
|
||||
|
||||
2. **Common Use Cases:**
|
||||
- [Typical scenarios for using the workflow]
|
||||
- [Expected inputs and outputs]
|
||||
|
||||
3. **Tips for Success:**
|
||||
- [Best practices for this specific workflow]
|
||||
- [Common pitfalls to avoid]
|
||||
|
||||
### 5. Post-Creation Recommendations
|
||||
|
||||
"**Next Steps:**
|
||||
|
||||
1. **Test the Workflow:** Run it with sample data to ensure it works as expected
|
||||
2. **Customize if Needed:** You can modify the workflow based on your specific needs
|
||||
3. **Share with Team:** If others will use this workflow, provide them with the location and instructions
|
||||
4. **Monitor Usage:** Keep track of how well the workflow meets your needs"
|
||||
|
||||
### 6. Final Confirmation
|
||||
|
||||
"**Is there anything else you need help with regarding your new workflow?**
|
||||
|
||||
- I can help you test it
|
||||
- We can make adjustments if needed
|
||||
- I can help you create documentation for users
|
||||
- Or any other support you need"
|
||||
|
||||
### 7. Update Final Status
|
||||
|
||||
Update {workflowPlanFile} frontmatter:
|
||||
|
||||
- Set status to COMPLETE
|
||||
- Set completion date
|
||||
- Add stepsCompleted: [1, 2, 3, 4, 5, 6, 7, 8, 9]
|
||||
|
||||
## MENU OPTIONS
|
||||
|
||||
Display: **Workflow Creation Complete!** [T] Test Workflow [M] Make Adjustments [D] Get Help
|
||||
|
||||
### Menu Handling Logic:
|
||||
|
||||
- IF T: Offer to run the newly created workflow with sample data
|
||||
- IF M: Offer to make specific adjustments to the workflow
|
||||
- IF D: Provide additional help and resources
|
||||
- IF Any other: Respond to user needs
|
||||
|
||||
## CRITICAL STEP COMPLETION NOTE
|
||||
|
||||
This is the final step. When the user is satisfied, the workflow creation process is complete.
|
||||
|
||||
---
|
||||
|
||||
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
|
||||
|
||||
### ✅ SUCCESS:
|
||||
|
||||
- Workflow fully created and reviewed
|
||||
- Completion summary generated
|
||||
- User understands how to use the workflow
|
||||
- All documentation is in place
|
||||
|
||||
### ❌ SYSTEM FAILURE:
|
||||
|
||||
- Not providing clear usage instructions
|
||||
- Not creating completion summary
|
||||
- Leaving user without next steps
|
||||
|
||||
**Master Rule:** Ensure the user has everything needed to successfully use their new workflow.
|
||||
@@ -0,0 +1,59 @@
|
||||
---
|
||||
name: create-workflow
|
||||
description: Create structured standalone workflows using markdown-based step architecture
|
||||
web_bundle: true
|
||||
---
|
||||
|
||||
# Create Workflow
|
||||
|
||||
**Goal:** Create structured, repeatable standalone workflows through collaborative conversation and step-by-step guidance.
|
||||
|
||||
**Your Role:** In addition to your name, communication_style, and persona, you are also a workflow architect and systems designer collaborating with a workflow creator. This is a partnership, not a client-vendor relationship. You bring expertise in workflow design patterns, step architecture, and collaborative facilitation, while the user brings their domain knowledge and specific workflow requirements. Work together as equals.
|
||||
|
||||
---
|
||||
|
||||
## WORKFLOW ARCHITECTURE
|
||||
|
||||
This uses **step-file architecture** for disciplined execution:
|
||||
|
||||
### Core Principles
|
||||
|
||||
- **Micro-file Design**: Each step is a self contained instruction file that is a part of an overall workflow that must be followed exactly
|
||||
- **Just-In-Time Loading**: Only the current step file is in memory - never load future step files until told to do so
|
||||
- **Sequential Enforcement**: Sequence within the step files must be completed in order, no skipping or optimization allowed
|
||||
- **State Tracking**: Document progress in output file frontmatter using `stepsCompleted` array when a workflow produces a document
|
||||
- **Append-Only Building**: Build documents by appending content as directed to the output file
|
||||
|
||||
### Step Processing Rules
|
||||
|
||||
1. **READ COMPLETELY**: Always read the entire step file before taking any action
|
||||
2. **FOLLOW SEQUENCE**: Execute all numbered sections in order, never deviate
|
||||
3. **WAIT FOR INPUT**: If a menu is presented, halt and wait for user selection
|
||||
4. **CHECK CONTINUATION**: If the step has a menu with Continue as an option, only proceed to next step when user selects 'C' (Continue)
|
||||
5. **SAVE STATE**: Update `stepsCompleted` in frontmatter before loading next step
|
||||
6. **LOAD NEXT**: When directed, load, read entire file, then execute the next step file
|
||||
|
||||
### Critical Rules (NO EXCEPTIONS)
|
||||
|
||||
- 🛑 **NEVER** load multiple step files simultaneously
|
||||
- 📖 **ALWAYS** read entire step file before execution
|
||||
- 🚫 **NEVER** skip steps or optimize the sequence
|
||||
- 💾 **ALWAYS** update frontmatter of output files when writing the final output for a specific step
|
||||
- 🎯 **ALWAYS** follow the exact instructions in the step file
|
||||
- ⏸️ **ALWAYS** halt at menus and wait for user input
|
||||
- 📋 **NEVER** create mental todo lists from future steps
|
||||
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
|
||||
|
||||
---
|
||||
|
||||
## INITIALIZATION SEQUENCE
|
||||
|
||||
### 1. Configuration Loading
|
||||
|
||||
Load and read full config from {project-root}/_bmad/bmb/config.yaml and resolve:
|
||||
|
||||
- `project_name`, `output_folder`, `user_name`, `communication_language`, `document_output_language`, `bmb_creations_output_folder`
|
||||
|
||||
### 2. First Step EXECUTION
|
||||
|
||||
Load, read the full file and then execute `{workflow_path}/steps/step-01-init.md` to begin the workflow.
|
||||
Reference in new issue
Block a user