Compare commits

...

21 Commits

Author SHA1 Message Date
mrsaifullah52 5920d619f8
Merge c6e53dbbc7 into aa30ef3e79 2025-12-02 17:51:03 -08:00
Brian Madison aa30ef3e79 convert create epics and stories and implementation readiness to the new workflow step format 2025-12-02 19:22:15 -06:00
Brian Madison 6365a63dff workflow builder understands how to build continuable workflows 2025-12-02 19:22:15 -06:00
Brian c6e53dbbc7
Merge branch 'main' into feature/n8n-workflow 2025-11-26 08:32:19 -06:00
mrsaifullah52 93db60b8f6 Merge remote-tracking branch 'upstream/main' into feature/n8n-workflow 2025-11-22 12:25:49 +05:00
mrsaifullah52 f344e5cdc2 feat(autominator): update agent menu and documentation 2025-11-22 12:24:58 +05:00
mrsaifullah52 8a91c6fffe fix(autominator): add critical format rules to n8n helpers 2025-11-22 12:24:16 +05:00
mrsaifullah52 36ce3c42d2 feat(autominator): implement research-driven node and workflow building 2025-11-22 12:23:51 +05:00
mrsaifullah52 82b4f1dcb4 feat(autominator): add gather-requirements workflow for requirement gathering
- Create gather-requirements workflow with interactive elicitation
- Add web search integration after each question
- Research EXACT node types, typeVersions, and parameter structures from docs.n8n.io
- Store all research findings in requirements file
- Generate requirement documents with research sections
- Add template.md with research findings sections
- Add instructions.md with comprehensive elicitation steps
- Add checklist.md for validation
2025-11-22 12:22:42 +05:00
mrsaifullah52 6d1da5fc72 refactor(autominator): Replace Context7 MCP integration with web search
Updated documentation, configuration, agent persona, and workflow instructions to remove Context7 MCP references and implement web search for accessing up-to-date n8n documentation. Variables and installer prompts related to Context7 were removed for consistency.
2025-11-21 20:39:36 +05:00
mrsaifullah52 ffe6f6c26b feat(autominator): improve elicitation to focus on actual problems 2025-11-20 15:10:35 +05:00
mrsaifullah52 3fa0865542 refactor(autominator): simplify Context7 MCP recommendation 2025-11-20 14:53:43 +05:00
mrsaifullah52 ebc5acd2aa chore(autominator): finalize standalone module and clean up
- Remove old autominator files from BMM module
- Verify module independence (no BMM dependencies)
- All 21 agents validated successfully
- All tests pass with new structure
- Module ready for standalone distribution
2025-11-20 14:28:53 +05:00
mrsaifullah52 b7239c1ec3 refactor(autominator): create standalone module independent from BMM
- Create new autominator module at src/modules/autominator/
- Move agent from bmm/agents/ to autominator/agents/
- Move workflows from bmm/workflows/autominator/ to autominator/workflows/
- Update module metadata from 'bmm' to 'autominator'
- Update all path references in workflow files
- Add module README.md with comprehensive documentation
- Module is now independent and separately distributable
2025-11-20 14:23:24 +05:00
mrsaifullah52 0edda967a5 refactor(autominator): rename n8n-expert to Autominator with Arnold persona
- Rename agent from n8n-expert to autominator
- Change persona name from Atlas to Arnold
- Update icon to 🦾 (mechanical arm)
- Add tagline: 'Arnold the Autominator - I'll be back... with your workflows automated!'
- Update all workflow path references from n8n-expert to autominator
- Rename workflow folder from n8n-expert to autominator
- Update all internal path references in workflow.yaml files
- Author: Saif
2025-11-20 14:14:16 +05:00
mrsaifullah52 5077941621 feat(n8n-expert): add optimize-workflow workflow
- Add workflow.yaml with configuration for workflow optimization
- Add instructions.md with comprehensive analysis and optimization workflow
- Add checklist.md for optimization validation
- Supports performance, error handling, code quality, and best practices review
2025-11-17 14:30:05 +05:00
mrsaifullah52 74240cf842 feat(n8n-expert): add migrate-workflow workflow
- Add workflow.yaml with configuration for platform migration
- Add instructions.md with platform analysis and mapping workflow
- Add checklist.md for migration validation
- Supports migration from Zapier, Make, HubSpot, Power Automate
2025-11-17 14:29:25 +05:00
mrsaifullah52 83c0a59887 feat(n8n-expert): add modify-workflow workflow
- Add workflow.yaml with configuration for editing workflows
- Add instructions.md with backup and modification workflow
- Add checklist.md for modification validation
- Supports editing existing n8n workflows with safety
2025-11-17 14:28:15 +05:00
mrsaifullah52 02d07ed254 feat(n8n-expert): add create-workflow workflow
- Add workflow.yaml with configuration and variables
- Add instructions.md with full elicitation and Context7 integration
- Add checklist.md for validation
- Supports building n8n workflows from scratch with smart elicitation
2025-11-17 14:22:44 +05:00
mrsaifullah52 9edc699a8f feat(n8n-expert): add shared resources for workflow creation - Add n8n-helpers.md with node creation guidelines - Add n8n-templates.yaml with 8 reusable workflow templates - Add platform-mappings.yaml for Zapier/Make/HubSpot/Power Automate migration - Include connection patterns and best practices 2025-11-17 14:21:35 +05:00
mrsaifullah52 28c5b581e9 feat(n8n-expert): add Atlas agent definition
- Add n8n-expert agent (Atlas) with 4 workflow triggers
- Configure agent persona for n8n workflow automation
- Include Context7 MCP integration for up-to-date docs
- Add party-mode trigger for multi-agent collaboration
- Author: Saif
2025-11-17 14:20:20 +05:00
92 changed files with 6853 additions and 1578 deletions

View File

@ -138,10 +138,10 @@ critical_actions:
# {bmad_folder}/_cfg/agents/bmm-dev.customize.yaml # {bmad_folder}/_cfg/agents/bmm-dev.customize.yaml
menu: menu:
- trigger: deploy-staging - trigger: deploy-staging
workflow: '{project-root}/.bmad-custom/deploy-staging.yaml' workflow: '{project-root}/{bmad_folder}/deploy-staging.yaml'
description: Deploy to staging environment description: Deploy to staging environment
- trigger: deploy-prod - trigger: deploy-prod
workflow: '{project-root}/.bmad-custom/deploy-prod.yaml' workflow: '{project-root}/{bmad_folder}/deploy-prod.yaml'
description: Deploy to production (with approval) description: Deploy to production (with approval)
``` ```

View File

@ -0,0 +1,335 @@
# Autominator - n8n Workflow Automation Module
**Arnold the Autominator - I'll be back... with your workflows automated!** 🦾
Standalone module for n8n workflow automation, creation, migration, and optimization. Build, modify, migrate, and optimize n8n workflows with expert guidance and up-to-date documentation.
## Overview
Autominator is an independent BMAD module that specializes in n8n workflow automation. Whether you're building new workflows from scratch, migrating from other platforms, or optimizing existing workflows, Arnold has you covered.
## Agent
**Arnold** - n8n Workflow Automation Specialist
- Expert in n8n workflow creation, modification, and optimization
- Specializes in platform migration (Zapier, Make, HubSpot, Power Automate)
- Uses web search to access up-to-date n8n documentation
- Smart elicitation for accurate requirement gathering
- Comprehensive workflow validation and testing
## Workflows
### 1. Gather Requirements
Gather and document workflow requirements before creating n8n workflows.
**Triggers:**
- `*gather-requirements`
**Features:**
- Interactive requirement gathering
- Documents problem statement, triggers, integrations
- Creates requirement file for workflow creation
- Saves to `docs/workflow-requirements/`
- Required before creating workflows
### 2. Create Workflow
Build new n8n workflows from scratch based on requirements.
**Triggers:**
- `*create-workflow`
**Features:**
- Smart elicitation to understand your needs
- Workflow type selection (webhook, scheduled, event-driven, manual, database-driven)
- Integration selection and configuration
- Complexity assessment
- Error handling strategy planning
- Web search integration for latest n8n docs
- Automatic JSON validation
### 3. Modify Workflow
Edit or update existing n8n workflows with backup and safety checks.
**Triggers:**
- `*modify-workflow`
**Features:**
- Load existing workflows from file or paste
- Selective modification (add, modify, or remove nodes)
- Connection management
- Automatic backup creation
- Change validation
- Rollback capability
### 4. Migrate Workflow
Migrate automation workflows from other platforms to n8n.
**Supported Platforms:**
- Zapier
- Make (Integromat)
- HubSpot Workflows
- Microsoft Power Automate
- IFTTT
- Custom platforms
**Triggers:**
- `*migrate-workflow`
**Features:**
- Platform-specific mapping
- Trigger and action conversion
- Data transformation planning
- Credential requirement identification
- Migration notes and documentation
- Post-migration testing guidance
### 5. Optimize Workflow
Analyze and improve existing n8n workflows for performance and best practices.
**Triggers:**
- `*optimize-workflow`
**Features:**
- Comprehensive workflow analysis
- Performance optimization recommendations
- Error handling improvements
- Code quality assessment
- Structure optimization
- Best practices validation
- Security review
- Automatic backup before changes
- Selective optimization application
## Quick Start
### Load Arnold Agent
```bash
# In your IDE, load the Autominator agent
agent autominator/autominator
# Or use the agent trigger
*autominator
```
### Gather Requirements (Recommended First Step)
```bash
# Start the requirements gathering process
*gather-requirements
# Follow the interactive prompts to:
# 1. Describe the problem you're solving
# 2. Define trigger type
# 3. Specify data requirements
# 4. Define desired outcome
# 5. List integrations
# 6. Define conditional logic
# 7. Set criticality level
# 8. Name the workflow
# Requirements are saved to: docs/workflow-requirements/req-{name}.md
```
### Create a Workflow
```bash
# Start the create workflow process
*create-workflow
# Arnold will:
# 1. Check for requirements file (or prompt to create one)
# 2. Load requirements automatically
# 3. Research n8n documentation
# 4. Design workflow structure
# 5. Build and validate workflow JSON
# 6. Save to docs/workflows/{name}.json
```
### Migrate from Another Platform
```bash
# Start the migration process
*migrate-workflow
# Provide:
# 1. Source platform (Zapier, Make, HubSpot, etc.)
# 2. Workflow details or export file
# 3. Integration list
# 4. Desired output location
```
### Optimize Existing Workflow
```bash
# Analyze and improve a workflow
*optimize-workflow
# Select optimization focus:
# - Performance
# - Error Handling
# - Code Quality
# - Structure
# - Best Practices
# - Security
# - All
```
## Features
### Web Search Integration
- Automatic web search for n8n documentation
- Accesses official docs.n8n.io resources
- Up-to-date node configurations and best practices
- Problem-specific solution research
### Smart Elicitation
- Contextual analysis of existing information
- Numbered option selection
- Progressive requirement gathering
- Validation before execution
### Comprehensive Validation
- JSON syntax validation
- Schema compliance checking
- Connection integrity verification
- Error recovery (never deletes files)
### Platform Mappings
Built-in mappings for:
- Zapier triggers and actions
- Make modules and routers
- HubSpot workflow actions
- Power Automate flows
- Common automation patterns
### Shared Resources
- **n8n-helpers.md** - Node creation guidelines and patterns
- **n8n-templates.yaml** - 8 reusable workflow templates
- **platform-mappings.yaml** - Platform conversion reference
## Module Structure
```
autominator/
├── _module-installer/
│ └── install-config.yaml
├── agents/
│ └── autominator.agent.yaml
├── workflows/
│ ├── _shared/
│ │ ├── n8n-helpers.md
│ │ ├── n8n-templates.yaml
│ │ └── platform-mappings.yaml
│ ├── create-workflow/
│ │ ├── workflow.yaml
│ │ ├── instructions.md
│ │ └── checklist.md
│ ├── modify-workflow/
│ │ ├── workflow.yaml
│ │ ├── instructions.md
│ │ └── checklist.md
│ ├── migrate-workflow/
│ │ ├── workflow.yaml
│ │ ├── instructions.md
│ │ └── checklist.md
│ └── optimize-workflow/
│ ├── workflow.yaml
│ ├── instructions.md
│ └── checklist.md
└── README.md
```
## Requirements
- n8n instance or account
- IDE with BMAD support
## Installation
Autominator is a standalone module and can be installed independently:
```bash
# Install via BMAD
npx bmad-method@alpha install autominator
# Or manually copy to your BMAD installation
cp -r autominator/ /path/to/bmad/src/modules/
```
## Integration with Other Modules
Autominator is independent but can be used alongside:
- **BMM** - For project lifecycle management
- **CIS** - For creative workflow design
- **BMB** - For module building
- **BMGD** - For game development workflows
## Best Practices
1. **Provide Clear Context** - Describe your workflow purpose and requirements
2. **Use Smart Elicitation** - Let Arnold ask clarifying questions
3. **Test Before Activation** - Always test workflows with sample data
4. **Monitor Initial Runs** - Watch for errors in first executions
5. **Document Changes** - Keep notes on workflow modifications
6. **Backup Regularly** - Use modify-workflow's backup feature
7. **Review Optimizations** - Understand changes before applying
## Troubleshooting
### Workflow JSON Validation Fails
- Check for missing commas or brackets
- Verify all node IDs are unique
- Ensure all connections reference existing nodes
- Use the error location to fix syntax
### Workflow Execution Issues
- Verify all credentials are configured
- Test with sample data first
- Check error handling settings
- Review workflow logs for details
## Related Documentation
- **[n8n Documentation](https://docs.n8n.io/)** - Official n8n docs
- **[BMAD Method](../bmm/README.md)** - Core BMAD framework
- **[CIS Module](../cis/README.md)** - Creative facilitation
- **[BMB Module](../bmb/README.md)** - Module building
## Support
- **Issues** - Report bugs on GitHub
- **Questions** - Check the troubleshooting section
- **Feedback** - Share suggestions for improvements
---
**Ready to automate?** Load Arnold and start with `*create-workflow`!
Part of BMad Method - Transform automation potential through expert AI guidance.

View File

@ -0,0 +1,57 @@
# Autominator Module Installation Configuration
code: autominator
name: "Autominator: n8n Workflow Automation"
default_selected: false
header: "Autominator - n8n Workflow Automation Module"
subheader: "Configure the settings for the Autominator module"
# Core config values automatically inherited:
## user_name
## communication_language
## document_output_language
## output_folder
## bmad_folder
## install_user_docs
## kb_install
n8n_instance_url:
prompt: "What is your n8n instance URL? (optional, for reference)"
default: "https://n8n.example.com"
result: "{value}"
workflow_output_folder:
prompt: "Where should generated workflows be stored?"
default: "{output_folder}/n8n-workflows"
result: "{project-root}/{value}"
automation_experience:
prompt: "What is your n8n/automation experience level?"
default: "intermediate"
result: "{value}"
single-select:
- value: "beginner"
label: "Beginner - New to n8n, provide detailed guidance"
- value: "intermediate"
label: "Intermediate - Familiar with n8n concepts, balanced approach"
- value: "expert"
label: "Expert - Experienced n8n developer, be direct and technical"
primary_integrations:
prompt: "Which integrations do you primarily use? (select all that apply)"
default: ["http", "database"]
result: "{value}"
multi-select:
- value: "http"
label: "HTTP/REST APIs"
- value: "database"
label: "Databases (PostgreSQL, MySQL, MongoDB)"
- value: "cloud"
label: "Cloud Services (Google Sheets, Slack, Notion, Airtable)"
- value: "crm"
label: "CRM Systems (HubSpot, Salesforce)"
- value: "email"
label: "Email"
- value: "custom"
label: "Custom/Other"

View File

@ -0,0 +1,48 @@
# Autominator - Arnold the Automation Expert
agent:
webskip: true
metadata:
id: "{bmad_folder}/autominator/agents/autominator.md"
name: Arnold
title: Arnold the Autominator
icon: 🦾
module: autominator
persona:
role: n8n Workflow Automation Specialist
identity: Arnold the Autominator - I'll be back... with your workflows automated! 🦾 Expert in n8n workflow creation, migration, and optimization. Specializes in building automation workflows, migrating from other platforms (Zapier, Make, HubSpot), and optimizing existing n8n workflows using up-to-date documentation via web search.
communication_style: Automation-first, elicitation-driven, solution-oriented. Presents options as numbered lists for easy selection. Always validates understanding before building. Direct, confident, and results-focused.
principles: |
- Web Search Integration - Always search for latest n8n documentation from docs.n8n.io for accurate, up-to-date implementations.
- Elicitation First - Understand requirements thoroughly before suggesting or building solutions.
- Lazy Loading - Load files and documentation only when needed to minimize context pollution.
- Validation - Always validate workflow JSON syntax after creation.
- Platform Agnostic - Support migration from any automation platform with proper mapping.
- Error Recovery - NEVER delete files due to syntax errors, always fix them using error location information.
- Structured Approach - Follow task-specific workflows for different automation scenarios.
menu:
- trigger: gather-requirements
workflow: "{project-root}/{bmad_folder}/autominator/workflows/gather-requirements/workflow.yaml"
description: Gather and document workflow requirements (run this first before creating workflows)
- trigger: create-workflow
workflow: "{project-root}/{bmad_folder}/autominator/workflows/create-workflow/workflow.yaml"
description: Create new n8n workflow from scratch based on requirements
- trigger: modify-workflow
workflow: "{project-root}/{bmad_folder}/autominator/workflows/modify-workflow/workflow.yaml"
description: Edit or update existing n8n workflow
- trigger: migrate-workflow
workflow: "{project-root}/{bmad_folder}/autominator/workflows/migrate-workflow/workflow.yaml"
description: Migrate workflows from other platforms (Zapier, Make, HubSpot, etc.) to n8n
- trigger: optimize-workflow
workflow: "{project-root}/{bmad_folder}/autominator/workflows/optimize-workflow/workflow.yaml"
description: Review and improve existing n8n workflows for performance and best practices
- trigger: party-mode
workflow: "{project-root}/{bmad_folder}/core/workflows/party-mode/workflow.yaml"
description: Bring the whole team in to chat with other expert agents from the party

View File

@ -0,0 +1,405 @@
# n8n Workflow Helpers
## UUID Generation
n8n uses UUIDs for node IDs, workflow IDs, and webhook IDs. Generate UUIDs in this format:
**Full UUID (36 characters):** `f8b7ff4f-6375-4c79-9b2c-9814bfdd0c92`
- Used for: node `id`, `webhookId`, `versionId`
- Format: 8-4-4-4-12 hexadecimal characters with hyphens
**Short ID (16 characters):** `Wvmqb0POKmqwCoKy`
- Used for: workflow `id`, tag `id`
- Format: alphanumeric (a-z, A-Z, 0-9)
**Assignment ID:** `id-1`, `id-2`, `id-3`
- Used for: Set node assignments, IF node conditions
- Format: "id-" + sequential number
## Node Creation Guidelines
### Basic Node Structure (Modern n8n Format)
```json
{
"parameters": {},
"id": "f8b7ff4f-6375-4c79-9b2c-9814bfdd0c92",
"name": "Node Name",
"type": "n8n-nodes-base.nodeName",
"typeVersion": 2,
"position": [1424, 496],
"webhookId": "b5f0b784-2440-4371-bcf1-b59dd2b29e68",
"credentials": {}
}
```
**Critical Rules:**
- `parameters` comes FIRST
- `id` must be UUID format (e.g., "f8b7ff4f-6375-4c79-9b2c-9814bfdd0c92")
- `type` must be `n8n-nodes-base.nodeName` format (NOT @n8n/n8n-nodes-\*)
- `typeVersion` must be INTEGER (e.g., 2, 3, 4) NOT float (2.1, 3.4)
- `position` must be array of integers: [x, y]
- `webhookId` required for webhook nodes (UUID format)
- Field order matters for n8n compatibility
### Node Positioning
- Start node: [250, 300]
- Horizontal spacing: 220px between nodes
- Vertical spacing: 100px for parallel branches
- Grid alignment: Snap to 20px grid for clean layout
### Common Node Types
### ⚠️ CRITICAL: Node Type Format Rules
**ALWAYS use format:** `n8n-nodes-base.nodeName`
**NEVER use these formats:**
- ❌ `@n8n/n8n-nodes-slack.slackTrigger` (wrong package format)
- ❌ `n8n-nodes-slack.slackTrigger` (missing base)
- ❌ `slackTrigger` (missing prefix)
**Correct Examples:**
- ✅ `n8n-nodes-base.webhook`
- ✅ `n8n-nodes-base.slackTrigger`
- ✅ `n8n-nodes-base.gmail`
- ✅ `n8n-nodes-base.if`
**Trigger Nodes:**
- `n8n-nodes-base.webhook` - HTTP webhook trigger
- `n8n-nodes-base.scheduleTrigger` - Cron/interval trigger
- `n8n-nodes-base.manualTrigger` - Manual execution trigger
- `n8n-nodes-base.emailTrigger` - Email trigger
- `n8n-nodes-base.slackTrigger` - Slack event trigger
**Action Nodes:**
- `n8n-nodes-base.httpRequest` - HTTP API calls
- `n8n-nodes-base.set` - Data transformation
- `n8n-nodes-base.code` - Custom JavaScript/Python code
- `n8n-nodes-base.if` - Conditional branching
- `n8n-nodes-base.merge` - Merge data from multiple branches
- `n8n-nodes-base.splitInBatches` - Process data in batches
**Integration Nodes:**
- `n8n-nodes-base.googleSheets` - Google Sheets
- `n8n-nodes-base.slack` - Slack actions
- `n8n-nodes-base.gmail` - Gmail
- `n8n-nodes-base.notion` - Notion
- `n8n-nodes-base.airtable` - Airtable
- `n8n-nodes-base.postgres` - PostgreSQL
- `n8n-nodes-base.mysql` - MySQL
## Connection Guidelines
### Connection Structure
### ⚠️ CRITICAL: Connection Format Rules
**CORRECT Format:**
```json
{
"Source Node Name": {
"main": [
[
{
"node": "Target Node Name",
"type": "main",
"index": 0
}
]
]
}
}
```
**WRONG Formats:**
```json
// ❌ WRONG - Missing "main" wrapper
{
"Source Node Name": [
[
{
"node": "Target Node Name",
"type": "main",
"index": 0
}
]
]
}
// ❌ WRONG - Direct array
{
"Source Node Name": [[{...}]]
}
```
### Connection Rules
1. Each connection has a source node and target node
2. Connections object structure: `{"Source": {"main": [[{...}]]}}`
3. The "main" key is REQUIRED (wraps the connection array)
4. Index 0 is default output, index 1+ for conditional branches
5. IF nodes have index 0 (true) and index 1 (false)
6. Always validate that referenced node names exist
### Connection Patterns
**Linear Flow:**
```
Trigger → Action1 → Action2 → End
```
**Conditional Branch:**
```
Trigger → IF Node → [true: Action1, false: Action2] → Merge
```
**Parallel Processing:**
```
Trigger → Split → [Branch1, Branch2, Branch3] → Merge
```
## Error Handling Best Practices
### Error Workflow Pattern
```json
{
"name": "Error Handler",
"type": "n8n-nodes-base.errorTrigger",
"parameters": {
"errorWorkflows": ["workflow-id"]
}
}
```
### Retry Configuration
```json
{
"retryOnFail": true,
"maxTries": 3,
"waitBetweenTries": 1000
}
```
## Data Transformation Patterns
### Using Set Node (Modern Format - typeVersion 3+)
```json
{
"name": "Transform Data",
"type": "n8n-nodes-base.set",
"typeVersion": 3,
"parameters": {
"assignments": {
"assignments": [
{
"id": "id-1",
"name": "outputField",
"value": "={{ $json.inputField }}",
"type": "string"
}
]
},
"includeOtherFields": true,
"options": {}
}
}
```
**Critical Rules for Set Node:**
- Use `assignments.assignments` structure (not `values`)
- Each assignment needs `id` field (e.g., "id-1", "id-2")
- Each assignment needs `type` field ("string", "number", "boolean")
- Include `includeOtherFields: true` to pass through other data
- Include `options: {}` for compatibility
### Using Gmail Node (typeVersion 2+)
```json
{
"name": "Send Email",
"type": "n8n-nodes-base.gmail",
"typeVersion": 2,
"parameters": {
"sendTo": "user@example.com",
"subject": "Email Subject",
"message": "Email body content",
"options": {}
}
}
```
**Critical Rules for Gmail Node:**
- Use `message` parameter (NOT `text`)
- Use `sendTo` (NOT `to`)
- Include `options: {}` for compatibility
### Using Slack Node with Channel Selection
```json
{
"name": "Slack Action",
"type": "n8n-nodes-base.slack",
"typeVersion": 2,
"parameters": {
"channel": {
"__rl": true,
"value": "general",
"mode": "list",
"cachedResultName": "#general"
}
}
}
```
**Critical Rules for Slack Channel:**
- Use `__rl: true` flag for resource locator
- Include `mode: "list"` for channel selection
- Include `cachedResultName` with # prefix
### Using IF Node (typeVersion 2+)
```json
{
"name": "Check Condition",
"type": "n8n-nodes-base.if",
"typeVersion": 2,
"parameters": {
"conditions": {
"options": {
"caseSensitive": false,
"leftValue": "",
"typeValidation": "loose"
},
"conditions": [
{
"id": "id-1",
"leftValue": "={{ $json.field }}",
"rightValue": "value",
"operator": {
"type": "string",
"operation": "equals"
}
}
],
"combinator": "and"
},
"options": {}
}
}
```
**Critical Rules for IF Node:**
- Use `conditions.conditions` structure
- Each condition needs `id` field
- Do NOT include `name` field in conditions
- Use `operator` object with `type` and `operation`
- Include `options` at root level
### Using Code Node
```json
{
"name": "Custom Logic",
"type": "n8n-nodes-base.code",
"parameters": {
"language": "javaScript",
"jsCode": "return items.map(item => ({ json: { ...item.json, processed: true } }));"
}
}
```
## Credentials Management
### Credential Reference
```json
{
"credentials": {
"httpBasicAuth": {
"id": "credential-id",
"name": "My API Credentials"
}
}
}
```
### Common Credential Types
- `httpBasicAuth` - Basic authentication
- `oAuth2Api` - OAuth2
- `httpHeaderAuth` - Header-based auth
- `httpQueryAuth` - Query parameter auth
## Workflow Metadata (Modern n8n Format)
### Required Fields
```json
{
"name": "Workflow Name",
"nodes": [],
"pinData": {},
"connections": {},
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "7d745171-e378-411c-bd0a-25a8368a1cb6",
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "2229c21690ffe7e7b16788a579be3103980c4445acb933f7ced2a6a17f0bd18b"
},
"id": "Wvmqb0POKmqwCoKy",
"tags": [
{
"name": "Automation",
"id": "7FHIZPUaIaChwuiS",
"updatedAt": "2025-11-21T19:39:46.484Z",
"createdAt": "2025-11-21T19:39:46.484Z"
}
]
}
```
**Critical Rules:**
- `pinData` must be empty object `{}`
- `versionId` must be UUID
- `meta` object with `templateCredsSetupCompleted` and `instanceId`
- `id` must be short alphanumeric (e.g., "Wvmqb0POKmqwCoKy")
- `tags` must be array of objects (not strings) with id, name, createdAt, updatedAt
## Validation Checklist
- [ ] All node IDs are unique
- [ ] All node names are unique
- [ ] All connections reference existing nodes
- [ ] Trigger node exists and is properly configured
- [ ] Node positions don't overlap
- [ ] Required parameters are set for each node
- [ ] Credentials are properly referenced
- [ ] Error handling is configured where needed
- [ ] JSON syntax is valid

View File

@ -0,0 +1,299 @@
# n8n Workflow Templates
# Basic webhook workflow template
webhook_workflow:
name: "Webhook Workflow"
nodes:
- id: "webhook_trigger"
name: "Webhook"
type: "n8n-nodes-base.webhook"
typeVersion: 1
position: [250, 300]
parameters:
httpMethod: "POST"
path: "webhook-path"
responseMode: "onReceived"
- id: "process_data"
name: "Process Data"
type: "n8n-nodes-base.set"
typeVersion: 1
position: [470, 300]
parameters:
mode: "manual"
values: {}
connections:
Webhook:
- - node: "Process Data"
type: "main"
index: 0
# Scheduled workflow template
scheduled_workflow:
name: "Scheduled Workflow"
nodes:
- id: "schedule_trigger"
name: "Schedule Trigger"
type: "n8n-nodes-base.scheduleTrigger"
typeVersion: 1
position: [250, 300]
parameters:
rule:
interval:
- field: "hours"
hoursInterval: 1
- id: "execute_action"
name: "Execute Action"
type: "n8n-nodes-base.httpRequest"
typeVersion: 1
position: [470, 300]
parameters:
method: "GET"
url: ""
connections:
Schedule Trigger:
- - node: "Execute Action"
type: "main"
index: 0
# Conditional workflow template
conditional_workflow:
name: "Conditional Workflow"
nodes:
- id: "manual_trigger"
name: "Manual Trigger"
type: "n8n-nodes-base.manualTrigger"
typeVersion: 1
position: [250, 300]
parameters: {}
- id: "if_condition"
name: "IF"
type: "n8n-nodes-base.if"
typeVersion: 1
position: [470, 300]
parameters:
conditions:
boolean: []
number: []
string: []
- id: "true_branch"
name: "True Branch"
type: "n8n-nodes-base.noOp"
typeVersion: 1
position: [690, 200]
parameters: {}
- id: "false_branch"
name: "False Branch"
type: "n8n-nodes-base.noOp"
typeVersion: 1
position: [690, 400]
parameters: {}
connections:
Manual Trigger:
- - node: "IF"
type: "main"
index: 0
IF:
- - node: "True Branch"
type: "main"
index: 0
- - node: "False Branch"
type: "main"
index: 0
# API integration workflow template
api_integration_workflow:
name: "API Integration Workflow"
nodes:
- id: "webhook_trigger"
name: "Webhook"
type: "n8n-nodes-base.webhook"
typeVersion: 1
position: [250, 300]
parameters:
httpMethod: "POST"
path: "api-webhook"
responseMode: "onReceived"
- id: "http_request"
name: "HTTP Request"
type: "n8n-nodes-base.httpRequest"
typeVersion: 1
position: [470, 300]
parameters:
method: "POST"
url: ""
jsonParameters: true
options: {}
- id: "transform_response"
name: "Transform Response"
type: "n8n-nodes-base.set"
typeVersion: 1
position: [690, 300]
parameters:
mode: "manual"
values: {}
connections:
Webhook:
- - node: "HTTP Request"
type: "main"
index: 0
HTTP Request:
- - node: "Transform Response"
type: "main"
index: 0
# Database workflow template
database_workflow:
name: "Database Workflow"
nodes:
- id: "schedule_trigger"
name: "Schedule Trigger"
type: "n8n-nodes-base.scheduleTrigger"
typeVersion: 1
position: [250, 300]
parameters:
rule:
interval:
- field: "minutes"
minutesInterval: 15
- id: "postgres_query"
name: "Postgres"
type: "n8n-nodes-base.postgres"
typeVersion: 1
position: [470, 300]
parameters:
operation: "executeQuery"
query: ""
- id: "process_results"
name: "Process Results"
type: "n8n-nodes-base.code"
typeVersion: 1
position: [690, 300]
parameters:
language: "javaScript"
jsCode: "return items;"
connections:
Schedule Trigger:
- - node: "Postgres"
type: "main"
index: 0
Postgres:
- - node: "Process Results"
type: "main"
index: 0
# Error handling workflow template
error_handling_workflow:
name: "Error Handling Workflow"
nodes:
- id: "manual_trigger"
name: "Manual Trigger"
type: "n8n-nodes-base.manualTrigger"
typeVersion: 1
position: [250, 300]
parameters: {}
- id: "risky_operation"
name: "Risky Operation"
type: "n8n-nodes-base.httpRequest"
typeVersion: 1
position: [470, 300]
parameters:
method: "GET"
url: ""
continueOnFail: true
retryOnFail: true
maxTries: 3
waitBetweenTries: 1000
- id: "check_error"
name: "Check for Error"
type: "n8n-nodes-base.if"
typeVersion: 1
position: [690, 300]
parameters:
conditions:
boolean:
- value1: "={{ $json.error !== undefined }}"
value2: true
- id: "handle_error"
name: "Handle Error"
type: "n8n-nodes-base.set"
typeVersion: 1
position: [910, 200]
parameters:
mode: "manual"
values:
string:
- name: "status"
value: "error"
- id: "success_path"
name: "Success Path"
type: "n8n-nodes-base.noOp"
typeVersion: 1
position: [910, 400]
parameters: {}
connections:
Manual Trigger:
- - node: "Risky Operation"
type: "main"
index: 0
Risky Operation:
- - node: "Check for Error"
type: "main"
index: 0
Check for Error:
- - node: "Handle Error"
type: "main"
index: 0
- - node: "Success Path"
type: "main"
index: 0
# Batch processing workflow template
batch_processing_workflow:
name: "Batch Processing Workflow"
nodes:
- id: "manual_trigger"
name: "Manual Trigger"
type: "n8n-nodes-base.manualTrigger"
typeVersion: 1
position: [250, 300]
parameters: {}
- id: "get_data"
name: "Get Data"
type: "n8n-nodes-base.httpRequest"
typeVersion: 1
position: [470, 300]
parameters:
method: "GET"
url: ""
- id: "split_batches"
name: "Split In Batches"
type: "n8n-nodes-base.splitInBatches"
typeVersion: 1
position: [690, 300]
parameters:
batchSize: 10
- id: "process_batch"
name: "Process Batch"
type: "n8n-nodes-base.code"
typeVersion: 1
position: [910, 300]
parameters:
language: "javaScript"
jsCode: "return items;"
connections:
Manual Trigger:
- - node: "Get Data"
type: "main"
index: 0
Get Data:
- - node: "Split In Batches"
type: "main"
index: 0
Split In Batches:
- - node: "Process Batch"
type: "main"
index: 0
Process Batch:
- - node: "Split In Batches"
type: "main"
index: 0

View File

@ -0,0 +1,282 @@
# Platform Migration Mappings
# Maps common automation platform concepts to n8n equivalents
# Zapier to n8n mappings
zapier:
triggers:
"New Email":
n8n_node: "n8n-nodes-base.emailTrigger"
notes: "Configure IMAP/POP3 credentials"
"Webhook":
n8n_node: "n8n-nodes-base.webhook"
notes: "Use POST method by default"
"Schedule":
n8n_node: "n8n-nodes-base.scheduleTrigger"
notes: "Convert Zapier schedule format to cron"
"New Row in Google Sheets":
n8n_node: "n8n-nodes-base.googleSheetsTrigger"
notes: "Requires Google OAuth credentials"
"New Slack Message":
n8n_node: "n8n-nodes-base.slackTrigger"
notes: "Configure channel and event type"
actions:
"Send Email":
n8n_node: "n8n-nodes-base.emailSend"
notes: "Configure SMTP credentials"
"HTTP Request":
n8n_node: "n8n-nodes-base.httpRequest"
notes: "Map method, URL, headers, and body"
"Create Google Sheets Row":
n8n_node: "n8n-nodes-base.googleSheets"
parameters:
operation: "append"
"Send Slack Message":
n8n_node: "n8n-nodes-base.slack"
parameters:
operation: "post"
resource: "message"
"Delay":
n8n_node: "n8n-nodes-base.wait"
notes: "Convert delay duration to milliseconds"
"Filter":
n8n_node: "n8n-nodes-base.if"
notes: "Convert filter conditions to IF node logic"
"Formatter":
n8n_node: "n8n-nodes-base.set"
notes: "Use Set node for data transformation"
"Code":
n8n_node: "n8n-nodes-base.code"
notes: "JavaScript or Python code execution"
concepts:
"Multi-step Zap":
n8n_equivalent: "Linear workflow with connected nodes"
"Paths":
n8n_equivalent: "IF node with multiple branches"
"Filters":
n8n_equivalent: "IF node with conditions"
"Formatter":
n8n_equivalent: "Set node or Code node"
"Looping":
n8n_equivalent: "Split In Batches node"
# Make (Integromat) to n8n mappings
make:
triggers:
"Webhook":
n8n_node: "n8n-nodes-base.webhook"
notes: "Direct equivalent"
"Watch Records":
n8n_node: "n8n-nodes-base.scheduleTrigger"
notes: "Combine with polling logic in Code node"
"Custom Webhook":
n8n_node: "n8n-nodes-base.webhook"
notes: "Configure response mode"
actions:
"HTTP Request":
n8n_node: "n8n-nodes-base.httpRequest"
notes: "Map all HTTP parameters"
"Router":
n8n_node: "n8n-nodes-base.switch"
notes: "Multiple conditional branches"
"Iterator":
n8n_node: "n8n-nodes-base.splitInBatches"
notes: "Process array items individually"
"Aggregator":
n8n_node: "n8n-nodes-base.merge"
notes: "Combine data from multiple sources"
"Data Store":
n8n_node: "n8n-nodes-base.redis"
notes: "Use Redis or database node for storage"
"JSON Parser":
n8n_node: "n8n-nodes-base.code"
notes: "Parse JSON in Code node"
"Text Parser":
n8n_node: "n8n-nodes-base.set"
notes: "Use expressions for text manipulation"
concepts:
"Scenario":
n8n_equivalent: "Workflow"
"Module":
n8n_equivalent: "Node"
"Route":
n8n_equivalent: "Connection"
"Filter":
n8n_equivalent: "IF node"
"Router":
n8n_equivalent: "Switch node or multiple IF nodes"
"Iterator":
n8n_equivalent: "Split In Batches node"
"Aggregator":
n8n_equivalent: "Merge node"
# HubSpot Workflows to n8n mappings
hubspot:
triggers:
"Contact Property Change":
n8n_node: "n8n-nodes-base.hubspotTrigger"
notes: "Configure webhook for property updates"
"Deal Stage Change":
n8n_node: "n8n-nodes-base.hubspotTrigger"
notes: "Monitor deal pipeline changes"
"Form Submission":
n8n_node: "n8n-nodes-base.hubspotTrigger"
notes: "Webhook for form submissions"
"List Membership":
n8n_node: "n8n-nodes-base.scheduleTrigger"
notes: "Poll HubSpot API for list changes"
actions:
"Update Contact Property":
n8n_node: "n8n-nodes-base.hubspot"
parameters:
resource: "contact"
operation: "update"
"Create Deal":
n8n_node: "n8n-nodes-base.hubspot"
parameters:
resource: "deal"
operation: "create"
"Send Email":
n8n_node: "n8n-nodes-base.hubspot"
parameters:
resource: "email"
operation: "send"
"Add to List":
n8n_node: "n8n-nodes-base.hubspot"
parameters:
resource: "contact"
operation: "addToList"
"Create Task":
n8n_node: "n8n-nodes-base.hubspot"
parameters:
resource: "task"
operation: "create"
concepts:
"Enrollment Trigger":
n8n_equivalent: "Trigger node (webhook or schedule)"
"If/Then Branch":
n8n_equivalent: "IF node"
"Delay":
n8n_equivalent: "Wait node"
"Goal":
n8n_equivalent: "IF node checking completion criteria"
"Re-enrollment":
n8n_equivalent: "Workflow settings with loop detection"
# Microsoft Power Automate to n8n mappings
power_automate:
triggers:
"When an item is created":
n8n_node: "n8n-nodes-base.webhook"
notes: "Configure webhook for item creation events"
"Recurrence":
n8n_node: "n8n-nodes-base.scheduleTrigger"
notes: "Convert recurrence pattern to cron"
"When a HTTP request is received":
n8n_node: "n8n-nodes-base.webhook"
notes: "Direct equivalent"
actions:
"HTTP":
n8n_node: "n8n-nodes-base.httpRequest"
notes: "Map all HTTP parameters"
"Condition":
n8n_node: "n8n-nodes-base.if"
notes: "Convert condition logic"
"Apply to each":
n8n_node: "n8n-nodes-base.splitInBatches"
notes: "Process array items"
"Compose":
n8n_node: "n8n-nodes-base.set"
notes: "Data transformation"
"Parse JSON":
n8n_node: "n8n-nodes-base.code"
notes: "Parse JSON in Code node"
"Delay":
n8n_node: "n8n-nodes-base.wait"
notes: "Convert delay duration"
concepts:
"Flow":
n8n_equivalent: "Workflow"
"Action":
n8n_equivalent: "Node"
"Condition":
n8n_equivalent: "IF node"
"Switch":
n8n_equivalent: "Switch node"
"Scope":
n8n_equivalent: "Error handling with try/catch in Code node"
"Apply to each":
n8n_equivalent: "Split In Batches node"
# Common patterns across platforms
common_patterns:
conditional_logic:
description: "If/then/else branching"
n8n_implementation: "IF node with true/false branches"
loops:
description: "Iterate over array items"
n8n_implementation: "Split In Batches node"
data_transformation:
description: "Transform, format, or map data"
n8n_implementation: "Set node or Code node"
error_handling:
description: "Handle errors and retries"
n8n_implementation: "Node settings: continueOnFail, retryOnFail, maxTries"
delays:
description: "Wait before next action"
n8n_implementation: "Wait node with duration"
webhooks:
description: "Receive HTTP requests"
n8n_implementation: "Webhook node with response configuration"
api_calls:
description: "Make HTTP requests to APIs"
n8n_implementation: "HTTP Request node"
parallel_execution:
description: "Execute multiple actions simultaneously"
n8n_implementation: "Multiple connections from single node"
merge_data:
description: "Combine data from multiple sources"
n8n_implementation: "Merge node"
# Migration considerations
migration_notes:
authentication:
- "Recreate all credentials in n8n"
- "OAuth flows may need re-authorization"
- "API keys and tokens must be securely stored"
scheduling:
- "Convert platform-specific schedules to cron expressions"
- "Consider timezone differences"
- "Test schedule triggers before going live"
data_formats:
- "Verify JSON structure compatibility"
- "Check date/time format conversions"
- "Validate data type mappings"
error_handling:
- "Implement retry logic where needed"
- "Add error notification workflows"
- "Test failure scenarios"
testing:
- "Test with sample data first"
- "Verify all integrations work correctly"
- "Monitor initial executions closely"
- "Compare outputs with original platform"

View File

@ -0,0 +1,74 @@
# Create n8n Workflow - Validation Checklist
## Workflow Structure
- [ ] Workflow has a valid name
- [ ] Workflow contains at least one trigger node
- [ ] All nodes have unique IDs
- [ ] All nodes have unique names
- [ ] Workflow JSON is valid and parseable
## Node Configuration
- [ ] Trigger node is properly configured
- [ ] All action nodes have required parameters set
- [ ] Node types are valid n8n node types
- [ ] Node positions are set and don't overlap
- [ ] TypeVersion is set for all nodes (usually 1)
## Connections
- [ ] All nodes are connected (no orphaned nodes except trigger)
- [ ] All connections reference existing node names
- [ ] Connection types are set correctly (usually "main")
- [ ] Connection indices are correct (0 for default, 0/1 for IF nodes)
- [ ] No circular dependencies (unless intentional loops)
## Error Handling
- [ ] Error handling strategy matches requirements
- [ ] Critical nodes have retry logic if needed
- [ ] continueOnFail is set appropriately
- [ ] maxTries and waitBetweenTries are configured if retries enabled
## Data Flow
- [ ] Data transformations are properly configured
- [ ] Set nodes have correct value mappings
- [ ] Code nodes have valid JavaScript/Python code
- [ ] Expressions use correct n8n syntax (={{ }})
## Integrations
- [ ] All required integrations are included
- [ ] Credential placeholders are set for authenticated services
- [ ] API endpoints and methods are correct
- [ ] Request/response formats are properly configured
## Best Practices
- [ ] Workflow follows n8n naming conventions
- [ ] Nodes are logically organized and positioned
- [ ] Complex logic is broken into manageable steps
- [ ] Workflow is documented (node names are descriptive)
## Testing Readiness
- [ ] Workflow can be imported into n8n without errors
- [ ] All required credentials are identified
- [ ] Test data requirements are clear
- [ ] Expected outputs are defined
## File Output
- [ ] File is saved to correct location
- [ ] File has .json extension
- [ ] File is valid JSON (passes JSON.parse)
- [ ] File size is reasonable (not corrupted)
## Documentation
- [ ] User has been informed how to import workflow
- [ ] Credential requirements have been communicated
- [ ] Testing instructions have been provided
- [ ] Any special configuration notes have been shared

View File

@ -0,0 +1,449 @@
# Create n8n Workflow - Workflow Instructions
```xml
<critical>The workflow execution engine is governed by: {project_root}/{bmad_folder}/core/tasks/workflow.xml</critical>
<critical>You MUST have already loaded and processed: {installed_path}/workflow.yaml</critical>
<critical>This workflow creates a new n8n workflow from scratch based on user requirements.</critical>
<workflow>
<step n="0" goal="Load Config and Check Prerequisites">
<critical>Load configuration and check for requirements file before proceeding</critical>
<action>Resolve variables from config_source: workflows_folder, requirements_folder, output_folder, user_name, communication_language</action>
<action>Create {{workflows_folder}} directory if it does not exist</action>
<action>Create {{requirements_folder}} directory if it does not exist</action>
<action>Search for requirements files in {{requirements_folder}}</action>
<action>List all files matching pattern: req-*.md</action>
<check if="no requirements files found">
<output>⚠️ No Requirements File Found
Before creating a workflow, you need to gather requirements.
**Options:**
1. Run `*gather-requirements` to create a requirements file
2. Provide requirements manually in this session
Would you like to:
a) Run gather-requirements workflow now
b) Continue without requirements file (manual elicitation)
Enter your choice (a/b):</output>
<action>WAIT for user input</action>
<check if="user chooses 'a'">
<action>Invoke workflow: {project-root}/{bmad_folder}/autominator/workflows/gather-requirements/workflow.yaml</action>
<action>After gather-requirements completes, reload this step to find the new requirements file</action>
</check>
<check if="user chooses 'b'">
<action>Set {{requirements_file}} = empty</action>
<action>Proceed to Step 1 for manual elicitation</action>
</check>
</check>
<check if="one requirements file found">
<action>Set {{requirements_file}} to the found file path</action>
<action>Load and parse requirements file COMPLETELY</action>
<action>Extract requirements: workflow_name, problem_description, trigger_type, data_requirements, desired_outcome, integrations, conditional_logic, criticality</action>
<action>Extract research findings: use_case_research, node_research, parameter_structures, workflow_pattern_research</action>
<action>Display loaded requirements summary to user</action>
<action>Skip to Step 4 (Plan Workflow Structure) - research already done</action>
</check>
<check if="multiple requirements files found">
<output>📋 Multiple Requirements Files Found:
[Display numbered list of files with workflow names]
Which requirements file would you like to use?
Enter the number (1-N) or 'new' to create a new one:</output>
<action>WAIT for user input</action>
<check if="user enters number">
<action>Set {{requirements_file}} to selected file path</action>
<action>Load and parse requirements file COMPLETELY</action>
<action>Extract requirements: workflow_name, problem_description, trigger_type, data_requirements, desired_outcome, integrations, conditional_logic, criticality</action>
<action>Extract research findings: use_case_research, node_research, parameter_structures, workflow_pattern_research</action>
<action>Display loaded requirements summary to user</action>
<action>Skip to Step 4 (Plan Workflow Structure) - research already done</action>
</check>
<check if="user enters 'new'">
<action>Invoke workflow: {project-root}/{bmad_folder}/autominator/workflows/gather-requirements/workflow.yaml</action>
<action>After gather-requirements completes, reload this step to find the new requirements file</action>
</check>
</check>
</step>
<step n="1" goal="Gather Requirements" elicit="true">
<critical>Start by understanding the ACTUAL PROBLEM the user wants to solve, not just technical requirements</critical>
<action>Ask Question 1: "What problem are you trying to solve with this automation?"</action>
<action>Encourage detailed explanation: "Describe the current manual process, pain points, and desired outcome."</action>
<action>WAIT for user input</action>
<action>Store in {{problem_description}}</action>
<action>Ask Question 2: "What triggers this process? When should the automation run?"</action>
<action>Present numbered options:
1. When data arrives - Webhook, form submission, API call
2. On a schedule - Every hour, daily, weekly, custom cron
3. When something changes - Database update, file change, service event
4. Manually - On-demand execution
5. Multiple triggers - Combination of above
6. Not sure - Help me decide based on my problem
</action>
<action>WAIT for user selection (1-6)</action>
<action>Store selection in {{trigger_type}}</action>
<check if="selection is 6 (Not sure)">
<action>Analyze {{problem_description}} and suggest appropriate trigger</action>
<action>Ask: "Based on your problem, I recommend [trigger type]. Does this make sense?"</action>
<action>WAIT for confirmation or adjustment</action>
<action>Store final trigger in {{trigger_type}}</action>
</check>
<action>Ask Question 3: "What data or information does this workflow need to work with?"</action>
<action>Examples: "Customer data, order details, form responses, API data, etc."</action>
<action>WAIT for user input</action>
<action>Store in {{data_requirements}}</action>
<action>Ask Question 4: "What should happen with this data? What's the desired outcome?"</action>
<action>Examples: "Send to Slack, update database, create invoice, notify team, etc."</action>
<action>WAIT for user input</action>
<action>Store in {{desired_outcome}}</action>
<action>Ask Question 5: "What services or systems are involved?"</action>
<action>Examples: "Slack, Google Sheets, PostgreSQL, HubSpot, custom API, etc."</action>
<action>WAIT for user input</action>
<action>Store in {{integrations}}</action>
<action>Ask Question 6: "Are there any conditions or decision points in this process?"</action>
<action>Examples: "If amount > $1000, notify manager; If status = 'urgent', send immediately"</action>
<action>Present numbered options:
1. No - Straight-through processing
2. Yes - Describe the conditions
</action>
<action>WAIT for user selection (1-2)</action>
<check if="selection is 2">
<action>Ask: "Describe the conditions and what should happen in each case"</action>
<action>WAIT for user input</action>
<action>Store in {{conditional_logic}}</action>
</check>
<action>Ask Question 7: "How critical is this workflow? What happens if it fails?"</action>
<action>Present numbered options:
1. Low - Can retry manually if needed
2. Medium - Should retry automatically, notify on failure
3. High - Must succeed, need alerts and logging
4. Critical - Business-critical, need comprehensive error handling
</action>
<action>WAIT for user selection (1-4)</action>
<action>Store selection in {{criticality}}</action>
<action>Ask Question 8: "What should the workflow be named?"</action>
<action>Suggest name based on {{problem_description}}</action>
<action>WAIT for user input</action>
<action>Store in {{workflow_name}}</action>
<action>Ask Question 9: "Where should the workflow file be saved?"</action>
<action>Present numbered options:
1. Default location - workflows/[workflow-name].json
2. Custom path - Specify your own file path
</action>
<action>WAIT for user selection (1-2)</action>
<check if="selection is 2">
<action>Ask for specific path</action>
<action>WAIT for user input</action>
</check>
<action>Store final path in {{save_location}}</action>
<action>Summarize understanding:</action>
<action>- Problem: {{problem_description}}</action>
<action>- Trigger: {{trigger_type}}</action>
<action>- Data: {{data_requirements}}</action>
<action>- Outcome: {{desired_outcome}}</action>
<action>- Services: {{integrations}}</action>
<action>- Conditions: {{conditional_logic}}</action>
<action>- Criticality: {{criticality}}</action>
<action>Ask: "Does this capture your requirements correctly?"</action>
<action>Present numbered options:
1. Yes - Proceed with workflow creation
2. No - Let me clarify or add details
</action>
<action>WAIT for user selection (1-2)</action>
<check if="selection is 2">
<action>Ask: "What needs to be clarified or added?"</action>
<action>WAIT for user input</action>
<action>Update relevant variables</action>
<action>Repeat summary and confirmation</action>
</check>
</step>
<step n="2" goal="Research n8n Documentation">
<critical>Search for up-to-date n8n documentation based on user requirements</critical>
<action>Inform user: "Researching n8n documentation for your workflow requirements..."</action>
<action>Perform web search for n8n documentation on:</action>
<action>1. Trigger type: {{trigger_type}}</action>
<action>2. Integrations: {{integrations}}</action>
<action>3. Conditional logic: {{conditional_logic}}</action>
<action>4. Error handling: {{criticality}}</action>
<action>Search queries to use:</action>
<action>- "n8n [trigger_type] node documentation"</action>
<action>- "n8n [integration] node setup"</action>
<action>- "n8n workflow best practices"</action>
<action>- "n8n error handling retry logic"</action>
<action>Focus on official n8n documentation at docs.n8n.io</action>
<action>Store relevant documentation snippets for reference</action>
<action>Note any specific node configurations or parameters needed</action>
</step>
<step n="3" goal="Verify Documentation Understanding">
<action>Summarize key findings from documentation:</action>
<action>- Available node types for requirements</action>
<action>- Required parameters and configurations</action>
<action>- Best practices for this use case</action>
<action>- Any limitations or considerations</action>
<action>Inform user: "Based on n8n documentation, I found the necessary nodes and configurations for your workflow."</action>
</step>
<step n="4" goal="Plan Workflow Structure">
<critical>Design workflow based on the ACTUAL PROBLEM, not just technical specs</critical>
<action>Analyze the problem and requirements:</action>
<action>- Problem to solve: {{problem_description}}</action>
<action>- Trigger: {{trigger_type}}</action>
<action>- Data needed: {{data_requirements}}</action>
<action>- Desired outcome: {{desired_outcome}}</action>
<action>- Services: {{integrations}}</action>
<action>- Conditions: {{conditional_logic}}</action>
<action>- Criticality: {{criticality}}</action>
<action>Design workflow structure that solves the problem:</action>
<action>1. Map trigger to appropriate n8n trigger node</action>
<action>2. Design data acquisition steps (API calls, database queries)</action>
<action>3. Plan data transformations needed for the outcome</action>
<action>4. Implement conditional logic from {{conditional_logic}}</action>
<action>5. Design actions to achieve {{desired_outcome}}</action>
<action>6. Add error handling based on {{criticality}}</action>
<action>7. Plan node connections and data flow</action>
<action>Present the solution-focused workflow plan:</action>
<action>## Workflow Solution for: {{problem_description}}</action>
<action></action>
<action>**How it works:**</action>
<action>[Explain in plain language how the workflow solves the problem]</action>
<action></action>
<action>**Workflow Steps:**</action>
<action>1. Trigger: [When/how it starts] - [n8n node type]</action>
<action>2. Get Data: [What data is retrieved] - [n8n nodes]</action>
<action>3. Process: [How data is transformed] - [n8n nodes]</action>
<action>4. Decide: [Conditional logic if any] - [IF/Switch nodes]</action>
<action>5. Act: [Final actions to achieve outcome] - [n8n nodes]</action>
<action>6. Handle Errors: [Error strategy] - [Error handling config]</action>
<action></action>
<action>**Expected Result:**</action>
<action>[Describe what happens when workflow runs successfully]</action>
<action>Ask: "Does this workflow solve your problem?"</action>
<action>Present numbered options:
1. Yes - This solves my problem, proceed
2. No - Missing something important
3. Partially - Needs adjustments
4. Explain more - I need clarification
</action>
<action>WAIT for user selection (1-4)</action>
<check if="selection is 2">
<action>Ask: "What's missing? What else needs to happen?"</action>
<action>WAIT for user input</action>
<action>Adjust workflow design to include missing elements</action>
<action>Repeat this step</action>
</check>
<check if="selection is 3">
<action>Ask: "What needs to be adjusted?"</action>
<action>WAIT for user input</action>
<action>Modify workflow design based on feedback</action>
<action>Repeat this step</action>
</check>
<check if="selection is 4">
<action>Ask: "Which part needs clarification?"</action>
<action>WAIT for user input</action>
<action>Provide detailed explanation of that part</action>
<action>Repeat this step</action>
</check>
</step>
<step n="5" goal="Load Templates and Resources">
<action>Load {{templates}} file</action>
<action>Identify closest matching template based on workflow type</action>
<action>Load {{helpers}} for node creation guidelines</action>
<action>Extract relevant template sections</action>
</step>
<step n="6" goal="Build Workflow JSON">
<critical>Use EXACT node types and parameter structures from {{node_research}} and {{parameter_structures}}</critical>
<critical>Follow modern n8n format from {{helpers}}</critical>
<action>Initialize workflow structure with modern n8n format:</action>
<substep>
{
"name": "{{workflow_name}}",
"nodes": [],
"pinData": {},
"connections": {},
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "[generate UUID]",
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "[generate UUID]"
},
"id": "[generate short ID]",
"tags": []
}
</substep>
<action>Build nodes ONE at a time following these rules:</action>
<substep>For Each Node (Use EXACT structures from research):
1. Generate UUID for node ID (format: "f8b7ff4f-6375-4c79-9b2c-9814bfdd0c92")
2. Set node name (unique, descriptive)
3. Use EXACT node type from {{node_research}}:
- MUST be format: "n8n-nodes-base.nodeName"
- NEVER use: "@n8n/n8n-nodes-*" format
- Example: "n8n-nodes-base.gmail" NOT "@n8n/n8n-nodes-gmail.gmail"
4. Use EXACT typeVersion from {{node_research}}:
- MUST be INTEGER (2, 3, 4)
- NEVER use float (2.1, 3.4)
5. Calculate position as INTEGER array:
- Format: [x, y] where x and y are integers
- First node (trigger): [240, 300]
- Subsequent nodes: add 220 to x for each step
- Branches: adjust y by ±100
6. Use EXACT parameter structure from {{parameter_structures}}:
- For Set node (v3+): use assignments.assignments structure
- For Gmail node (v2+): use "message" parameter (NOT "text")
- For IF node (v2+): use conditions.conditions structure (NO "name" field in conditions)
- For Slack channel: use __rl flag with mode and cachedResultName
- Copy structure EXACTLY from research, don't modify
7. Add webhookId (UUID) if node type is webhook
8. Add credentials if needed
9. Field order: parameters, id, name, type, typeVersion, position, webhookId, credentials
10. Store node name in list for validation
</substep>
<substep>For Each Connection (CRITICAL FORMAT):
1. Identify source node name (must match node "name" field exactly)
2. Identify target node name (must match node "name" field exactly)
3. Create connection entry with CORRECT format:
"Source Node Name": {
"main": [
[
{
"node": "Target Node Name",
"type": "main",
"index": 0
}
]
]
}
4. CRITICAL: The "main" wrapper object is REQUIRED
5. NEVER use format: "Source": [[{...}]] (missing "main" wrapper)
6. For IF nodes:
- index 0 = true branch
- index 1 = false branch
7. Validate all referenced nodes exist in node names list
</substep>
<substep>Node Building Order:
1. Trigger node
2. Main flow action nodes
3. Conditional nodes (IF/Switch)
4. Branch nodes
5. Merge nodes
6. Final action nodes
7. Connect all nodes
</substep>
<action>Apply error handling based on {{error_handling}} selection</action>
<action>Validate all node IDs are unique</action>
<action>Validate all node names are unique</action>
<action>Validate all connections reference existing nodes</action>
</step>
<step n="7" goal="Optimize and Save">
<action>Review workflow for optimization:</action>
<action>- Remove any unused nodes</action>
<action>- Verify node positions don't overlap</action>
<action>- Ensure proper spacing and alignment</action>
<action>- Validate all required parameters are set</action>
<action>Resolve final save path:</action>
<check if="{{save_location}} was provided by user">
<action>Use {{save_location}} as-is</action>
</check>
<check if="{{save_location}} is empty or default">
<action>Use {{workflows_folder}}/{{workflow_name}}.json</action>
<action>Ensure {{workflows_folder}} directory exists</action>
<action>Store resolved path in {{save_location}}</action>
</check>
<action>Save workflow to {{save_location}}</action>
</step>
<step n="8" goal="Validate JSON Syntax">
<critical>NEVER delete the file if validation fails - always fix syntax errors</critical>
<action>Run: node -e "JSON.parse(require('fs').readFileSync('{{save_location}}', 'utf8')); console.log('✓ Valid JSON')"</action>
<check if="validation fails (exit code 1)">
<action>Read the error message carefully - it shows the syntax error and position</action>
<action>Open the file and navigate to the error location</action>
<action>Fix the syntax error (add missing comma, bracket, or quote as indicated)</action>
<action>Save the file</action>
<action>Re-run validation with the same command</action>
<action>Repeat until validation passes</action>
</check>
<action>Once validation passes, confirm with user: "n8n workflow created at {{save_location}}"</action>
</step>
<step n="9" goal="Provide Usage Instructions">
<action>Inform user how to use the workflow:</action>
<action>1. Import the JSON file into n8n</action>
<action>2. Configure credentials for integrated services</action>
<action>3. Test the workflow with sample data</action>
<action>4. Activate the workflow when ready</action>
<action>Ask: "Would you like me to explain any part of the workflow?"</action>
<action>Present numbered options:
1. No - I'm good to go
2. Yes - Explain specific nodes
3. Yes - Explain the overall flow
4. Yes - Explain how to test it
</action>
<action>WAIT for user selection (1-4)</action>
<check if="selection is 2, 3, or 4">
<action>Provide requested explanation</action>
</check>
</step>
<step n="10" goal="Validate Content">
<invoke-task>Validate against checklist at {{validation}} using {{bmad_folder}}/core/tasks/validate-workflow.xml</invoke-task>
</step>
</workflow>
```

View File

@ -0,0 +1,43 @@
name: create-workflow
description: "Create new n8n workflow from scratch based on requirements"
author: "Saif"
# Critical variables from config
config_source: "{project-root}/{bmad_folder}/autominator/config.yaml"
output_folder: "{config_source}:output_folder"
user_name: "{config_source}:user_name"
communication_language: "{config_source}:communication_language"
workflows_folder: "{config_source}:workflows_folder"
requirements_folder: "{config_source}:requirements_folder"
date: system-generated
# Workflow components
installed_path: "{project-root}/{bmad_folder}/autominator/workflows/create-workflow"
shared_path: "{project-root}/{bmad_folder}/autominator/workflows/_shared"
instructions: "{installed_path}/instructions.md"
validation: "{installed_path}/checklist.md"
# Shared resources
helpers: "{shared_path}/n8n-helpers.md"
templates: "{shared_path}/n8n-templates.yaml"
platform_mappings: "{shared_path}/platform-mappings.yaml"
# Variables
variables:
requirements_file: "" # Will be discovered or elicited
workflow_type: "" # Will be loaded from requirements or elicited
trigger_type: "" # Will be loaded from requirements or elicited
integrations: [] # Will be loaded from requirements or elicited
complexity: "" # Will be elicited
error_handling: "" # Will be elicited
workflow_name: "" # Will be loaded from requirements or elicited
problem_description: "" # Will be loaded from requirements
data_requirements: "" # Will be loaded from requirements
desired_outcome: "" # Will be loaded from requirements
conditional_logic: "" # Will be loaded from requirements
criticality: "" # Will be loaded from requirements
default_output_file: "{workflows_folder}/{workflow_name}.json"
standalone: true
web_bundle: false

View File

@ -0,0 +1,25 @@
# Gather Requirements - Validation Checklist
## Requirements Completeness
- [ ] Problem statement is clear and specific
- [ ] Trigger type is defined
- [ ] Data requirements are documented
- [ ] Desired outcome is clear
- [ ] All integrations are listed
- [ ] Conditional logic is documented (or marked as not needed)
- [ ] Criticality level is set
- [ ] Workflow name is descriptive
## Document Quality
- [ ] Requirements file is saved to correct location
- [ ] All template fields are filled
- [ ] No placeholder text remains
- [ ] Change log is initialized
## Readiness
- [ ] Requirements are sufficient to create workflow
- [ ] User has confirmed requirements are correct
- [ ] File is ready for use by create-workflow

View File

@ -0,0 +1,190 @@
# Gather Requirements - Workflow Instructions
```xml
<critical>The workflow execution engine is governed by: {project_root}/{bmad_folder}/core/tasks/workflow.xml</critical>
<critical>You MUST have already loaded and processed: {installed_path}/workflow.yaml</critical>
<critical>This workflow gathers requirements for n8n workflow creation.</critical>
<workflow>
<step n="1" goal="Load Config and Initialize">
<action>Resolve variables from config_source: requirements_folder, output_folder, user_name, communication_language</action>
<action>Create {{requirements_folder}} directory if it does not exist</action>
<action>Load template from {{template}}</action>
</step>
<step n="2" goal="Gather Requirements" elicit="true">
<critical>Ask questions ONE AT A TIME and WAIT for user response after each question</critical>
<ask>Question 1: What problem are you trying to solve with this automation?
Describe the current manual process, pain points, and desired outcome.</ask>
<action>WAIT for user input</action>
<action>Store response in {{problem_description}}</action>
<action>Perform web search to understand the use case:</action>
<action>- "n8n workflow for [problem description] site:docs.n8n.io"</action>
<action>- "n8n automation [problem description] best practices"</action>
<action>Store findings in {{use_case_research}}</action>
<ask>Question 2: What triggers this process? When should the automation run?
Options:
1. When data arrives - Webhook, form submission, API call
2. On a schedule - Every hour, daily, weekly, custom cron
3. When something changes - Database update, file change, service event
4. Manually - On-demand execution
5. Multiple triggers - Combination of above
6. Not sure - Help me decide based on my problem
Enter your selection (1-6):</ask>
<action>WAIT for user input</action>
<action>Store response in {{trigger_type}}</action>
<check if="selection is 6">
<action>Analyze {{problem_description}} and suggest appropriate trigger</action>
<ask>Based on your problem, I recommend [trigger type]. Does this make sense? (yes/no)</ask>
<action>WAIT for confirmation</action>
<action>Store final trigger in {{trigger_type}}</action>
</check>
<ask>Question 3: What data or information does this workflow need to work with?
Examples: Customer data, order details, form responses, API data, etc.</ask>
<action>WAIT for user input</action>
<action>Store response in {{data_requirements}}</action>
<ask>Question 4: What should happen with this data? What's the desired outcome?
Examples: Send to Slack, update database, create invoice, notify team, etc.</ask>
<action>WAIT for user input</action>
<action>Store response in {{desired_outcome}}</action>
<ask>Question 5: What services or systems are involved?
Examples: Slack, Google Sheets, PostgreSQL, HubSpot, custom API, etc.</ask>
<action>WAIT for user input</action>
<action>Store response in {{integrations}}</action>
<action>Research EXACT n8n node types for each integration:</action>
<action>For each service in {{integrations}}:</action>
<action>1. Search: "n8n [service] node documentation site:docs.n8n.io"</action>
<action>2. Extract EXACT node type string (e.g., "n8n-nodes-base.webhook")</action>
<action>3. Extract typeVersion (e.g., 2.1)</action>
<action>4. Extract available parameters structure</action>
<action>5. Extract example usage from docs</action>
<action>6. Note if trigger node or action node</action>
<action>Store all findings in {{node_research}}</action>
<ask>Question 6: Are there any conditions or decision points in this process?
Examples: If amount > $1000, notify manager; If status = 'urgent', send immediately
Options:
1. No - Straight-through processing
2. Yes - Describe the conditions
Enter your selection (1-2):</ask>
<action>WAIT for user input</action>
<check if="selection is 2">
<ask>Describe the conditions and what should happen in each case:</ask>
<action>WAIT for user input</action>
<action>Store response in {{conditional_logic}}</action>
</check>
<check if="selection is 1">
<action>Store "No conditional logic required" in {{conditional_logic}}</action>
</check>
<ask>Question 7: How critical is this workflow? What happens if it fails?
Options:
1. Low - Can retry manually if needed
2. Medium - Should retry automatically, notify on failure
3. High - Must succeed, need alerts and logging
4. Critical - Business-critical, need comprehensive error handling
Enter your selection (1-4):</ask>
<action>WAIT for user input</action>
<action>Store selection in {{criticality}}</action>
<ask>Question 8: What should the workflow be named?</ask>
<action>WAIT for user input</action>
<action>Store response in {{workflow_name}}</action>
<action>Generate {{workflow_slug}} from {{workflow_name}} (lowercase, hyphens, no spaces)</action>
<action>Display summary:
- Problem: {{problem_description}}
- Trigger: {{trigger_type}}
- Data: {{data_requirements}}
- Outcome: {{desired_outcome}}
- Services: {{integrations}}
- Conditions: {{conditional_logic}}
- Criticality: {{criticality}}
- Name: {{workflow_name}}
</action>
<ask>Does this capture your requirements correctly?
Options:
1. Yes - Save requirements
2. No - Let me clarify or add details
Enter your selection (1-2):</ask>
<action>WAIT for user input</action>
<check if="selection is 2">
<ask>What needs to be clarified or added?</ask>
<action>WAIT for user input</action>
<action>Update relevant variables based on feedback</action>
<action>Repeat summary and confirmation</action>
</check>
</step>
<step n="3" goal="Research Workflow Pattern">
<action>Perform comprehensive web search for workflow pattern:</action>
<action>- "n8n workflow pattern [trigger_type] to [desired_outcome] site:docs.n8n.io"</action>
<action>- "n8n [integrations] workflow example site:docs.n8n.io"</action>
<action>- "n8n best practices [use case] site:docs.n8n.io"</action>
<action>Store findings in {{workflow_pattern_research}}</action>
<action>Research parameter structures for each node type:</action>
<action>For each node type in {{node_research}}:</action>
<action>1. Search: "n8n [node type] parameters documentation site:docs.n8n.io"</action>
<action>2. Extract EXACT parameter structure from docs</action>
<action>3. Extract required vs optional parameters</action>
<action>4. Extract parameter data types</action>
<action>5. Extract example values</action>
<action>Store in {{parameter_structures}}</action>
</step>
<step n="4" goal="Save Requirements Document">
<action>Resolve output path: {{default_output_file}} using {{workflow_slug}}</action>
<action>Fill template with all gathered variables AND research findings</action>
<action>Include in document:</action>
<action>- Problem description and requirements</action>
<action>- Use case research findings</action>
<action>- EXACT node types with typeVersions</action>
<action>- EXACT parameter structures from docs</action>
<action>- Workflow pattern recommendations</action>
<action>- Best practices from research</action>
<action>Save document to {{default_output_file}}</action>
<action>Report saved file path to user</action>
<output>✅ Requirements Saved Successfully!
**File:** {{default_output_file}}
**Next Steps:**
1. Review the requirements file
2. Run `*create-workflow` to generate the n8n workflow
(The create-workflow will automatically load this requirements file)
**Note:** You can edit the requirements file manually before creating the workflow.
</output>
</step>
<step n="5" goal="Validate Content">
<invoke-task>Validate against checklist at {{validation}} using {{bmad_folder}}/core/tasks/validate-workflow.xml</invoke-task>
</step>
</workflow>
```

View File

@ -0,0 +1,75 @@
# Workflow Requirements: {{workflow_name}}
**Created:** {{date}}
**Status:** Requirements Gathered
**Criticality:** {{criticality}}
---
## Problem Statement
{{problem_description}}
---
## Workflow Overview
**Trigger:** {{trigger_type}}
**Desired Outcome:** {{desired_outcome}}
---
## Data Requirements
{{data_requirements}}
---
## Integrations
{{integrations}}
---
## Conditional Logic
{{conditional_logic}}
---
## Research Findings
### Use Case Research
{{use_case_research}}
### Node Types (From n8n Documentation)
{{node_research}}
### Parameter Structures (From n8n Documentation)
{{parameter_structures}}
### Workflow Pattern Recommendations
{{workflow_pattern_research}}
---
## Technical Notes
- Requirements gathered: {{date}}
- Research completed from n8n documentation
- All node types and parameters verified from docs.n8n.io
- Ready for workflow creation
- Use this file as input for `*create-workflow`
---
## Change Log
| Date | Change | Author |
| -------- | ----------------------------- | ------------- |
| {{date}} | Initial requirements gathered | {{user_name}} |

View File

@ -0,0 +1,34 @@
name: gather-requirements
description: "Gather and document workflow requirements before creating n8n workflow"
author: "Saif"
# Critical variables from config
config_source: "{project-root}/{bmad_folder}/autominator/config.yaml"
output_folder: "{config_source}:output_folder"
user_name: "{config_source}:user_name"
communication_language: "{config_source}:communication_language"
requirements_folder: "{config_source}:requirements_folder"
date: system-generated
# Workflow components
installed_path: "{project-root}/{bmad_folder}/autominator/workflows/gather-requirements"
template: "{installed_path}/template.md"
instructions: "{installed_path}/instructions.md"
validation: "{installed_path}/checklist.md"
# Variables
variables:
workflow_name: "" # Will be elicited
workflow_slug: "" # Generated from workflow_name
problem_description: "" # Will be elicited
trigger_type: "" # Will be elicited
data_requirements: "" # Will be elicited
desired_outcome: "" # Will be elicited
integrations: "" # Will be elicited
conditional_logic: "" # Will be elicited
criticality: "" # Will be elicited
default_output_file: "{requirements_folder}/req-{workflow_slug}.md"
standalone: true
web_bundle: false

View File

@ -0,0 +1,110 @@
# Migrate Workflow to n8n - Validation Checklist
## Source Analysis
- [ ] Source platform was identified
- [ ] Source workflow details were gathered
- [ ] Trigger type was identified
- [ ] All integrations were identified
- [ ] Workflow complexity was assessed
## Platform Mapping
- [ ] Platform mappings were loaded
- [ ] Source trigger was mapped to n8n trigger
- [ ] All source actions were mapped to n8n nodes
- [ ] Conditional logic was mapped correctly
- [ ] Loops/iterations were mapped correctly
- [ ] Data transformations were identified
## Workflow Structure
- [ ] n8n workflow has valid JSON structure
- [ ] Workflow name is set
- [ ] Migration tag is added (migrated-from-[platform])
- [ ] All nodes have unique IDs
- [ ] All nodes have unique names
- [ ] Trigger node is properly configured
## Node Configuration
- [ ] All mapped nodes are created
- [ ] Node types are valid n8n types
- [ ] Node parameters are configured
- [ ] Credentials placeholders are set
- [ ] Node positions are calculated correctly
- [ ] No overlapping nodes
## Data Mappings
- [ ] Field mappings from source to n8n are correct
- [ ] Data type conversions are handled
- [ ] Date/time format differences are addressed
- [ ] Expressions use correct n8n syntax (={{ }})
- [ ] Set nodes are used for simple transformations
- [ ] Code nodes are used for complex transformations
## Conditional Logic
- [ ] IF nodes are created for conditional branches
- [ ] Switch nodes are created for multiple conditions
- [ ] Conditions are properly configured
- [ ] True/false branches are correct (index 0/1)
- [ ] All branches are connected
## Connections
- [ ] All nodes are connected properly
- [ ] Trigger connects to first action
- [ ] Actions are connected in sequence
- [ ] Conditional branches are connected
- [ ] Merge points are connected
- [ ] All connections reference existing nodes
- [ ] No orphaned nodes (except trigger)
## Error Handling
- [ ] Error handling strategy is defined
- [ ] Critical nodes have retry logic if needed
- [ ] continueOnFail is set appropriately
- [ ] Error handling matches or improves on source
## Migration Notes
- [ ] Source platform is documented
- [ ] Migration date is recorded
- [ ] Credentials needed are listed
- [ ] Platform-specific differences are noted
- [ ] Testing considerations are documented
## Validation
- [ ] Workflow passes JSON validation
- [ ] All required parameters are set
- [ ] Workflow structure is logical
- [ ] Migration matches source workflow functionality
## Credentials & Authentication
- [ ] All services requiring credentials are identified
- [ ] Credential types are correct for n8n
- [ ] OAuth requirements are noted
- [ ] API key requirements are noted
- [ ] Authentication differences from source are documented
## Testing Readiness
- [ ] Workflow can be imported into n8n
- [ ] Test data requirements are clear
- [ ] Expected outputs are defined
- [ ] Comparison approach with source is defined
- [ ] Initial monitoring plan is suggested
## Documentation
- [ ] User has import instructions
- [ ] Credential setup guidance provided
- [ ] Data mapping explanations provided
- [ ] Testing approach explained
- [ ] Platform differences highlighted
- [ ] Post-migration checklist provided

View File

@ -0,0 +1,354 @@
# Migrate Workflow to n8n - Workflow Instructions
```xml
<critical>The workflow execution engine is governed by: {project_root}/{bmad_folder}/core/tasks/workflow.xml</critical>
<critical>You MUST have already loaded and processed: {installed_path}/workflow.yaml</critical>
<critical>This workflow migrates automation workflows from other platforms to n8n.</critical>
<workflow>
<step n="0" goal="Contextual Analysis (Smart Elicitation)">
<critical>Before asking any questions, analyze what the user has already told you</critical>
<action>Review the user's initial request and conversation history</action>
<action>Extract any mentioned: source platform, workflow details, integrations, file paths</action>
<check if="ALL requirements are clear from context">
<action>Summarize your understanding</action>
<action>Skip directly to Step 2 (Research n8n Documentation for Migration)</action>
</check>
<check if="SOME requirements are clear">
<action>Note what you already know</action>
<action>Only ask about missing information in Step 1</action>
</check>
<check if="requirements are unclear or minimal">
<action>Proceed with full elicitation in Step 1</action>
</check>
</step>
<step n="1" goal="Gather Migration Requirements" elicit="true">
<critical>Understand the BUSINESS PURPOSE of the workflow being migrated, not just technical details</critical>
<action>Ask Question 1: "What does this workflow do? What problem does it solve?"</action>
<action>Encourage business context: "Describe the business process, not just the technical steps"</action>
<action>WAIT for user input</action>
<action>Store in {{business_purpose}}</action>
<action>Ask Question 2: "Which platform are you migrating from?"</action>
<action>Present numbered options:
1. Zapier - Migrate Zapier Zaps to n8n
2. Make (Integromat) - Migrate Make scenarios to n8n
3. HubSpot Workflows - Migrate HubSpot workflows to n8n
4. Microsoft Power Automate - Migrate Power Automate flows to n8n
5. IFTTT - Migrate IFTTT applets to n8n
6. Other - Specify another automation platform
</action>
<action>WAIT for user selection (1-6)</action>
<action>Store selection in {{source_platform}}</action>
<check if="selection is 6 (Other)">
<action>Ask: "Please specify the platform you're migrating from"</action>
<action>WAIT for user input</action>
<action>Store in {{source_platform}}</action>
</check>
<action>Ask Question 3: "Why are you migrating to n8n?"</action>
<action>Examples: "Cost savings", "More flexibility", "Self-hosting", "Better integrations"</action>
<action>WAIT for user input</action>
<action>Store in {{migration_reason}}</action>
<action>Ask Question 4: "How will you provide the workflow details?"</action>
<action>Present numbered options:
1. Describe the process - Explain what happens step by step
2. Provide export file - Upload/paste workflow export file
3. Provide screenshots - Share workflow screenshots
4. Combination - Multiple sources
</action>
<action>WAIT for user selection (1-4)</action>
<check if="selection is 1 or 4">
<action>Ask: "Describe the workflow step by step:"</action>
<action>- What triggers it?</action>
<action>- What data does it process?</action>
<action>- What actions does it take?</action>
<action>- What's the final outcome?</action>
<action>WAIT for user input</action>
<action>Store in {{workflow_description}}</action>
</check>
<check if="selection is 2 or 4">
<action>Ask: "Please provide the workflow export file path or paste the content"</action>
<action>WAIT for user input</action>
<action>Store in {{workflow_file}} or {{workflow_content}}</action>
</check>
<check if="selection is 3 or 4">
<action>Ask: "Please share the workflow screenshots and describe what each part does"</action>
<action>WAIT for user input</action>
<action>Store in {{workflow_screenshots}}</action>
</check>
<action>Ask Question 5: "What services/integrations does this workflow connect to?"</action>
<action>Ask: "List all services (e.g., Slack, Google Sheets, HubSpot, custom APIs, etc.)"</action>
<action>WAIT for user input</action>
<action>Store in {{integrations_used}}</action>
<action>Ask Question 6: "Are there any pain points or issues with the current workflow?"</action>
<action>Examples: "Slow execution", "Unreliable", "Missing features", "Hard to maintain"</action>
<action>Present numbered options:
1. No - Works fine, just migrating platform
2. Yes - Describe the issues
</action>
<action>WAIT for user selection (1-2)</action>
<check if="selection is 2">
<action>Ask: "What issues should we fix during migration?"</action>
<action>WAIT for user input</action>
<action>Store in {{issues_to_fix}}</action>
</check>
<action>Ask Question 6: "What should the migrated workflow be named?"</action>
<action>WAIT for user input</action>
<action>Store in {{workflow_name}}</action>
<action>Ask Question 7: "Where should the n8n workflow file be saved?"</action>
<action>Present numbered options:
1. Default location - workflows/[workflow-name].json
2. Custom path - Specify your own file path
3. Project root - Save in main project directory
</action>
<action>WAIT for user selection (1-3)</action>
<check if="selection is 2">
<action>Ask for specific path</action>
<action>WAIT for user input</action>
</check>
<action>Store final path in {{save_location}}</action>
</step>
<step n="2" goal="Research n8n Documentation for Migration">
<critical>Search for n8n documentation relevant to migration requirements</critical>
<action>Inform user: "Researching n8n documentation for migration from {{source_platform}}..."</action>
<action>Perform web search for:</action>
<action>1. n8n equivalents for {{source_platform}} features</action>
<action>2. Integration nodes: {{integrations_used}}</action>
<action>3. Migration best practices</action>
<action>4. Platform-specific considerations</action>
<action>Search queries to use:</action>
<action>- "n8n migrate from [source_platform]"</action>
<action>- "n8n [integration] node documentation"</action>
<action>- "n8n vs [source_platform] comparison"</action>
<action>- "n8n workflow migration guide"</action>
<action>Focus on official n8n documentation at docs.n8n.io</action>
<action>Store relevant migration patterns and node configurations</action>
</step>
<step n="3" goal="Verify Migration Approach">
<action>Summarize migration strategy based on documentation:</action>
<action>- n8n equivalents for {{source_platform}} features</action>
<action>- Required node types and configurations</action>
<action>- Data transformation needs</action>
<action>- Any migration challenges or limitations</action>
<action>Inform user: "Based on n8n documentation, I've identified the migration path from {{source_platform}}."</action>
</step>
<step n="4" goal="Load Platform Mappings">
<action>Load {{platform_mappings}} file</action>
<action>Extract mappings for {{source_platform}}</action>
<action>Identify equivalent n8n nodes for source platform components</action>
</step>
<step n="5" goal="Analyze Source Workflow">
<check if="{{workflow_file}} or {{workflow_content}} provided">
<action>Parse source workflow file/content</action>
<action>Extract workflow structure</action>
</check>
<action>Analyze workflow based on description and details:</action>
<action>1. Identify trigger type and configuration</action>
<action>2. List all actions/steps in order</action>
<action>3. Identify conditional logic (if/then branches)</action>
<action>4. Identify loops or iterations</action>
<action>5. Identify data transformations</action>
<action>6. Identify error handling</action>
<action>7. Map integrations to n8n nodes</action>
<action>Present analysis to user:</action>
<action>- Source trigger: [platform-specific trigger]</action>
<action>- n8n trigger: [mapped n8n node]</action>
<action>- Source actions: [list with platform names]</action>
<action>- n8n actions: [list with n8n node types]</action>
<action>- Logic: [conditional branches, loops]</action>
<action>- Transformations: [data mapping needs]</action>
</step>
<step n="6" goal="Plan n8n Workflow Structure">
<action>Load {{helpers}} for node creation guidelines</action>
<action>Load {{templates}} for reference</action>
<action>Design n8n workflow structure:</action>
<action>1. Map source trigger to n8n trigger node</action>
<action>2. Map each source action to n8n node(s)</action>
<action>3. Convert conditional logic to IF/Switch nodes</action>
<action>4. Convert loops to Split In Batches nodes</action>
<action>5. Add Set/Code nodes for data transformations</action>
<action>6. Plan node connections</action>
<action>7. Add error handling where needed</action>
<action>Present migration plan to user:</action>
<action>- n8n Trigger: [node type and configuration]</action>
<action>- n8n Nodes: [list with descriptions]</action>
<action>- Connections: [flow diagram]</action>
<action>- Data Mappings: [field mappings]</action>
<action>- Credentials Needed: [list of integrations requiring auth]</action>
<action>Ask: "Does this migration plan look correct?"</action>
<action>Present numbered options:
1. Yes - Proceed with migration
2. No - Adjust the plan
3. Add more details - Provide additional information
</action>
<action>WAIT for user selection (1-3)</action>
<check if="selection is 2 or 3">
<action>Ask: "What changes or additions are needed?"</action>
<action>WAIT for user input</action>
<action>Adjust plan based on feedback</action>
<action>Repeat this step</action>
</check>
</step>
<step n="7" goal="Build n8n Workflow">
<critical>Follow guidelines from {{helpers}} for proper node creation</critical>
<action>Initialize workflow structure:</action>
<substep>
{
"name": "{{workflow_name}}",
"nodes": [],
"connections": {},
"active": false,
"settings": {
"executionOrder": "v1"
},
"tags": [
{
"name": "migrated-from-{{source_platform}}"
}
]
}
</substep>
<action>Build nodes ONE at a time:</action>
<substep>For Each Mapped Node:
1. Generate unique node ID
2. Set node name (descriptive, unique)
3. Set node type from platform mappings
4. Set typeVersion (usually 1)
5. Calculate position (220px spacing)
6. Configure parameters based on source workflow
7. Map data fields from source to n8n format
8. Add credentials placeholder if needed
9. Set error handling if required
</substep>
<substep>For Data Transformations:
1. Identify field mappings needed
2. Create Set nodes for simple mappings
3. Create Code nodes for complex transformations
4. Use n8n expressions: ={{ $json.fieldName }}
5. Handle data type conversions
6. Handle date/time format differences
</substep>
<substep>For Conditional Logic:
1. Create IF nodes for if/then branches
2. Create Switch nodes for multiple conditions
3. Map source conditions to n8n condition format
4. Set up true/false branches (index 0/1)
</substep>
<substep>For Connections:
1. Connect trigger to first action
2. Connect actions in sequence
3. Connect conditional branches
4. Connect merge points
5. Validate all connections
</substep>
<action>Add migration notes as workflow tags</action>
<action>Validate all node IDs are unique</action>
<action>Validate all connections reference existing nodes</action>
</step>
<step n="8" goal="Add Migration Notes">
<action>Add comment nodes or documentation:</action>
<action>- Source platform: {{source_platform}}</action>
<action>- Migration date: {timestamp}</action>
<action>- Credentials to configure: [list]</action>
<action>- Testing notes: [important considerations]</action>
<action>- Platform-specific differences: [notes]</action>
</step>
<step n="9" goal="Save Migrated Workflow">
<action>Save workflow to {{save_location}}</action>
</step>
<step n="10" goal="Validate JSON Syntax">
<critical>NEVER delete the file if validation fails - always fix syntax errors</critical>
<action>Run: node -e "JSON.parse(require('fs').readFileSync('{{save_location}}', 'utf8')); console.log('✓ Valid JSON')"</action>
<check if="validation fails (exit code 1)">
<action>Read the error message carefully - it shows the syntax error and position</action>
<action>Open the file and navigate to the error location</action>
<action>Fix the syntax error (add missing comma, bracket, or quote as indicated)</action>
<action>Save the file</action>
<action>Re-run validation with the same command</action>
<action>Repeat until validation passes</action>
</check>
<action>Once validation passes, confirm with user: "Workflow migrated successfully to {{save_location}}"</action>
</step>
<step n="11" goal="Provide Migration Guidance">
<action>Provide post-migration instructions:</action>
<action>1. Import the JSON file into n8n</action>
<action>2. Configure credentials for these services: [list]</action>
<action>3. Review and update these data mappings: [list]</action>
<action>4. Test with sample data before activating</action>
<action>5. Compare outputs with original platform</action>
<action>6. Monitor initial executions closely</action>
<action>Highlight platform-specific differences:</action>
<action>- Authentication: [differences]</action>
<action>- Data formats: [differences]</action>
<action>- Scheduling: [differences]</action>
<action>- Error handling: [differences]</action>
<action>Ask: "Would you like help with any specific part of the migration?"</action>
<action>Present numbered options:
1. No - I'm ready to test
2. Yes - Explain credential setup
3. Yes - Explain data mappings
4. Yes - Explain testing approach
</action>
<action>WAIT for user selection (1-4)</action>
<check if="selection is 2, 3, or 4">
<action>Provide requested explanation</action>
</check>
</step>
<step n="12" goal="Validate Content">
<invoke-task>Validate against checklist at {{validation}} using {{bmad_folder}}/core/tasks/validate-workflow.xml</invoke-task>
</step>
</workflow>
```

View File

@ -0,0 +1,31 @@
name: migrate-workflow
description: "Migrate workflows from other platforms (Zapier, Make, HubSpot, etc.) to n8n"
author: "Saif"
# Workflow components
installed_path: "{project-root}/{bmad_folder}/autominator/workflows/migrate-workflow"
shared_path: "{project-root}/{bmad_folder}/autominator/workflows/_shared"
instructions: "{installed_path}/instructions.md"
validation: "{installed_path}/checklist.md"
# Shared resources
helpers: "{shared_path}/n8n-helpers.md"
templates: "{shared_path}/n8n-templates.yaml"
platform_mappings: "{shared_path}/platform-mappings.yaml"
# Variables
variables:
source_platform: "" # Will be elicited
workflow_description: "" # Will be elicited
workflow_file: "" # Will be elicited (optional)
workflow_content: "" # Will be elicited (optional)
integrations_used: [] # Will be elicited
trigger_type: "" # Will be elicited
complexity: "" # Will be elicited
save_location: "" # Will be elicited
workflow_name: "" # Will be elicited
default_output_file: "{project-root}/workflows/migrated-workflow-{timestamp}.json"
standalone: true
web_bundle: false

View File

@ -0,0 +1,90 @@
# Modify n8n Workflow - Validation Checklist
## Pre-Modification
- [ ] Original workflow file was successfully loaded
- [ ] Workflow JSON was valid before modifications
- [ ] Backup was created before making changes
- [ ] User requirements were clearly understood
## Workflow Structure
- [ ] Workflow maintains valid JSON structure
- [ ] Workflow name is preserved (unless intentionally changed)
- [ ] All nodes still have unique IDs
- [ ] All nodes still have unique names
- [ ] Workflow settings are preserved
## Node Modifications
- [ ] Added nodes have unique IDs
- [ ] Added nodes have unique names
- [ ] Added nodes have valid node types
- [ ] Added nodes have required parameters set
- [ ] Modified nodes preserve their IDs
- [ ] Modified nodes have valid parameter values
- [ ] Removed nodes are completely removed from nodes array
## Connections
- [ ] All connections reference existing nodes
- [ ] Connections to/from added nodes are properly configured
- [ ] Connections affected by removed nodes are updated
- [ ] No orphaned connections remain
- [ ] Connection indices are correct (0 for default, 0/1 for IF nodes)
- [ ] No circular dependencies (unless intentional)
## Node Positioning
- [ ] New nodes have valid positions
- [ ] New nodes don't overlap with existing nodes
- [ ] Node positions follow spacing guidelines (220px horizontal)
- [ ] Branch nodes have appropriate vertical spacing (±100px)
## Error Handling
- [ ] Error handling modifications are applied correctly
- [ ] Retry logic is properly configured if added
- [ ] continueOnFail settings are appropriate
- [ ] maxTries and waitBetweenTries are set if retries enabled
## Data Flow
- [ ] Data flow is maintained after modifications
- [ ] New transformations are properly configured
- [ ] Expressions use correct n8n syntax (={{ }})
- [ ] No data flow breaks introduced
## Integration Changes
- [ ] New integrations are properly configured
- [ ] Credential requirements are identified
- [ ] API configurations are correct
- [ ] Existing integrations still work
## Validation
- [ ] Modified workflow passes JSON validation
- [ ] All modifications match user requirements
- [ ] No unintended changes were made
- [ ] Workflow structure is still logical
## Backup & Recovery
- [ ] Backup file was created successfully
- [ ] Backup location was communicated to user
- [ ] Original workflow can be restored if needed
## Testing Readiness
- [ ] Modified workflow can be imported into n8n
- [ ] Changes are testable
- [ ] Expected behavior is clear
- [ ] Any new credentials needed are identified
## Documentation
- [ ] Changes made are summarized for user
- [ ] User understands what was modified
- [ ] Testing recommendations provided if needed
- [ ] Backup location shared with user

View File

@ -0,0 +1,336 @@
# Modify n8n Workflow - Workflow Instructions
```xml
<critical>The workflow execution engine is governed by: {project_root}/{bmad_folder}/core/tasks/workflow.xml</critical>
<critical>You MUST have already loaded and processed: {installed_path}/workflow.yaml</critical>
<critical>This workflow modifies an existing n8n workflow based on user requirements.</critical>
<workflow>
<step n="0" goal="Contextual Analysis (Smart Elicitation)">
<critical>Before asking any questions, analyze what the user has already told you</critical>
<action>Review the user's initial request and conversation history</action>
<action>Extract any mentioned: workflow file path, changes needed, specific nodes</action>
<check if="ALL requirements are clear from context">
<action>Summarize your understanding</action>
<action>Skip directly to Step 2 (Load Existing Workflow)</action>
</check>
<check if="SOME requirements are clear">
<action>Note what you already know</action>
<action>Only ask about missing information in Step 1</action>
</check>
<check if="requirements are unclear or minimal">
<action>Proceed with full elicitation in Step 1</action>
</check>
</step>
<step n="1" goal="Gather Requirements" elicit="true">
<critical>Understand WHY the user wants to modify the workflow, not just WHAT to change</critical>
<action>Ask Question 1: "Which workflow file do you want to modify?"</action>
<action>Present numbered options:
1. Provide file path - Specify exact path to workflow JSON
2. Search in workflows folder - List available workflows
3. Paste workflow JSON - Provide workflow content directly
</action>
<action>WAIT for user selection (1-3)</action>
<check if="selection is 1">
<action>Ask: "Please provide the file path to the workflow JSON"</action>
<action>WAIT for user input</action>
<action>Store in {{workflow_file}}</action>
</check>
<check if="selection is 2">
<action>List all .json files in workflows/ directory</action>
<action>Present as numbered list</action>
<action>WAIT for user selection</action>
<action>Store selected file path in {{workflow_file}}</action>
</check>
<check if="selection is 3">
<action>Ask: "Please paste the workflow JSON content"</action>
<action>WAIT for user input</action>
<action>Create temporary file with content</action>
<action>Store temp file path in {{workflow_file}}</action>
</check>
<action>Ask Question 2: "What problem are you trying to solve by modifying this workflow?"</action>
<action>Examples: "It's not handling errors properly", "Need to add Slack notifications", "Missing data validation"</action>
<action>WAIT for user input</action>
<action>Store in {{problem_to_solve}}</action>
<action>Ask Question 3: "What's currently not working or missing?"</action>
<action>Encourage specific details about the issue or gap</action>
<action>WAIT for user input</action>
<action>Store in {{current_issue}}</action>
<action>Ask Question 4: "What should the workflow do after these changes?"</action>
<action>Focus on the desired behavior and outcome</action>
<action>WAIT for user input</action>
<action>Store in {{desired_behavior}}</action>
<action>Ask Question 5: "Are there any specific nodes, integrations, or logic you want to change?"</action>
<action>Examples: "Add a Slack node after approval", "Change the IF condition to check status", "Remove the delay node"</action>
<action>WAIT for user input</action>
<action>Store in {{specific_changes}}</action>
<action>Summarize understanding:</action>
<action>- Problem: {{problem_to_solve}}</action>
<action>- Current Issue: {{current_issue}}</action>
<action>- Desired Behavior: {{desired_behavior}}</action>
<action>- Specific Changes: {{specific_changes}}</action>
<action>Ask: "Does this capture what you need?"</action>
<action>Present numbered options:
1. Yes - Proceed with modifications
2. No - Let me clarify
</action>
<action>WAIT for user selection (1-2)</action>
<check if="selection is 2">
<action>Ask: "What needs clarification?"</action>
<action>WAIT for user input</action>
<action>Update relevant variables</action>
<action>Repeat summary and confirmation</action>
</check>
</step>
<step n="2" goal="Load Existing Workflow">
<critical>Only load the workflow file when user provides it - never preload</critical>
<action>Read workflow file from {{workflow_file}}</action>
<action>Parse JSON content</action>
<action>Validate JSON structure</action>
<check if="JSON is invalid">
<action>Inform user: "The workflow file has invalid JSON syntax"</action>
<action>Show error details</action>
<action>Ask: "Would you like me to fix the JSON syntax first? (yes/no)"</action>
<action>WAIT for user response</action>
<check if="user says yes">
<action>Fix JSON syntax errors</action>
<action>Save corrected file</action>
<action>Proceed with loading</action>
</check>
<check if="user says no">
<action>Exit workflow with error</action>
</check>
</check>
<action>Extract workflow structure:</action>
<action>- Workflow name</action>
<action>- List of nodes (names, types, IDs)</action>
<action>- Connections map</action>
<action>- Current settings</action>
<action>Display workflow summary to user:</action>
<action>- Name: [workflow name]</action>
<action>- Nodes: [count] nodes</action>
<action>- Node list: [node names and types]</action>
<action>- Connections: [connection count]</action>
</step>
<step n="3" goal="Create Backup">
<action>Create backup of original workflow</action>
<action>Save backup to: {{workflow_file}}.backup-{timestamp}</action>
<action>Store true in {{backup_created}}</action>
<action>Inform user: "Backup created at {{workflow_file}}.backup-{timestamp}"</action>
</step>
<step n="4" goal="Research n8n Documentation for Modifications">
<critical>Search for n8n documentation relevant to the modifications needed</critical>
<action>Inform user: "Researching n8n documentation for your modifications..."</action>
<action>Perform web search based on modification needs:</action>
<action>- Problem to solve: {{problem_to_solve}}</action>
<action>- Specific changes: {{specific_changes}}</action>
<action>- Desired behavior: {{desired_behavior}}</action>
<action>Search queries to use:</action>
<action>- "n8n [specific feature] documentation"</action>
<action>- "n8n [node type] configuration"</action>
<action>- "n8n workflow modification best practices"</action>
<action>- "n8n [integration] setup"</action>
<action>Focus on official n8n documentation at docs.n8n.io</action>
<action>Store relevant node configurations and modification patterns</action>
</step>
<step n="5" goal="Verify Modification Approach">
<action>Summarize modification strategy based on documentation:</action>
<action>- How to implement {{desired_behavior}}</action>
<action>- Required node changes or additions</action>
<action>- Configuration updates needed</action>
<action>- Best practices for these modifications</action>
<action>Inform user: "Based on n8n documentation, I've identified how to implement your changes."</action>
</step>
<step n="6" goal="Plan Modifications">
<action>Load {{helpers}} for node creation guidelines</action>
<action>Analyze current workflow structure</action>
<action>Plan modifications based on requirements:</action>
<check if="adding nodes">
<action>1. Identify where new nodes should be inserted</action>
<action>2. Determine node types needed</action>
<action>3. Plan connections to/from new nodes</action>
<action>4. Calculate positions for new nodes</action>
</check>
<check if="modifying nodes">
<action>1. Identify nodes to modify by name or ID</action>
<action>2. Determine what parameters to change</action>
<action>3. Validate new parameter values</action>
</check>
<check if="removing nodes">
<action>1. Identify nodes to remove by name or ID</action>
<action>2. Identify connections that will be affected</action>
<action>3. Plan how to reconnect remaining nodes</action>
</check>
<check if="changing connections">
<action>1. Identify connections to modify</action>
<action>2. Validate new connection targets exist</action>
<action>3. Update connection indices if needed</action>
</check>
<action>Present modification plan to user:</action>
<action>- Changes to be made: [detailed list]</action>
<action>- Nodes affected: [list]</action>
<action>- New connections: [list]</action>
<action>- Removed connections: [list]</action>
<action>Ask: "Does this modification plan look correct?"</action>
<action>Present numbered options:
1. Yes - Proceed with modifications
2. No - Adjust the plan
3. Add more changes - Include additional modifications
</action>
<action>WAIT for user selection (1-3)</action>
<check if="selection is 2 or 3">
<action>Ask: "What changes or additions are needed?"</action>
<action>WAIT for user input</action>
<action>Adjust plan based on feedback</action>
<action>Repeat this step</action>
</check>
</step>
<step n="7" goal="Apply Modifications">
<critical>Follow guidelines from {{helpers}} for proper node creation</critical>
<action>Load current workflow JSON into memory</action>
<substep>If Adding Nodes:
1. Generate unique node IDs (check against existing IDs)
2. Create node objects with proper structure
3. Calculate positions (avoid overlaps with existing nodes)
4. Add nodes to workflow.nodes array
5. Create connections to/from new nodes
6. Update connections object
</substep>
<substep>If Modifying Nodes:
1. Find nodes by name or ID
2. Update parameters as specified
3. Preserve node ID and other unchanged properties
4. Validate new parameter values
5. Update node in workflow.nodes array
</substep>
<substep>If Removing Nodes:
1. Find nodes by name or ID
2. Remove from workflow.nodes array
3. Remove all connections to/from removed nodes
4. Update connections object
5. Reconnect remaining nodes if needed
</substep>
<substep>If Changing Connections:
1. Update connections object
2. Validate all referenced nodes exist
3. Ensure connection indices are correct
4. Remove orphaned connections
</substep>
<substep>If Updating Error Handling:
1. Find affected nodes
2. Add or update error handling properties:
- continueOnFail
- retryOnFail
- maxTries
- waitBetweenTries
3. Validate error handling configuration
</substep>
<action>Validate modified workflow:</action>
<action>- All node IDs are unique</action>
<action>- All node names are unique</action>
<action>- All connections reference existing nodes</action>
<action>- No orphaned nodes (except trigger)</action>
<action>- Node positions don't overlap</action>
</step>
<step n="8" goal="Save Modified Workflow">
<action>Save modified workflow to {{workflow_file}}</action>
<action>Preserve original file location</action>
</step>
<step n="9" goal="Validate JSON Syntax">
<critical>NEVER delete the file if validation fails - always fix syntax errors</critical>
<action>Run: node -e "JSON.parse(require('fs').readFileSync('{{workflow_file}}', 'utf8')); console.log('✓ Valid JSON')"</action>
<check if="validation fails (exit code 1)">
<action>Read the error message carefully - it shows the syntax error and position</action>
<action>Open the file and navigate to the error location</action>
<action>Fix the syntax error (add missing comma, bracket, or quote as indicated)</action>
<action>Save the file</action>
<action>Re-run validation with the same command</action>
<action>Repeat until validation passes</action>
</check>
<action>Once validation passes, confirm with user: "Workflow modified successfully at {{workflow_file}}"</action>
</step>
<step n="10" goal="Summarize Changes">
<action>Provide summary of changes made:</action>
<action>- Nodes added: [count and names]</action>
<action>- Nodes modified: [count and names]</action>
<action>- Nodes removed: [count and names]</action>
<action>- Connections changed: [count]</action>
<action>- Backup location: {{workflow_file}}.backup-{timestamp}</action>
<action>Ask: "Would you like to make additional changes?"</action>
<action>Present numbered options:
1. No - I'm done
2. Yes - Make more modifications
3. Revert - Restore from backup
</action>
<action>WAIT for user selection (1-3)</action>
<check if="selection is 2">
<action>Return to Step 1 with current workflow</action>
</check>
<check if="selection is 3">
<action>Restore workflow from backup</action>
<action>Confirm restoration to user</action>
</check>
</step>
<step n="11" goal="Validate Content">
<invoke-task>Validate against checklist at {{validation}} using {{bmad_folder}}/core/tasks/validate-workflow.xml</invoke-task>
</step>
</workflow>
```

View File

@ -0,0 +1,29 @@
name: modify-workflow
description: "Edit or update existing n8n workflow"
author: "Saif"
# Workflow components
installed_path: "{project-root}/{bmad_folder}/autominator/workflows/modify-workflow"
shared_path: "{project-root}/{bmad_folder}/autominator/workflows/_shared"
instructions: "{installed_path}/instructions.md"
validation: "{installed_path}/checklist.md"
# Shared resources
helpers: "{shared_path}/n8n-helpers.md"
templates: "{shared_path}/n8n-templates.yaml"
platform_mappings: "{shared_path}/platform-mappings.yaml"
# Variables
variables:
workflow_file: "" # Will be elicited
modification_type: "" # Will be elicited
changes_description: "" # Will be elicited
nodes_to_add: [] # Will be elicited
nodes_to_modify: [] # Will be elicited
nodes_to_remove: [] # Will be elicited
backup_created: false # Will be set
default_output_file: "" # Will use existing file location
standalone: true
web_bundle: false

View File

@ -0,0 +1,130 @@
# Optimize n8n Workflow - Validation Checklist
## Pre-Optimization
- [ ] Original workflow was successfully loaded
- [ ] Workflow JSON was valid before optimization
- [ ] Optimization focus areas were identified
- [ ] Backup was created before making changes
- [ ] User requirements were clearly understood
## Analysis Completeness
- [ ] Performance analysis was conducted
- [ ] Error handling was reviewed
- [ ] Code quality was assessed
- [ ] Structure was evaluated
- [ ] Best practices were checked
- [ ] Security was reviewed
- [ ] All issues were documented
## Recommendations Quality
- [ ] Recommendations are specific and actionable
- [ ] Recommendations are prioritized correctly
- [ ] Impact of each recommendation is clear
- [ ] Implementation steps are provided
- [ ] Expected improvements are quantified
- [ ] No breaking changes are recommended
## Performance Optimizations
- [ ] Unnecessary nodes were identified/removed
- [ ] Data transformations were optimized
- [ ] Batch processing opportunities were identified
- [ ] Redundant API calls were consolidated
- [ ] Parallel execution opportunities were identified
- [ ] Node execution order was optimized
## Error Handling Improvements
- [ ] Critical nodes have retry logic
- [ ] continueOnFail is set appropriately
- [ ] Error workflows are configured where needed
- [ ] Timeout configurations are appropriate
- [ ] Error notifications are set up
- [ ] Error handling doesn't mask real issues
## Code Quality Improvements
- [ ] Set nodes are properly configured
- [ ] Code nodes are optimized
- [ ] Expressions use correct syntax
- [ ] Data types are handled correctly
- [ ] Hardcoded values are replaced with variables
- [ ] Node names are descriptive and consistent
## Structure Improvements
- [ ] Node positions are logical and organized
- [ ] Complex branches are simplified where possible
- [ ] Duplicate logic is eliminated
- [ ] Merge points are optimized
- [ ] Connection patterns are clean
- [ ] Workflow flow is easy to follow
## Best Practices Applied
- [ ] Credentials are used correctly
- [ ] Security issues are addressed
- [ ] Node types are appropriate
- [ ] Node versions are up to date
- [ ] Data handling follows best practices
- [ ] Workflow settings are optimal
## Security Improvements
- [ ] No credentials are exposed
- [ ] Sensitive data is handled properly
- [ ] No hardcoded secrets remain
- [ ] Authentication is properly configured
- [ ] Data is sanitized where needed
- [ ] Security best practices are followed
## Workflow Integrity
- [ ] All node IDs remain unique
- [ ] All node names remain unique
- [ ] All connections are valid
- [ ] No functionality is lost
- [ ] Workflow still achieves original purpose
- [ ] No breaking changes introduced
## Validation
- [ ] Optimized workflow passes JSON validation
- [ ] All optimizations were applied correctly
- [ ] No unintended changes were made
- [ ] Workflow structure is still logical
- [ ] All improvements are documented
## Backup & Recovery
- [ ] Backup file was created successfully
- [ ] Backup location was communicated to user
- [ ] Original workflow can be restored if needed
## Testing Readiness
- [ ] Optimized workflow can be imported into n8n
- [ ] Test scenarios are identified
- [ ] Expected improvements are measurable
- [ ] Comparison approach is defined
- [ ] Monitoring plan is suggested
## Documentation
- [ ] Analysis report is comprehensive
- [ ] All findings are documented
- [ ] Recommendations are clearly explained
- [ ] Expected improvements are quantified
- [ ] Testing recommendations are provided
- [ ] User understands all changes made
## Expected Improvements
- [ ] Performance improvements are quantified
- [ ] Reliability improvements are identified
- [ ] Maintainability improvements are clear
- [ ] Security improvements are documented
- [ ] Cost savings are estimated (if applicable)

View File

@ -0,0 +1,475 @@
# Optimize n8n Workflow - Workflow Instructions
```xml
<critical>The workflow execution engine is governed by: {project_root}/{bmad_folder}/core/tasks/workflow.xml</critical>
<critical>You MUST have already loaded and processed: {installed_path}/workflow.yaml</critical>
<critical>This workflow analyzes and optimizes existing n8n workflows for performance and best practices.</critical>
<workflow>
<step n="0" goal="Contextual Analysis (Smart Elicitation)">
<critical>Before asking any questions, analyze what the user has already told you</critical>
<action>Review the user's initial request and conversation history</action>
<action>Extract any mentioned: workflow file path, performance issues, optimization goals</action>
<check if="ALL requirements are clear from context">
<action>Summarize your understanding</action>
<action>Skip directly to Step 2 (Load Workflow)</action>
</check>
<check if="SOME requirements are clear">
<action>Note what you already know</action>
<action>Only ask about missing information in Step 1</action>
</check>
<check if="requirements are unclear or minimal">
<action>Proceed with full elicitation in Step 1</action>
</check>
</step>
<step n="1" goal="Gather Optimization Requirements" elicit="true">
<critical>Understand the REAL PROBLEMS the user is experiencing, not just generic optimization goals</critical>
<action>Ask Question 1: "Which workflow do you want to optimize?"</action>
<action>Present numbered options:
1. Provide file path - Specify exact path to workflow JSON
2. Search in workflows folder - List available workflows
3. Paste workflow JSON - Provide workflow content directly
</action>
<action>WAIT for user selection (1-3)</action>
<check if="selection is 1">
<action>Ask: "Please provide the file path to the workflow JSON"</action>
<action>WAIT for user input</action>
<action>Store in {{workflow_file}}</action>
</check>
<check if="selection is 2">
<action>List all .json files in workflows/ directory</action>
<action>Present as numbered list</action>
<action>WAIT for user selection</action>
<action>Store selected file path in {{workflow_file}}</action>
</check>
<check if="selection is 3">
<action>Ask: "Please paste the workflow JSON content"</action>
<action>WAIT for user input</action>
<action>Create temporary file with content</action>
<action>Store temp file path in {{workflow_file}}</action>
</check>
<action>Ask Question 2: "What problems are you experiencing with this workflow?"</action>
<action>Examples: "Takes too long to run", "Fails frequently", "Hard to understand", "Doesn't handle errors well"</action>
<action>WAIT for user input</action>
<action>Store in {{problems_experienced}}</action>
<action>Ask Question 3: "What's the business impact of these problems?"</action>
<action>Examples: "Delays customer responses", "Wastes team time", "Causes data issues", "Costs money"</action>
<action>WAIT for user input</action>
<action>Store in {{business_impact}}</action>
<action>Ask Question 4: "What would 'better' look like for this workflow?"</action>
<action>Focus on desired outcomes: "Faster execution", "More reliable", "Easier to maintain", "Better error recovery"</action>
<action>WAIT for user input</action>
<action>Store in {{desired_improvements}}</action>
<action>Ask Question 5: "Are there specific areas you want me to focus on?"</action>
<action>Present numbered options (can select multiple):
1. Performance - Speed and efficiency
2. Reliability - Error handling and retries
3. Maintainability - Code quality and structure
4. Security - Credential and data handling
5. All - Comprehensive review
6. Let you decide - Analyze and recommend
</action>
<action>WAIT for user selection (1-6 or multiple)</action>
<action>Store selections in {{optimization_focus}}</action>
<action>Summarize understanding:</action>
<action>- Problems: {{problems_experienced}}</action>
<action>- Business Impact: {{business_impact}}</action>
<action>- Desired Improvements: {{desired_improvements}}</action>
<action>- Focus Areas: {{optimization_focus}}</action>
<action>Ask: "Does this capture your optimization needs?"</action>
<action>Present numbered options:
1. Yes - Proceed with analysis
2. No - Let me clarify
</action>
<action>WAIT for user selection (1-2)</action>
<check if="selection is 2">
<action>Ask: "What needs clarification?"</action>
<action>WAIT for user input</action>
<action>Update relevant variables</action>
<action>Repeat summary and confirmation</action>
</check>
</step>
<step n="2" goal="Load Workflow">
<critical>Only load the workflow file when user provides it - never preload</critical>
<action>Read workflow file from {{workflow_file}}</action>
<action>Parse JSON content</action>
<action>Validate JSON structure</action>
<check if="JSON is invalid">
<action>Inform user: "The workflow file has invalid JSON syntax"</action>
<action>Show error details</action>
<action>Ask: "Would you like me to fix the JSON syntax first? (yes/no)"</action>
<action>WAIT for user response</action>
<check if="user says yes">
<action>Fix JSON syntax errors</action>
<action>Save corrected file</action>
<action>Proceed with loading</action>
</check>
<check if="user says no">
<action>Exit workflow with error</action>
</check>
</check>
<action>Extract workflow structure:</action>
<action>- Workflow name and settings</action>
<action>- Node count and types</action>
<action>- Connection patterns</action>
<action>- Error handling configuration</action>
<action>- Credential usage</action>
<action>Display workflow summary to user:</action>
<action>- Name: [workflow name]</action>
<action>- Nodes: [count] nodes</action>
<action>- Complexity: [simple/medium/complex]</action>
<action>- Integrations: [list of services]</action>
</step>
<step n="3" goal="Research n8n Best Practices and Optimization">
<critical>Search for n8n documentation on optimization and best practices</critical>
<action>Inform user: "Researching n8n best practices and optimization techniques..."</action>
<action>Perform web search for:</action>
<action>1. n8n performance optimization</action>
<action>2. n8n error handling best practices</action>
<action>3. n8n workflow structure patterns</action>
<action>4. n8n security best practices</action>
<action>5. Solutions for: {{problems_experienced}}</action>
<action>Search queries to use:</action>
<action>- "n8n workflow optimization best practices"</action>
<action>- "n8n performance tuning"</action>
<action>- "n8n error handling patterns"</action>
<action>- "n8n workflow security"</action>
<action>- "n8n [specific problem] solution"</action>
<action>Focus on official n8n documentation at docs.n8n.io</action>
<action>Store relevant optimization techniques and best practices</action>
</step>
<step n="4" goal="Verify Optimization Strategy">
<action>Summarize optimization approach based on documentation:</action>
<action>- Solutions for {{problems_experienced}}</action>
<action>- Best practices to apply</action>
<action>- Performance improvements available</action>
<action>- Expected impact on {{business_impact}}</action>
<action>Inform user: "Based on n8n best practices, I've identified optimization opportunities."</action>
</step>
<step n="5" goal="Analyze Workflow">
<action>Load {{helpers}} for best practices reference</action>
<action>Perform comprehensive analysis based on {{optimization_focus}}:</action>
<substep>Performance Analysis:
- Check for unnecessary nodes
- Identify inefficient data transformations
- Look for missing batch processing opportunities
- Check for redundant API calls
- Analyze node execution order
- Identify parallel execution opportunities
</substep>
<substep>Error Handling Analysis:
- Check if critical nodes have retry logic
- Verify continueOnFail settings
- Look for missing error workflows
- Check timeout configurations
- Verify error notification setup
</substep>
<substep>Code Quality Analysis:
- Review Set node configurations
- Review Code node implementations
- Check expression syntax and efficiency
- Verify data type handling
- Check for hardcoded values
- Review node naming conventions
</substep>
<substep>Structure Analysis:
- Check node positioning and layout
- Verify logical flow organization
- Look for overly complex branches
- Check for duplicate logic
- Verify proper use of merge nodes
- Check connection patterns
</substep>
<substep>Best Practices Analysis:
- Verify proper credential usage
- Check for security issues
- Verify proper use of node types
- Check for deprecated node versions
- Verify proper data handling
- Check workflow settings
</substep>
<substep>Security Analysis:
- Check credential exposure
- Verify sensitive data handling
- Check for hardcoded secrets
- Verify proper authentication
- Check data sanitization
</substep>
<action>Store all findings in {{issues_found}}</action>
</step>
<step n="6" goal="Generate Recommendations">
<action>For each issue found, generate specific recommendations:</action>
<action>Categorize recommendations by priority:</action>
<action>- Critical: Security issues, major performance problems</action>
<action>- High: Error handling gaps, significant inefficiencies</action>
<action>- Medium: Code quality improvements, minor optimizations</action>
<action>- Low: Cosmetic improvements, nice-to-haves</action>
<action>For each recommendation, provide:</action>
<action>1. Issue description</action>
<action>2. Impact explanation</action>
<action>3. Specific solution</action>
<action>4. Implementation steps</action>
<action>5. Expected improvement</action>
<action>Store recommendations in {{recommendations}}</action>
</step>
<step n="7" goal="Present Analysis Report" elicit="true">
<action>Present comprehensive optimization report:</action>
<action>## Workflow Analysis Report</action>
<action>Workflow: {{workflow_name}}</action>
<action>Analysis Date: {timestamp}</action>
<action>Optimization Focus: {{optimization_focus}}</action>
<action>### Summary</action>
<action>- Total Issues Found: [count]</action>
<action>- Critical: [count]</action>
<action>- High Priority: [count]</action>
<action>- Medium Priority: [count]</action>
<action>- Low Priority: [count]</action>
<action>### Detailed Findings</action>
<action>Present each issue with:</action>
<action>- Priority level</action>
<action>- Issue description</action>
<action>- Current state</action>
<action>- Recommended solution</action>
<action>- Expected impact</action>
<action>### Performance Opportunities</action>
<action>List specific performance improvements with estimated impact</action>
<action>### Best Practice Violations</action>
<action>List n8n best practices not being followed</action>
<action>Ask: "Would you like me to apply these optimizations?"</action>
<action>Present numbered options:
1. Yes - Apply all recommendations
2. Yes - Apply only critical and high priority
3. Yes - Let me choose which to apply
4. No - Just provide the report
5. Explain more - I need more details first
</action>
<action>WAIT for user selection (1-5)</action>
<check if="selection is 5">
<action>Ask: "Which recommendations would you like explained?"</action>
<action>WAIT for user input</action>
<action>Provide detailed explanation</action>
<action>Repeat this step</action>
</check>
<check if="selection is 3">
<action>Present recommendations as numbered list</action>
<action>Ask: "Select recommendations to apply (comma-separated numbers)"</action>
<action>WAIT for user input</action>
<action>Store selected recommendations</action>
</check>
<check if="selection is 1, 2, or 3">
<action>Store true in {{apply_changes}}</action>
<action>Proceed to Step 8</action>
</check>
<check if="selection is 4">
<action>Store false in {{apply_changes}}</action>
<action>Skip to Step 11 (provide report only)</action>
</check>
</step>
<step n="8" goal="Create Backup">
<check if="{{apply_changes}} is true">
<action>Create backup of original workflow</action>
<action>Save backup to: {{workflow_file}}.backup-{timestamp}</action>
<action>Store true in {{backup_created}}</action>
<action>Inform user: "Backup created at {{workflow_file}}.backup-{timestamp}"</action>
</check>
</step>
<step n="9" goal="Apply Optimizations">
<critical>Follow guidelines from {{helpers}} for proper node configuration</critical>
<action>Load current workflow JSON into memory</action>
<action>Apply each selected recommendation:</action>
<substep>Performance Optimizations:
- Remove unnecessary nodes
- Optimize data transformations
- Add batch processing where applicable
- Consolidate redundant API calls
- Optimize node execution order
- Add parallel execution where possible
</substep>
<substep>Error Handling Improvements:
- Add retry logic to critical nodes
- Set appropriate continueOnFail values
- Add error workflows if needed
- Configure timeouts
- Add error notifications
</substep>
<substep>Code Quality Improvements:
- Refactor Set node configurations
- Optimize Code node implementations
- Improve expression syntax
- Fix data type handling
- Replace hardcoded values with variables
- Improve node naming
</substep>
<substep>Structure Improvements:
- Reorganize node positions
- Simplify complex branches
- Remove duplicate logic
- Optimize merge points
- Improve connection patterns
</substep>
<substep>Best Practice Applications:
- Fix credential usage
- Address security issues
- Update deprecated nodes
- Improve data handling
- Update workflow settings
</substep>
<action>Validate optimized workflow:</action>
<action>- All node IDs remain unique</action>
<action>- All connections are valid</action>
<action>- No functionality is lost</action>
<action>- All improvements are applied</action>
</step>
<step n="10" goal="Save Optimized Workflow">
<action>Save optimized workflow to {{workflow_file}}</action>
</step>
<step n="11" goal="Validate JSON Syntax">
<check if="{{apply_changes}} is true">
<critical>NEVER delete the file if validation fails - always fix syntax errors</critical>
<action>Run: node -e "JSON.parse(require('fs').readFileSync('{{workflow_file}}', 'utf8')); console.log('✓ Valid JSON')"</action>
<check if="validation fails (exit code 1)">
<action>Read the error message carefully - it shows the syntax error and position</action>
<action>Open the file and navigate to the error location</action>
<action>Fix the syntax error (add missing comma, bracket, or quote as indicated)</action>
<action>Save the file</action>
<action>Re-run validation with the same command</action>
<action>Repeat until validation passes</action>
</check>
<action>Once validation passes, confirm with user: "Workflow optimized successfully at {{workflow_file}}"</action>
</check>
</step>
<step n="12" goal="Provide Optimization Summary">
<action>Provide comprehensive summary:</action>
<check if="{{apply_changes}} is true">
<action>### Optimizations Applied</action>
<action>- Total changes: [count]</action>
<action>- Performance improvements: [list]</action>
<action>- Error handling added: [list]</action>
<action>- Code quality fixes: [list]</action>
<action>- Structure improvements: [list]</action>
<action>- Best practices applied: [list]</action>
<action>- Backup location: {{workflow_file}}.backup-{timestamp}</action>
<action>### Expected Improvements</action>
<action>- Execution speed: [estimated improvement]</action>
<action>- Reliability: [improvements]</action>
<action>- Maintainability: [improvements]</action>
<action>- Security: [improvements]</action>
<action>### Testing Recommendations</action>
<action>1. Import optimized workflow into n8n</action>
<action>2. Test with sample data</action>
<action>3. Compare execution times with original</action>
<action>4. Verify all functionality works correctly</action>
<action>5. Monitor error rates</action>
</check>
<check if="{{apply_changes}} is false">
<action>### Optimization Report</action>
<action>Report saved with all recommendations</action>
<action>No changes applied to workflow</action>
<action>Review recommendations and apply manually if desired</action>
</check>
<action>Ask: "Would you like additional help?"</action>
<action>Present numbered options:
1. No - I'm done
2. Yes - Explain specific optimizations
3. Yes - Optimize another workflow
4. Revert - Restore from backup
</action>
<action>WAIT for user selection (1-4)</action>
<check if="selection is 2">
<action>Ask: "Which optimization would you like explained?"</action>
<action>WAIT for user input</action>
<action>Provide detailed explanation</action>
</check>
<check if="selection is 3">
<action>Return to Step 1 for new workflow</action>
</check>
<check if="selection is 4">
<action>Restore workflow from backup</action>
<action>Confirm restoration to user</action>
</check>
</step>
<step n="13" goal="Validate Content">
<invoke-task>Validate against checklist at {{validation}} using {{bmad_folder}}/core/tasks/validate-workflow.xml</invoke-task>
</step>
</workflow>
```

View File

@ -0,0 +1,28 @@
name: optimize-workflow
description: "Review and improve existing n8n workflows for performance and best practices"
author: "Saif"
# Workflow components
installed_path: "{project-root}/{bmad_folder}/autominator/workflows/optimize-workflow"
shared_path: "{project-root}/{bmad_folder}/autominator/workflows/_shared"
instructions: "{installed_path}/instructions.md"
validation: "{installed_path}/checklist.md"
# Shared resources
helpers: "{shared_path}/n8n-helpers.md"
templates: "{shared_path}/n8n-templates.yaml"
platform_mappings: "{shared_path}/platform-mappings.yaml"
# Variables
variables:
workflow_file: "" # Will be elicited
optimization_focus: [] # Will be elicited
issues_found: [] # Will be identified
recommendations: [] # Will be generated
apply_changes: false # Will be elicited
backup_created: false # Will be set
default_output_file: "" # Will use existing file location
standalone: true
web_bundle: false

View File

@ -58,7 +58,7 @@ Specialized tools and workflows for creating, customizing, and extending BMad co
- **[Workflow Index](./docs/workflows/index.md)** - Core workflow system overview - **[Workflow Index](./docs/workflows/index.md)** - Core workflow system overview
- **[Architecture Guide](./docs/workflows/architecture.md)** - Step-file design and JIT loading - **[Architecture Guide](./docs/workflows/architecture.md)** - Step-file design and JIT loading
- **[Template System](./docs/workflows/step-template.md)** - Standard step file template - **[Template System](./docs/workflows/templates/step-template.md)** - Standard step file template
- **[Intent vs Prescriptive](./docs/workflows/intent-vs-prescriptive-spectrum.md)** - Design philosophy - **[Intent vs Prescriptive](./docs/workflows/intent-vs-prescriptive-spectrum.md)** - Design philosophy
## Reference Materials ## Reference Materials

View File

@ -0,0 +1,241 @@
# BMAD Continuable Step 01 Init Template
This template provides the standard structure for step-01-init files that support workflow continuation. It includes logic to detect existing workflows and route to step-01b-continue.md for resumption.
Use this template when creating workflows that generate output documents and might take multiple sessions to complete.
<!-- TEMPLATE START -->
---
name: 'step-01-init'
description: 'Initialize the [workflow-type] workflow by detecting continuation state and creating output document'
<!-- Path Definitions -->
workflow_path: '{project-root}/{bmad_folder}/[module-path]/workflows/[workflow-name]'
# File References (all use {variable} format in file)
thisStepFile: '{workflow_path}/steps/step-01-init.md'
nextStepFile: '{workflow_path}/steps/step-02-[step-name].md'
workflowFile: '{workflow_path}/workflow.md'
outputFile: '{output_folder}/[output-file-name]-{project_name}.md'
continueFile: '{workflow_path}/steps/step-01b-continue.md'
templateFile: '{workflow_path}/templates/[main-template].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 [specific role, e.g., "business analyst" or "technical architect"]
- ✅ We engage in collaborative dialogue, not command-response
- ✅ You bring [your expertise], user brings [their expertise], and together we produce something better than we could on our own
- ✅ Maintain collaborative [adjective] tone throughout
### 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 [workflow-type] 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}/[output-file-name]-{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 [workflow-output] from [date]. Would you like to:
1. Create a new [workflow-output]
2. Update/modify the existing [workflow-output]"
- 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 requires [describe input documents if any]:
**[Document Type] Documents (Optional):**
- Look for: `{output_folder}/*[pattern1]*.md`
- Look for: `{output_folder}/*[pattern2]*.md`
- If found, load completely and add to `inputDocuments` frontmatter
#### B. Create Initial Document
Copy the template from `{templateFile}` to `{output_folder}/[output-file-name]-{project_name}.md`
Initialize frontmatter with:
```yaml
---
stepsCompleted: [1]
lastStep: 'init'
inputDocuments: []
date: [current date]
user_name: { user_name }
[additional workflow-specific fields]
---
```
#### C. Show Welcome Message
"[Welcome message appropriate for workflow type]
Let's begin by [brief description of first activity]."
## ✅ SUCCESS METRICS:
- Document created from template (for fresh workflows)
- Frontmatter initialized with step 1 marked complete
- User welcomed to the process
- Ready to proceed to step 2
- OR continuation properly routed to step-01b-continue.md
## ❌ FAILURE MODES TO AVOID:
- Proceeding with step 2 without document initialization
- Not checking for existing documents properly
- Creating duplicate documents
- Skipping welcome message
- Not routing to step-01b-continue.md when needed
### 5. Present MENU OPTIONS
Display: **Proceeding to [next step description]...**
#### 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 `{nextStepFile}` to begin [next step description]
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- Document created from template (for fresh workflows)
- update frontmatter `stepsCompleted` to add 1 at the end of the array before loading next step
- Frontmatter initialized with `stepsCompleted: [1]`
- User welcomed to the process
- Ready to proceed to step 2
- OR existing workflow properly routed to step-01b-continue.md
### ❌ SYSTEM FAILURE:
- Proceeding with step 2 without document initialization
- Not checking for existing documents properly
- Creating duplicate documents
- Skipping welcome message
- Not routing to step-01b-continue.md when appropriate
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.
## CRITICAL STEP COMPLETION NOTE
ONLY WHEN initialization setup is complete and document is created (OR continuation is properly routed), will you then immediately load, read entire file, then execute `{nextStepFile}` to begin [next step description].
<!-- TEMPLATE END -->
## Customization Guidelines
When adapting this template for your specific workflow:
### 1. Update Placeholders
Replace bracketed placeholders with your specific values:
- `[workflow-type]` - e.g., "nutrition planning", "project requirements"
- `[module-path]` - e.g., "bmb/reference" or "custom"
- `[workflow-name]` - your workflow directory name
- `[output-file-name]` - base name for output document
- `[step-name]` - name for step 2 (e.g., "gather", "profile")
- `[main-template]` - name of your main template file
- `[workflow-output]` - what the workflow produces
- `[Document Type]` - type of input documents (if any)
- `[pattern1]`, `[pattern2]` - search patterns for input documents
- `[additional workflow-specific fields]` - any extra frontmatter fields needed
### 2. Customize Welcome Message
Adapt the welcome message in section 4C to match your workflow's tone and purpose.
### 3. Update Success Metrics
Ensure success metrics reflect your specific workflow requirements.
### 4. Adjust Next Step References
Update `{nextStepFile}` to point to your actual step 2 file.
## Implementation Notes
1. **This step MUST include continuation detection logic** - this is the key pattern
2. **Always include `continueFile` reference** in frontmatter
3. **Proper frontmatter initialization** is critical for continuation tracking
4. **Auto-proceed pattern** - this step should not have user choice menus (except for completed workflow handling)
5. **Template-based document creation** - ensures consistent output structure
## Integration with step-01b-continue.md
This template is designed to work seamlessly with the step-01b-template.md continuation step. The two steps together provide a complete pause/resume workflow capability.

View File

@ -0,0 +1,223 @@
# BMAD Workflow Step 1B Continuation Template
This template provides the standard structure for workflow continuation steps. It handles resuming workflows that were started but not completed, ensuring seamless continuation across multiple sessions.
Use this template alongside **step-01-init-continuable-template.md** to create workflows that can be paused and resumed. The init template handles the detection and routing logic, while this template handles the resumption logic.
<!-- TEMPLATE START -->
---
name: 'step-01b-continue'
description: 'Handle workflow continuation from previous session'
<!-- Path Definitions -->
workflow_path: '{project-root}/{bmad_folder}/[module-path]/workflows/[workflow-name]'
# File References (all use {variable} format in file)
thisStepFile: '{workflow_path}/steps/step-01b-continue.md'
outputFile: '{output_folder}/[output-file-name]-{project_name}.md'
workflowFile: '{workflow_path}/workflow.md'
# Template References (if needed for analysis)
## analysisTemplate: '{workflow_path}/templates/[some-template].md'
# Step 1B: Workflow Continuation
## STEP GOAL:
To resume the [workflow-type] workflow from where it was left off, ensuring smooth continuation without loss of context or progress.
## 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 [specific role, e.g., "business analyst" or "technical architect"]
- ✅ If you already have been given a name, communication_style and identity, continue to use those while playing this new role
- ✅ We engage in collaborative dialogue, not command-response
- ✅ You bring [your expertise], user brings [their expertise], and together we produce something better than we could on our own
- ✅ Maintain collaborative [adjective] tone throughout
### 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 of incomplete file {outputFile}
## EXECUTION PROTOCOLS:
- 🎯 Show your analysis of current state before taking action
- 💾 Keep existing frontmatter `stepsCompleted` values intact
- 📖 Review the template content already generated in {outputFile}
- 🚫 FORBIDDEN to modify content that was completed in previous steps
- 📝 Update frontmatter with continuation timestamp when resuming
## CONTEXT BOUNDARIES:
- Current [output-file-name] document is already loaded
- Previous context = complete template + existing frontmatter
- [Key data collected] already gathered in previous sessions
- Last completed step = last value in `stepsCompleted` array from frontmatter
## CONTINUATION SEQUENCE:
### 1. Analyze Current State
Review the frontmatter of {outputFile} to understand:
- `stepsCompleted`: Which steps are already done (the rightmost value is the last step completed)
- `lastStep`: Name/description of last completed step (if exists)
- `date`: Original workflow start date
- `inputDocuments`: Any documents loaded during initialization
- [Other relevant frontmatter fields]
Example: If `stepsCompleted: [1, 2, 3, 4]`, then step 4 was the last completed step.
### 2. Read All Completed Step Files
For each step number in `stepsCompleted` array (excluding step 1, which is init):
1. **Construct step filename**: `step-[N]-[name].md`
2. **Read the complete step file** to understand:
- What that step accomplished
- What the next step should be (from nextStep references)
- Any specific context or decisions made
Example: If `stepsCompleted: [1, 2, 3]`:
- Read `step-02-[name].md`
- Read `step-03-[name].md`
- The last file will tell you what step-04 should be
### 3. Review Previous Output
Read the complete {outputFile} to understand:
- Content generated so far
- Sections completed vs pending
- User decisions and preferences
- Current state of the deliverable
### 4. Determine Next Step
Based on the last completed step file:
1. **Find the nextStep reference** in the last completed step file
2. **Validate the file exists** at the referenced path
3. **Confirm the workflow is incomplete** (not all steps finished)
### 5. Welcome Back Dialog
Present a warm, context-aware welcome:
"Welcome back! I see we've completed [X] steps of your [workflow-type].
We last worked on [brief description of last step].
Based on our progress, we're ready to continue with [next step description].
Are you ready to continue where we left off?"
### 6. Validate Continuation Intent
Ask confirmation questions if needed:
"Has anything changed since our last session that might affect our approach?"
"Are you still aligned with the goals and decisions we made earlier?"
"Would you like to review what we've accomplished so far?"
### 7. Present MENU OPTIONS
Display: "**Resuming workflow - Select an Option:** [C] Continue to [Next Step Name]"
#### 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
- Update frontmatter with continuation timestamp when 'C' is selected
#### Menu Handling Logic:
- IF C:
1. Update frontmatter: add `lastContinued: [current date]`
2. Load, read entire file, then execute the appropriate next step file (determined in section 4)
- 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 continuation analysis is complete, will you then:
1. Update frontmatter in {outputFile} with continuation timestamp
2. Load, read entire file, then execute the next step file determined from the analysis
Do NOT modify any other content in the output document during this continuation step.
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- Correctly identified last completed step from `stepsCompleted` array
- Read and understood all previous step contexts
- User confirmed readiness to continue
- Frontmatter updated with continuation timestamp
- Workflow resumed at appropriate next step
### ❌ SYSTEM FAILURE:
- Skipping analysis of existing state
- Modifying content from previous steps
- Loading wrong next step file
- Not updating frontmatter with continuation info
- Proceeding without user confirmation
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.
<!-- TEMPLATE END -->
## Customization Guidelines
When adapting this template for your specific workflow:
### 1. Update Placeholders
Replace bracketed placeholders with your specific values:
- `[module-path]` - e.g., "bmb/reference" or "custom"
- `[workflow-name]` - your workflow directory name
- `[workflow-type]` - e.g., "nutrition planning", "project requirements"
- `[output-file-name]` - base name for output document
- `[specific role]` - the role this workflow plays
- `[your expertise]` - what expertise you bring
- `[their expertise]` - what expertise user brings
### 2. Add Workflow-Specific Context
Add any workflow-specific fields to section 1 (Analyze Current State) if your workflow uses additional frontmatter fields for tracking.
### 3. Customize Welcome Message
Adapt the welcome dialog in section 5 to match your workflow's tone and context.
### 4. Add Continuation-Specific Validations
If your workflow has specific checkpoints or validation requirements, add them to section 6.
## Implementation Notes
1. **This step should NEVER modify the output content** - only analyze and prepare for continuation
2. **Always preserve the `stepsCompleted` array** - don't modify it in this step
3. **Timestamp tracking** - helps users understand when workflows were resumed
4. **Context preservation** - the key is maintaining all previous work and decisions
5. **Seamless experience** - user should feel like they never left the workflow

View File

@ -2,33 +2,43 @@
This template provides the standard structure for all BMAD workflow step files. Copy and modify this template for each new step you create. This template provides the standard structure for all BMAD workflow step files. Copy and modify this template for each new step you create.
<!-- TEMPLATE START -->
--- ---
```yaml
---
name: 'step-[N]-[short-name]' name: 'step-[N]-[short-name]'
description: '[Brief description of what this step accomplishes]' description: '[Brief description of what this step accomplishes]'
# Path Definitions <!-- Path Definitions -->
workflow_path: '{project-root}/{bmad_folder}/bmb/reference/workflows/[workflow-name]'
workflow_path: '{project-root}/{bmad_folder}/bmb/reference/workflows/[workflow-name]' # the folder the workflow.md file is in
# File References (all use {variable} format in file) # File References (all use {variable} format in file)
thisStepFile: '{workflow_path}/steps/step-[N]-[short-name].md' thisStepFile: '{workflow_path}/steps/step-[N]-[short-name].md'
nextStepFile: '{workflow_path}/steps/step-[N+1]-[next-short-name].md' # Remove for final step nextStep{N+1}: '{workflow_path}/steps/step-[N+1]-[next-short-name].md' # Remove for final step or no next step
altStep{Y}: '{workflow_path}/steps/step-[Y]-[some-other-step].md' # if there is an alternate next story depending on logic
workflowFile: '{workflow_path}/workflow.md' workflowFile: '{workflow_path}/workflow.md'
outputFile: '{output_folder}/[output-file-name]-{project_name}.md' outputFile: '{output_folder}/[output-file-name]-{project_name}.md'
# Task References # Task References (IF THE workflow uses and it makes sense in this step to have these )
advancedElicitationTask: '{project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml' advancedElicitationTask: '{project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml'
partyModeWorkflow: '{project-root}/{bmad_folder}/core/workflows/party-mode/workflow.md' partyModeWorkflow: '{project-root}/{bmad_folder}/core/workflows/party-mode/workflow.md'
# Template References (if this step uses templates) # Template References (if this step uses a specific templates)
profileTemplate: '{workflow_path}/templates/profile-section.md' profileTemplate: '{workflow_path}/templates/profile-section.md'
assessmentTemplate: '{workflow_path}/templates/assessment-section.md' assessmentTemplate: '{workflow_path}/templates/assessment-section.md'
strategyTemplate: '{workflow_path}/templates/strategy-section.md' strategyTemplate: '{workflow_path}/templates/strategy-section.md'
# Add more as needed
# Data (CSV for example) References (if used in this step)
someData: '{workflow_path}/data/foo.csv'
# Add more as needed - but ONLY what is used in this specific step file!
--- ---
```
# Step [N]: [Step Name] # Step [N]: [Step Name]
@ -52,7 +62,7 @@ Example: "To analyze user requirements and document functional specifications th
- ✅ You are a [specific role, e.g., "business analyst" or "technical architect"] - ✅ You are a [specific role, e.g., "business analyst" or "technical architect"]
- ✅ If you already have been given a name, communication_style and identity, continue to use those while playing this new role - ✅ If you already have been given a name, communication_style and identity, continue to use those while playing this new role
- ✅ We engage in collaborative dialogue, not command-response - ✅ We engage in collaborative dialogue, not command-response
- ✅ You bring [your expertise], user brings [their expertise], and together we produce something better than the sum of our own parts - ✅ You bring [your expertise], user brings [their expertise], and together we produce something better than we could on our own
- ✅ Maintain collaborative [adjective] tone throughout - ✅ Maintain collaborative [adjective] tone throughout
### Step-Specific Rules: ### Step-Specific Rules:
@ -88,15 +98,10 @@ Example: "To analyze user requirements and document functional specifications th
[Specific instructions for second part of the work] [Specific instructions for second part of the work]
#### Content to Append (if applicable): ### N. Title (as many as needed)
```markdown <!-- not ever step will include advanced elicitation or party mode, in which case generally will just have the C option -->
## [Section Title] <!-- for example an init step 1 that loads data, or step 1b continues a workflow would not need advanced elicitation or party mode - but any step where the user and the llm work together on content, thats where it makes sense to include them -->
[Content template or instructions for what to append]
```
### N. (Continue as needed)
### N. Present MENU OPTIONS ### N. Present MENU OPTIONS
@ -105,7 +110,7 @@ Display: "**Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Cont
#### Menu Handling Logic: #### Menu Handling Logic:
- IF A: Execute {advancedElicitationTask} # Or custom action - IF A: Execute {advancedElicitationTask} # Or custom action
- IF P: Execute {partyModeWorkflow} - IF P: Execute {partyModeWorkflow} # Or custom action
- IF C: Save content to {outputFile}, update frontmatter, then only then load, read entire file, then execute {nextStepFile} - 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](#n-present-menu-options) - IF Any other comments or queries: help user respond then [Redisplay Menu Options](#n-present-menu-options)
@ -113,8 +118,8 @@ Display: "**Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Cont
- ALWAYS halt and wait for user input after presenting menu - ALWAYS halt and wait for user input after presenting menu
- ONLY proceed to next step when user selects 'C' - ONLY proceed to next step when user selects 'C'
- After other menu items execution, return to this menu - After other menu items execution completes, redisplay the menu
- User can chat or ask questions - always respond and then end with display again of the menu options - User can chat or ask questions - always respond when conversation ends, redisplay the menu
## CRITICAL STEP COMPLETION NOTE ## CRITICAL STEP COMPLETION NOTE
@ -122,8 +127,6 @@ Display: "**Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Cont
ONLY WHEN [C continue option] is selected and [completion requirements], will you then load and read fully `[installed_path]/step-[next-number]-[name].md` to execute and begin [next step description]. ONLY WHEN [C continue option] is selected and [completion requirements], will you then load and read fully `[installed_path]/step-[next-number]-[name].md` to execute and begin [next step description].
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS ## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS: ### ✅ SUCCESS:
@ -140,15 +143,19 @@ ONLY WHEN [C continue option] is selected and [completion requirements], will yo
- [Step-specific failure mode 2] - [Step-specific failure mode 2]
- Proceeding without user input/selection - Proceeding without user input/selection
- Not updating required documents/frontmatter - Not updating required documents/frontmatter
- [General failure modes] - [Step-specific failure mode N]
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE. **Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.
--- <!-- TEMPLATE END-->
## Common Menu Patterns ## Common Menu Patterns to use in the final sequence item in a step file.
### Standard Menu (A/P/C) FYI Again - party mode is useful for the user to reach out and get opinions from other agents.
Advanced elicitation is use to direct you to think of alternative outputs of a sequence you just performed.
### Standard Menu - when a sequence in a step results in content produced by the agent or human that could be improved before proceeding.
```markdown ```markdown
### N. Present MENU OPTIONS ### N. Present MENU OPTIONS
@ -170,7 +177,7 @@ Display: "**Select an Option:** [A] [Advanced Elicitation] [P] Party Mode [C] Co
- User can chat or ask questions - always respond and then end with display again of the menu options - User can chat or ask questions - always respond and then end with display again of the menu options
``` ```
### Auto-Proceed Menu (No User Choice) ### Optional Menu - Auto-Proceed Menu (No User Choice or confirm, just flow right to the next step once completed)
```markdown ```markdown
### N. Present MENU OPTIONS ### N. Present MENU OPTIONS
@ -196,8 +203,8 @@ Display: "**Select an Option:** [A] [Custom Action 1] [B] [Custom Action 2] [C]
#### Menu Handling Logic: #### Menu Handling Logic:
- IF A: [Custom handler for option A] - IF A: [Custom handler route for option A]
- IF B: [Custom handler for option B] - IF B: [Custom handler route for option B]
- IF C: Save content to {outputFile}, update frontmatter, then only then load, read entire file, then execute {nextStepFile} - 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](#n-present-menu-options) - IF Any other comments or queries: help user respond then [Redisplay Menu Options](#n-present-menu-options)
@ -214,7 +221,7 @@ Display: "**Select an Option:** [A] [Custom Action 1] [B] [Custom Action 2] [C]
```markdown ```markdown
### N. Present MENU OPTIONS ### N. Present MENU OPTIONS
Display: "**Select an Option:** [A] [Custom Label] [C] Continue" Display: "**Select an Option:** [A] [Continue to Step Foo] [A] [Continue to Step Bar]"
#### Menu Handling Logic: #### Menu Handling Logic:

View File

@ -0,0 +1,104 @@
# BMAD Workflow Template
This template provides the standard structure for all BMAD workflow files. Copy and modify this template for each new workflow you create.
<!-- TEMPLATE START -->
---
name: [WORKFLOW_DISPLAY_NAME]
description: [Brief description of what this workflow accomplishes]
web_bundle: [true/false] # Set to true for inclusion in web bundle builds
---
# [WORKFLOW_DISPLAY_NAME]
**Goal:** [State the primary goal of this workflow in one clear sentence]
**Your Role:** In addition to your name, communication_style, and persona, you are also a [role] collaborating with [user type]. This is a partnership, not a client-vendor relationship. You bring [your expertise], while the user brings [their expertise]. Work together as equals.
## WORKFLOW ARCHITECTURE
### Core Principles
- **Micro-file Design**: Each step of the overall goal is a self contained instruction file that you will adhere too 1 file as directed at a time
- **Just-In-Time Loading**: Only 1 current step file will be loaded, read, and executed to completion - 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. Module Configuration Loading
Load and read full config from {project-root}/{bmad_folder}/[MODULE FOLDER]/config.yaml and resolve:
- `project_name`, `output_folder`, `user_name`, `communication_language`, `document_output_language`, [MODULE VARS]
### 2. First Step EXECUTION
Load, read the full file and then execute [FIRST STEP FILE PATH] to begin the workflow.
<!-- TEMPLATE END -->
## How to Use This Template
### Step 1: Copy and Replace Placeholders
Copy the template above and replace:
- `[WORKFLOW_DISPLAY_NAME]` → Your workflow's display name
- `[MODULE FOLDER]` → Default is `core` unless this is for another module (such as bmm, cis, or another as directed by user)
- `[Brief description]` → One-sentence description
- `[true/false]` → Whether to include in web bundle
- `[role]` → AI's role in this workflow
- `[user type]` → Who the user is
- `[CONFIG_PATH]` → Path to config file (usually `bmm/config.yaml` or `bmb/config.yaml`)
- `[WORKFLOW_PATH]` → Path to your workflow folder
- `[MODULE VARS]` → Extra config variables available in a module configuration that the workflow would need to use
### Step 2: Create the Folder Structure
```
[workflow-folder]/
├── workflow.md # This file
├── data/ # (Optional csv or other data files)
├── templates/ # template files for output
└── steps/
├── step-01-init.md
├── step-02-[name].md
└── ...
```
### Step 3: Configure the Initialization Path
Update the last line of the workflow.md being created to replace [FIRST STEP FILE PATH] with the path to the actual first step file.
Example: Load, read the full file and then execute `{workflow_path}/steps/step-01-init.md` to begin the workflow.
### NOTE: You can View a real example of a perfect workflow.md file that was created from this template
`{project-root}/{bmad_folder}/bmb/reference/workflows/meal-prep-nutrition/workflow.md`

View File

@ -1,152 +0,0 @@
# BMAD Workflow Template
This template provides the standard structure for all BMAD workflow files. Copy and modify this template for each new workflow you create.
## Frontmatter Structure
Copy this YAML frontmatter and fill in your specific values:
```yaml
---
name: [WORKFLOW_DISPLAY_NAME]
description: [Brief description of what this workflow accomplishes]
web_bundle: [true/false] # Set to true for inclusion in web bundle builds
---
# [WORKFLOW_DISPLAY_NAME]
**Goal:** [State the primary goal of this workflow in one clear sentence]
**Your Role:** In addition to your name, communication_style, and persona, you are also a [role] collaborating with [user type]. This is a partnership, not a client-vendor relationship. You bring [your expertise], while the user brings [their expertise]. 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
---
## INITIALIZATION SEQUENCE
### 1. Configuration Loading
Load and read full config from {project-root}/{bmad_folder}/[module such as core, bmm, bmb]/config.yaml and resolve:
- `project_name`, `output_folder`, `user_name`, `communication_language`, `document_output_language`, [any additional variables]
**Note:** Use variable substitution patterns for flexible installation paths:
- `{project-root}` - Root directory of the project
- `{bmad_folder}` - Name of the BMAD folder (usually `.bmad`)
- `[module]` - Module name (core, bmm, bmb, or custom)
### 2. First Step EXECUTION
Load, read the full file and then execute `{workflow_path}/steps/step-01-init.md` to begin the workflow.
```
## How to Use This Template
### Step 1: Copy and Replace Placeholders
Copy the template above and replace:
- `[WORKFLOW_DISPLAY_NAME]` → Your workflow's display name
- `[Brief description]` → One-sentence description
- `[true/false]` → Whether to include in web bundle
- `[role]` → AI's role in this workflow
- `[user type]` → Who the user is
- `[CONFIG_PATH]` → Path to config file (usually `bmm/config.yaml` or `bmb/config.yaml`)
- `[WORKFLOW_PATH]` → Path to your workflow folder
- `[any additional variables]` → Extra config variables needed
### Step 2: Create the Folder Structure
```
[workflow-folder]/
├── workflow.md # This file
└── steps/
├── step-01-init.md
├── step-02-[name].md
└── ...
```
### Step 3: Configure the Initialization Path
Update the last line to point to your actual first step file:
```markdown
Load, read the full file and then execute `{workflow_path}/steps/step-01-init.md` to begin the workflow.
```
## Examples
### Example 1: Document Creation Workflow
```yaml
---
name: User Guide Creator
description: Creates comprehensive user guides through collaborative content creation
web_bundle: true
---
# User Guide Creator
**Goal:** Create comprehensive user guides through collaborative content creation
**Your Role:** In addition to your name, communication_style, and persona, you are also a technical writer collaborating with a subject matter expert. This is a partnership, not a client-vendor relationship. You bring structured writing skills and documentation expertise, while the user brings domain knowledge and technical expertise. Work together as equals.
```
### Example 2: Decision Support Workflow
```yaml
---
name: Decision Framework
description: Helps users make structured decisions using proven methodologies
web_bundle: false
---
# Decision Framework
**Goal:** Helps users make structured decisions using proven methodologies
**Your Role:** In addition to your name, communication_style, and persona, you are also a decision facilitator collaborating with a decision maker. This is a partnership, not a client-vendor relationship. You bring structured thinking and facilitation skills, while the user brings context and decision criteria. Work together as equals.
```
## Best Practices
1. **Keep Roles Collaborative**: Always emphasize partnership over client-vendor relationships
2. **Be Specific About Goals**: One clear sentence that describes the outcome
3. **Use Standard Architecture**: Never modify the WORKFLOW ARCHITECTURE section
4. **Include web_bundle**: Set to true for production-ready workflows
5. **Test the Path**: Verify the step file path exists and is correct
## Example Implementation
See the [Meal Prep & Nutrition Plan workflow](../reference/workflows/meal-prep-nutrition/workflow.md) for a complete implementation of this template.
Remember: This template is the STANDARD for all BMAD workflows. Do not modify the core architecture section - only customize the role description and goal.

View File

@ -157,7 +157,8 @@ Display: **Proceeding to user profile collection...**
### ✅ SUCCESS: ### ✅ SUCCESS:
- Document created from template - Document created from template
- Frontmatter initialized with step 1 marked complete - update frontmatter `stepsCompleted` to add 4 at the end of the array before loading next step
- Frontmatter initialized with `stepsCompleted: [1]`
- User welcomed to the process - User welcomed to the process
- Ready to proceed to step 2 - Ready to proceed to step 2
@ -173,5 +174,3 @@ ONLY WHEN initialization setup is complete and document is created, will you the
- Skipping welcome message - Skipping welcome message
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE. **Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.
---

View File

@ -7,10 +7,7 @@ workflow_path: '{project-root}/{bmad_folder}/bmb/reference/workflows/meal-prep-n
# File References # File References
thisStepFile: '{workflow_path}/steps/step-01b-continue.md' thisStepFile: '{workflow_path}/steps/step-01b-continue.md'
workflowFile: '{workflow_path}/workflow.md'
outputFile: '{output_folder}/nutrition-plan-{project_name}.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 1B: Workflow Continuation
@ -38,9 +35,9 @@ To resume the nutrition planning workflow from where it was left off, ensuring s
### Step-Specific Rules: ### Step-Specific Rules:
- 🎯 Focus ONLY on analyzing and resuming workflow state - 🎯 Focus ONLY on analyzing and resuming workflow state
- 🚫 FORBIDDEN to modify content completed in previous steps - 🚫 FORBIDDEN to modify content during this step
- 💬 Maintain continuity with previous sessions - 💬 Maintain continuity with previous sessions
- 🚪 DETECT exact continuation point from frontmatter - 🚪 DETECT exact continuation point from frontmatter of incomplete file {outputFile}
## EXECUTION PROTOCOLS: ## EXECUTION PROTOCOLS:
@ -60,39 +57,19 @@ To resume the nutrition planning workflow from where it was left off, ensuring s
### 1. Analyze Current State ### 1. Analyze Current State
Review the frontmatter to understand: Review the frontmatter of {outputFile} to understand:
- `stepsCompleted`: Which steps are already done - `stepsCompleted`: Which steps are already done, the rightmost value of the array is the last step completed. For example stepsCompleted: [1, 2, 3] would mean that steps 1, then 2, and then 3 were finished.
- `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: ### 2. Read the full step of every completed step
- What sections are already completed - read each step file that corresponds to the stepsCompleted > 1.
- What recommendations have been made
- Current progress through the plan
- Any notes or adjustments documented
### 2. Confirm Continuation Point EXAMPLE: In the example `stepsCompleted: [1, 2, 3]` your would find the step 2 file by file name (step-02-profile.md) and step 3 file (step-03-assessment.md). the last file in the array is the last one completed, so you will follow the instruction to know what the next step to start processing is. reading that file would for example show that the next file is `steps/step-04-strategy.md`.
Based on `lastStep`, prepare to continue with: ### 3. Review the output completed previously
- If `lastStep` = "init" → Continue to Step 3: Dietary Assessment In addition to reading ONLY each step file that was completed, you will then read the {outputFile} to further understand what is done so far.
- 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 ### 4. Welcome Back Dialog
@ -103,7 +80,6 @@ continuationDate: [current date]
- Briefly summarize progress made - Briefly summarize progress made
- Confirm any changes since last session - Confirm any changes since last session
- Validate that user is still aligned with goals - Validate that user is still aligned with goals
- Proceed to next appropriate step
### 6. Present MENU OPTIONS ### 6. Present MENU OPTIONS
@ -118,19 +94,13 @@ Display: **Resuming workflow - Select an Option:** [C] Continue
#### Menu Handling Logic: #### Menu Handling Logic:
- IF C: Update frontmatter with continuation info, then load, read entire file, then execute appropriate next step based on `lastStep` - IF C: follow the suggestion of the last completed step reviewed to continue as it suggested
- 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) - IF Any other comments or queries: help user respond then [Redisplay Menu Options](#5-present-menu-options)
## CRITICAL STEP COMPLETION NOTE ## 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. 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 ## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS: ### ✅ SUCCESS:

View File

@ -53,7 +53,7 @@ To gather comprehensive user profile information through collaborative conversat
- 🎯 Engage in natural conversation to gather profile information - 🎯 Engage in natural conversation to gather profile information
- 💾 After collecting all information, append to {outputFile} - 💾 After collecting all information, append to {outputFile}
- 📖 Update frontmatter `stepsCompleted: [1, 2]` before loading next step - 📖 Update frontmatter `stepsCompleted` to add 2 at the end of the array before loading next step
- 🚫 FORBIDDEN to load next step until user selects 'C' and content is saved - 🚫 FORBIDDEN to load next step until user selects 'C' and content is saved
## CONTEXT BOUNDARIES: ## CONTEXT BOUNDARIES:

View File

@ -57,6 +57,7 @@ To analyze nutritional requirements, identify restrictions, and calculate target
- 🎯 Use data from CSV files for comprehensive analysis - 🎯 Use data from CSV files for comprehensive analysis
- 💾 Calculate macros based on profile and goals - 💾 Calculate macros based on profile and goals
- 📖 Document all findings in nutrition-plan.md - 📖 Document all findings in nutrition-plan.md
- 📖 Update frontmatter `stepsCompleted` to add 3 at the end of the array before loading next step
- 🚫 FORBIDDEN to prescribe medical nutrition therapy - 🚫 FORBIDDEN to prescribe medical nutrition therapy
## CONTEXT BOUNDARIES: ## CONTEXT BOUNDARIES:

View File

@ -168,8 +168,8 @@ Display: **Select an Option:** [A] Meal Variety Optimization [P] Chef & Dietitia
- HALT and AWAIT ANSWER - HALT and AWAIT ANSWER
- IF A: Execute `{project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml` - IF A: Execute `{project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml`
- IF P: Execute `{project-root}/{bmad_folder}/core/workflows/party-mode/workflow.md` - IF P: Execute `{project-root}/{bmad_folder}/core/workflows/party-mode/workflow.md` with a chef and dietitian expert also as part of the party
- IF C: Save content to nutrition-plan.md, update frontmatter, check cooking frequency: - IF C: Save content to nutrition-plan.md, update frontmatter `stepsCompleted` to add 4 at the end of the array before loading next step, 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-05-shopping.md`
- IF cooking frequency ≤ 2x/week: load, read entire file, then execute `{workflow_path}/step-06-prep-schedule.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) - IF Any other comments or queries: help user respond then [Redisplay Menu Options](#5-present-menu-options)

View File

@ -159,7 +159,7 @@ Display: **Select an Option:** [A] Budget Optimization Strategies [P] Shopping P
- HALT and AWAIT ANSWER - HALT and AWAIT ANSWER
- IF A: Execute `{project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml` - IF A: Execute `{project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml`
- IF P: Execute `{project-root}/{bmad_folder}/core/workflows/party-mode/workflow.md` - IF P: Execute `{project-root}/{bmad_folder}/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 C: Save content to nutrition-plan.md, update frontmatter `stepsCompleted` to add 5 at the end of the array before loading next step, 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) - IF Any other comments or queries: help user respond then [Redisplay Menu Options](#5-present-menu-options)
## CRITICAL STEP COMPLETION NOTE ## CRITICAL STEP COMPLETION NOTE

View File

@ -180,14 +180,14 @@ Display: **Select an Option:** [A] Advanced Prep Techniques [P] Coach Perspectiv
- HALT and AWAIT ANSWER - HALT and AWAIT ANSWER
- IF A: Execute `{project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml` - IF A: Execute `{project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml`
- IF P: Execute `{project-root}/{bmad_folder}/core/workflows/party-mode/workflow.md` - IF P: Execute `{project-root}/{bmad_folder}/core/workflows/party-mode/workflow.md`
- IF C: Update frontmatter with all steps completed, mark workflow complete, display final message - IF C: update frontmatter `stepsCompleted` to add 6 at the end of the array before loading next step, mark workflow complete, display final message
- IF Any other comments or queries: help user respond then [Redisplay Menu Options](#6-present-menu-options) - IF Any other comments or queries: help user respond then [Redisplay Menu Options](#6-present-menu-options)
## CRITICAL STEP COMPLETION NOTE ## CRITICAL STEP COMPLETION NOTE
ONLY WHEN C is selected and content is saved to document: ONLY WHEN C is selected and content is saved to document:
1. Update frontmatter with all steps completed and indicate final completion 1. update frontmatter `stepsCompleted` to add 6 at the end of the array before loading next step completed and indicate final completion
2. Display final completion message 2. Display final completion message
3. End workflow session 3. End workflow session

View File

@ -49,9 +49,9 @@ This uses **step-file architecture** for disciplined execution:
### 1. Configuration Loading ### 1. Configuration Loading
Load and read full config from {project-root}/{bmad_folder}/bmm/config.yaml and resolve: Load and read full config from {project-root}/{bmad_folder}/core/config.yaml and resolve:
- `project_name`, `output_folder`, `user_name`, `communication_language`, `document_output_language`, `user_skill_level` - `project_name`, `output_folder`, `user_name`, `communication_language`, `document_output_language`
### 2. First Step EXECUTION ### 2. First Step EXECUTION

View File

@ -81,10 +81,10 @@
**Agent Documentation References** **Agent Documentation References**
- Agent compilation guide: `{project-root}/.bmad/bmb/docs/agents/agent-compilation.md` - Agent compilation guide: `{project-root}/{bmad_folder}/bmb/docs/agents/agent-compilation.md`
- Agent types guide: `{project-root}/.bmad/bmb/docs/agents/understanding-agent-types.md` - Agent types guide: `{project-root}/{bmad_folder}/bmb/docs/agents/understanding-agent-types.md`
- Architecture docs: simple, expert, module agent architectures - Architecture docs: simple, expert, module agent architectures
- Menu patterns guide: `{project-root}/.bmad/bmb/docs/agents/agent-menu-patterns.md` - Menu patterns guide: `{project-root}/{bmad_folder}/bmb/docs/agents/agent-menu-patterns.md`
- Status: ✅ ALL REFERENCES PRESERVED - Status: ✅ ALL REFERENCES PRESERVED
**Communication Presets** **Communication Presets**

View File

@ -10,11 +10,11 @@ thisStepFile: '{workflow_path}/steps/step-01-brainstorm.md'
nextStepFile: '{workflow_path}/steps/step-02-discover.md' nextStepFile: '{workflow_path}/steps/step-02-discover.md'
workflowFile: '{workflow_path}/workflow.md' workflowFile: '{workflow_path}/workflow.md'
brainstormContext: '{workflow_path}/data/brainstorm-context.md' brainstormContext: '{workflow_path}/data/brainstorm-context.md'
brainstormWorkflow: '{project-root}/.bmad/core/workflows/brainstorming/workflow.md' brainstormWorkflow: '{project-root}/{bmad_folder}/core/workflows/brainstorming/workflow.md'
# Task References # Task References
advancedElicitationTask: '{project-root}/.bmad/core/tasks/advanced-elicitation.xml' advancedElicitationTask: '{project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml'
partyModeWorkflow: '{project-root}/.bmad/core/workflows/party-mode/workflow.md' partyModeWorkflow: '{project-root}/{bmad_folder}/core/workflows/party-mode/workflow.md'
--- ---
# Step 1: Optional Brainstorming # Step 1: Optional Brainstorming

View File

@ -10,7 +10,7 @@ thisStepFile: '{workflow_path}/steps/step-02-discover.md'
nextStepFile: '{workflow_path}/steps/step-03-persona.md' nextStepFile: '{workflow_path}/steps/step-03-persona.md'
workflowFile: '{workflow_path}/workflow.md' workflowFile: '{workflow_path}/workflow.md'
outputFile: '{output_folder}/agent-purpose-{project_name}.md' outputFile: '{output_folder}/agent-purpose-{project_name}.md'
agentTypesGuide: '{project-root}/.bmad/bmb/docs/agents/understanding-agent-types.md' agentTypesGuide: '{project-root}/{bmad_folder}/bmb/docs/agents/understanding-agent-types.md'
simpleExamples: '{workflow_path}/data/reference/agents/simple-examples/' simpleExamples: '{workflow_path}/data/reference/agents/simple-examples/'
expertExamples: '{workflow_path}/data/reference/agents/expert-examples/' expertExamples: '{workflow_path}/data/reference/agents/expert-examples/'
moduleExamples: '{workflow_path}/data/reference/agents/module-examples/' moduleExamples: '{workflow_path}/data/reference/agents/module-examples/'
@ -19,8 +19,8 @@ moduleExamples: '{workflow_path}/data/reference/agents/module-examples/'
agentPurposeTemplate: '{workflow_path}/templates/agent-purpose-and-type.md' agentPurposeTemplate: '{workflow_path}/templates/agent-purpose-and-type.md'
# Task References # Task References
advancedElicitationTask: '{project-root}/.bmad/core/tasks/advanced-elicitation.xml' advancedElicitationTask: '{project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml'
partyModeWorkflow: '{project-root}/.bmad/core/workflows/party-mode/workflow.md' partyModeWorkflow: '{project-root}/{bmad_folder}/core/workflows/party-mode/workflow.md'
--- ---
# Step 2: Discover Agent Purpose and Type # Step 2: Discover Agent Purpose and Type

View File

@ -11,14 +11,14 @@ nextStepFile: '{workflow_path}/steps/step-04-commands.md'
workflowFile: '{workflow_path}/workflow.md' workflowFile: '{workflow_path}/workflow.md'
outputFile: '{output_folder}/agent-persona-{project_name}.md' outputFile: '{output_folder}/agent-persona-{project_name}.md'
communicationPresets: '{workflow_path}/data/communication-presets.csv' communicationPresets: '{workflow_path}/data/communication-presets.csv'
agentMenuPatterns: '{project-root}/.bmad/bmb/docs/agents/agent-menu-patterns.md' agentMenuPatterns: '{project-root}/{bmad_folder}/bmb/docs/agents/agent-menu-patterns.md'
# Template References # Template References
personaTemplate: '{workflow_path}/templates/agent-persona.md' personaTemplate: '{workflow_path}/templates/agent-persona.md'
# Task References # Task References
advancedElicitationTask: '{project-root}/.bmad/core/tasks/advanced-elicitation.xml' advancedElicitationTask: '{project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml'
partyModeWorkflow: '{project-root}/.bmad/core/workflows/party-mode/workflow.md' partyModeWorkflow: '{project-root}/{bmad_folder}/core/workflows/party-mode/workflow.md'
--- ---
# Step 3: Shape Agent's Personality # Step 3: Shape Agent's Personality

View File

@ -10,17 +10,17 @@ thisStepFile: '{workflow_path}/steps/step-04-commands.md'
nextStepFile: '{workflow_path}/steps/step-05-name.md' nextStepFile: '{workflow_path}/steps/step-05-name.md'
workflowFile: '{workflow_path}/workflow.md' workflowFile: '{workflow_path}/workflow.md'
outputFile: '{output_folder}/agent-commands-{project_name}.md' outputFile: '{output_folder}/agent-commands-{project_name}.md'
agentMenuPatterns: '{project-root}/.bmad/bmb/docs/agents/agent-menu-patterns.md' agentMenuPatterns: '{project-root}/{bmad_folder}/bmb/docs/agents/agent-menu-patterns.md'
simpleArchitecture: '{project-root}/.bmad/bmb/docs/agents/simple-agent-architecture.md' simpleArchitecture: '{project-root}/{bmad_folder}/bmb/docs/agents/simple-agent-architecture.md'
expertArchitecture: '{project-root}/.bmad/bmb/docs/agents/expert-agent-architecture.md' expertArchitecture: '{project-root}/{bmad_folder}/bmb/docs/agents/expert-agent-architecture.md'
moduleArchitecture: '{project-root}/.bmad/bmb/docs/agents/module-agent-architecture.md' moduleArchitecture: '{project-root}/{bmad_folder}/bmb/docs/agents/module-agent-architecture.md'
# Template References # Template References
commandsTemplate: '{workflow_path}/templates/agent-commands.md' commandsTemplate: '{workflow_path}/templates/agent-commands.md'
# Task References # Task References
advancedElicitationTask: '{project-root}/.bmad/core/tasks/advanced-elicitation.xml' advancedElicitationTask: '{project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml'
partyModeWorkflow: '{project-root}/.bmad/core/workflows/party-mode/workflow.md' partyModeWorkflow: '{project-root}/{bmad_folder}/core/workflows/party-mode/workflow.md'
--- ---
# Step 4: Build Capabilities and Commands # Step 4: Build Capabilities and Commands

View File

@ -15,8 +15,8 @@ outputFile: '{output_folder}/agent-identity-{project_name}.md'
identityTemplate: '{workflow_path}/templates/agent-identity.md' identityTemplate: '{workflow_path}/templates/agent-identity.md'
# Task References # Task References
advancedElicitationTask: '{project-root}/.bmad/core/tasks/advanced-elicitation.xml' advancedElicitationTask: '{project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml'
partyModeWorkflow: '{project-root}/.bmad/core/workflows/party-mode/workflow.md' partyModeWorkflow: '{project-root}/{bmad_folder}/core/workflows/party-mode/workflow.md'
--- ---
# Step 5: Agent Naming and Identity # Step 5: Agent Naming and Identity

View File

@ -10,15 +10,15 @@ thisStepFile: '{workflow_path}/steps/step-06-build.md'
nextStepFile: '{workflow_path}/steps/step-07-validate.md' nextStepFile: '{workflow_path}/steps/step-07-validate.md'
workflowFile: '{workflow_path}/workflow.md' workflowFile: '{workflow_path}/workflow.md'
outputFile: '{output_folder}/agent-yaml-{project_name}.md' outputFile: '{output_folder}/agent-yaml-{project_name}.md'
moduleOutputFile: '{project-root}/.bmad/{target_module}/agents/{agent_filename}.agent.yaml' moduleOutputFile: '{project-root}/{bmad_folder}/{target_module}/agents/{agent_filename}.agent.yaml'
standaloneOutputFile: '{workflow_path}/data/{agent_filename}/{agent_filename}.agent.yaml' standaloneOutputFile: '{workflow_path}/data/{agent_filename}/{agent_filename}.agent.yaml'
# Template References # Template References
completeAgentTemplate: '{workflow_path}/templates/agent-complete-{agent_type}.md' completeAgentTemplate: '{workflow_path}/templates/agent-complete-{agent_type}.md'
# Task References # Task References
advancedElicitationTask: '{project-root}/.bmad/core/tasks/advanced-elicitation.xml' advancedElicitationTask: '{project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml'
partyModeWorkflow: '{project-root}/.bmad/core/workflows/party-mode/workflow.md' partyModeWorkflow: '{project-root}/{bmad_folder}/core/workflows/party-mode/workflow.md'
--- ---
# Step 6: Build Complete Agent YAML # Step 6: Build Complete Agent YAML

View File

@ -10,15 +10,15 @@ thisStepFile: '{workflow_path}/steps/step-07-validate.md'
nextStepFile: '{workflow_path}/steps/step-08-setup.md' nextStepFile: '{workflow_path}/steps/step-08-setup.md'
workflowFile: '{workflow_path}/workflow.md' workflowFile: '{workflow_path}/workflow.md'
outputFile: '{output_folder}/agent-validation-{project_name}.md' outputFile: '{output_folder}/agent-validation-{project_name}.md'
agentValidationChecklist: '{project-root}/.bmad/bmb/workflows/create-agent/agent-validation-checklist.md' agentValidationChecklist: '{project-root}/{bmad_folder}/bmb/workflows/create-agent/agent-validation-checklist.md'
agentFile: '{{output_file_path}}' agentFile: '{{output_file_path}}'
# Template References # Template References
validationTemplate: '{workflow_path}/templates/validation-results.md' validationTemplate: '{workflow_path}/templates/validation-results.md'
# Task References # Task References
advancedElicitationTask: '{project-root}/.bmad/core/tasks/advanced-elicitation.xml' advancedElicitationTask: '{project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml'
partyModeWorkflow: '{project-root}/.bmad/core/workflows/party-mode/workflow.md' partyModeWorkflow: '{project-root}/{bmad_folder}/core/workflows/party-mode/workflow.md'
--- ---
# Step 7: Quality Check and Validation # Step 7: Quality Check and Validation

View File

@ -16,8 +16,8 @@ agentSidecarFolder: '{{standalone_output_folder}}/{{agent_filename}}-sidecar'
sidecarTemplate: '{workflow_path}/templates/expert-sidecar-structure.md' sidecarTemplate: '{workflow_path}/templates/expert-sidecar-structure.md'
# Task References # Task References
advancedElicitationTask: '{project-root}/.bmad/core/tasks/advanced-elicitation.xml' advancedElicitationTask: '{project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml'
partyModeWorkflow: '{project-root}/.bmad/core/workflows/party-mode/workflow.md' partyModeWorkflow: '{project-root}/{bmad_folder}/core/workflows/party-mode/workflow.md'
--- ---
# Step 8: Expert Agent Workspace Setup # Step 8: Expert Agent Workspace Setup

View File

@ -10,14 +10,14 @@ thisStepFile: '{workflow_path}/steps/step-09-customize.md'
nextStepFile: '{workflow_path}/steps/step-10-build-tools.md' nextStepFile: '{workflow_path}/steps/step-10-build-tools.md'
workflowFile: '{workflow_path}/workflow.md' workflowFile: '{workflow_path}/workflow.md'
outputFile: '{output_folder}/agent-customization-{project_name}.md' outputFile: '{output_folder}/agent-customization-{project_name}.md'
configOutputFile: '{project-root}/.bmad/_cfg/agents/{target_module}-{agent_filename}.customize.yaml' configOutputFile: '{project-root}/{bmad_folder}/_cfg/agents/{target_module}-{agent_filename}.customize.yaml'
# Template References # Template References
customizationTemplate: '{workflow_path}/templates/agent-customization.md' customizationTemplate: '{workflow_path}/templates/agent-customization.md'
# Task References # Task References
advancedElicitationTask: '{project-root}/.bmad/core/tasks/advanced-elicitation.xml' advancedElicitationTask: '{project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml'
partyModeWorkflow: '{project-root}/.bmad/core/workflows/party-mode/workflow.md' partyModeWorkflow: '{project-root}/{bmad_folder}/core/workflows/party-mode/workflow.md'
--- ---
# Step 9: Optional Customization File # Step 9: Optional Customization File

View File

@ -17,8 +17,8 @@ compiledAgentFile: '{{output_folder}}/{{agent_filename}}.md'
buildHandlingTemplate: '{workflow_path}/templates/build-results.md' buildHandlingTemplate: '{workflow_path}/templates/build-results.md'
# Task References # Task References
advancedElicitationTask: '{project-root}/.bmad/core/tasks/advanced-elicitation.xml' advancedElicitationTask: '{project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml'
partyModeWorkflow: '{project-root}/.bmad/core/workflows/party-mode/workflow.md' partyModeWorkflow: '{project-root}/{bmad_folder}/core/workflows/party-mode/workflow.md'
--- ---
# Step 10: Build Tools Handling # Step 10: Build Tools Handling

View File

@ -16,8 +16,8 @@ compiledAgentFile: '{{compiled_agent_path}}'
completionTemplate: '{workflow_path}/templates/completion-summary.md' completionTemplate: '{workflow_path}/templates/completion-summary.md'
# Task References # Task References
advancedElicitationTask: '{project-root}/.bmad/core/tasks/advanced-elicitation.xml' advancedElicitationTask: '{project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml'
partyModeWorkflow: '{project-root}/.bmad/core/workflows/party-mode/workflow.md' partyModeWorkflow: '{project-root}/{bmad_folder}/core/workflows/party-mode/workflow.md'
--- ---
# Step 11: Celebration and Next Steps # Step 11: Celebration and Next Steps

View File

@ -49,7 +49,7 @@ This uses **step-file architecture** for disciplined execution:
### 1. Configuration Loading ### 1. Configuration Loading
Load and read full config from `{project-root}/.bmad/bmb/config.yaml`: Load and read full config from `{project-root}/{bmad_folder}/bmb/config.yaml`:
- `project_name`, `output_folder`, `user_name`, `communication_language`, `document_output_language` - `project_name`, `output_folder`, `user_name`, `communication_language`, `document_output_language`
@ -63,12 +63,12 @@ Load, read completely, then execute `steps/step-01-brainstorm.md` to begin the w
# Technical documentation for agent building # Technical documentation for agent building
agent_compilation: "{project-root}/.bmad/bmb/docs/agents/agent-compilation.md" agent_compilation: "{project-root}/{bmad_folder}/bmb/docs/agents/agent-compilation.md"
understanding_agent_types: "{project-root}/.bmad/bmb/docs/agents/understanding-agent-types.md" understanding_agent_types: "{project-root}/{bmad_folder}/bmb/docs/agents/understanding-agent-types.md"
simple_agent_architecture: "{project-root}/.bmad/bmb/docs/agents/simple-agent-architecture.md" simple_agent_architecture: "{project-root}/{bmad_folder}/bmb/docs/agents/simple-agent-architecture.md"
expert_agent_architecture: "{project-root}/.bmad/bmb/docs/agents/expert-agent-architecture.md" expert_agent_architecture: "{project-root}/{bmad_folder}/bmb/docs/agents/expert-agent-architecture.md"
module_agent_architecture: "{project-root}/.bmad/bmb/docs/agents/module-agent-architecture.md" module_agent_architecture: "{project-root}/{bmad_folder}/bmb/docs/agents/module-agent-architecture.md"
agent_menu_patterns: "{project-root}/.bmad/bmb/docs/agents/agent-menu-patterns.md" agent_menu_patterns: "{project-root}/{bmad_folder}/bmb/docs/agents/agent-menu-patterns.md"
# Data and templates # Data and templates
@ -83,9 +83,9 @@ module_agent_examples: "{project-root}/src/modules/bmb/reference/agents/module-e
# Output configuration # Output configuration
custom_agent_location: "{project-root}/.bmad/custom/src/agents" custom_agent_location: "{project-root}/{bmad_folder}/custom/src/agents"
module_output_file: "{project-root}/.bmad/{target_module}/agents/{agent_filename}.agent.yaml" module_output_file: "{project-root}/{bmad_folder}/{target_module}/agents/{agent_filename}.agent.yaml"
standalone_output_folder: "{custom_agent_location}/{agent_filename}" standalone_output_folder: "{custom_agent_location}/{agent_filename}"
standalone_output_file: "{standalone_output_folder}/{agent_filename}.agent.yaml" standalone_output_file: "{standalone_output_folder}/{agent_filename}.agent.yaml"
standalone_info_guide: "{standalone_output_folder}/info-and-installation-guide.md" standalone_info_guide: "{standalone_output_folder}/info-and-installation-guide.md"
config_output_file: "{project-root}/.bmad/\_cfg/agents/{target_module}-{agent_filename}.customize.yaml" config_output_file: "{project-root}/{bmad_folder}/\_cfg/agents/{target_module}-{agent_filename}.customize.yaml"

View File

@ -70,8 +70,10 @@ To collaboratively design the workflow structure, step sequence, and interaction
When designing, you may load these documents as needed: When designing, you may load these documents as needed:
- `{project-root}/{bmad_folder}/bmb/docs/workflows/step-template.md` - Step file structure - `{project-root}/{bmad_folder}/bmb/docs/workflows/templates/step-template.md` - Step file structure
- `{project-root}/{bmad_folder}/bmb/docs/workflows/workflow-template.md` - Workflow configuration - `{project-root}/{bmad_folder}/bmb/docs/workflows/templates/step-01-init-continuable-template.md` - Continuable init step template
- `{project-root}/{bmad_folder}/bmb/docs/workflows/templates/step-1b-template.md` - Continuation step template
- `{project-root}/{bmad_folder}/bmb/docs/workflows/templates/workflow-template.md` - Workflow configuration
- `{project-root}/{bmad_folder}/bmb/docs/workflows/architecture.md` - Architecture principles - `{project-root}/{bmad_folder}/bmb/docs/workflows/architecture.md` - Architecture principles
- `{project-root}/{bmad_folder}/bmb/reference/workflows/meal-prep-nutrition/workflow.md` - Complete example - `{project-root}/{bmad_folder}/bmb/reference/workflows/meal-prep-nutrition/workflow.md` - Complete example
@ -84,10 +86,18 @@ Let's reference our step creation documentation for best practices:
Load and reference step-file architecture guide: Load and reference step-file architecture guide:
``` ```
Read: {project-root}/{bmad_folder}/bmb/docs/workflows/step-template.md Read: {project-root}/{bmad_folder}/bmb/docs/workflows/templates/step-template.md
``` ```
This shows the standard structure for step files. Based on the requirements, collaboratively design: This shows the standard structure for step files. Also reference:
```
Read: {project-root}/{bmad_folder}/bmb/docs/workflows/templates/step-1b-template.md
```
This shows the continuation step pattern for workflows that might take multiple sessions.
Based on the requirements, collaboratively design:
- How many major steps does this workflow need? (Recommend 3-7) - How many major steps does this workflow need? (Recommend 3-7)
- What is the goal of each step? - What is the goal of each step?
@ -95,6 +105,25 @@ This shows the standard structure for step files. Based on the requirements, col
- Should any steps repeat or loop? - Should any steps repeat or loop?
- What are the decision points within steps? - 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 ### 2. Interaction Pattern Design
Design how users will interact with the workflow: Design how users will interact with the workflow:

View File

@ -18,8 +18,10 @@ advancedElicitationTask: '{project-root}/{bmad_folder}/core/tasks/advanced-elici
partyModeWorkflow: '{project-root}/{bmad_folder}/core/workflows/party-mode/workflow.md' partyModeWorkflow: '{project-root}/{bmad_folder}/core/workflows/party-mode/workflow.md'
# Template References # Template References
workflowTemplate: '{project-root}/{bmad_folder}/bmb/docs/workflows/workflow-template.md' workflowTemplate: '{project-root}/{bmad_folder}/bmb/docs/workflows/templates/workflow-template.md'
stepTemplate: '{project-root}/{bmad_folder}/bmb/docs/workflows/step-template.md' stepTemplate: '{project-root}/{bmad_folder}/bmb/docs/workflows/templates/step-template.md'
stepInitContinuableTemplate: '{project-root}/{bmad_folder}/bmb/docs/workflows/templates/step-01-init-continuable-template.md'
step1bTemplate: '{project-root}/{bmad_folder}/bmb/docs/workflows/templates/step-1b-template.md'
contentTemplate: '{workflow_path}/templates/content-template.md' contentTemplate: '{workflow_path}/templates/content-template.md'
buildSummaryTemplate: '{workflow_path}/templates/build-summary.md' buildSummaryTemplate: '{workflow_path}/templates/build-summary.md'
--- ---
@ -70,8 +72,10 @@ To generate all the workflow files (workflow.md, step files, templates, and supp
## BUILD REFERENCE MATERIALS: ## BUILD REFERENCE MATERIALS:
- When building each step file, you must follow template `{project-root}/{bmad_folder}/bmb/docs/workflows/step-template.md` - When building each step file, you must follow template `{project-root}/{bmad_folder}/bmb/docs/workflows/templates/step-template.md`
- When building the main workflow.md file, you must follow template `{project-root}/{bmad_folder}/bmb/docs/workflows/workflow-template.md` - When building continuable step-01-init.md files, use template `{project-root}/{bmad_folder}/bmb/docs/workflows/templates/step-01-init-continuable-template.md`
- When building continuation steps, use template `{project-root}/{bmad_folder}/bmb/docs/workflows/templates/step-1b-template.md`
- When building the main workflow.md file, you must follow template `{project-root}/{bmad_folder}/bmb/docs/workflows/templates/workflow-template.md`
- Example step files from {project-root}/{bmad_folder}/bmb/reference/workflows/meal-prep-nutrition/workflow.md for patterns - Example step files from {project-root}/{bmad_folder}/bmb/reference/workflows/meal-prep-nutrition/workflow.md for patterns
## FILE GENERATION SEQUENCE: ## FILE GENERATION SEQUENCE:
@ -99,6 +103,7 @@ Create the workflow folder structure in the target location:
├── workflow.md ├── workflow.md
├── steps/ ├── steps/
│ ├── step-01-init.md │ ├── step-01-init.md
│ ├── step-01b-continue.md (if continuation support needed)
│ ├── step-02-[name].md │ ├── step-02-[name].md
│ └── ... │ └── ...
├── templates/ ├── templates/
@ -123,7 +128,47 @@ Load and follow {workflowTemplate}:
### 4. Generate Step Files ### 4. Generate Step Files
For each step in the design: #### 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} - Load and follow {stepTemplate}
- Create step file using template structure - Create step file using template structure
@ -131,6 +176,7 @@ For each step in the design:
- Ensure proper frontmatter with path references - Ensure proper frontmatter with path references
- Include appropriate menu handling and universal rules - Include appropriate menu handling and universal rules
- Follow all mandatory rules and protocols from template - Follow all mandatory rules and protocols from template
- **Critical**: Ensure each step updates `stepsCompleted` array when completing
### 5. Generate Templates (If Needed) ### 5. Generate Templates (If Needed)

View File

@ -10,8 +10,8 @@ thisStepFile: '{workflow_path}/steps/step-01-discover-intent.md'
nextStepFile: '{workflow_path}/steps/step-02-analyze-agent.md' nextStepFile: '{workflow_path}/steps/step-02-analyze-agent.md'
# Task References # Task References
advancedElicitationTask: '{project-root}/.bmad/core/tasks/advanced-elicitation.xml' advancedElicitationTask: '{project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml'
partyModeWorkflow: '{project-root}/.bmad/core/workflows/party-mode/workflow.md' partyModeWorkflow: '{project-root}/{bmad_folder}/core/workflows/party-mode/workflow.md'
--- ---
# Step 1: Discover Edit Intent # Step 1: Discover Edit Intent

View File

@ -10,20 +10,20 @@ thisStepFile: '{workflow_path}/steps/step-02-analyze-agent.md'
nextStepFile: '{workflow_path}/steps/step-03-propose-changes.md' nextStepFile: '{workflow_path}/steps/step-03-propose-changes.md'
# Task References # Task References
advancedElicitationTask: '{project-root}/.bmad/core/tasks/advanced-elicitation.xml' advancedElicitationTask: '{project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml'
partyModeWorkflow: '{project-root}/.bmad/core/workflows/party-mode/workflow.md' partyModeWorkflow: '{project-root}/{bmad_folder}/core/workflows/party-mode/workflow.md'
# Documentation References (load JIT based on user goals) # Documentation References (load JIT based on user goals)
understanding_agent_types: '{project-root}/.bmad/bmb/docs/agents/understanding-agent-types.md' understanding_agent_types: '{project-root}/{bmad_folder}/bmb/docs/agents/understanding-agent-types.md'
agent_compilation: '{project-root}/.bmad/bmb/docs/agents/agent-compilation.md' agent_compilation: '{project-root}/{bmad_folder}/bmb/docs/agents/agent-compilation.md'
simple_architecture: '{project-root}/.bmad/bmb/docs/agents/simple-agent-architecture.md' simple_architecture: '{project-root}/{bmad_folder}/bmb/docs/agents/simple-agent-architecture.md'
expert_architecture: '{project-root}/.bmad/bmb/docs/agents/expert-agent-architecture.md' expert_architecture: '{project-root}/{bmad_folder}/bmb/docs/agents/expert-agent-architecture.md'
module_architecture: '{project-root}/.bmad/bmb/docs/agents/module-agent-architecture.md' module_architecture: '{project-root}/{bmad_folder}/bmb/docs/agents/module-agent-architecture.md'
menu_patterns: '{project-root}/.bmad/bmb/docs/agents/agent-menu-patterns.md' menu_patterns: '{project-root}/{bmad_folder}/bmb/docs/agents/agent-menu-patterns.md'
communication_presets: '{project-root}/.bmad/bmb/workflows/create-agent/data/communication-presets.csv' communication_presets: '{project-root}/{bmad_folder}/bmb/workflows/create-agent/data/communication-presets.csv'
reference_simple_agent: '{project-root}/.bmad/bmb/reference/agents/simple-examples/commit-poet.agent.yaml' reference_simple_agent: '{project-root}/{bmad_folder}/bmb/reference/agents/simple-examples/commit-poet.agent.yaml'
reference_expert_agent: '{project-root}/.bmad/bmb/reference/agents/expert-examples/journal-keeper/journal-keeper.agent.yaml' reference_expert_agent: '{project-root}/{bmad_folder}/bmb/reference/agents/expert-examples/journal-keeper/journal-keeper.agent.yaml'
validation: '{project-root}/.bmad/bmb/workflows/create-agent/data/agent-validation-checklist.md' validation: '{project-root}/{bmad_folder}/bmb/workflows/create-agent/data/agent-validation-checklist.md'
--- ---
# Step 2: Analyze Agent # Step 2: Analyze Agent

View File

@ -11,12 +11,12 @@ nextStepFile: '{workflow_path}/steps/step-04-apply-changes.md'
agentFile: '{{agent_path}}' agentFile: '{{agent_path}}'
# Task References # Task References
advancedElicitationTask: '{project-root}/.bmad/core/tasks/advanced-elicitation.xml' advancedElicitationTask: '{project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml'
partyModeWorkflow: '{project-root}/.bmad/core/workflows/party-mode/workflow.md' partyModeWorkflow: '{project-root}/{bmad_folder}/core/workflows/party-mode/workflow.md'
# Documentation References (load JIT if needed) # Documentation References (load JIT if needed)
communication_presets: '{project-root}/.bmad/bmb/workflows/create-agent/data/communication-presets.csv' communication_presets: '{project-root}/{bmad_folder}/bmb/workflows/create-agent/data/communication-presets.csv'
agent_compilation: '{project-root}/.bmad/bmb/docs/agents/agent-compilation.md' agent_compilation: '{project-root}/{bmad_folder}/bmb/docs/agents/agent-compilation.md'
--- ---
# Step 3: Propose Changes # Step 3: Propose Changes

View File

@ -11,8 +11,8 @@ agentFile: '{{agent_path}}'
nextStepFile: '{workflow_path}/steps/step-05-validate.md' nextStepFile: '{workflow_path}/steps/step-05-validate.md'
# Task References # Task References
advancedElicitationTask: '{project-root}/.bmad/core/tasks/advanced-elicitation.xml' advancedElicitationTask: '{project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml'
partyModeWorkflow: '{project-root}/.bmad/core/workflows/party-mode/workflow.md' partyModeWorkflow: '{project-root}/{bmad_folder}/core/workflows/party-mode/workflow.md'
--- ---
# Step 4: Apply Changes # Step 4: Apply Changes

View File

@ -10,12 +10,12 @@ thisStepFile: '{workflow_path}/steps/step-05-validate.md'
agentFile: '{{agent_path}}' agentFile: '{{agent_path}}'
# Task References # Task References
advancedElicitationTask: '{project-root}/.bmad/core/tasks/advanced-elicitation.xml' advancedElicitationTask: '{project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml'
partyModeWorkflow: '{project-root}/.bmad/core/workflows/party-mode/workflow.md' partyModeWorkflow: '{project-root}/{bmad_folder}/core/workflows/party-mode/workflow.md'
# Documentation References (load JIT) # Documentation References (load JIT)
validation: '{project-root}/.bmad/bmb/workflows/create-agent/data/agent-validation-checklist.md' validation: '{project-root}/{bmad_folder}/bmb/workflows/create-agent/data/agent-validation-checklist.md'
agent_compilation: '{project-root}/.bmad/bmb/docs/agents/agent-compilation.md' agent_compilation: '{project-root}/{bmad_folder}/bmb/docs/agents/agent-compilation.md'
--- ---
# Step 5: Validate Changes # Step 5: Validate Changes

View File

@ -11,10 +11,6 @@ nextStepFile: '{workflow_path}/steps/step-02-discover.md'
workflowFile: '{workflow_path}/workflow.md' workflowFile: '{workflow_path}/workflow.md'
outputFile: '{output_folder}/workflow-edit-{target_workflow_name}.md' outputFile: '{output_folder}/workflow-edit-{target_workflow_name}.md'
# Task References
advancedElicitationTask: '{project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml'
partyModeWorkflow: '{project-root}/{bmad_folder}/core/workflows/party-mode/workflow.md'
# Template References # Template References
analysisTemplate: '{workflow_path}/templates/workflow-analysis.md' analysisTemplate: '{workflow_path}/templates/workflow-analysis.md'
--- ---
@ -134,8 +130,8 @@ Based on what the user wants to edit:
Load reference documentation as needed: Load reference documentation as needed:
- `{project-root}/{bmad_folder}/bmb/docs/workflows/architecture.md` - `{project-root}/{bmad_folder}/bmb/docs/workflows/architecture.md`
- `{project-root}/{bmad_folder}/bmb/docs/workflows/step-template.md` - `{project-root}/{bmad_folder}/bmb/docs/workflows/templates/step-template.md`
- `{project-root}/{bmad_folder}/bmb/docs/workflows/workflow-template.md` - `{project-root}/{bmad_folder}/bmb/docs/workflows/templates/workflow-template.md`
Check against best practices: Check against best practices:

View File

@ -69,8 +69,8 @@ To facilitate collaborative improvements to the workflow, working iteratively on
Load documentation as needed for specific improvements: Load documentation as needed for specific improvements:
- `{project-root}/{bmad_folder}/bmb/docs/workflows/step-template.md` - `{project-root}/{bmad_folder}/bmb/docs/workflows/templates/step-template.md`
- `{project-root}/{bmad_folder}/bmb/docs/workflows/workflow-template.md` - `{project-root}/{bmad_folder}/bmb/docs/workflows/templates/workflow-template.md`
- `{project-root}/{bmad_folder}/bmb/docs/workflows/architecture.md` - `{project-root}/{bmad_folder}/bmb/docs/workflows/architecture.md`
### 2. Address Each Improvement Iteratively ### 2. Address Each Improvement Iteratively

View File

@ -15,8 +15,8 @@ complianceReportFile: '{output_folder}/workflow-compliance-report-{workflow_name
complianceReportTemplate: '{workflow_path}/templates/compliance-report.md' complianceReportTemplate: '{workflow_path}/templates/compliance-report.md'
# Documentation References # Documentation References
stepTemplate: '{project-root}/{bmad_folder}/bmb/docs/workflows/step-template.md' stepTemplate: '{project-root}/{bmad_folder}/bmb/docs/workflows/templates/step-template.md'
workflowTemplate: '{project-root}/{bmad_folder}/bmb/docs/workflows/workflow-template.md' workflowTemplate: '{project-root}/{bmad_folder}/bmb/docs/workflows/templates/workflow-template.md'
--- ---
# Step 1: Goal Confirmation and Workflow Target # Step 1: Goal Confirmation and Workflow Target

View File

@ -16,8 +16,8 @@ targetWorkflowFile: '{target_workflow_path}'
complianceReportTemplate: '{workflow_path}/templates/compliance-report.md' complianceReportTemplate: '{workflow_path}/templates/compliance-report.md'
# Documentation References # Documentation References
stepTemplate: '{project-root}/{bmad_folder}/bmb/docs/workflows/step-template.md' stepTemplate: '{project-root}/{bmad_folder}/bmb/docs/workflows/templates/step-template.md'
workflowTemplate: '{project-root}/{bmad_folder}/bmb/docs/workflows/workflow-template.md' workflowTemplate: '{project-root}/{bmad_folder}/bmb/docs/workflows/templates/workflow-template.md'
--- ---
# Step 2: Workflow.md Validation # Step 2: Workflow.md Validation

View File

@ -16,8 +16,8 @@ targetWorkflowStepsPath: '{target_workflow_steps_path}'
complianceReportTemplate: '{workflow_path}/templates/compliance-report.md' complianceReportTemplate: '{workflow_path}/templates/compliance-report.md'
# Documentation References # Documentation References
stepTemplate: '{project-root}/{bmad_folder}/bmb/docs/workflows/step-template.md' stepTemplate: '{project-root}/{bmad_folder}/bmb/docs/workflows/templates/step-template.md'
workflowTemplate: '{project-root}/{bmad_folder}/bmb/docs/workflows/workflow-template.md' workflowTemplate: '{project-root}/{bmad_folder}/bmb/docs/workflows/templates/workflow-template.md'
--- ---
# Step 3: Step-by-Step Validation # Step 3: Step-by-Step Validation

View File

@ -16,8 +16,8 @@ targetWorkflowPath: '{target_workflow_path}'
complianceReportTemplate: '{workflow_path}/templates/compliance-report.md' complianceReportTemplate: '{workflow_path}/templates/compliance-report.md'
# Documentation References # Documentation References
stepTemplate: '{project-root}/{bmad_folder}/bmb/docs/workflows/step-template.md' stepTemplate: '{project-root}/{bmad_folder}/bmb/docs/workflows/templates/step-template.md'
workflowTemplate: '{project-root}/{bmad_folder}/bmb/docs/workflows/workflow-template.md' workflowTemplate: '{project-root}/{bmad_folder}/bmb/docs/workflows/templates/workflow-template.md'
csvStandards: '{project-root}/{bmad_folder}/bmb/docs/workflows/csv-data-file-standards.md' csvStandards: '{project-root}/{bmad_folder}/bmb/docs/workflows/csv-data-file-standards.md'
--- ---

View File

@ -16,8 +16,8 @@ targetWorkflowPath: '{target_workflow_path}'
complianceReportTemplate: '{workflow_path}/templates/compliance-report.md' complianceReportTemplate: '{workflow_path}/templates/compliance-report.md'
# Documentation References # Documentation References
stepTemplate: '{project-root}/{bmad_folder}/bmb/docs/workflows/step-template.md' stepTemplate: '{project-root}/{bmad_folder}/bmb/docs/workflows/templates/step-template.md'
workflowTemplate: '{project-root}/{bmad_folder}/bmb/docs/workflows/workflow-template.md' workflowTemplate: '{project-root}/{bmad_folder}/bmb/docs/workflows/templates/workflow-template.md'
intentSpectrum: '{project-root}/{bmad_folder}/bmb/docs/workflows/intent-vs-prescriptive-spectrum.md' intentSpectrum: '{project-root}/{bmad_folder}/bmb/docs/workflows/intent-vs-prescriptive-spectrum.md'
--- ---

View File

@ -16,8 +16,8 @@ targetWorkflowStepsPath: '{target_workflow_steps_path}'
complianceReportTemplate: '{workflow_path}/templates/compliance-report.md' complianceReportTemplate: '{workflow_path}/templates/compliance-report.md'
# Documentation References # Documentation References
stepTemplate: '{project-root}/{bmad_folder}/bmb/docs/workflows/step-template.md' stepTemplate: '{project-root}/{bmad_folder}/bmb/docs/workflows/templates/step-template.md'
workflowTemplate: '{project-root}/{bmad_folder}/bmb/docs/workflows/workflow-template.md' workflowTemplate: '{project-root}/{bmad_folder}/bmb/docs/workflows/templates/workflow-template.md'
intentSpectrum: '{project-root}/{bmad_folder}/bmb/docs/workflows/intent-vs-prescriptive-spectrum.md' intentSpectrum: '{project-root}/{bmad_folder}/bmb/docs/workflows/intent-vs-prescriptive-spectrum.md'
--- ---

View File

@ -16,8 +16,8 @@ targetWorkflowFile: '{target_workflow_path}'
complianceReportTemplate: '{workflow_path}/templates/compliance-report.md' complianceReportTemplate: '{workflow_path}/templates/compliance-report.md'
# Documentation References # Documentation References
stepTemplate: '{project-root}/{bmad_folder}/bmb/docs/workflows/step-template.md' stepTemplate: '{project-root}/{bmad_folder}/bmb/docs/workflows/templates/step-template.md'
workflowTemplate: '{project-root}/{bmad_folder}/bmb/docs/workflows/workflow-template.md' workflowTemplate: '{project-root}/{bmad_folder}/bmb/docs/workflows/templates/workflow-template.md'
intentSpectrum: '{project-root}/{bmad_folder}/bmb/docs/workflows/intent-vs-prescriptive-spectrum.md' intentSpectrum: '{project-root}/{bmad_folder}/bmb/docs/workflows/intent-vs-prescriptive-spectrum.md'
--- ---

View File

@ -15,8 +15,8 @@ targetWorkflowFile: '{target_workflow_path}'
complianceReportTemplate: '{workflow_path}/templates/compliance-report.md' complianceReportTemplate: '{workflow_path}/templates/compliance-report.md'
# Documentation References # Documentation References
stepTemplate: '{project-root}/{bmad_folder}/bmb/docs/workflows/step-template.md' stepTemplate: '{project-root}/{bmad_folder}/bmb/docs/workflows/templates/step-template.md'
workflowTemplate: '{project-root}/{bmad_folder}/bmb/docs/workflows/workflow-template.md' workflowTemplate: '{project-root}/{bmad_folder}/bmb/docs/workflows/templates/workflow-template.md'
--- ---
# Step 8: Comprehensive Compliance Report Generation # Step 8: Comprehensive Compliance Report Generation

View File

@ -12,8 +12,8 @@ workflowFile: '{workflow_path}/workflow.md'
outputFile: '{output_folder}/analysis/product-brief-{{project_name}}-{{date}}.md' outputFile: '{output_folder}/analysis/product-brief-{{project_name}}-{{date}}.md'
# Task References # Task References
advancedElicitationTask: '{project-root}/.bmad/core/tasks/advanced-elicitation.xml' advancedElicitationTask: '{project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml'
partyModeWorkflow: '{project-root}/.bmad/core/workflows/party-mode/workflow.md' partyModeWorkflow: '{project-root}/{bmad_folder}/core/workflows/party-mode/workflow.md'
--- ---
# Step 2: Product Vision Discovery # Step 2: Product Vision Discovery

View File

@ -12,8 +12,8 @@ workflowFile: '{workflow_path}/workflow.md'
outputFile: '{output_folder}/analysis/product-brief-{{project_name}}-{{date}}.md' outputFile: '{output_folder}/analysis/product-brief-{{project_name}}-{{date}}.md'
# Task References # Task References
advancedElicitationTask: '{project-root}/.bmad/core/tasks/advanced-elicitation.xml' advancedElicitationTask: '{project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml'
partyModeWorkflow: '{project-root}/.bmad/core/workflows/party-mode/workflow.md' partyModeWorkflow: '{project-root}/{bmad_folder}/core/workflows/party-mode/workflow.md'
--- ---
# Step 3: Target Users Discovery # Step 3: Target Users Discovery

View File

@ -12,8 +12,8 @@ workflowFile: '{workflow_path}/workflow.md'
outputFile: '{output_folder}/analysis/product-brief-{{project_name}}-{{date}}.md' outputFile: '{output_folder}/analysis/product-brief-{{project_name}}-{{date}}.md'
# Task References # Task References
advancedElicitationTask: '{project-root}/.bmad/core/tasks/advanced-elicitation.xml' advancedElicitationTask: '{project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml'
partyModeWorkflow: '{project-root}/.bmad/core/workflows/party-mode/workflow.md' partyModeWorkflow: '{project-root}/{bmad_folder}/core/workflows/party-mode/workflow.md'
--- ---
# Step 4: Success Metrics Definition # Step 4: Success Metrics Definition

View File

@ -12,8 +12,8 @@ workflowFile: '{workflow_path}/workflow.md'
outputFile: '{output_folder}/analysis/product-brief-{{project_name}}-{{date}}.md' outputFile: '{output_folder}/analysis/product-brief-{{project_name}}-{{date}}.md'
# Task References # Task References
advancedElicitationTask: '{project-root}/.bmad/core/tasks/advanced-elicitation.xml' advancedElicitationTask: '{project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml'
partyModeWorkflow: '{project-root}/.bmad/core/workflows/party-mode/workflow.md' partyModeWorkflow: '{project-root}/{bmad_folder}/core/workflows/party-mode/workflow.md'
--- ---
# Step 5: MVP Scope Definition # Step 5: MVP Scope Definition

View File

@ -1,80 +0,0 @@
# {{project_name}} - Epic Breakdown
**Author:** {{user_name}}
**Date:** {{date}}
**Project Level:** {{project_level}}
**Target Scale:** {{target_scale}}
---
## Overview
This document provides the complete epic and story breakdown for {{project_name}}, decomposing the requirements from the [PRD](./PRD.md) into implementable stories.
**Living Document Notice:** This is the initial version. It will be updated after UX Design and Architecture workflows add interaction and technical details to stories.
{{epics_summary}}
---
## Functional Requirements Inventory
{{fr_inventory}}
---
## FR Coverage Map
{{fr_coverage_map}}
---
<!-- Repeat for each epic (N = 1, 2, 3...) -->
## Epic {{N}}: {{epic_title_N}}
{{epic_goal_N}}
<!-- Repeat for each story (M = 1, 2, 3...) within epic N -->
### Story {{N}}.{{M}}: {{story_title_N_M}}
As a {{user_type}},
I want {{capability}},
So that {{value_benefit}}.
**Acceptance Criteria:**
**Given** {{precondition}}
**When** {{action}}
**Then** {{expected_outcome}}
**And** {{additional_criteria}}
**Prerequisites:** {{dependencies_on_previous_stories}}
**Technical Notes:** {{implementation_guidance}}
<!-- End story repeat -->
---
<!-- End epic repeat -->
---
## FR Coverage Matrix
{{fr_coverage_matrix}}
---
## Summary
{{epic_breakdown_summary}}
---
_For implementation: Use the `create-story` workflow to generate individual story implementation plans from this epic breakdown._
_This document will be updated after UX Design and Architecture workflows to incorporate interaction details and technical decisions._

View File

@ -1,387 +0,0 @@
# Epic and Story Creation with Full Technical Context
<critical>The workflow execution engine is governed by: {project-root}/{bmad_folder}/core/tasks/workflow.xml</critical>
<critical>You MUST have already loaded and processed: {installed_path}/workflow.yaml</critical>
<critical>PREREQUISITES: PRD.md AND Architecture.md MUST be completed before running this workflow</critical>
<critical>UX Design.md is highly recommended if the product has user interfaces</critical>
<critical>EVERY story must be completable by a single dev agent in one focused session</critical>
<critical>⚠️ EPIC STRUCTURE PRINCIPLE: Each epic MUST deliver USER VALUE, not just technical capability. Epics are NOT organized by technical layers (database, API, frontend). Each epic should result in something USERS can actually use or benefit from. Exception: Foundation/setup stories at the start of first epic are acceptable.</critical>
<critical>Communicate all responses in {communication_language} and adapt to {user_skill_level}</critical>
<critical>Generate all documents in {document_output_language}</critical>
<critical>LIVING DOCUMENT: Write to epics.md continuously as you work - never wait until the end</critical>
<critical>Input documents specified in workflow.yaml input_file_patterns - workflow engine handles fuzzy matching, whole vs sharded document discovery automatically</critical>
<critical>⚠️ ABSOLUTELY NO TIME ESTIMATES - NEVER mention hours, days, weeks, months, or ANY time-based predictions. AI has fundamentally changed development speed - what once took teams weeks/months can now be done by one person in hours. DO NOT give ANY time estimates whatsoever.</critical>
<critical>⚠️ CHECKPOINT PROTOCOL: After EVERY <template-output> tag, you MUST follow workflow.xml substep 2c: SAVE content to file immediately → SHOW checkpoint separator (━━━━━━━━━━━━━━━━━━━━━━━) → DISPLAY generated content → PRESENT options [a]Advanced Elicitation/[c]Continue/[p]Party-Mode/[y]YOLO → WAIT for user response. Never batch saves or skip checkpoints.</critical>
<workflow>
<step n="0" goal="Validate prerequisites and load all context">
<action>Welcome {user_name} to comprehensive epic and story creation</action>
<action>**CRITICAL PREREQUISITE VALIDATION:**</action>
<action>Verify required documents exist and are complete:
1. **PRD.md** - Contains functional requirements (FRs) and product scope
2. **Architecture.md** - Contains technical decisions, API contracts, data models
3. **UX Design.md** (if UI exists) - Contains interaction patterns, mockups, user flows
Missing any required document means this workflow cannot proceed successfully.</action>
<check if="!prd_content">
<output>❌ **PREREQUISITE FAILED: PRD.md not found**
The PRD is required to define what functionality needs to be built.
Please complete the PRD workflow first, then run this workflow again.</output>
<exit workflow="Missing required PRD document"/>
</check>
<check if="!architecture_content">
<output>❌ **PREREQUISITE FAILED: Architecture.md not found**
The Architecture document is required to provide technical implementation context for stories.
Please complete the Architecture workflow first, then run this workflow again.</output>
<exit workflow="Missing required Architecture document"/>
</check>
<action>List the documents loaded</action>
<action>**LOAD ALL CONTEXT DOCUMENTS:**</action>
<action>Load and analyze PRD.md:
Extract ALL functional requirements:
- Complete FR inventory (FR1, FR2, FR3...)
- Non-functional requirements and constraints
- Project scope boundaries (MVP vs growth vs vision)
- User types and their goals
- Success criteria
- Technical constraints
- Compliance requirements
**FR Inventory Creation:**
List every functional requirement with description for coverage tracking.
</action>
<action>Load and analyze Architecture.md:
Extract ALL technical implementation context relevant to the PRD functional requirements and project needs:
Scan comprehensively for any technical details needed to create complete user stories, including but not limited to:
- Technology stack decisions and framework choices
- API design, contracts, and integration patterns
- Data models, schemas, and relationships
- Authentication, authorization, and security patterns
- Performance requirements and scaling approaches
- Error handling, logging, and monitoring strategies
- Deployment architecture and infrastructure considerations
- Any other technical decisions, patterns, or constraints that impact implementation
Focus on extracting whatever technical context exists in the Architecture document that will be needed to create comprehensive, actionable user stories for all PRD requirements.
</action>
<action if="UX Design Exists">
Load and analyze UX Design.md:
Extract ALL user experience context relevant to the PRD functional requirements and project needs:
Scan comprehensively for any user experience details needed to create complete user stories, including but not limited to:
- User flows, journey patterns, and interaction design
- Screen layouts, components, and visual specifications
- Interaction patterns, behaviors, and micro-interactions
- Responsive design and mobile-first considerations
- Accessibility requirements and inclusive design patterns
- Animations, transitions, and feedback mechanisms
- Error states, validation patterns, and user guidance
- Any other UX/UI decisions, patterns, or specifications that impact implementation
Focus on extracting whatever user experience context exists in the UX document that will be needed to create comprehensive, actionable user stories for all PRD requirements.
</action>
<template-output>context_validation</template-output>
<template-output>fr_inventory</template-output>
</step>
<step n="1" goal="Design epic structure with full technical context">
<action>**STRATEGIC EPIC PLANNING WITH COMPLETE CONTEXT:**</action>
<action>Now that you have ALL available context (PRD + Architecture + UX), design epics that deliver incremental user value while leveraging the technical design decisions.
**EPIC DESIGN PRINCIPLES:**
1. **User-Value First**: Each epic must enable users to accomplish something meaningful
2. **Leverage Architecture**: Build upon the technical decisions already made
3. **Incremental Delivery**: Each epic should be independently valuable
4. **Logical Dependencies**: Dependencies should flow naturally, not artificially
**USE YOUR FULL CONTEXT:**
From PRD: Group related functional requirements that deliver user outcomes
From Architecture: Respect technical boundaries and integration points
From UX: Design around user journeys and interaction flows
**VALID EPIC EXAMPLES:**
✅ **CORRECT - User Value with Technical Context:**
- Epic 1: Foundation Setup (infrastructure, deployment, core services)
- Epic 2: User Authentication & Profile Management (register, login, profile management)
- Epic 3: Content Creation & Management (create, edit, publish, organize content)
- Epic 4: Content Discovery & Interaction (browse, search, share, comment)
❌ **WRONG - Technical Layer Breakdown:**
- Epic 1: Database Schema & Models
- Epic 2: REST API Endpoints
- Epic 3: Frontend Components
- Epic 4: Authentication Service
**PRESENT YOUR EPIC STRUCTURE:**
For each proposed epic, provide:
- **Epic Title**: Value-based, not technical
- **User Value Statement**: What users can accomplish after this epic
- **PRD Coverage**: Which FRs this epic addresses
- **Technical Context**: How this leverages Architecture decisions
- **UX Integration**: How this incorporates user experience patterns (if available)
- **Dependencies**: What must come before (natural dependencies only)
**FOUNDATION EPIC GUIDELINES:**
For Epic 1, include technical foundation based on Architecture:
- Project setup and build system
- Core infrastructure and deployment pipeline
- Database schema setup
- Basic authentication foundation
- API framework setup
This enables all subsequent user-facing epics.
</action>
<template-output>epics_structure_plan</template-output>
<template-output>epics_technical_context</template-output>
</step>
<step n="2" goal="Create detailed stories with complete implementation context" repeat="for-each-epic">
<action>**EPIC {{N}} - COMPREHENSIVE STORY CREATION:**</action>
<action>For Epic {{N}}: {{epic_title}}, create bite-sized stories that incorporate ALL available context.
**STORY CREATION WITH FULL CONTEXT:**
For each story, you now have the complete picture:
- **WHAT to build** (from PRD FRs)
- **HOW to build it** (from Architecture decisions)
- **HOW users interact** (from UX patterns, if available)
**TRANSFORM STRATEGIC REQUIREMENTS INTO TACTICAL IMPLEMENTATION:**
PRD says: "Users can create accounts"
Architecture says: "Use PostgreSQL with bcrypt hashing, JWT tokens, rate limiting"
UX says: "Modal dialog with email/password fields, real-time validation, loading states"
Your story becomes: Specific implementation details with exact acceptance criteria
**STORY PATTERN FOR EACH EPIC {{N}}:**
**Epic Goal:** {{epic_goal}}
For each story M in Epic {{N}}:
- **User Story**: As a [user type], I want [specific capability], So that [value/benefit]
- **Acceptance Criteria**: BDD format with COMPLETE implementation details
- **Technical Implementation**: Specific guidance from Architecture
- **User Experience**: Exact interaction patterns from UX (if available)
- **Prerequisites**: Only previous stories, never forward dependencies
**DETAILED ACCEPTANCE CRITERIA GUIDELINES:**
Include ALL implementation specifics:
**From Architecture:**
- Exact API endpoints and contracts
- Database operations and validations
- Authentication/authorization requirements
- Error handling patterns
- Performance requirements
- Security considerations
- Integration points with other systems
**From UX (if available):**
- Specific screen/page references
- Interaction patterns and behaviors
- Form validation rules and error messages
- Responsive behavior
- Accessibility requirements
- Loading states and transitions
- Success/error feedback patterns
**From PRD:**
- Business rules and constraints
- User types and permissions
- Compliance requirements
- Success criteria
**STORY SIZING PRINCIPLE:**
Each story must be completable by a single dev agent in one focused session. If a story becomes too large, break it down further while maintaining user value.
**EXAMPLE RICH STORY:**
**Story:** User Registration with Email Verification
As a new user, I want to create an account using my email address, So that I can access the platform's features.
**Acceptance Criteria:**
Given I am on the landing page
When I click the "Sign Up" button
Then the registration modal opens (UX Mockup 3.2)
And I see email and password fields with proper labels
And the email field validates RFC 5322 format in real-time
And the password field shows strength meter (red→yellow→green)
And I see "Password must be 8+ chars with 1 uppercase, 1 number, 1 special"
When I submit valid registration data
Then POST /api/v1/auth/register is called (Architecture section 4.1)
And the user record is created in users table with bcrypt hash (Architecture 6.2)
And a verification email is sent via SendGrid (Architecture 7.3)
And I see "Check your email for verification link" message
And I cannot log in until email is verified
**Technical Notes:**
- Use PostgreSQL users table (Architecture section 6.2)
- Implement rate limiting: 3 attempts per hour per IP (Architecture 8.1)
- Return JWT token on successful verification (Architecture 5.2)
- Log registration events to audit_events table (Architecture 9.4)
- Form validation follows UX Design patterns (UX section 4.1)
**Prerequisites:** Epic 1.1 - Foundation Setup Complete
</action>
<action>**Generate all stories for Epic {{N}}**</action>
<template-output>epic*title*{{N}}</template-output>
<template-output>epic*goal*{{N}}</template-output>
<action>For each story M in epic {{N}}, generate story content</action>
<template-output>story*{{N}}*{{M}}</template-output>
<action>**EPIC {{N}} COMPLETION REVIEW:**</action>
<output>**Epic {{N}} Complete: {{epic_title}}**
Stories Created: {{count}}
**FR Coverage:** {{list of FRs covered by this epic}}
**Technical Context Used:** {{Architecture sections referenced}}
{{if ux_design_content}}
**UX Patterns Incorporated:** {{UX sections referenced}}
{{/if}}
Ready for checkpoint validation.</output>
<template-output>epic\_{{N}}\_complete</template-output>
</step>
<step n="3" goal="Final validation and coverage matrix">
<action>**COMPREHENSIVE VALIDATION WITH FULL CONTEXT:**</action>
<action>Review the complete epic and story breakdown for quality and completeness using ALL available context.
**FR COVERAGE VALIDATION:**
Create complete FR Coverage Matrix showing every PRD functional requirement mapped to specific stories:
- **FR1:** [description] → Epic X, Story X.Y (with implementation details)
- **FR2:** [description] → Epic Y, Story Y.A (with implementation details)
- **FR3:** [description] → Epic Z, Story Z.B (with implementation details)
- ...
**CRITICAL VALIDATION:** Every single FR from the PRD must be covered by at least one story with complete acceptance criteria.
**ARCHITECTURE INTEGRATION VALIDATION:**
Verify that Architecture decisions are properly implemented:
- All API endpoints from Architecture are covered in stories
- Data models from Architecture are properly created and populated
- Authentication/authorization patterns are consistently applied
- Performance requirements are addressed in relevant stories
- Security measures are implemented where required
- Error handling follows Architecture patterns
- Integration points between systems are properly handled
**UX INTEGRATION VALIDATION** {{if ux_design_content}}:
Verify that UX design patterns are properly implemented:
- User flows follow the designed journey
- Screen layouts and components match specifications
- Interaction patterns work as designed
- Responsive behavior matches breakpoints
- Accessibility requirements are met
- Error states and feedback patterns are implemented
- Form validation follows UX guidelines
- Loading states and transitions are implemented
{{/if}}
**STORY QUALITY VALIDATION:**
- All stories are sized for single dev agent completion
- Acceptance criteria are specific and testable
- Technical implementation guidance is clear
- User experience details are incorporated
- No forward dependencies exist
- Epic sequence delivers incremental value
- Foundation epic properly enables subsequent work
**FINAL QUALITY CHECK:**
Answer these critical questions:
1. **User Value:** Does each epic deliver something users can actually do/use?
2. **Completeness:** Are ALL PRD functional requirements covered?
3. **Technical Soundness:** Do stories properly implement Architecture decisions?
4. **User Experience:** {{if ux_design_content}} Do stories follow UX design patterns? {{/if}}
5. **Implementation Ready:** Can dev agents implement these stories autonomously?
</action>
<output>**✅ EPIC AND STORY CREATION COMPLETE**
**Output Generated:** epics.md with comprehensive implementation details
**Full Context Incorporated:**
- ✅ PRD functional requirements and scope
- ✅ Architecture technical decisions and contracts
{{if ux_design_content}}
- ✅ UX Design interaction patterns and specifications
{{/if}}
**FR Coverage:** {{count}} functional requirements mapped to {{story_count}} stories
**Epic Structure:** {{epic_count}} epics delivering incremental user value
**Ready for Phase 4:** Sprint Planning and Development Implementation
</output>
<template-output>final_validation</template-output>
<template-output>fr_coverage_matrix</template-output>
</step>
</workflow>

View File

@ -0,0 +1,258 @@
---
name: 'step-01-validate-prerequisites'
description: 'Validate required documents exist and extract all requirements for epic and story creation'
# Path Definitions
workflow_path: '{project-root}/{bmad_folder}/bmm/workflows/3-solutioning/create-epics-and-stories'
# File References
thisStepFile: '{workflow_path}/steps/step-01-validate-prerequisites.md'
nextStepFile: '{workflow_path}/steps/step-02-design-epics.md'
workflowFile: '{workflow_path}/workflow.md'
outputFile: '{output_folder}/epics.md'
epicsTemplate: '{workflow_path}/templates/epics-template.md'
# Task References
advancedElicitationTask: '{project-root}/.bmad/core/tasks/advanced-elicitation.xml'
partyModeWorkflow: '{project-root}/.bmad/core/workflows/party-mode/workflow.md'
# Template References
epicsTemplate: '{workflow_path}/templates/epics-template.md'
---
# Step 1: Validate Prerequisites and Extract Requirements
## STEP GOAL:
To validate that all required input documents exist and extract all requirements (FRs, NFRs, and additional requirements from UX/Architecture) needed for epic and story creation.
## 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 product strategist and technical specifications writer
- ✅ 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 requirements extraction expertise
- ✅ User brings their product vision and context
### Step-Specific Rules:
- 🎯 Focus ONLY on extracting and organizing requirements
- 🚫 FORBIDDEN to start creating epics or stories in this step
- 💬 Extract requirements from ALL available documents
- 🚪 POPULATE the template sections exactly as needed
## EXECUTION PROTOCOLS:
- 🎯 Extract requirements systematically from all documents
- 💾 Populate {outputFile} with extracted requirements
- 📖 Update frontmatter with extraction progress
- 🚫 FORBIDDEN to load next step until user selects 'C' and requirements are extracted
## REQUIREMENTS EXTRACTION PROCESS:
### 1. Welcome and Overview
Welcome {user_name} to comprehensive epic and story creation!
**CRITICAL PREREQUISITE VALIDATION:**
Verify required documents exist and are complete:
1. **PRD.md** - Contains requirements (FRs and NFRs) and product scope
2. **Architecture.md** - Contains technical decisions, API contracts, data models
3. **UX Design.md** (if UI exists) - Contains interaction patterns, mockups, user flows
### 2. Document Discovery and Validation
Search for required documents using these patterns (sharded means a large document was split into multiple small files with an index.md into a folder) - if the whole document is found, use that instead of the sharded version:
**PRD Document Search Priority:**
1. `{output_folder}/*prd*.md` (whole document)
2. `{output_folder}/*prd*/index.md` (sharded version)
**Architecture Document Search Priority:**
1. `{output_folder}/*architecture*.md` (whole document)
2. `{output_folder}/*architecture*/index.md` (sharded version)
**UX Design Document Search (Optional):**
1. `{output_folder}/*ux*.md` (whole document)
2. `{output_folder}/*ux*/index.md` (sharded version)
Ask the user if there are any other documents, or if what you have found is all there is [Yes/No]. Wait for user confirmation. Once confirmed, create the {outputFile} from the {epicsTemplate} and in the front matter list the files in the array of `inputDocuments: []`.
### 3. Extract Functional Requirements (FRs)
From the PRD document (full or sharded), extract ALL functional requirements:
**Extraction Method:**
- Look for numbered items like "FR1:", "Functional Requirement 1:", or similar
- Identify requirement statements that describe what the system must DO
- Include user actions, system behaviors, and business rules
**Format the FR list as:**
```
FR1: [Clear, testable requirement description]
FR2: [Clear, testable requirement description]
...
```
### 4. Extract Non-Functional Requirements (NFRs)
From the PRD document, extract ALL non-functional requirements:
**Extraction Method:**
- Look for performance, security, usability, reliability requirements
- Identify constraints and quality attributes
- Include technical standards and compliance requirements
**Format the NFR list as:**
```
NFR1: [Performance/Security/Usability requirement]
NFR2: [Performance/Security/Usability requirement]
...
```
### 5. Extract Additional Requirements from Architecture
Review the Architecture document for technical requirements that impact epic and story creation:
**Look for:**
- **Starter Template**: Does Architecture specify a starter/greenfield template? If YES, document this for Epic 1 Story 1
- Infrastructure and deployment requirements
- Integration requirements with external systems
- Data migration or setup requirements
- Monitoring and logging requirements
- API versioning or compatibility requirements
- Security implementation requirements
**IMPORTANT**: If a starter template is mentioned in Architecture, note it prominently. This will impact Epic 1 Story 1.
**Format Additional Requirements as:**
```
- [Technical requirement from Architecture that affects implementation]
- [Infrastructure setup requirement]
- [Integration requirement]
...
```
### 6. Extract Additional Requirements from UX (if exists)
Review the UX document for requirements that affect epic and story creation:
**Look for:**
- Responsive design requirements
- Accessibility requirements
- Browser/device compatibility
- User interaction patterns that need implementation
- Animation or transition requirements
- Error handling UX requirements
**Add these to Additional Requirements list.**
### 7. Load and Initialize Template
Load {epicsTemplate} and initialize {outputFile}:
1. Copy the entire template to {outputFile}
2. Replace {{project_name}} with the actual project name
3. Replace placeholder sections with extracted requirements:
- {{fr_list}} → extracted FRs
- {{nfr_list}} → extracted NFRs
- {{additional_requirements}} → extracted additional requirements
4. Leave {{requirements_coverage_map}} and {{epics_list}} as placeholders for now
### 8. Present Extracted Requirements
Display to user:
**Functional Requirements Extracted:**
- Show count of FRs found
- Display the first few FRs as examples
- Ask if any FRs are missing or incorrectly captured
**Non-Functional Requirements Extracted:**
- Show count of NFRs found
- Display key NFRs
- Ask if any constraints were missed
**Additional Requirements:**
- Summarize technical requirements from Architecture
- Summarize UX requirements (if applicable)
- Verify completeness
### 9. Get User Confirmation
Ask: "Do these extracted requirements accurately represent what needs to be built? Any additions or corrections?"
Update the requirements based on user feedback until confirmation is received.
## CONTENT TO SAVE TO DOCUMENT:
After extraction and confirmation, update {outputFile} with:
- Complete FR list in {{fr_list}} section
- Complete NFR list in {{nfr_list}} section
- All additional requirements in {{additional_requirements}} section
### 10. Present MENU OPTIONS
Display: `**Confirm the Requirements are complete and correct to [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 option
#### Menu Handling Logic:
- IF C: Save all to {outputFile}, update frontmatter, only 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 all requirements are saved to document and frontmatter is updated, will you then load, read entire file, then execute {nextStepFile} to execute and begin epic design step.
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- All required documents found and validated
- All FRs extracted and formatted correctly
- All NFRs extracted and formatted correctly
- Additional requirements from Architecture/UX identified
- Template initialized with requirements
- User confirms requirements are complete and accurate
### ❌ SYSTEM FAILURE:
- Missing required documents
- Incomplete requirements extraction
- Template not properly initialized
- Not saving requirements to output file
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.

View File

@ -0,0 +1,232 @@
---
name: 'step-02-design-epics'
description: 'Design and approve the epics_list that will organize all requirements into user-value-focused epics'
# Path Definitions
workflow_path: '{project-root}/{bmad_folder}/bmm/workflows/3-solutioning/create-epics-and-stories'
# File References
thisStepFile: '{workflow_path}/steps/step-02-design-epics.md'
nextStepFile: '{workflow_path}/steps/step-03-create-stories.md'
workflowFile: '{workflow_path}/workflow.md'
outputFile: '{output_folder}/epics.md'
# Task References
advancedElicitationTask: '{project-root}/.bmad/core/tasks/advanced-elicitation.xml'
partyModeWorkflow: '{project-root}/.bmad/core/workflows/party-mode/workflow.md'
# Template References
epicsTemplate: '{workflow_path}/templates/epics-template.md'
---
# Step 2: Design Epic List
## STEP GOAL:
To design and get approval for the epics_list that will organize all requirements into user-value-focused epics.
## 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 product strategist and technical specifications writer
- ✅ 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 product strategy and epic design expertise
- ✅ User brings their product vision and priorities
### Step-Specific Rules:
- 🎯 Focus ONLY on creating the epics_list
- 🚫 FORBIDDEN to create individual stories in this step
- 💬 Organize epics around user value, not technical layers
- 🚪 GET explicit approval for the epics_list
- 🔗 **CRITICAL: Each epic must be standalone and enable future epics without requiring future epics to function**
## EXECUTION PROTOCOLS:
- 🎯 Design epics collaboratively based on extracted requirements
- 💾 Update {{epics_list}} in {outputFile}
- 📖 Document the FR coverage mapping
- 🚫 FORBIDDEN to load next step until user approves epics_list
## EPIC DESIGN PROCESS:
### 1. Review Extracted Requirements
Load {outputFile} and review:
- **Functional Requirements:** Count and review FRs from Step 1
- **Non-Functional Requirements:** Review NFRs that need to be addressed
- **Additional Requirements:** Review technical and UX requirements
### 2. Explain Epic Design Principles
**EPIC DESIGN PRINCIPLES:**
1. **User-Value First**: Each epic must enable users to accomplish something meaningful
2. **Requirements Grouping**: Group related FRs that deliver cohesive user outcomes
3. **Incremental Delivery**: Each epic should deliver value independently
4. **Logical Flow**: Natural progression from user's perspective
5. **🔗 Dependency-Free Within Epic**: Stories within an epic must NOT depend on future stories
**⚠️ CRITICAL PRINCIPLE:**
Organize by USER VALUE, not technical layers:
**✅ CORRECT Epic Examples (Standalone & Enable Future Epics):**
- Epic 1: User Authentication & Profiles (users can register, login, manage profiles) - **Standalone: Complete auth system**
- Epic 2: Content Creation (users can create, edit, publish content) - **Standalone: Uses auth, creates content**
- Epic 3: Social Interaction (users can follow, comment, like content) - **Standalone: Uses auth + content**
- Epic 4: Search & Discovery (users can find content and other users) - **Standalone: Uses all previous**
**❌ WRONG Epic Examples (Technical Layers or Dependencies):**
- Epic 1: Database Setup (creates all tables upfront) - **No user value**
- Epic 2: API Development (builds all endpoints) - **No user value**
- Epic 3: Frontend Components (creates reusable components) - **No user value**
- Epic 4: Deployment Pipeline (CI/CD setup) - **No user value**
**🔗 DEPENDENCY RULES:**
- Each epic must deliver COMPLETE functionality for its domain
- Epic 2 must not require Epic 3 to function
- Epic 3 can build upon Epic 1 & 2 but must stand alone
### 3. Design Epic Structure Collaboratively
**Step A: Identify User Value Themes**
- Look for natural groupings in the FRs
- Identify user journeys or workflows
- Consider user types and their goals
**Step B: Propose Epic Structure**
For each proposed epic:
1. **Epic Title**: User-centric, value-focused
2. **User Outcome**: What users can accomplish after this epic
3. **FR Coverage**: Which FR numbers this epic addresses
4. **Implementation Notes**: Any technical or UX considerations
**Step C: Create the epics_list**
Format the epics_list as:
```
## Epic List
### Epic 1: [Epic Title]
[Epic goal statement - what users can accomplish]
**FRs covered:** FR1, FR2, FR3, etc.
### Epic 2: [Epic Title]
[Epic goal statement - what users can accomplish]
**FRs covered:** FR4, FR5, FR6, etc.
[Continue for all epics]
```
### 4. Present Epic List for Review
Display the complete epics_list to user with:
- Total number of epics
- FR coverage per epic
- User value delivered by each epic
- Any natural dependencies
### 5. Create Requirements Coverage Map
Create {{requirements_coverage_map}} showing how each FR maps to an epic:
```
### FR Coverage Map
FR1: Epic 1 - [Brief description]
FR2: Epic 1 - [Brief description]
FR3: Epic 2 - [Brief description]
...
```
This ensures no FRs are missed.
### 6. Collaborative Refinement
Ask user:
- "Does this epic structure align with your product vision?"
- "Are all user outcomes properly captured?"
- "Should we adjust any epic groupings?"
- "Are there natural dependencies we've missed?"
### 7. Get Final Approval
**CRITICAL:** Must get explicit user approval:
"Do you approve this epic structure for proceeding to story creation?"
If user wants changes:
- Make the requested adjustments
- Update the epics_list
- Re-present for approval
- Repeat until approval is received
## CONTENT TO UPDATE IN DOCUMENT:
After approval, update {outputFile}:
1. Replace {{epics_list}} placeholder with the approved epic list
2. Replace {{requirements_coverage_map}} with the coverage map
3. Ensure all FRs are mapped to epics
### 8. Present MENU OPTIONS
Display: "**Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Continue"
#### Menu Handling Logic:
- IF A: Execute {advancedElicitationTask}
- IF P: Execute {partyModeWorkflow}
- IF C: Save approved epics_list 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](#8-present-menu-options)
#### 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 completes, redisplay the menu
- User can chat or ask questions - always respond when conversation ends, redisplay the menu options
## CRITICAL STEP COMPLETION NOTE
ONLY WHEN C is selected and the approved epics_list is saved to document, will you then load, read entire file, then execute {nextStepFile} to execute and begin story creation step.
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- Epics designed around user value
- All FRs mapped to specific epics
- epics_list created and formatted correctly
- Requirements coverage map completed
- User gives explicit approval for epic structure
- Document updated with approved epics
### ❌ SYSTEM FAILURE:
- Epics organized by technical layers
- Missing FRs in coverage map
- No user approval obtained
- epics_list not saved to document
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.

View File

@ -0,0 +1,271 @@
---
name: 'step-03-create-stories'
description: 'Generate all epics with their stories following the template structure'
# Path Definitions
workflow_path: '{project-root}/{bmad_folder}/bmm/workflows/3-solutioning/create-epics-and-stories'
# File References
thisStepFile: '{workflow_path}/steps/step-03-create-stories.md'
nextStepFile: '{workflow_path}/steps/step-04-final-validation.md'
workflowFile: '{workflow_path}/workflow.md'
outputFile: '{output_folder}/epics.md'
# Task References
advancedElicitationTask: '{project-root}/.bmad/core/tasks/advanced-elicitation.xml'
partyModeWorkflow: '{project-root}/.bmad/core/workflows/party-mode/workflow.md'
# Template References
epicsTemplate: '{workflow_path}/templates/epics-template.md'
---
# Step 3: Generate Epics and Stories
## STEP GOAL:
To generate all epics with their stories based on the approved epics_list, following the template structure exactly.
## MANDATORY EXECUTION RULES (READ FIRST):
### Universal Rules:
- 🛑 NEVER generate content without user input
- 📖 CRITICAL: Read the complete step file before taking any action
- 🔄 CRITICAL: Process epics sequentially
- 📋 YOU ARE A FACILITATOR, not a content generator
### Role Reinforcement:
- ✅ You are a product strategist and technical specifications writer
- ✅ 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 story creation and acceptance criteria expertise
- ✅ User brings their implementation priorities and constraints
### Step-Specific Rules:
- 🎯 Generate stories for each epic following the template exactly
- 🚫 FORBIDDEN to deviate from template structure
- 💬 Each story must have clear acceptance criteria
- 🚪 ENSURE each story is completable by a single dev agent
- 🔗 **CRITICAL: Stories MUST NOT depend on future stories within the same epic**
## EXECUTION PROTOCOLS:
- 🎯 Generate stories collaboratively with user input
- 💾 Append epics and stories to {outputFile} following template
- 📖 Process epics one at a time in sequence
- 🚫 FORBIDDEN to skip any epic or rush through stories
## STORY GENERATION PROCESS:
### 1. Load Approved Epic Structure
Load {outputFile} and review:
- Approved epics_list from Step 2
- FR coverage map
- All requirements (FRs, NFRs, additional)
- Template structure at the end of the document
### 2. Explain Story Creation Approach
**STORY CREATION GUIDELINES:**
For each epic, create stories that:
- Follow the exact template structure
- Are sized for single dev agent completion
- Have clear user value
- Include specific acceptance criteria
- Reference requirements being fulfilled
**🚨 DATABASE/ENTITY CREATION PRINCIPLE:**
Create tables/entities ONLY when needed by the story:
- ❌ WRONG: Epic 1 Story 1 creates all 50 database tables
- ✅ RIGHT: Each story creates/alters ONLY the tables it needs
**🔗 STORY DEPENDENCY PRINCIPLE:**
Stories must be independently completable in sequence:
- ❌ WRONG: Story 1.2 requires Story 1.3 to be completed first
- ✅ RIGHT: Each story can be completed based only on previous stories
- ❌ WRONG: "Wait for Story 1.4 to be implemented before this works"
- ✅ RIGHT: "This story works independently and enables future stories"
**STORY FORMAT (from template):**
```
### Story {N}.{M}: {story_title}
As a {user_type},
I want {capability},
So that {value_benefit}.
**Acceptance Criteria:**
**Given** {precondition}
**When** {action}
**Then** {expected_outcome}
**And** {additional_criteria}
```
**✅ GOOD STORY EXAMPLES:**
_Epic 1: User Authentication_
- Story 1.1: User Registration with Email
- Story 1.2: User Login with Password
- Story 1.3: Password Reset via Email
_Epic 2: Content Creation_
- Story 2.1: Create New Blog Post
- Story 2.2: Edit Existing Blog Post
- Story 2.3: Publish Blog Post
**❌ BAD STORY EXAMPLES:**
- Story: "Set up database" (no user value)
- Story: "Create all models" (too large, no user value)
- Story: "Build authentication system" (too large)
- Story: "Login UI (depends on Story 1.3 API endpoint)" (future dependency!)
- Story: "Edit post (requires Story 1.4 to be implemented first)" (wrong order!)
### 3. Process Epics Sequentially
For each epic in the approved epics_list:
#### A. Epic Overview
Display:
- Epic number and title
- Epic goal statement
- FRs covered by this epic
- Any NFRs or additional requirements relevant
#### B. Story Breakdown
Work with user to break down the epic into stories:
- Identify distinct user capabilities
- Ensure logical flow within the epic
- Size stories appropriately
#### C. Generate Each Story
For each story in the epic:
1. **Story Title**: Clear, action-oriented
2. **User Story**: Complete the As a/I want/So that format
3. **Acceptance Criteria**: Write specific, testable criteria
**AC Writing Guidelines:**
- Use Given/When/Then format
- Each AC should be independently testable
- Include edge cases and error conditions
- Reference specific requirements when applicable
#### D. Collaborative Review
After writing each story:
- Present the story to user
- Ask: "Does this story capture the requirement correctly?"
- "Is the scope appropriate for a single dev session?"
- "Are the acceptance criteria complete and testable?"
#### E. Append to Document
When story is approved:
- Append it to {outputFile} following template structure
- Use correct numbering (Epic N, Story M)
- Maintain proper markdown formatting
### 4. Epic Completion
After all stories for an epic are complete:
- Display epic summary
- Show count of stories created
- Verify all FRs for the epic are covered
- Get user confirmation to proceed to next epic
### 5. Repeat for All Epics
Continue the process for each epic in the approved list, processing them in order (Epic 1, Epic 2, etc.).
### 6. Final Document Completion
After all epics and stories are generated:
- Verify the document follows template structure exactly
- Ensure all placeholders are replaced
- Confirm all FRs are covered
- Check formatting consistency
## TEMPLATE STRUCTURE COMPLIANCE:
The final {outputFile} must follow this structure exactly:
1. **Overview** section with project name
2. **Requirements Inventory** with all three subsections populated
3. **FR Coverage Map** showing requirement to epic mapping
4. **Epic List** with approved epic structure
5. **Epic sections** for each epic (N = 1, 2, 3...)
- Epic title and goal
- All stories for that epic (M = 1, 2, 3...)
- Story title and user story
- Acceptance Criteria using Given/When/Then format
### 7. Present FINAL MENU OPTIONS
After all epics and stories are complete:
Display: "**Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Continue"
#### 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](#7-present-final-menu-options)
#### 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
## CRITICAL STEP COMPLETION NOTE
ONLY WHEN [C continue option] is selected and [all epics and stories saved to document following the template structure exactly], will you then load and read fully `{nextStepFile}` to execute and begin final validation phase.
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- All epics processed in sequence
- Stories created for each epic
- Template structure followed exactly
- All FRs covered by stories
- Stories appropriately sized
- Acceptance criteria are specific and testable
- Document is complete and ready for development
### ❌ SYSTEM FAILURE:
- Deviating from template structure
- Missing epics or stories
- Stories too large or unclear
- Missing acceptance criteria
- Not following proper formatting
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.

View File

@ -0,0 +1,144 @@
---
name: 'step-04-final-validation'
description: 'Validate complete coverage of all requirements and ensure implementation readiness'
# Path Definitions
workflow_path: '{project-root}/{bmad_folder}/bmm/workflows/3-solutioning/create-epics-and-stories'
# File References
thisStepFile: '{workflow_path}/steps/step-04-final-validation.md'
workflowFile: '{workflow_path}/workflow.md'
outputFile: '{output_folder}/epics.md'
# Task References
advancedElicitationTask: '{project-root}/.bmad/core/tasks/advanced-elicitation.xml'
partyModeWorkflow: '{project-root}/.bmad/core/workflows/party-mode/workflow.md'
# Template References
epicsTemplate: '{workflow_path}/templates/epics-template.md'
---
# Step 4: Final Validation
## STEP GOAL:
To validate complete coverage of all requirements and ensure stories are ready for development.
## MANDATORY EXECUTION RULES (READ FIRST):
### Universal Rules:
- 🛑 NEVER generate content without user input
- 📖 CRITICAL: Read the complete step file before taking any action
- 🔄 CRITICAL: Process validation sequentially without skipping
- 📋 YOU ARE A FACILITATOR, not a content generator
### Role Reinforcement:
- ✅ You are a product strategist and technical specifications writer
- ✅ 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 validation expertise and quality assurance
- ✅ User brings their implementation priorities and final review
### Step-Specific Rules:
- 🎯 Focus ONLY on validating complete requirements coverage
- 🚫 FORBIDDEN to skip any validation checks
- 💬 Validate FR coverage, story completeness, and dependencies
- 🚪 ENSURE all stories are ready for development
## EXECUTION PROTOCOLS:
- 🎯 Validate every requirement has story coverage
- 💾 Check story dependencies and flow
- 📖 Verify architecture compliance
- 🚫 FORBIDDEN to approve incomplete coverage
## CONTEXT BOUNDARIES:
- Available context: Complete epic and story breakdown from previous steps
- Focus: Final validation of requirements coverage and story readiness
- Limits: Validation only, no new content creation
- Dependencies: Completed story generation from Step 3
## VALIDATION PROCESS:
### 1. FR Coverage Validation
Review the complete epic and story breakdown to ensure EVERY FR is covered:
**CRITICAL CHECK:**
- Go through each FR from the Requirements Inventory
- Verify it appears in at least one story
- Check that acceptance criteria fully address the FR
- No FRs should be left uncovered
### 2. Architecture Implementation Validation
**Check for Starter Template Setup:**
- Does Architecture document specify a starter template?
- If YES: Epic 1 Story 1 must be "Set up initial project from starter template"
- This includes cloning, installing dependencies, initial configuration
**Database/Entity Creation Validation:**
- Are database tables/entities created ONLY when needed by stories?
- ❌ WRONG: Epic 1 creates all tables upfront
- ✅ RIGHT: Tables created as part of the first story that needs them
- Each story should create/modify ONLY what it needs
### 3. Story Quality Validation
**Each story must:**
- Be completable by a single dev agent
- Have clear acceptance criteria
- Reference specific FRs it implements
- Include necessary technical details
- **Not have forward dependencies** (can only depend on PREVIOUS stories)
- Be implementable without waiting for future stories
### 4. Epic Structure Validation
**Check that:**
- Epics deliver user value, not technical milestones
- Dependencies flow naturally
- Foundation stories only setup what's needed
- No big upfront technical work
### 5. Dependency Validation (CRITICAL)
**Epic Independence Check:**
- Does each epic deliver COMPLETE functionality for its domain?
- Can Epic 2 function without Epic 3 being implemented?
- Can Epic 3 function standalone using Epic 1 & 2 outputs?
- ❌ WRONG: Epic 2 requires Epic 3 features to work
- ✅ RIGHT: Each epic is independently valuable
**Within-Epic Story Dependency Check:**
For each epic, review stories in order:
- Can Story N.1 be completed without Stories N.2, N.3, etc.?
- Can Story N.2 be completed using only Story N.1 output?
- Can Story N.3 be completed using only Stories N.1 & N.2 outputs?
- ❌ WRONG: "This story depends on a future story"
- ❌ WRONG: Story references features not yet implemented
- ✅ RIGHT: Each story builds only on previous stories
### 6. Complete and Save
If all validations pass:
- Update any remaining placeholders in the document
- Ensure proper formatting
- Save the final epics.md
**Present Final Menu:**
**All validations complete!** [C] Complete Workflow
When C is selected, the workflow is complete and the epics.md is ready for development.

View File

@ -0,0 +1,57 @@
---
stepsCompleted: []
inputDocuments: []
---
# {{project_name}} - Epic Breakdown
## Overview
This document provides the complete epic and story breakdown for {{project_name}}, decomposing the requirements from the PRD, UX Design if it exists, and Architecture requirements into implementable stories.
## Requirements Inventory
### Functional Requirements
{{fr_list}}
### NonFunctional Requirements
{{nfr_list}}
### Additional Requirements
{{additional_requirements}}
### FR Coverage Map
{{requirements_coverage_map}}
## Epic List
{{epics_list}}
<!-- Repeat for each epic in epics_list (N = 1, 2, 3...) -->
## Epic {{N}}: {{epic_title_N}}
{{epic_goal_N}}
<!-- Repeat for each story (M = 1, 2, 3...) within epic N -->
### Story {{N}}.{{M}}: {{story_title_N_M}}
As a {{user_type}},
I want {{capability}},
So that {{value_benefit}}.
**Acceptance Criteria:**
<!-- for each AC on this story -->
**Given** {{precondition}}
**When** {{action}}
**Then** {{expected_outcome}}
**And** {{additional_criteria}}
<!-- End story repeat -->

View File

@ -0,0 +1,58 @@
---
name: 'Create Epics and Stories'
description: 'Transform PRD requirements and Architecture decisions into comprehensive stories organized by user value. This workflow requires completed PRD + Architecture documents (UX recommended if UI exists) and breaks down requirements into implementation-ready epics and user stories that incorporate all available technical and design context. Creates detailed, actionable stories with complete acceptance criteria for development teams.'
web_bundle: true
---
# Create Epics and Stories
**Goal:** Transform PRD requirements and Architecture decisions into comprehensive stories organized by user value, creating detailed, actionable stories with complete acceptance criteria for development teams.
**Your Role:** In addition to your name, communication_style, and persona, you are also a product strategist and technical specifications writer collaborating with a product owner. This is a partnership, not a client-vendor relationship. You bring expertise in requirements decomposition, technical implementation context, and acceptance criteria writing, while the user brings their product vision, user needs, and business requirements. Work together as equals.
---
## WORKFLOW ARCHITECTURE
This uses **step-file architecture** for disciplined execution:
### Core Principles
- **Micro-file Design**: Each step of the overall goal is a self contained instruction file that you will adhere too 1 file as directed at a time
- **Just-In-Time Loading**: Only 1 current step file will be loaded, read, and executed to completion - 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_folder}/bmm/config.yaml and resolve:
- `project_name`, `output_folder`, `user_name`, `communication_language`, `document_output_language`
### 2. First Step EXECUTION
Load, read the full file and then execute `{project-root}/{bmad_folder}/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-01-validate-prerequisites.md` to begin the workflow.

View File

@ -1,53 +0,0 @@
# Epic and Story Decomposition Workflow
name: create-epics-and-stories
description: "Transform PRD requirements and Architecture decisions into comprehensive stories organized by user value. This workflow requires completed PRD + Architecture documents (UX recommended if UI exists) and breaks down requirements into implementation-ready epics and user stories that incorporate all available technical and design context. Creates detailed, actionable stories with complete acceptance criteria for development teams."
author: "BMad"
# Critical variables from config
config_source: "{project-root}/{bmad_folder}/bmm/config.yaml"
project_name: "{config_source}:project_name"
output_folder: "{config_source}:output_folder"
user_name: "{config_source}:user_name"
communication_language: "{config_source}:communication_language"
document_output_language: "{config_source}:document_output_language"
user_skill_level: "{config_source}:user_skill_level"
date: system-generated
# Smart input file references - handles both whole docs and sharded docs
# Priority: Whole document first, then sharded version
input_file_patterns:
prd:
description: "Product Requirements Document with FRs and NFRs (required)"
whole: "{output_folder}/*prd*.md"
sharded: "{output_folder}/*prd*/index.md"
load_strategy: "INDEX_GUIDED"
architecture:
description: "Architecture decisions and technical design (required)"
whole: "{output_folder}/*architecture*.md"
sharded: "{output_folder}/*architecture*/index.md"
load_strategy: "FULL_LOAD"
ux_design:
description: "UX design specification for interaction patterns (recommended if UI exists)"
whole: "{output_folder}/*ux*.md"
sharded: "{output_folder}/*ux*/index.md"
load_strategy: "FULL_LOAD"
# Module path and component files
installed_path: "{project-root}/{bmad_folder}/bmm/workflows/3-solutioning/create-epics-and-stories"
instructions: "{installed_path}/instructions.md"
template: "{installed_path}/epics-template.md"
# Output configuration
default_output_file: "{output_folder}/epics.md"
standalone: true
web_bundle:
name: "create-epics-and-stories"
description: "Transform PRD requirements into bite-sized stories organized in epics for 200k context dev agents"
author: "BMad"
instructions: "{bmad_folder}/bmm/workflows/3-solutioning/create-epics-and-stories/instructions.md"
template: "{bmad_folder}/bmm/workflows/3-solutioning/create-epics-and-stories/epics-template.md"
web_bundle_files:
- "{bmad_folder}/bmm/workflows/3-solutioning/create-epics-and-stories/instructions.md"
- "{bmad_folder}/bmm/workflows/3-solutioning/create-epics-and-stories/epics-template.md"

View File

@ -1,169 +0,0 @@
# Implementation Readiness Validation Checklist
## Document Completeness
### Core Planning Documents
- [ ] PRD exists and is complete
- [ ] PRD contains measurable success criteria
- [ ] PRD defines clear scope boundaries and exclusions
- [ ] Architecture document exists (architecture\*.md)
- [ ] Technical Specification exists with implementation details
- [ ] Epic and story breakdown document exists
- [ ] All documents are dated and versioned
### Document Quality
- [ ] No placeholder sections remain in any document
- [ ] All documents use consistent terminology
- [ ] Technical decisions include rationale and trade-offs
- [ ] Assumptions and risks are explicitly documented
- [ ] Dependencies are clearly identified and documented
## Alignment Verification
### PRD to Architecture Alignment
- [ ] Every functional requirement in PRD has architectural support documented
- [ ] All non-functional requirements from PRD are addressed in architecture
- [ ] Architecture doesn't introduce features beyond PRD scope
- [ ] Performance requirements from PRD match architecture capabilities
- [ ] Security requirements from PRD are fully addressed in architecture
- [ ] If architecture.md: Implementation patterns are defined for consistency
- [ ] If architecture.md: All technology choices have verified versions
- [ ] If UX spec exists: Architecture supports UX requirements
### PRD to Stories Coverage
- [ ] Every PRD requirement maps to at least one story
- [ ] All user journeys in PRD have complete story coverage
- [ ] Story acceptance criteria align with PRD success criteria
- [ ] Priority levels in stories match PRD feature priorities
- [ ] No stories exist without PRD requirement traceability
### Architecture to Stories Implementation
- [ ] All architectural components have implementation stories
- [ ] Infrastructure setup stories exist for each architectural layer
- [ ] Integration points defined in architecture have corresponding stories
- [ ] Data migration/setup stories exist if required by architecture
- [ ] Security implementation stories cover all architecture security decisions
## Story and Sequencing Quality
### Story Completeness
- [ ] All stories have clear acceptance criteria
- [ ] Technical tasks are defined within relevant stories
- [ ] Stories include error handling and edge cases
- [ ] Each story has clear definition of done
- [ ] Stories are appropriately sized (no epic-level stories remaining)
### Sequencing and Dependencies
- [ ] Stories are sequenced in logical implementation order
- [ ] Dependencies between stories are explicitly documented
- [ ] No circular dependencies exist
- [ ] Prerequisite technical tasks precede dependent stories
- [ ] Foundation/infrastructure stories come before feature stories
### Greenfield Project Specifics
- [ ] Initial project setup and configuration stories exist
- [ ] If using architecture.md: First story is starter template initialization command
- [ ] Development environment setup is documented
- [ ] CI/CD pipeline stories are included early in sequence
- [ ] Database/storage initialization stories are properly placed
- [ ] Authentication/authorization stories precede protected features
## Risk and Gap Assessment
### Critical Gaps
- [ ] No core PRD requirements lack story coverage
- [ ] No architectural decisions lack implementation stories
- [ ] All integration points have implementation plans
- [ ] Error handling strategy is defined and implemented
- [ ] Security concerns are all addressed
### Technical Risks
- [ ] No conflicting technical approaches between stories
- [ ] Technology choices are consistent across all documents
- [ ] Performance requirements are achievable with chosen architecture
- [ ] Scalability concerns are addressed if applicable
- [ ] Third-party dependencies are identified with fallback plans
## UX and Special Concerns (if applicable)
### UX Coverage
- [ ] UX requirements are documented in PRD
- [ ] UX implementation tasks exist in relevant stories
- [ ] Accessibility requirements have story coverage
- [ ] Responsive design requirements are addressed
- [ ] User flow continuity is maintained across stories
### Special Considerations
- [ ] Compliance requirements are fully addressed
- [ ] Internationalization needs are covered if required
- [ ] Performance benchmarks are defined and measurable
- [ ] Monitoring and observability stories exist
- [ ] Documentation stories are included where needed
## Overall Readiness
### Ready to Proceed Criteria
- [ ] All critical issues have been resolved
- [ ] High priority concerns have mitigation plans
- [ ] Story sequencing supports iterative delivery
- [ ] Team has necessary skills for implementation
- [ ] No blocking dependencies remain unresolved
### Quality Indicators
- [ ] Documents demonstrate thorough analysis
- [ ] Clear traceability exists across all artifacts
- [ ] Consistent level of detail throughout documents
- [ ] Risks are identified with mitigation strategies
- [ ] Success criteria are measurable and achievable
## Assessment Completion
### Report Quality
- [ ] All findings are supported by specific examples
- [ ] Recommendations are actionable and specific
- [ ] Severity levels are appropriately assigned
- [ ] Positive findings are highlighted
- [ ] Next steps are clearly defined
### Process Validation
- [ ] All expected documents were reviewed
- [ ] Cross-references were systematically checked
- [ ] Project level considerations were applied correctly
- [ ] Workflow status was checked and considered
- [ ] Output folder was thoroughly searched for artifacts
---
## Issue Log
### Critical Issues Found
<!-- checklist of critical issues or N/A -->
### High Priority Issues Found
<!-- checklist of high priority issues or N/A -->
### Medium Priority Issues Found
<!-- checklist of medium priority issues or N/A -->
---
_Use this checklist to ensure comprehensive validation of implementation readiness_

View File

@ -1,332 +0,0 @@
# Implementation Readiness - Workflow Instructions
<critical>The workflow execution engine is governed by: {project-root}/{bmad_folder}/core/tasks/workflow.xml</critical>
<critical>You MUST have already loaded and processed: {project-root}/{bmad_folder}/bmm/workflows/3-solutioning/implementation-readiness/workflow.yaml</critical>
<critical>Communicate all findings and analysis in {communication_language} throughout the assessment</critical>
<critical>Input documents specified in workflow.yaml input_file_patterns - workflow engine handles fuzzy matching, whole vs sharded document discovery automatically</critical>
<critical>⚠️ ABSOLUTELY NO TIME ESTIMATES - NEVER mention hours, days, weeks, months, or ANY time-based predictions. AI has fundamentally changed development speed - what once took teams weeks/months can now be done by one person in hours. DO NOT give ANY time estimates whatsoever.</critical>
<critical>⚠️ CHECKPOINT PROTOCOL: After EVERY <template-output> tag, you MUST follow workflow.xml substep 2c: SAVE content to file immediately → SHOW checkpoint separator (━━━━━━━━━━━━━━━━━━━━━━━) → DISPLAY generated content → PRESENT options [a]Advanced Elicitation/[c]Continue/[p]Party-Mode/[y]YOLO → WAIT for user response. Never batch saves or skip checkpoints.</critical>
<workflow>
<step n="0" goal="Validate workflow readiness" tag="workflow-status">
<action>Check if {workflow_status_file} exists</action>
<check if="status file not found">
<output>No workflow status file found. Implementation Readiness check can run standalone or as part of BMM workflow path.</output>
<output>**Recommended:** Run `workflow-init` first for project context tracking and workflow sequencing.</output>
<ask>Continue in standalone mode or exit to run workflow-init? (continue/exit)</ask>
<check if="continue">
<action>Set standalone_mode = true</action>
</check>
<check if="exit">
<action>Exit workflow</action>
</check>
</check>
<check if="status file found">
<action>Load the FULL file: {workflow_status_file}</action>
<action>Parse workflow_status section</action>
<action>Check status of "implementation-readiness" workflow</action>
<action>Get {selected_track} (quick-flow, bmad-method, or enterprise-bmad-method)</action>
<action>Find first non-completed workflow (next expected workflow)</action>
<action>Based on the selected_track, understand what artifacts should exist: - quick-flow: Tech spec and simple stories in an epic only (no PRD, minimal solutioning) - bmad-method and enterprise-bmad-method: PRD, UX design, epics/stories, architecture</action>
<check if="implementation-readiness status is file path (already completed)">
<output>⚠️ Implementation readiness check already completed: {{implementation-readiness status}}</output>
<ask>Re-running will create a new validation report. Continue? (y/n)</ask>
<check if="n">
<output>Exiting. Use workflow-status to see your next step.</output>
<action>Exit workflow</action>
</check>
</check>
<check if="implementation-readiness is not the next expected workflow">
<output>⚠️ Next expected workflow: {{next_workflow}}. Implementation readiness check is out of sequence.</output>
<ask>Continue with readiness check anyway? (y/n)</ask>
<check if="n">
<output>Exiting. Run {{next_workflow}} instead.</output>
<action>Exit workflow</action>
</check>
</check>
<action>Set standalone_mode = false</action>
</check>
<template-output>project_context</template-output>
</step>
<step n="0.5" goal="Discover and load input documents">
<invoke-protocol name="discover_inputs" />
<note>After discovery, these content variables are available: {prd_content}, {epics_content}, {architecture_content}, {ux_design_content}, {tech_spec_content}, {document_project_content}</note>
</step>
<step n="1" goal="Inventory loaded project artifacts">
<action>Review the content loaded by Step 0.5 and create an inventory</action>
<action>Inventory of available documents:
- PRD: {prd_content} (loaded if available)
- Architecture: {architecture_content} (loaded if available)
- Epics: {epics_content} (loaded if available)
- UX Design: {ux_design_content} (loaded if available)
- Tech Spec: {tech_spec_content} (loaded if available, Quick Flow track)
- Brownfield docs: {document_project_content} (loaded via INDEX_GUIDED if available)
</action>
<action>For each loaded document, extract:
- Document type and purpose
- Brief description of what it contains
- Flag any expected documents that are missing as potential issues
</action>
<template-output>document_inventory</template-output>
</step>
<step n="2" goal="Deep analysis of core planning documents">
<action>Thoroughly analyze each loaded document to extract:
- Core requirements and success criteria
- Architectural decisions and constraints
- Technical implementation approaches
- User stories and acceptance criteria
- Dependencies and sequencing requirements
- Any assumptions or risks documented
</action>
<action>For PRD analysis, focus on:
- User requirements and use cases
- Functional and non-functional requirements
- Success metrics and acceptance criteria
- Scope boundaries and explicitly excluded items
- Priority levels for different features
</action>
<action>For Architecture/Tech Spec analysis, focus on:
- System design decisions and rationale
- Technology stack and framework choices
- Integration points and APIs
- Data models and storage decisions
- Security and performance considerations
- Any architectural constraints that might affect story implementation
</action>
<action>For Epic/Story analysis, focus on:
- Coverage of PRD requirements
- Story sequencing and dependencies
- Acceptance criteria completeness
- Technical tasks within stories
- Estimated complexity and effort indicators
</action>
<template-output>document_analysis</template-output>
</step>
<step n="3" goal="Cross-reference validation and alignment check">
<action>PRD ↔ Architecture Alignment:
- Verify every PRD requirement has corresponding architectural support
- Check that architectural decisions don't contradict PRD constraints
- Identify any architectural additions beyond PRD scope (potential gold-plating)
- Ensure non-functional requirements from PRD are addressed in architecture document
- If using new architecture workflow: verify implementation patterns are defined
</action>
<action>PRD ↔ Stories Coverage:
- Map each PRD requirement to implementing stories
- Identify any PRD requirements without story coverage
- Find stories that don't trace back to PRD requirements
- Validate that story acceptance criteria align with PRD success criteria
</action>
<action>Architecture ↔ Stories Implementation Check:
- Verify architectural decisions are reflected in relevant stories
- Check that story technical tasks align with architectural approach
- Identify any stories that might violate architectural constraints
- Ensure infrastructure and setup stories exist for architectural components
</action>
<template-output>alignment_validation</template-output>
</step>
<step n="4" goal="Gap and risk analysis">
<action>Identify and categorize all gaps, risks, and potential issues discovered during validation</action>
<action>Check for Critical Gaps:
- Missing stories for core requirements
- Unaddressed architectural concerns
- Absent infrastructure or setup stories for greenfield projects
- Missing error handling or edge case coverage
- Security or compliance requirements not addressed
</action>
<action>Identify Sequencing Issues:
- Dependencies not properly ordered
- Stories that assume components not yet built
- Parallel work that should be sequential
- Missing prerequisite technical tasks
</action>
<action>Detect Potential Contradictions:
- Conflicts between PRD and architecture approaches
- Stories with conflicting technical approaches
- Acceptance criteria that contradict requirements
- Resource or technology conflicts
</action>
<action>Find Gold-Plating and Scope Creep:
- Features in architecture not required by PRD
- Stories implementing beyond requirements
- Technical complexity beyond project needs
- Over-engineering indicators
</action>
<action>Check Testability Review (if test-design exists in Phase 3):
**Note:** test-design is recommended for BMad Method, required for Enterprise Method
- Check if {output_folder}/test-design-system.md exists
- If exists: Review testability assessment (Controllability, Observability, Reliability)
- If testability concerns documented: Flag for gate decision
- If missing AND track is Enterprise: Flag as CRITICAL gap
- If missing AND track is Method: Note as recommendation (not blocker)
</action>
<template-output>gap_risk_analysis</template-output>
</step>
<step n="5" goal="UX and special concerns validation" optional="true">
<check if="UX artifacts exist or UX workflow in active path">
<action>Review UX artifacts and validate integration:
- Check that UX requirements are reflected in PRD
- Verify stories include UX implementation tasks
- Ensure architecture supports UX requirements (performance, responsiveness)
- Identify any UX concerns not addressed in stories
</action>
<action>Validate accessibility and usability coverage:
- Check for accessibility requirement coverage in stories
- Verify responsive design considerations if applicable
- Ensure user flow completeness across stories
</action>
</check>
<template-output>ux_validation</template-output>
</step>
<step n="6" goal="Generate comprehensive readiness assessment">
<action>Compile all findings into a structured readiness report with:
- Executive summary of readiness status
- Project context and validation scope
- Document inventory and coverage assessment
- Detailed findings organized by severity (Critical, High, Medium, Low)
- Specific recommendations for each issue
- Overall readiness recommendation (Ready, Ready with Conditions, Not Ready)
</action>
<action>Provide actionable next steps:
- List any critical issues that must be resolved
- Suggest specific document updates needed
- Recommend additional stories or tasks required
- Propose sequencing adjustments if needed
</action>
<action>Include positive findings:
- Highlight well-aligned areas
- Note particularly thorough documentation
- Recognize good architectural decisions
- Commend comprehensive story coverage where found
</action>
<template-output>readiness_assessment</template-output>
</step>
<step n="7" goal="Update status and complete" tag="workflow-status">
<check if="standalone_mode != true">
<action>Load the FULL file: {workflow_status_file}</action>
<action>Find workflow_status key "implementation-readiness"</action>
<critical>ONLY write the file path as the status value - no other text, notes, or metadata</critical>
<action>Update workflow_status["implementation-readiness"] = "{output_folder}/implementation-readiness-report-{{date}}.md"</action>
<action>Save file, preserving ALL comments and structure including STATUS DEFINITIONS</action>
<action>Find first non-completed workflow in workflow_status (next workflow to do)</action>
<action>Determine next agent from path file based on next workflow</action>
</check>
<action>Determine overall readiness status from the readiness_assessment (Ready, Ready with Conditions, or Not Ready)</action>
<output>**✅ Implementation Readiness Check Complete!**
**Assessment Report:**
- Readiness assessment saved to: {output_folder}/implementation-readiness-report-{{date}}.md
{{#if standalone_mode != true}}
**Status Updated:**
- Progress tracking updated: implementation-readiness marked complete
- Next workflow: {{next_workflow}}
{{else}}
**Note:** Running in standalone mode (no progress tracking)
{{/if}}
**Next Steps:**
{{#if standalone_mode != true}}
- **Next workflow:** {{next_workflow}} ({{next_agent}} agent)
- Review the assessment report and address any critical issues before proceeding
Check status anytime with: `workflow-status`
{{else}}
Since no workflow is in progress:
- Refer to the BMM workflow guide if unsure what to do next
- Or run `workflow-init` to create a workflow path and get guided next steps
{{/if}}
</output>
<check if="overall readiness status is Ready OR Ready with Conditions">
<output>**🚀 Ready for Implementation!**
Your project artifacts are aligned and complete. You can now proceed to Phase 4: Implementation.
</output>
<ask>Would you like to run the **sprint-planning** workflow to initialize your sprint tracking and prepare for development? (yes/no)</ask>
<check if="yes">
<action>Inform user that sprint-planning workflow will be invoked</action>
<invoke-workflow path="{project-root}/{bmad_folder}/bmm/workflows/4-implementation/sprint-planning/workflow.yaml" />
</check>
<check if="no">
<output>You can run sprint-planning later when ready: `sprint-planning`</output>
</check>
</check>
<check if="overall readiness status is Not Ready">
<output>**⚠️ Not Ready for Implementation**
Critical issues must be resolved before proceeding. Review the assessment report and address the identified gaps.
Once issues are resolved, re-run implementation-readiness to validate again.
</output>
</check>
<template-output>status_update_result</template-output>
</step>
</workflow>

View File

@ -0,0 +1,189 @@
---
name: 'step-01-document-discovery'
description: 'Discover and inventory all project documents, handling duplicates and organizing file structure'
# Path Definitions
workflow_path: '{project-root}/{bmad_folder}/bmm/workflows/3-solutioning/implementation-readiness'
# File References
thisStepFile: '{workflow_path}/steps/step-01-document-discovery.md'
nextStepFile: '{workflow_path}/steps/step-02-prd-analysis.md'
workflowFile: '{workflow_path}/workflow.md'
outputFile: '{output_folder}/implementation-readiness-report-{{date}}.md'
templateFile: '{workflow_path}/templates/readiness-report-template.md'
---
# Step 1: Document Discovery
## STEP GOAL:
To discover, inventory, and organize all project documents, identifying duplicates and determining which versions to use for the assessment.
## 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 an expert Product Manager and Scrum Master
- ✅ Your focus is on finding organizing and documenting what exists
- ✅ You identify ambiguities and ask for clarification
- ✅ Success is measured in clear file inventory and conflict resolution
### Step-Specific Rules:
- 🎯 Focus ONLY on finding and organizing files
- 🚫 Don't read or analyze file contents
- 💬 Identify duplicate documents clearly
- 🚪 Get user confirmation on file selections
## EXECUTION PROTOCOLS:
- 🎯 Search for all document types systematically
- 💾 Group sharded files together
- 📖 Flag duplicates for user resolution
- 🚫 FORBIDDEN to proceed with unresolved duplicates
## DOCUMENT DISCOVERY PROCESS:
### 1. Initialize Document Discovery
"Beginning **Document Discovery** to inventory all project files.
I will:
1. Search for all required documents (PRD, Architecture, Epics, UX)
2. Group sharded documents together
3. Identify any duplicates (whole + sharded versions)
4. Present findings for your confirmation"
### 2. Document Search Patterns
Search for each document type using these patterns:
#### A. PRD Documents
- Whole: `{output_folder}/*prd*.md`
- Sharded: `{output_folder}/*prd*/index.md` and related files
#### B. Architecture Documents
- Whole: `{output_folder}/*architecture*.md`
- Sharded: `{output_folder}/*architecture*/index.md` and related files
#### C. Epics & Stories Documents
- Whole: `{output_folder}/*epic*.md`
- Sharded: `{output_folder}/*epic*/index.md` and related files
#### D. UX Design Documents
- Whole: `{output_folder}/*ux*.md`
- Sharded: `{output_folder}/*ux*/index.md` and related files
### 3. Organize Findings
For each document type found:
```
## [Document Type] Files Found
**Whole Documents:**
- [filename.md] ([size], [modified date])
**Sharded Documents:**
- Folder: [foldername]/
- index.md
- [other files in folder]
```
### 4. Identify Critical Issues
#### Duplicates (CRITICAL)
If both whole and sharded versions exist:
```
⚠️ CRITICAL ISSUE: Duplicate document formats found
- PRD exists as both whole.md AND prd/ folder
- YOU MUST choose which version to use
- Remove or rename the other version to avoid confusion
```
#### Missing Documents (WARNING)
If required documents not found:
```
⚠️ WARNING: Required document not found
- Architecture document not found
- Will impact assessment completeness
```
### 5. Add Initial Report Section
Initialize {outputFile} with {templateFile}.
### 6. Present Findings and Get Confirmation
Display findings and ask:
"**Document Discovery Complete**
[Show organized file list]
**Issues Found:**
- [List any duplicates requiring resolution]
- [List any missing documents]
**Required Actions:**
- If duplicates exist: Please remove/rename one version
- Confirm which documents to use for assessment
**Ready to proceed?** [C] Continue after resolving issues"
### 7. Present MENU OPTIONS
Display: **Select an Option:** [C] Continue to File Validation
#### EXECUTION RULES:
- ALWAYS halt and wait for user input after presenting menu
- ONLY proceed with 'C' selection
- If duplicates identified, insist on resolution first
- User can clarify file locations or request additional searches
#### Menu Handling Logic:
- IF C: Save document inventory to {outputFile}, update frontmatter with completed step and files being included, and only then load read fully and execute {nextStepFile}
- IF Any other comments or queries: help user respond then redisplay menu
## CRITICAL STEP COMPLETION NOTE
ONLY WHEN C is selected and document inventory is saved will you load {nextStepFile} to begin file validation.
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- All document types searched systematically
- Files organized and inventoried clearly
- Duplicates identified and flagged for resolution
- User confirmed file selections
### ❌ SYSTEM FAILURE:
- Not searching all document types
- Ignoring duplicate document conflicts
- Proceeding without resolving critical issues
- Not saving document inventory
**Master Rule:** Clear file identification is essential for accurate assessment.

View File

@ -0,0 +1,177 @@
---
name: 'step-02-prd-analysis'
description: 'Read and analyze PRD to extract all FRs and NFRs for coverage validation'
# Path Definitions
workflow_path: '{project-root}/{bmad_folder}/bmm/workflows/3-solutioning/implementation-readiness'
# File References
thisStepFile: '{workflow_path}/steps/step-02-prd-analysis.md'
nextStepFile: '{workflow_path}/steps/step-03-epic-coverage-validation.md'
workflowFile: '{workflow_path}/workflow.md'
outputFile: '{output_folder}/implementation-readiness-report-{{date}}.md'
epicsFile: '{output_folder}/*epic*.md' # Will be resolved to actual file
---
# Step 2: PRD Analysis
## STEP GOAL:
To fully read and analyze the PRD document (whole or sharded) to extract all Functional Requirements (FRs) and Non-Functional Requirements (NFRs) for validation against epics coverage.
## 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 an expert Product Manager and Scrum Master
- ✅ Your expertise is in requirements analysis and traceability
- ✅ You think critically about requirement completeness
- ✅ Success is measured in thorough requirement extraction
### Step-Specific Rules:
- 🎯 Focus ONLY on reading and extracting from PRD
- 🚫 Don't validate files (done in step 1)
- 💬 Read PRD completely - whole or all sharded files
- 🚪 Extract every FR and NFR with numbering
## EXECUTION PROTOCOLS:
- 🎯 Load and completely read the PRD
- 💾 Extract all requirements systematically
- 📖 Document findings in the report
- 🚫 FORBIDDEN to skip or summarize PRD content
## PRD ANALYSIS PROCESS:
### 1. Initialize PRD Analysis
"Beginning **PRD Analysis** to extract all requirements.
I will:
1. Load the PRD document (whole or sharded)
2. Read it completely and thoroughly
3. Extract ALL Functional Requirements (FRs)
4. Extract ALL Non-Functional Requirements (NFRs)
5. Document findings for coverage validation"
### 2. Load and Read PRD
From the document inventory in step 1:
- If whole PRD file exists: Load and read it completely
- If sharded PRD exists: Load and read ALL files in the PRD folder
- Ensure complete coverage - no files skipped
### 3. Extract Functional Requirements (FRs)
Search for and extract:
- Numbered FRs (FR1, FR2, FR3, etc.)
- Requirements labeled "Functional Requirement"
- User stories or use cases that represent functional needs
- Business rules that must be implemented
Format findings as:
```
## Functional Requirements Extracted
FR1: [Complete requirement text]
FR2: [Complete requirement text]
FR3: [Complete requirement text]
...
Total FRs: [count]
```
### 4. Extract Non-Functional Requirements (NFRs)
Search for and extract:
- Performance requirements (response times, throughput)
- Security requirements (authentication, encryption, etc.)
- Usability requirements (accessibility, ease of use)
- Reliability requirements (uptime, error rates)
- Scalability requirements (concurrent users, data growth)
- Compliance requirements (standards, regulations)
Format findings as:
```
## Non-Functional Requirements Extracted
NFR1: [Performance requirement]
NFR2: [Security requirement]
NFR3: [Usability requirement]
...
Total NFRs: [count]
```
### 5. Document Additional Requirements
Look for:
- Constraints or assumptions
- Technical requirements not labeled as FR/NFR
- Business constraints
- Integration requirements
### 6. Add to Assessment Report
Append to {outputFile}:
```markdown
## PRD Analysis
### Functional Requirements
[Complete FR list from section 3]
### Non-Functional Requirements
[Complete NFR list from section 4]
### Additional Requirements
[Any other requirements or constraints found]
### PRD Completeness Assessment
[Initial assessment of PRD completeness and clarity]
```
### 7. Auto-Proceed to Next Step
After PRD analysis complete, immediately load next step for epic coverage validation.
## PROCEEDING TO EPIC COVERAGE VALIDATION
PRD analysis complete. Loading next step to validate epic coverage.
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- PRD loaded and read completely
- All FRs extracted with full text
- All NFRs identified and documented
- Findings added to assessment report
### ❌ SYSTEM FAILURE:
- Not reading complete PRD (especially sharded versions)
- Missing requirements in extraction
- Summarizing instead of extracting full text
- Not documenting findings in report
**Master Rule:** Complete requirement extraction is essential for traceability validation.

View File

@ -0,0 +1,178 @@
---
name: 'step-03-epic-coverage-validation'
description: 'Validate that all PRD FRs are covered in epics and stories'
# Path Definitions
workflow_path: '{project-root}/{bmad_folder}/bmm/workflows/3-solutioning/implementation-readiness'
# File References
thisStepFile: '{workflow_path}/steps/step-03-epic-coverage-validation.md'
nextStepFile: '{workflow_path}/steps/step-04-ux-alignment.md'
workflowFile: '{workflow_path}/workflow.md'
outputFile: '{output_folder}/implementation-readiness-report-{{date}}.md'
---
# Step 3: Epic Coverage Validation
## STEP GOAL:
To validate that all Functional Requirements from the PRD are captured in the epics and stories document, identifying any gaps in coverage.
## 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 an expert Product Manager and Scrum Master
- ✅ Your expertise is in requirements traceability
- ✅ You ensure no requirements fall through the cracks
- ✅ Success is measured in complete FR coverage
### Step-Specific Rules:
- 🎯 Focus ONLY on FR coverage validation
- 🚫 Don't analyze story quality (that's later)
- 💬 Compare PRD FRs against epic coverage list
- 🚪 Document every missing FR
## EXECUTION PROTOCOLS:
- 🎯 Load epics document completely
- 💾 Extract FR coverage from epics
- 📖 Compare against PRD FR list
- 🚫 FORBIDDEN to proceed without documenting gaps
## EPIC COVERAGE VALIDATION PROCESS:
### 1. Initialize Coverage Validation
"Beginning **Epic Coverage Validation**.
I will:
1. Load the epics and stories document
2. Extract FR coverage information
3. Compare against PRD FRs from previous step
4. Identify any FRs not covered in epics"
### 2. Load Epics Document
From the document inventory in step 1:
- Load the epics and stories document (whole or sharded)
- Read it completely to find FR coverage information
- Look for sections like "FR Coverage Map" or similar
### 3. Extract Epic FR Coverage
From the epics document:
- Find FR coverage mapping or list
- Extract which FR numbers are claimed to be covered
- Document which epics cover which FRs
Format as:
```
## Epic FR Coverage Extracted
FR1: Covered in Epic X
FR2: Covered in Epic Y
FR3: Covered in Epic Z
...
Total FRs in epics: [count]
```
### 4. Compare Coverage Against PRD
Using the PRD FR list from step 2:
- Check each PRD FR against epic coverage
- Identify FRs NOT covered in epics
- Note any FRs in epics but NOT in PRD
Create coverage matrix:
```
## FR Coverage Analysis
| FR Number | PRD Requirement | Epic Coverage | Status |
|-----------|----------------|---------------|---------|
| FR1 | [PRD text] | Epic X Story Y | ✓ Covered |
| FR2 | [PRD text] | **NOT FOUND** | ❌ MISSING |
| FR3 | [PRD text] | Epic Z Story A | ✓ Covered |
```
### 5. Document Missing Coverage
List all FRs not covered:
```
## Missing FR Coverage
### Critical Missing FRs
FR#: [Full requirement text from PRD]
- Impact: [Why this is critical]
- Recommendation: [Which epic should include this]
### High Priority Missing FRs
[List any other uncovered FRs]
```
### 6. Add to Assessment Report
Append to {outputFile}:
```markdown
## Epic Coverage Validation
### Coverage Matrix
[Complete coverage matrix from section 4]
### Missing Requirements
[List of uncovered FRs from section 5]
### Coverage Statistics
- Total PRD FRs: [count]
- FRs covered in epics: [count]
- Coverage percentage: [percentage]
```
### 7. Auto-Proceed to Next Step
After coverage validation complete, immediately load next step.
## PROCEEDING TO UX ALIGNMENT
Epic coverage validation complete. Loading next step for UX alignment.
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- Epics document loaded completely
- FR coverage extracted accurately
- All gaps identified and documented
- Coverage matrix created
### ❌ SYSTEM FAILURE:
- Not reading complete epics document
- Missing FRs in comparison
- Not documenting uncovered requirements
- Incomplete coverage analysis
**Master Rule:** Every FR must have a traceable implementation path.

View File

@ -0,0 +1,138 @@
---
name: 'step-04-ux-alignment'
description: 'Check for UX document and validate alignment with PRD and Architecture'
# Path Definitions
workflow_path: '{project-root}/{bmad_folder}/bmm/workflows/3-solutioning/implementation-readiness'
# File References
thisStepFile: '{workflow_path}/steps/step-04-ux-alignment.md'
nextStepFile: '{workflow_path}/steps/step-05-epic-quality-review.md'
workflowFile: '{workflow_path}/workflow.md'
outputFile: '{output_folder}/implementation-readiness-report-{{date}}.md'
---
# Step 4: UX Alignment
## STEP GOAL:
To check if UX documentation exists and validate that it aligns with PRD requirements and Architecture decisions, ensuring architecture accounts for both PRD and UX needs.
## 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 UX VALIDATOR ensuring user experience is properly addressed
- ✅ UX requirements must be supported by architecture
- ✅ Missing UX documentation is a warning if UI is implied
- ✅ Alignment gaps must be documented
### Step-Specific Rules:
- 🎯 Check for UX document existence first
- 🚫 Don't assume UX is not needed
- 💬 Validate alignment between UX, PRD, and Architecture
- 🚪 Add findings to the output report
## EXECUTION PROTOCOLS:
- 🎯 Search for UX documentation
- 💾 If found, validate alignment
- 📖 If not found, assess if UX is implied
- 🚫 FORBIDDEN to proceed without completing assessment
## UX ALIGNMENT PROCESS:
### 1. Initialize UX Validation
"Beginning **UX Alignment** validation.
I will:
1. Check if UX documentation exists
2. If UX exists: validate alignment with PRD and Architecture
3. If no UX: determine if UX is implied and document warning"
### 2. Search for UX Documentation
Search patterns:
- `{output_folder}/*ux*.md` (whole document)
- `{output_folder}/*ux*/index.md` (sharded)
- Look for UI-related terms in other documents
### 3. If UX Document Exists
#### A. UX ↔ PRD Alignment
- Check UX requirements reflected in PRD
- Verify user journeys in UX match PRD use cases
- Identify UX requirements not in PRD
#### B. UX ↔ Architecture Alignment
- Verify architecture supports UX requirements
- Check performance needs (responsiveness, load times)
- Identify UI components not supported by architecture
### 4. If No UX Document
Assess if UX/UI is implied:
- Does PRD mention user interface?
- Are there web/mobile components implied?
- Is this a user-facing application?
If UX implied but missing: Add warning to report
### 5. Add Findings to Report
Append to {outputFile}:
```markdown
## UX Alignment Assessment
### UX Document Status
[Found/Not Found]
### Alignment Issues
[List any misalignments between UX, PRD, and Architecture]
### Warnings
[Any warnings about missing UX or architectural gaps]
```
### 6. Auto-Proceed to Next Step
After UX assessment complete, immediately load next step.
## PROCEEDING TO EPIC QUALITY REVIEW
UX alignment assessment complete. Loading next step for epic quality review.
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- UX document existence checked
- Alignment validated if UX exists
- Warning issued if UX implied but missing
- Findings added to report
### ❌ SYSTEM FAILURE:
- Not checking for UX document
- Ignoring alignment issues
- Not documenting warnings

View File

@ -0,0 +1,251 @@
---
name: 'step-05-epic-quality-review'
description: 'Validate epics and stories against create-epics-and-stories best practices'
# Path Definitions
workflow_path: '{project-root}/{bmad_folder}/bmm/workflows/3-solutioning/implementation-readiness'
# File References
thisStepFile: '{workflow_path}/steps/step-05-epic-quality-review.md'
nextStepFile: '{workflow_path}/steps/step-06-final-assessment.md'
workflowFile: '{workflow_path}/workflow.md'
outputFile: '{output_folder}/implementation-readiness-report-{{date}}.md'
epicsBestPractices: '{project-root}/{bmad_folder}/bmm/workflows/3-solutioning/create-epics-and-stories'
---
# Step 5: Epic Quality Review
## STEP GOAL:
To validate epics and stories against the best practices defined in create-epics-and-stories workflow, focusing on user value, independence, dependencies, and implementation readiness.
## 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 an EPIC QUALITY ENFORCER
- ✅ You know what good epics look like - challenge anything deviating
- ✅ Technical epics are wrong - find them
- ✅ Forward dependencies are forbidden - catch them
- ✅ Stories must be independently completable
### Step-Specific Rules:
- 🎯 Apply create-epics-and-stories standards rigorously
- 🚫 Don't accept "technical milestones" as epics
- 💬 Challenge every dependency on future work
- 🚪 Verify proper story sizing and structure
## EXECUTION PROTOCOLS:
- 🎯 Systematically validate each epic and story
- 💾 Document all violations of best practices
- 📖 Check every dependency relationship
- 🚫 FORBIDDEN to accept structural problems
## EPIC QUALITY REVIEW PROCESS:
### 1. Initialize Best Practices Validation
"Beginning **Epic Quality Review** against create-epics-and-stories standards.
I will rigorously validate:
- Epics deliver user value (not technical milestones)
- Epic independence (Epic 2 doesn't need Epic 3)
- Story dependencies (no forward references)
- Proper story sizing and completeness
Any deviation from best practices will be flagged as a defect."
### 2. Epic Structure Validation
#### A. User Value Focus Check
For each epic:
- **Epic Title:** Is it user-centric (what user can do)?
- **Epic Goal:** Does it describe user outcome?
- **Value Proposition:** Can users benefit from this epic alone?
**Red flags (violations):**
- "Setup Database" or "Create Models" - no user value
- "API Development" - technical milestone
- "Infrastructure Setup" - not user-facing
- "Authentication System" - borderline (is it user value?)
#### B. Epic Independence Validation
Test epic independence:
- **Epic 1:** Must stand alone completely
- **Epic 2:** Can function using only Epic 1 output
- **Epic 3:** Can function using Epic 1 & 2 outputs
- **Rule:** Epic N cannot require Epic N+1 to work
**Document failures:**
- "Epic 2 requires Epic 3 features to function"
- Stories in Epic 2 referencing Epic 3 components
- Circular dependencies between epics
### 3. Story Quality Assessment
#### A. Story Sizing Validation
Check each story:
- **Clear User Value:** Does the story deliver something meaningful?
- **Independent:** Can it be completed without future stories?
**Common violations:**
- "Setup all models" - not a USER story
- "Create login UI (depends on Story 1.3)" - forward dependency
#### B. Acceptance Criteria Review
For each story's ACs:
- **Given/When/Then Format:** Proper BDD structure?
- **Testable:** Each AC can be verified independently?
- **Complete:** Covers all scenarios including errors?
- **Specific:** Clear expected outcomes?
**Issues to find:**
- Vague criteria like "user can login"
- Missing error conditions
- Incomplete happy path
- Non-measurable outcomes
### 4. Dependency Analysis
#### A. Within-Epic Dependencies
Map story dependencies within each epic:
- Story 1.1 must be completable alone
- Story 1.2 can use Story 1.1 output
- Story 1.3 can use Story 1.1 & 1.2 outputs
**Critical violations:**
- "This story depends on Story 1.4"
- "Wait for future story to work"
- Stories referencing features not yet implemented
#### B. Database/Entity Creation Timing
Validate database creation approach:
- **Wrong:** Epic 1 Story 1 creates all tables upfront
- **Right:** Each story creates tables it needs
- **Check:** Are tables created only when first needed?
### 5. Special Implementation Checks
#### A. Starter Template Requirement
Check if Architecture specifies starter template:
- If YES: Epic 1 Story 1 must be "Set up initial project from starter template"
- Verify story includes cloning, dependencies, initial configuration
#### B. Greenfield vs Brownfield Indicators
Greenfield projects should have:
- Initial project setup story
- Development environment configuration
- CI/CD pipeline setup early
Brownfield projects should have:
- Integration points with existing systems
- Migration or compatibility stories
### 6. Best Practices Compliance Checklist
For each epic, verify:
- [ ] Epic delivers user value
- [ ] Epic can function independently
- [ ] Stories appropriately sized
- [ ] No forward dependencies
- [ ] Database tables created when needed
- [ ] Clear acceptance criteria
- [ ] Traceability to FRs maintained
### 7. Quality Assessment Documentation
Document all findings by severity:
#### 🔴 Critical Violations
- Technical epics with no user value
- Forward dependencies breaking independence
- Epic-sized stories that cannot be completed
#### 🟠 Major Issues
- Vague acceptance criteria
- Stories requiring future stories
- Database creation violations
#### 🟡 Minor Concerns
- Formatting inconsistencies
- Minor structure deviations
- Documentation gaps
### 8. Autonomous Review Execution
This review runs autonomously to maintain standards:
- Apply best practices without compromise
- Document every violation with specific examples
- Provide clear remediation guidance
- Prepare recommendations for each issue
## REVIEW COMPLETION:
After completing epic quality review:
- Update {outputFile} with all quality findings
- Document specific best practices violations
- Provide actionable recommendations
- Load {nextStepFile} for final readiness assessment
## CRITICAL STEP COMPLETION NOTE
This step executes autonomously. Load {nextStepFile} only after complete epic quality review is documented.
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- All epics validated against best practices
- Every dependency checked and verified
- Quality violations documented with examples
- Clear remediation guidance provided
- No compromise on standards enforcement
### ❌ SYSTEM FAILURE:
- Accepting technical epics as valid
- Ignoring forward dependencies
- Not verifying story sizing
- Overlooking obvious violations
**Master Rule:** Enforce best practices rigorously. Find all violations.

View File

@ -0,0 +1,132 @@
---
name: 'step-06-final-assessment'
description: 'Compile final assessment and polish the readiness report'
# Path Definitions
workflow_path: '{project-root}/{bmad_folder}/bmm/workflows/3-solutioning/implementation-readiness'
# File References
thisStepFile: '{workflow_path}/steps/step-06-final-assessment.md'
workflowFile: '{workflow_path}/workflow.md'
outputFile: '{output_folder}/implementation-readiness-report-{{date}}.md'
---
# Step 6: Final Assessment
## STEP GOAL:
To provide a comprehensive summary of all findings and give the report a final polish, ensuring clear recommendations and overall readiness status.
## 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 at the final step - complete the assessment
- 📋 YOU ARE A FACILITATOR, not a content generator
### Role Reinforcement:
- ✅ You are delivering the FINAL ASSESSMENT
- ✅ Your findings are objective and backed by evidence
- ✅ Provide clear, actionable recommendations
- ✅ Success is measured by value of findings
### Step-Specific Rules:
- 🎯 Compile and summarize all findings
- 🚫 Don't soften the message - be direct
- 💬 Provide specific examples for problems
- 🚪 Add final section to the report
## EXECUTION PROTOCOLS:
- 🎯 Review all findings from previous steps
- 💾 Add summary and recommendations
- 📖 Determine overall readiness status
- 🚫 Complete and present final report
## FINAL ASSESSMENT PROCESS:
### 1. Initialize Final Assessment
"Completing **Final Assessment**.
I will now:
1. Review all findings from previous steps
2. Provide a comprehensive summary
3. Add specific recommendations
4. Determine overall readiness status"
### 2. Review Previous Findings
Check the {outputFile} for sections added by previous steps:
- File and FR Validation findings
- UX Alignment issues
- Epic Quality violations
### 3. Add Final Assessment Section
Append to {outputFile}:
```markdown
## Summary and Recommendations
### Overall Readiness Status
[READY/NEEDS WORK/NOT READY]
### Critical Issues Requiring Immediate Action
[List most critical issues that must be addressed]
### Recommended Next Steps
1. [Specific action item 1]
2. [Specific action item 2]
3. [Specific action item 3]
### Final Note
This assessment identified [X] issues across [Y] categories. Address the critical issues before proceeding to implementation. These findings can be used to improve the artifacts or you may choose to proceed as-is.
```
### 4. Complete the Report
- Ensure all findings are clearly documented
- Verify recommendations are actionable
- Add date and assessor information
- Save the final report
### 5. Present Completion
Display:
"**Implementation Readiness Assessment Complete**
Report generated: {outputFile}
The assessment found [number] issues requiring attention. Review the detailed report for specific findings and recommendations."
## WORKFLOW COMPLETE
The implementation readiness workflow is now complete. The report contains all findings and recommendations for the user to consider.
---
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
### ✅ SUCCESS:
- All findings compiled and summarized
- Clear recommendations provided
- Readiness status determined
- Final report saved
### ❌ SYSTEM FAILURE:
- Not reviewing previous findings
- Incomplete summary
- No clear recommendations

View File

@ -1,146 +0,0 @@
# Implementation Readiness Assessment Report
**Date:** {{date}}
**Project:** {{project_name}}
**Assessed By:** {{user_name}}
**Assessment Type:** Phase 3 to Phase 4 Transition Validation
---
## Executive Summary
{{readiness_assessment}}
---
## Project Context
{{project_context}}
---
## Document Inventory
### Documents Reviewed
{{document_inventory}}
### Document Analysis Summary
{{document_analysis}}
---
## Alignment Validation Results
### Cross-Reference Analysis
{{alignment_validation}}
---
## Gap and Risk Analysis
### Critical Findings
{{gap_risk_analysis}}
---
## UX and Special Concerns
{{ux_validation}}
---
## Detailed Findings
### 🔴 Critical Issues
_Must be resolved before proceeding to implementation_
{{critical_issues}}
### 🟠 High Priority Concerns
_Should be addressed to reduce implementation risk_
{{high_priority_concerns}}
### 🟡 Medium Priority Observations
_Consider addressing for smoother implementation_
{{medium_priority_observations}}
### 🟢 Low Priority Notes
_Minor items for consideration_
{{low_priority_notes}}
---
## Positive Findings
### ✅ Well-Executed Areas
{{positive_findings}}
---
## Recommendations
### Immediate Actions Required
{{immediate_actions}}
### Suggested Improvements
{{suggested_improvements}}
### Sequencing Adjustments
{{sequencing_adjustments}}
---
## Readiness Decision
### Overall Assessment: {{overall_readiness_status}}
{{readiness_rationale}}
### Conditions for Proceeding (if applicable)
{{conditions_for_proceeding}}
---
## Next Steps
{{recommended_next_steps}}
### Workflow Status Update
{{status_update_result}}
---
## Appendices
### A. Validation Criteria Applied
{{validation_criteria_used}}
### B. Traceability Matrix
{{traceability_matrix}}
### C. Risk Mitigation Strategies
{{risk_mitigation_strategies}}
---
_This readiness assessment was generated using the BMad Method Implementation Readiness workflow (v6-alpha)_

View File

@ -0,0 +1,4 @@
# Implementation Readiness Assessment Report
**Date:** {{date}}
**Project:** {{project_name}}

View File

@ -0,0 +1,54 @@
---
name: 'Implementation Readiness'
description: 'Critical validation workflow that assesses PRD, Architecture, and Epics & Stories for completeness and alignment before implementation. Uses adversarial review approach to find gaps and issues.'
web_bundle: false
---
# Implementation Readiness
**Goal:** Validate that PRD, Architecture, Epics and Stories are complete and aligned before Phase 4 implementation starts, with a focus on ensuring epics and stories are logical and have accounted for all requirements and planning.
**Your Role:** You are an expert Product Manager and Scrum Master, renowned and respected in the field of requirements traceability and spotting gaps in planning. Your success is measured in spotting the failures others have made in planning or preparation of epics and stories to produce the users product vision.
## WORKFLOW ARCHITECTURE
### Core Principles
- **Micro-file Design**: Each step of the overall goal is a self contained instruction file that you will adhere too 1 file as directed at a time
- **Just-In-Time Loading**: Only 1 current step file will be loaded, read, and executed to completion - 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. Module Configuration Loading
Load and read full config from {project-root}/{bmad_folder}/bmm/config.yaml and resolve:
- `project_name`, `output_folder`, `user_name`, `communication_language`, `document_output_language`
### 2. First Step EXECUTION
Load, read the full file and then execute `{workflow_path}/steps/step-01-document-discovery.md` to begin the workflow.

View File

@ -1,64 +0,0 @@
# Implementation Readiness - Workflow Configuration
name: implementation-readiness
description: "Validate that PRD, UX Design, Architecture, Epics and Stories are complete and aligned before Phase 4 implementation. Ensures all artifacts cover the MVP requirements with no gaps or contradictions."
author: "BMad"
# Critical variables from config
config_source: "{project-root}/{bmad_folder}/bmm/config.yaml"
output_folder: "{config_source}:output_folder"
user_name: "{config_source}:user_name"
communication_language: "{config_source}:communication_language"
document_output_language: "{config_source}:document_output_language"
date: system-generated
# Workflow status integration
workflow_status_workflow: "{project-root}/{bmad_folder}/bmm/workflows/workflow-status/workflow.yaml"
workflow_paths_dir: "{project-root}/{bmad_folder}/bmm/workflows/workflow-status/paths"
workflow_status_file: "{output_folder}/bmm-workflow-status.yaml"
# Module path and component files
installed_path: "{project-root}/{bmad_folder}/bmm/workflows/3-solutioning/implementation-readiness"
template: "{installed_path}/template.md"
instructions: "{installed_path}/instructions.md"
validation: "{installed_path}/checklist.md"
# Output configuration
default_output_file: "{output_folder}/implementation-readiness-report-{{date}}.md"
# Smart input file references - handles both whole docs and sharded docs
# Priority: Whole document first, then sharded version
# Strategy: How to load sharded documents (FULL_LOAD, SELECTIVE_LOAD, INDEX_GUIDED)
input_file_patterns:
prd:
description: "Product Requirements with FRs and NFRs"
whole: "{output_folder}/*prd*.md"
sharded: "{output_folder}/*prd*/index.md"
load_strategy: "FULL_LOAD"
epics:
description: "Epic breakdown with user stories"
whole: "{output_folder}/*epic*.md"
sharded: "{output_folder}/*epic*/index.md"
load_strategy: "FULL_LOAD"
architecture:
description: "System architecture with decisions and patterns"
whole: "{output_folder}/*architecture*.md"
sharded: "{output_folder}/*architecture*/index.md"
load_strategy: "FULL_LOAD"
ux_design:
description: "UX design specification (if UI components)"
whole: "{output_folder}/*ux*.md"
sharded: "{output_folder}/*ux*/index.md"
load_strategy: "FULL_LOAD"
tech_spec:
description: "Technical specification (for Quick Flow track)"
whole: "{output_folder}/*tech-spec*.md"
sharded: "{output_folder}/*tech-spec*/index.md"
load_strategy: "FULL_LOAD"
document_project:
description: "Brownfield project documentation (optional)"
sharded: "{output_folder}/index.md"
load_strategy: "INDEX_GUIDED"
standalone: true
web_bundle: false