Compare commits
24 Commits
cd1ec6121b
...
5b040d9183
| Author | SHA1 | Date |
|---|---|---|
|
|
5b040d9183 | |
|
|
5ea02d7091 | |
|
|
7b21708868 | |
|
|
3c81d78991 | |
|
|
dcaf02f665 | |
|
|
04b328bd2a | |
|
|
c6e53dbbc7 | |
|
|
93db60b8f6 | |
|
|
f344e5cdc2 | |
|
|
8a91c6fffe | |
|
|
36ce3c42d2 | |
|
|
82b4f1dcb4 | |
|
|
6d1da5fc72 | |
|
|
ffe6f6c26b | |
|
|
3fa0865542 | |
|
|
ebc5acd2aa | |
|
|
b7239c1ec3 | |
|
|
0edda967a5 | |
|
|
5077941621 | |
|
|
74240cf842 | |
|
|
83c0a59887 | |
|
|
02d07ed254 | |
|
|
9edc699a8f | |
|
|
28c5b581e9 |
|
|
@ -6,14 +6,14 @@
|
|||
<mandate>Instructions are MANDATORY - either as file path, steps or embedded list in YAML, XML or markdown</mandate>
|
||||
<mandate>Execute ALL steps in instructions IN EXACT ORDER</mandate>
|
||||
<mandate>Save to template output file after EVERY "template-output" tag</mandate>
|
||||
<mandate>NEVER delegate a step - YOU are responsible for every steps execution</mandate>
|
||||
<mandate>NEVER skip a step - YOU are responsible for every steps execution without fail or excuse</mandate>
|
||||
</llm>
|
||||
|
||||
<WORKFLOW-RULES critical="true">
|
||||
<rule n="1">Steps execute in exact numerical order (1, 2, 3...)</rule>
|
||||
<rule n="2">Optional steps: Ask user unless #yolo mode active</rule>
|
||||
<rule n="3">Template-output tags: Save content → Show user → Get approval before continuing</rule>
|
||||
<rule n="4">User must approve each major section before continuing UNLESS #yolo mode active</rule>
|
||||
<rule n="3">Template-output tags: Save content, discuss with the user the section completed, and NEVER proceed until the users indicates
|
||||
to proceed (unless YOLO mode has been activated)</rule>
|
||||
</WORKFLOW-RULES>
|
||||
|
||||
<flow>
|
||||
|
|
@ -43,7 +43,7 @@
|
|||
</substep>
|
||||
</step>
|
||||
|
||||
<step n="2" title="Process Each Instruction Step">
|
||||
<step n="2" title="Process Each Instruction Step in Order">
|
||||
<iterate>For each step in instructions:</iterate>
|
||||
|
||||
<substep n="2a" title="Handle Step Attributes">
|
||||
|
|
@ -60,7 +60,7 @@
|
|||
<tag>action xml tag → Perform the action</tag>
|
||||
<tag>check if="condition" xml tag → Conditional block wrapping actions (requires closing </check>)</tag>
|
||||
<tag>ask xml tag → Prompt user and WAIT for response</tag>
|
||||
<tag>invoke-workflow xml tag → Execute another workflow with given inputs</tag>
|
||||
<tag>invoke-workflow xml tag → Execute another workflow with given inputs and the workflow.xml runner</tag>
|
||||
<tag>invoke-task xml tag → Execute specified task</tag>
|
||||
<tag>invoke-protocol name="protocol_name" xml tag → Execute reusable protocol from protocols section</tag>
|
||||
<tag>goto step="x" → Jump to specified step</tag>
|
||||
|
|
@ -98,16 +98,14 @@
|
|||
</step>
|
||||
|
||||
<step n="3" title="Completion">
|
||||
<check>If checklist exists → Run validation</check>
|
||||
<check>If template: false → Confirm actions completed</check>
|
||||
<check>Else → Confirm document saved to output path</check>
|
||||
<check>Confirm document saved to output path</check>
|
||||
<action>Report workflow completion</action>
|
||||
</step>
|
||||
</flow>
|
||||
|
||||
<execution-modes>
|
||||
<mode name="normal">Full user interaction at all decision points</mode>
|
||||
<mode name="#yolo">Skip all confirmations and elicitation, minimize prompts and try to produce all of the workflow automatically by
|
||||
<mode name="normal">Full user interaction and confirmation of EVERY step at EVERY template output - NO EXCEPTIONS except yolo MODE</mode>
|
||||
<mode name="yolo">Skip all confirmations and elicitation, minimize prompts and try to produce all of the workflow automatically by
|
||||
simulating the remaining discussions with an simulated expert user</mode>
|
||||
</execution-modes>
|
||||
|
||||
|
|
@ -123,7 +121,7 @@
|
|||
<tag>action - Required action to perform</tag>
|
||||
<tag>action if="condition" - Single conditional action (inline, no closing tag needed)</tag>
|
||||
<tag>check if="condition">...</check> - Conditional block wrapping multiple items (closing tag required)</tag>
|
||||
<tag>ask - Get user input (wait for response)</tag>
|
||||
<tag>ask - Get user input (ALWAYS wait for response before continuing)</tag>
|
||||
<tag>goto - Jump to another step</tag>
|
||||
<tag>invoke-workflow - Call another workflow</tag>
|
||||
<tag>invoke-task - Call a task</tag>
|
||||
|
|
@ -136,35 +134,6 @@
|
|||
</output>
|
||||
</supported-tags>
|
||||
|
||||
<conditional-execution-patterns desc="When to use each pattern">
|
||||
<pattern type="single-action">
|
||||
<use-case>One action with a condition</use-case>
|
||||
<syntax><action if="condition">Do something</action></syntax>
|
||||
<example><action if="file exists">Load the file</action></example>
|
||||
<rationale>Cleaner and more concise for single items</rationale>
|
||||
</pattern>
|
||||
|
||||
<pattern type="multi-action-block">
|
||||
<use-case>Multiple actions/tags under same condition</use-case>
|
||||
<syntax><check if="condition">
|
||||
<action>First action</action>
|
||||
<action>Second action</action>
|
||||
</check></syntax>
|
||||
<example><check if="validation fails">
|
||||
<action>Log error</action>
|
||||
<goto step="1">Retry</goto>
|
||||
</check></example>
|
||||
<rationale>Explicit scope boundaries prevent ambiguity</rationale>
|
||||
</pattern>
|
||||
|
||||
<pattern type="nested-conditions">
|
||||
<use-case>Else/alternative branches</use-case>
|
||||
<syntax><check if="condition A">...</check>
|
||||
<check if="else">...</check></syntax>
|
||||
<rationale>Clear branching logic with explicit blocks</rationale>
|
||||
</pattern>
|
||||
</conditional-execution-patterns>
|
||||
|
||||
<protocols desc="Reusable workflow protocols that can be invoked via invoke-protocol tag">
|
||||
<protocol name="discover_inputs" desc="Smart file discovery and loading based on input_file_patterns">
|
||||
<objective>Intelligently load project files (whole or sharded) based on workflow's input_file_patterns configuration</objective>
|
||||
|
|
@ -180,17 +149,8 @@
|
|||
<step n="2" title="Load Files Using Smart Strategies">
|
||||
<iterate>For each pattern in input_file_patterns:</iterate>
|
||||
|
||||
<substep n="2a" title="Try Whole Document First">
|
||||
<action>Attempt glob match on 'whole' pattern (e.g., "{output_folder}/*prd*.md")</action>
|
||||
<check if="matches found">
|
||||
<action>Load ALL matching files completely (no offset/limit)</action>
|
||||
<action>Store content in variable: {pattern_name_content} (e.g., {prd_content})</action>
|
||||
<action>Mark pattern as RESOLVED, skip to next pattern</action>
|
||||
</check>
|
||||
</substep>
|
||||
|
||||
<substep n="2b" title="Try Sharded Document if Whole Not Found">
|
||||
<check if="no whole matches AND sharded pattern exists">
|
||||
<substep n="2a" title="Try Sharded Documents First">
|
||||
<check if="sharded pattern exists">
|
||||
<action>Determine load_strategy from pattern config (defaults to FULL_LOAD if not specified)</action>
|
||||
|
||||
<strategy name="FULL_LOAD">
|
||||
|
|
@ -223,11 +183,23 @@
|
|||
<action>Store combined content in variable: {pattern_name_content}</action>
|
||||
<note>When in doubt, LOAD IT - context is valuable, being thorough is better than missing critical info</note>
|
||||
</strategy>
|
||||
<action>Mark pattern as RESOLVED, skip to next pattern</action>
|
||||
</check>
|
||||
</substep>
|
||||
|
||||
<substep n="2b" title="Try Whole Document if No Sharded Found">
|
||||
<check if="no sharded matches found OR no sharded pattern exists">
|
||||
<action>Attempt glob match on 'whole' pattern (e.g., "{output_folder}/*prd*.md")</action>
|
||||
<check if="matches found">
|
||||
<action>Load ALL matching files completely (no offset/limit)</action>
|
||||
<action>Store content in variable: {pattern_name_content} (e.g., {prd_content})</action>
|
||||
<action>Mark pattern as RESOLVED, skip to next pattern</action>
|
||||
</check>
|
||||
</check>
|
||||
</substep>
|
||||
|
||||
<substep n="2c" title="Handle Not Found">
|
||||
<check if="no matches for whole OR sharded">
|
||||
<check if="no matches for sharded OR whole">
|
||||
<action>Set {pattern_name_content} to empty string</action>
|
||||
<action>Note in session: "No {pattern_name} files found" (not an error, just unavailable, offer use change to provide)</action>
|
||||
</check>
|
||||
|
|
@ -237,8 +209,8 @@
|
|||
<step n="3" title="Report Discovery Results">
|
||||
<action>List all loaded content variables with file counts</action>
|
||||
<example>
|
||||
✓ Loaded {prd_content} from 1 file: PRD.md
|
||||
✓ Loaded {architecture_content} from 5 sharded files: architecture/index.md, architecture/system-design.md, ...
|
||||
✓ Loaded {prd_content} from 5 sharded files: prd/index.md, prd/requirements.md, ...
|
||||
✓ Loaded {architecture_content} from 1 file: Architecture.md
|
||||
✓ Loaded {epics_content} from selective load: epics/epic-3.md
|
||||
○ No ux_design files found
|
||||
</example>
|
||||
|
|
@ -246,24 +218,18 @@
|
|||
</step>
|
||||
</flow>
|
||||
|
||||
<usage-in-instructions>
|
||||
<example desc="Typical usage in workflow instructions.md">
|
||||
<step n="0" goal="Discover and load project context">
|
||||
<invoke-protocol name="discover_inputs" />
|
||||
</step>
|
||||
|
||||
<step n="1" goal="Analyze requirements">
|
||||
<action>Review {prd_content} for functional requirements</action>
|
||||
<action>Cross-reference with {architecture_content} for technical constraints</action>
|
||||
</step>
|
||||
</example>
|
||||
</usage-in-instructions>
|
||||
</protocol>
|
||||
</protocols>
|
||||
|
||||
<llm final="true">
|
||||
<mandate>This is the complete workflow execution engine</mandate>
|
||||
<mandate>You MUST Follow instructions exactly as written and maintain conversation context between steps</mandate>
|
||||
<mandate>If confused, re-read this task, the workflow yaml, and any yaml indicated files</mandate>
|
||||
<critical-rules>
|
||||
• This is the complete workflow execution engine
|
||||
• You MUST Follow instructions exactly as written
|
||||
• The workflow execution engine is governed by: {project-root}/{bmad_folder}/core/tasks/workflow.xml
|
||||
• You MUST have already loaded and processed: {installed_path}/workflow.yaml
|
||||
• This workflow uses INTENT-DRIVEN PLANNING - adapt organically to product type and context
|
||||
• YOU ARE FACILITATING A CONVERSATION With a user to produce a final document step by step. The whole process is meant to be
|
||||
collaborative helping the user flesh out their ideas. Do not rush or optimize and skip any section.
|
||||
</critical-rules>
|
||||
</llm>
|
||||
</task>
|
||||
</task>
|
||||
|
|
@ -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.
|
||||
|
|
@ -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"
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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"
|
||||
|
|
@ -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
|
||||
|
|
@ -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>
|
||||
```
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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>
|
||||
```
|
||||
|
|
@ -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}} |
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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>
|
||||
```
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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>
|
||||
```
|
||||
|
|
@ -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
|
||||
|
|
@ -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)
|
||||
|
|
@ -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>
|
||||
```
|
||||
|
|
@ -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
|
||||
|
|
@ -24,7 +24,7 @@ agent:
|
|||
description: Get workflow status or initialize a workflow if not already done (optional)
|
||||
|
||||
- trigger: create-prd
|
||||
workflow: "{project-root}/{bmad_folder}/bmm/workflows/2-plan-workflows/prd/workflow.yaml"
|
||||
exec: "{project-root}/{bmad_folder}/bmm/workflows/2-plan-workflows/prd/workflow.md"
|
||||
description: Create Product Requirements Document (PRD) (Required for BMad Method flow)
|
||||
|
||||
- trigger: validate-prd
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ Essential reference materials:
|
|||
|
||||
**Work with existing codebase (brownfield)**
|
||||
→ Read [Brownfield Development Guide](./brownfield-guide.md)
|
||||
→ Pay special attention to Phase 0 documentation requirements
|
||||
→ Pay special attention to documentation requirements for brownfield projects
|
||||
|
||||
**Understand planning tracks and methodology**
|
||||
→ See [Scale Adaptive System](./scale-adaptive-system.md)
|
||||
|
|
|
|||
|
|
@ -103,7 +103,6 @@ The BMad Method Module (BMM) provides a comprehensive team of specialized AI age
|
|||
- Creating product briefs for strategic planning
|
||||
- Conducting research (market, technical, competitive)
|
||||
- Documenting existing projects (brownfield)
|
||||
- Phase 0 documentation needs
|
||||
|
||||
**Primary Phase:** Phase 1 (Analysis)
|
||||
|
||||
|
|
@ -137,7 +136,7 @@ The BMad Method Module (BMM) provides a comprehensive team of specialized AI age
|
|||
- Creating system architecture for Level 2-4 projects
|
||||
- Making technical design decisions
|
||||
- Validating architecture documents
|
||||
- Validating readiness for implementation phase (Phase 3→4 transition)
|
||||
- Validating readiness for implementation phase (Phase 3 to Phase 4 transition)
|
||||
- Course correction during implementation
|
||||
|
||||
**Primary Phase:** Phase 3 (Solutioning)
|
||||
|
|
@ -348,7 +347,7 @@ The BMad Method Module (BMM) provides a comprehensive team of specialized AI age
|
|||
|
||||
**When to Use:**
|
||||
|
||||
- Documenting brownfield projects (Phase 0)
|
||||
- Documenting brownfield projects (Documentation prerequisite)
|
||||
- Creating API documentation
|
||||
- Generating architecture documentation
|
||||
- Writing user guides and tutorials
|
||||
|
|
@ -492,7 +491,7 @@ The BMad Method Module (BMM) provides a comprehensive team of specialized AI age
|
|||
|
||||
- `workflow-status` - Check what to do next
|
||||
- `create-architecture` - Game systems architecture
|
||||
- `implementation-readiness` - Validate Phase 3→4 transition
|
||||
- `implementation-readiness` - Validate Phase 3 to Phase 4 transition
|
||||
- `correct-course` - Handle technical changes
|
||||
|
||||
**Communication Style:** Calm and measured. Systematic thinking about complex systems. Uses chess metaphors and military strategy. Emphasizes balance and elegance.
|
||||
|
|
@ -958,8 +957,8 @@ Agent analyzes project state → recommends next workflow
|
|||
|
||||
```
|
||||
Each phase has validation gates:
|
||||
- Phase 2→3: validate-prd, validate-tech-spec
|
||||
- Phase 3→4: implementation-readiness
|
||||
- Phase 2 to 3: validate-prd, validate-tech-spec
|
||||
- Phase 3 to 4: implementation-readiness
|
||||
Run validation before advancing
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ You: "Yes"
|
|||
|
||||
---
|
||||
|
||||
## Phase 0: Documentation (Critical First Step)
|
||||
## Documentation: Critical First Step
|
||||
|
||||
🚨 **For brownfield projects: Always ensure adequate AI-usable documentation before planning**
|
||||
|
||||
|
|
@ -159,7 +159,7 @@ If you have documentation but files are huge (>500 lines, 10+ level 2 sections):
|
|||
| **A** | No documentation | `document-project` | Only option - generate from scratch |
|
||||
| **B** | Docs exist but massive/outdated/incomplete | `document-project` | Safer to regenerate than trust bad docs |
|
||||
| **C** | Good docs but no structure | `shard-doc` → `index-docs` | Structure existing content for AI |
|
||||
| **D** | Confirmed AI-optimized docs with index.md | Skip Phase 0 | Rare - only if you're 100% confident |
|
||||
| **D** | Confirmed AI-optimized docs with index.md | Skip Documentation | Rare - only if you're 100% confident |
|
||||
|
||||
### Scenario A: No Documentation (Most Common)
|
||||
|
||||
|
|
@ -231,7 +231,7 @@ If you have **good, current documentation** but it's in massive files:
|
|||
|
||||
### Scenario D: Confirmed AI-Optimized Documentation (Rare)
|
||||
|
||||
**Action: Skip Phase 0**
|
||||
**Action: Skip Documentation**
|
||||
|
||||
Only skip if ALL conditions met:
|
||||
|
||||
|
|
@ -619,7 +619,7 @@ Document in tech-spec/architecture:
|
|||
### Commands by Phase
|
||||
|
||||
```bash
|
||||
# Phase 0: Documentation (If Needed)
|
||||
# Documentation (If Needed)
|
||||
# Analyst agent:
|
||||
document-project # Create comprehensive docs (10-30min)
|
||||
# OR load index-docs task for existing docs (2-5min)
|
||||
|
|
@ -637,16 +637,14 @@ prd # BMad Method/Enterprise tracks
|
|||
|
||||
# Phase 3: Solutioning (BMad Method/Enterprise)
|
||||
# Architect agent:
|
||||
create-architecture # Extend architecture
|
||||
architecture # Create/extend architecture
|
||||
create-epics-and-stories # Create epics and stories (after architecture)
|
||||
implementation-readiness # Final validation
|
||||
|
||||
# Phase 4: Implementation (All Tracks)
|
||||
# SM agent:
|
||||
sprint-planning # Initialize tracking
|
||||
epic-tech-context # Epic context
|
||||
create-story # Draft story
|
||||
story-context # Story context
|
||||
create-story # Create story
|
||||
|
||||
# DEV agent:
|
||||
dev-story # Implement
|
||||
|
|
@ -659,14 +657,14 @@ correct-course # If issues
|
|||
|
||||
### Key Files
|
||||
|
||||
**Phase 0 Output:**
|
||||
**Documentation Output:**
|
||||
|
||||
- `docs/index.md` - **Master AI entry point (REQUIRED)**
|
||||
- `docs/project-overview.md`
|
||||
- `docs/architecture.md`
|
||||
- `docs/source-tree-analysis.md`
|
||||
|
||||
**Phase 1-3 Tracking:**
|
||||
**Phase 1-4 Tracking:**
|
||||
|
||||
- `docs/bmm-workflow-status.yaml` - Progress tracker
|
||||
|
||||
|
|
@ -682,6 +680,7 @@ correct-course # If issues
|
|||
**Phase 3 Architecture:**
|
||||
|
||||
- `docs/architecture.md` (BMad Method/Enterprise tracks)
|
||||
- `docs/epics.md` + epic folders (from create-epics-and-stories)
|
||||
|
||||
**Phase 4 Implementation:**
|
||||
|
||||
|
|
|
|||
|
|
@ -101,10 +101,6 @@ Game development equivalent of PRD, created by Game Designer agent for game proj
|
|||
|
||||
## Workflow and Phases
|
||||
|
||||
### Phase 0: Documentation (Prerequisite)
|
||||
|
||||
**Conditional phase for brownfield projects.** Creates comprehensive codebase documentation before planning. Only required if existing documentation is insufficient for AI agents.
|
||||
|
||||
### Phase 1: Analysis (Optional)
|
||||
|
||||
Discovery and research phase including brainstorming, research workflows, and product brief creation. Optional for Quick Flow, recommended for BMad Method, required for Enterprise Method.
|
||||
|
|
@ -119,7 +115,11 @@ Architecture design phase. Required for BMad Method and Enterprise Method tracks
|
|||
|
||||
### Phase 4: Implementation (Required)
|
||||
|
||||
Sprint-based development through story-by-story iteration. Uses sprint-planning, epic-tech-context, create-story, story-context, dev-story, code-review, and retrospective workflows.
|
||||
Sprint-based development through story-by-story iteration. Uses sprint-planning, create-story, dev-story, code-review, and retrospective workflows.
|
||||
|
||||
### Documentation (Prerequisite for Brownfield)
|
||||
|
||||
**Conditional prerequisite for brownfield projects.** Creates comprehensive codebase documentation before planning. Only required if existing documentation is insufficient for AI agents. Uses the `document-project` workflow.
|
||||
|
||||
### Quick Spec Flow
|
||||
|
||||
|
|
|
|||
|
|
@ -32,11 +32,11 @@ BMad Method adapts to three distinct planning tracks:
|
|||
|
||||
### Three Tracks at a Glance
|
||||
|
||||
| Track | Planning Depth | Time Investment | Best For |
|
||||
| --------------------- | --------------------- | --------------- | ------------------------------------------ |
|
||||
| **Quick Flow** | Tech-spec only | Hours to 1 day | Simple features, bug fixes, clear scope |
|
||||
| **BMad Method** | PRD + Arch + UX | 1-3 days | Products, platforms, complex features |
|
||||
| **Enterprise Method** | Method + Test/Sec/Ops | 3-7 days | Enterprise needs, compliance, multi-tenant |
|
||||
| Track | Planning Depth | Best For |
|
||||
| --------------------- | --------------------- | ------------------------------------------ |
|
||||
| **Quick Flow** | Tech-spec only | Simple features, bug fixes, clear scope |
|
||||
| **BMad Method** | PRD + Arch + UX | Products, platforms, complex features |
|
||||
| **Enterprise Method** | Method + Test/Sec/Ops | Enterprise needs, compliance, multi-tenant |
|
||||
|
||||
### Decision Tree
|
||||
|
||||
|
|
|
|||
|
|
@ -88,9 +88,9 @@ graph TB
|
|||
style Waived fill:#9c27b0,stroke:#4a148c,stroke-width:3px,color:#000
|
||||
```
|
||||
|
||||
**Phase Numbering Note:** BMad uses a 4-phase methodology with optional Phase 0/1:
|
||||
**Phase Numbering Note:** BMad uses a 4-phase methodology with optional Phase 1 and documentation prerequisite:
|
||||
|
||||
- **Phase 0** (Optional): Documentation (brownfield prerequisite - `*document-project`)
|
||||
- **Documentation** (Optional for brownfield): Prerequisite using `*document-project`
|
||||
- **Phase 1** (Optional): Discovery/Analysis (`*brainstorm`, `*research`, `*product-brief`)
|
||||
- **Phase 2** (Required): Planning (`*prd` creates PRD with FRs/NFRs)
|
||||
- **Phase 3** (Track-dependent): Solutioning (`*architecture` → `*create-epics-and-stories` → TEA: `*framework`, `*ci` → `*implementation-readiness`)
|
||||
|
|
@ -98,7 +98,7 @@ graph TB
|
|||
|
||||
**TEA workflows:** `*framework` and `*ci` run once in Phase 3 after architecture. `*test-design` runs per-epic in Phase 4. Output: `test-design-epic-N.md`.
|
||||
|
||||
Quick Flow track skips Phases 0, 1, and 3. BMad Method and Enterprise use all phases based on project needs.
|
||||
Quick Flow track skips Phase 1 and 3. BMad Method and Enterprise use all phases based on project needs.
|
||||
|
||||
### Why TEA is Different from Other BMM Agents
|
||||
|
||||
|
|
@ -259,22 +259,22 @@ These cheat sheets map TEA workflows to the **BMad Method and Enterprise tracks*
|
|||
|
||||
**🔄 Brownfield Deltas from Greenfield:**
|
||||
|
||||
- ➕ Phase 0 (Documentation) - Document existing codebase if undocumented
|
||||
- ➕ Documentation (Prerequisite) - Document existing codebase if undocumented
|
||||
- ➕ Phase 2: `*trace` - Baseline existing test coverage before planning
|
||||
- 🔄 Phase 4: `*test-design` - Focus on regression hotspots and brownfield risks
|
||||
- 🔄 Phase 4: Story Review - May include `*nfr-assess` if not done earlier
|
||||
|
||||
| Workflow Stage | Test Architect | Dev / Team | Outputs |
|
||||
| ----------------------------- | ---------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ---------------------------------------------------------------------- |
|
||||
| **Phase 0**: Documentation ➕ | - | Analyst `*document-project` (if undocumented) | Comprehensive project documentation |
|
||||
| **Phase 1**: Discovery | - | Analyst/PM/Architect rerun planning workflows | Updated planning artifacts in `{output_folder}` |
|
||||
| **Phase 2**: Planning | Run ➕ `*trace` (baseline coverage) | PM `*prd` (creates PRD with FRs/NFRs) | PRD with FRs/NFRs, ➕ coverage baseline |
|
||||
| **Phase 3**: Solutioning | Run `*framework`, `*ci` AFTER architecture and epic creation | Architect `*architecture`, `*create-epics-and-stories`, `*implementation-readiness` | Architecture, epics/stories, test framework, CI pipeline |
|
||||
| **Phase 4**: Sprint Start | - | SM `*sprint-planning` | Sprint status file with all epics and stories |
|
||||
| **Phase 4**: Epic Planning | Run `*test-design` for THIS epic 🔄 (regression hotspots) | Review epic scope and brownfield risks | `test-design-epic-N.md` with brownfield risk assessment and mitigation |
|
||||
| **Phase 4**: Story Dev | (Optional) `*atdd` before dev, then `*automate` after | SM `*create-story`, DEV implements | Tests, story implementation |
|
||||
| **Phase 4**: Story Review | Apply `*test-review` (optional), re-run `*trace`, ➕ `*nfr-assess` if needed | Resolve gaps, update docs/tests | Quality report, refreshed coverage matrix, NFR report |
|
||||
| **Phase 4**: Release Gate | (Optional) `*test-review` for final audit, Run `*trace` (Phase 2) | Capture sign-offs, share release notes | Quality audit, Gate YAML + release summary |
|
||||
| Workflow Stage | Test Architect | Dev / Team | Outputs |
|
||||
| ---------------------------------- | ---------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ---------------------------------------------------------------------- |
|
||||
| **Documentation**: Prerequisite ➕ | - | Analyst `*document-project` (if undocumented) | Comprehensive project documentation |
|
||||
| **Phase 1**: Discovery | - | Analyst/PM/Architect rerun planning workflows | Updated planning artifacts in `{output_folder}` |
|
||||
| **Phase 2**: Planning | Run ➕ `*trace` (baseline coverage) | PM `*prd` (creates PRD with FRs/NFRs) | PRD with FRs/NFRs, ➕ coverage baseline |
|
||||
| **Phase 3**: Solutioning | Run `*framework`, `*ci` AFTER architecture and epic creation | Architect `*architecture`, `*create-epics-and-stories`, `*implementation-readiness` | Architecture, epics/stories, test framework, CI pipeline |
|
||||
| **Phase 4**: Sprint Start | - | SM `*sprint-planning` | Sprint status file with all epics and stories |
|
||||
| **Phase 4**: Epic Planning | Run `*test-design` for THIS epic 🔄 (regression hotspots) | Review epic scope and brownfield risks | `test-design-epic-N.md` with brownfield risk assessment and mitigation |
|
||||
| **Phase 4**: Story Dev | (Optional) `*atdd` before dev, then `*automate` after | SM `*create-story`, DEV implements | Tests, story implementation |
|
||||
| **Phase 4**: Story Review | Apply `*test-review` (optional), re-run `*trace`, ➕ `*nfr-assess` if needed | Resolve gaps, update docs/tests | Quality report, refreshed coverage matrix, NFR report |
|
||||
| **Phase 4**: Release Gate | (Optional) `*test-review` for final audit, Run `*trace` (Phase 2) | Capture sign-offs, share release notes | Quality audit, Gate YAML + release summary |
|
||||
|
||||
<details>
|
||||
<summary>Execution Notes</summary>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
# BMM Analysis Workflows (Phase 1)
|
||||
|
||||
**Reading Time:** ~7 minutes
|
||||
|
||||
## Overview
|
||||
|
||||
Phase 1 (Analysis) workflows are **optional** exploration and discovery tools that help validate ideas, understand markets, and generate strategic context before planning begins.
|
||||
|
|
@ -14,61 +12,35 @@ Phase 1 (Analysis) workflows are **optional** exploration and discovery tools th
|
|||
|
||||
---
|
||||
|
||||
## Phase 1 Analysis Workflow Map
|
||||
## Phase 1 Analysis Workflow Overview
|
||||
|
||||
```mermaid
|
||||
%%{init: {'theme':'base', 'themeVariables': { 'primaryColor':'#fff','primaryTextColor':'#000','primaryBorderColor':'#000','lineColor':'#000','fontSize':'16px','fontFamily':'arial'}}}%%
|
||||
graph TB
|
||||
subgraph Discovery["<b>DISCOVERY & IDEATION (Optional)</b>"]
|
||||
direction LR
|
||||
BrainstormProject["<b>Analyst: brainstorm-project</b><br/>Multi-track solution exploration"]
|
||||
BrainstormGame["<b>Analyst: brainstorm-game</b><br/>Game concept generation"]
|
||||
end
|
||||
Phase 1 Analysis consists of three categories of optional workflows:
|
||||
|
||||
subgraph Research["<b>RESEARCH & VALIDATION (Optional)</b>"]
|
||||
direction TB
|
||||
ResearchWF["<b>Analyst: research</b><br/>• market (TAM/SAM/SOM)<br/>• technical (framework evaluation)<br/>• competitive (landscape)<br/>• user (personas, JTBD)<br/>• domain (industry analysis)<br/>• deep_prompt (AI research)"]
|
||||
end
|
||||
### Discovery & Ideation (Optional)
|
||||
|
||||
subgraph Strategy["<b>STRATEGIC CAPTURE (Recommended for Greenfield)</b>"]
|
||||
direction LR
|
||||
ProductBrief["<b>Analyst: product-brief</b><br/>Product vision + strategy<br/>(Interactive or YOLO mode)"]
|
||||
GameBrief["<b>Game Designer: game-brief</b><br/>Game vision capture<br/>(Interactive or YOLO mode)"]
|
||||
end
|
||||
- **brainstorm-project** - Multi-track solution exploration for software projects
|
||||
- **brainstorm-game** - Game concept generation (coming soon)
|
||||
|
||||
Discovery -.->|Software| ProductBrief
|
||||
Discovery -.->|Games| GameBrief
|
||||
Discovery -.->|Validate ideas| Research
|
||||
Research -.->|Inform brief| ProductBrief
|
||||
Research -.->|Inform brief| GameBrief
|
||||
ProductBrief --> Phase2["<b>Phase 2: prd workflow</b>"]
|
||||
GameBrief --> Phase2Game["<b>Phase 2: gdd workflow</b>"]
|
||||
Research -.->|Can feed directly| Phase2
|
||||
### Research & Validation (Optional)
|
||||
|
||||
style Discovery fill:#e1f5fe,stroke:#01579b,stroke-width:3px,color:#000
|
||||
style Research fill:#fff9c4,stroke:#f57f17,stroke-width:3px,color:#000
|
||||
style Strategy fill:#f3e5f5,stroke:#4a148c,stroke-width:3px,color:#000
|
||||
style Phase2 fill:#c8e6c9,stroke:#2e7d32,stroke-width:2px,color:#000
|
||||
style Phase2Game fill:#c8e6c9,stroke:#2e7d32,stroke-width:2px,color:#000
|
||||
- **research** - Market, technical, competitive, user, domain, and AI research
|
||||
- **domain-research** - Industry-specific deep dive research
|
||||
|
||||
style BrainstormProject fill:#81d4fa,stroke:#0277bd,stroke-width:2px,color:#000
|
||||
style BrainstormGame fill:#81d4fa,stroke:#0277bd,stroke-width:2px,color:#000
|
||||
style ResearchWF fill:#fff59d,stroke:#f57f17,stroke-width:2px,color:#000
|
||||
style ProductBrief fill:#ce93d8,stroke:#6a1b9a,stroke-width:2px,color:#000
|
||||
style GameBrief fill:#ce93d8,stroke:#6a1b9a,stroke-width:2px,color:#000
|
||||
```
|
||||
### Strategic Capture (Recommended for Greenfield)
|
||||
|
||||
- **product-brief** - Product vision and strategy definition
|
||||
|
||||
These workflows feed into Phase 2 (Planning) workflows, particularly the `prd` workflow.
|
||||
|
||||
---
|
||||
|
||||
## Quick Reference
|
||||
|
||||
| Workflow | Agent | Required | Purpose | Output |
|
||||
| ---------------------- | ------------- | ----------- | -------------------------------------------------------------- | ---------------------------- |
|
||||
| **brainstorm-project** | Analyst | No | Explore solution approaches and architectures | Solution options + rationale |
|
||||
| **brainstorm-game** | Analyst | No | Generate game concepts using creative techniques | Game concepts + evaluation |
|
||||
| **research** | Analyst | No | Multi-type research (market/technical/competitive/user/domain) | Research reports |
|
||||
| **product-brief** | Analyst | Recommended | Define product vision and strategy (interactive) | Product Brief document |
|
||||
| **game-brief** | Game Designer | Recommended | Capture game vision before GDD (interactive) | Game Brief document |
|
||||
| Workflow | Agent | Required | Purpose | Output |
|
||||
| ---------------------- | ------- | ----------- | -------------------------------------------------------------- | ---------------------------- |
|
||||
| **brainstorm-project** | Analyst | No | Explore solution approaches and architectures | Solution options + rationale |
|
||||
| **research** | Analyst | No | Multi-type research (market/technical/competitive/user/domain) | Research reports |
|
||||
| **product-brief** | Analyst | Recommended | Define product vision and strategy (interactive) | Product Brief document |
|
||||
|
||||
---
|
||||
|
||||
|
|
@ -98,37 +70,6 @@ graph TB
|
|||
|
||||
---
|
||||
|
||||
### brainstorm-game
|
||||
|
||||
**Purpose:** Generate game concepts through systematic creative exploration using five brainstorming techniques.
|
||||
|
||||
**Agent:** Analyst
|
||||
|
||||
**When to Use:**
|
||||
|
||||
- Generating original game concepts
|
||||
- Exploring variations on themes
|
||||
- Breaking creative blocks
|
||||
- Validating game ideas against constraints
|
||||
|
||||
**Techniques Used:**
|
||||
|
||||
- SCAMPER (systematic modification)
|
||||
- Mind Mapping (hierarchical exploration)
|
||||
- Lotus Blossom (radial expansion)
|
||||
- Six Thinking Hats (multi-perspective)
|
||||
- Random Word Association (lateral thinking)
|
||||
|
||||
**Key Outputs:**
|
||||
|
||||
- Method-specific artifacts (5 separate documents)
|
||||
- Consolidated concept document with feasibility
|
||||
- Design pillar alignment matrix
|
||||
|
||||
**Example:** "Roguelike with psychological themes" → Emotions as characters, inner demons as enemies, therapy sessions as rest points, deck composition affects narrative.
|
||||
|
||||
---
|
||||
|
||||
### research
|
||||
|
||||
**Purpose:** Comprehensive multi-type research system consolidating market, technical, competitive, user, and domain analysis.
|
||||
|
|
@ -190,42 +131,6 @@ graph TB
|
|||
|
||||
---
|
||||
|
||||
### game-brief
|
||||
|
||||
**Purpose:** Lightweight interactive brainstorming session capturing game vision before Game Design Document.
|
||||
|
||||
**Agent:** Game Designer
|
||||
|
||||
**When to Use:**
|
||||
|
||||
- Starting new game project
|
||||
- Exploring game ideas before committing
|
||||
- Pitching concepts to team/stakeholders
|
||||
- Validating market fit and feasibility
|
||||
|
||||
**Game Brief vs GDD:**
|
||||
|
||||
| Aspect | Game Brief | GDD |
|
||||
| ------------ | ------------------ | ------------------------- |
|
||||
| Purpose | Validate concept | Design for implementation |
|
||||
| Detail Level | High-level vision | Detailed specs |
|
||||
| Format | Conversational | Structured |
|
||||
| Output | Concise vision doc | Comprehensive design |
|
||||
|
||||
**Key Outputs:**
|
||||
|
||||
- Game vision (concept, pitch)
|
||||
- Target market and positioning
|
||||
- Core gameplay pillars
|
||||
- Scope and constraints
|
||||
- Reference framework
|
||||
- Risk assessment
|
||||
- Success criteria
|
||||
|
||||
**Integration:** Feeds into GDD workflow (Phase 2).
|
||||
|
||||
---
|
||||
|
||||
## Decision Guide
|
||||
|
||||
### Starting a Software Project
|
||||
|
|
@ -234,16 +139,10 @@ graph TB
|
|||
brainstorm-project (if unclear) → research (market/technical) → product-brief → Phase 2 (prd)
|
||||
```
|
||||
|
||||
### Starting a Game Project
|
||||
|
||||
```
|
||||
brainstorm-game (if generating concepts) → research (market/competitive) → game-brief → Phase 2 (gdd)
|
||||
```
|
||||
|
||||
### Validating an Idea
|
||||
|
||||
```
|
||||
research (market type) → product-brief or game-brief → Phase 2
|
||||
research (market type) → product-brief → Phase 2
|
||||
```
|
||||
|
||||
### Technical Decision Only
|
||||
|
|
@ -258,6 +157,12 @@ research (technical type) → Use findings in Phase 3 (architecture)
|
|||
research (market/competitive type) → product-brief → Phase 2
|
||||
```
|
||||
|
||||
### Domain Research for Complex Industries
|
||||
|
||||
```
|
||||
domain-research → research (compliance/regulatory) → product-brief → Phase 2
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Integration with Phase 2 (Planning)
|
||||
|
|
@ -267,8 +172,8 @@ Analysis outputs feed directly into Planning:
|
|||
| Analysis Output | Planning Input |
|
||||
| --------------------------- | -------------------------- |
|
||||
| product-brief.md | **prd** workflow |
|
||||
| game-brief.md | **gdd** workflow |
|
||||
| market-research.md | **prd** context |
|
||||
| domain-research.md | **prd** context |
|
||||
| technical-research.md | **architecture** (Phase 3) |
|
||||
| competitive-intelligence.md | **prd** positioning |
|
||||
|
||||
|
|
@ -306,20 +211,11 @@ Use analysis workflows to align stakeholders before committing to detailed plann
|
|||
|
||||
```
|
||||
1. brainstorm-project - explore approaches
|
||||
2. research (market) - validate viability
|
||||
2. research (market/technical/domain) - validate viability
|
||||
3. product-brief - capture strategic vision
|
||||
4. → Phase 2: prd
|
||||
```
|
||||
|
||||
### Greenfield Game (Full Analysis)
|
||||
|
||||
```
|
||||
1. brainstorm-game - generate concepts
|
||||
2. research (competitive) - understand landscape
|
||||
3. game-brief - capture vision
|
||||
4. → Phase 2: gdd
|
||||
```
|
||||
|
||||
### Skip Analysis (Clear Requirements)
|
||||
|
||||
```
|
||||
|
|
@ -351,10 +247,10 @@ Use analysis workflows to align stakeholders before committing to detailed plann
|
|||
A: No! Analysis is entirely optional. Use only workflows that help you think through your problem.
|
||||
|
||||
**Q: Which workflow should I start with?**
|
||||
A: If unsure, start with `research` (market type) to validate viability, then move to `product-brief` or `game-brief`.
|
||||
A: If unsure, start with `research` (market type) to validate viability, then move to `product-brief`.
|
||||
|
||||
**Q: Can I skip straight to Planning?**
|
||||
A: Yes! If you know what you're building and why, skip Phase 1 entirely and start with Phase 2 (prd/gdd/tech-spec).
|
||||
A: Yes! If you know what you're building and why, skip Phase 1 entirely and start with Phase 2 (prd/tech-spec).
|
||||
|
||||
**Q: How long should Analysis take?**
|
||||
A: Typically hours to 1-2 days. If taking longer, you may be over-analyzing. Move to Planning.
|
||||
|
|
@ -363,7 +259,7 @@ A: Typically hours to 1-2 days. If taking longer, you may be over-analyzing. Mov
|
|||
A: That's the point! Analysis helps you fail fast and pivot before heavy planning investment.
|
||||
|
||||
**Q: Should brownfield projects do Analysis?**
|
||||
A: Usually no. Start with `document-project` (Phase 0), then skip to Planning (Phase 2).
|
||||
A: Usually no. Start with `document-project` (Documentation prerequisite), then skip to Planning (Phase 2).
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
# BMM Implementation Workflows (Phase 4)
|
||||
|
||||
**Reading Time:** ~8 minutes
|
||||
|
||||
## Overview
|
||||
|
||||
Phase 4 (Implementation) workflows manage the iterative sprint-based development cycle using a **story-centric workflow** where each story moves through a defined lifecycle from creation to completion.
|
||||
|
|
@ -14,117 +12,29 @@ Phase 4 (Implementation) workflows manage the iterative sprint-based development
|
|||
|
||||
Phase 4 is the final phase of the BMad Method workflow. To see how implementation fits into the complete methodology:
|
||||
|
||||

|
||||
The BMad Method consists of four phases working in sequence:
|
||||
|
||||
_Complete workflow showing Phases 1-4. Phase 4 (Implementation) is the rightmost column, showing the iterative epic and story cycles detailed below._
|
||||
1. **Phase 1 (Analysis)** - Optional exploration and discovery workflows
|
||||
2. **Phase 2 (Planning)** - Required requirements definition using scale-adaptive system
|
||||
3. **Phase 3 (Solutioning)** - Technical architecture and design decisions
|
||||
4. **Phase 4 (Implementation)** - Iterative sprint-based development with story-centric workflow
|
||||
|
||||
---
|
||||
Phase 4 focuses on the iterative epic and story cycles where stories are implemented, reviewed, and completed one at a time.
|
||||
|
||||
## Phase 4 Workflow Lifecycle
|
||||
|
||||
```mermaid
|
||||
%%{init: {'theme':'base', 'themeVariables': { 'primaryColor':'#fff','primaryTextColor':'#000','primaryBorderColor':'#000','lineColor':'#000','fontSize':'16px','fontFamily':'arial'}}}%%
|
||||
graph TB
|
||||
subgraph Setup["<b>SPRINT SETUP - Run Once</b>"]
|
||||
direction TB
|
||||
SprintPlanning["<b>SM: sprint-planning</b><br/>Initialize sprint status file"]
|
||||
end
|
||||
|
||||
subgraph EpicCycle["<b>EPIC CYCLE - Repeat Per Epic</b>"]
|
||||
direction TB
|
||||
EpicContext["<b>SM: epic-tech-context</b><br/>Generate epic technical guidance"]
|
||||
ValidateEpic["<b>SM: validate-epic-tech-context</b><br/>(Optional validation)"]
|
||||
|
||||
EpicContext -.->|Optional| ValidateEpic
|
||||
ValidateEpic -.-> StoryLoopStart
|
||||
EpicContext --> StoryLoopStart[Start Story Loop]
|
||||
end
|
||||
|
||||
subgraph StoryLoop["<b>STORY LIFECYCLE - Repeat Per Story</b>"]
|
||||
direction TB
|
||||
|
||||
CreateStory["<b>SM: create-story</b><br/>Create next story from queue"]
|
||||
ValidateStory["<b>SM: validate-create-story</b><br/>(Optional validation)"]
|
||||
StoryContext["<b>SM: story-context</b><br/>Assemble dynamic context"]
|
||||
StoryReady["<b>SM: story-ready-for-dev</b><br/>Mark ready without context"]
|
||||
ValidateContext["<b>SM: validate-story-context</b><br/>(Optional validation)"]
|
||||
DevStory["<b>DEV: develop-story</b><br/>Implement with tests"]
|
||||
CodeReview["<b>DEV: code-review</b><br/>Senior dev review"]
|
||||
StoryDone["<b>DEV: story-done</b><br/>Mark complete, advance queue"]
|
||||
|
||||
CreateStory -.->|Optional| ValidateStory
|
||||
ValidateStory -.-> StoryContext
|
||||
CreateStory --> StoryContext
|
||||
CreateStory -.->|Alternative| StoryReady
|
||||
StoryContext -.->|Optional| ValidateContext
|
||||
ValidateContext -.-> DevStory
|
||||
StoryContext --> DevStory
|
||||
StoryReady -.-> DevStory
|
||||
DevStory --> CodeReview
|
||||
CodeReview -.->|Needs fixes| DevStory
|
||||
CodeReview --> StoryDone
|
||||
StoryDone -.->|Next story| CreateStory
|
||||
end
|
||||
|
||||
subgraph EpicClose["<b>EPIC COMPLETION</b>"]
|
||||
direction TB
|
||||
Retrospective["<b>SM: epic-retrospective</b><br/>Post-epic lessons learned"]
|
||||
end
|
||||
|
||||
subgraph Support["<b>SUPPORTING WORKFLOWS</b>"]
|
||||
direction TB
|
||||
CorrectCourse["<b>SM: correct-course</b><br/>Handle mid-sprint changes"]
|
||||
WorkflowStatus["<b>Any Agent: workflow-status</b><br/>Check what's next"]
|
||||
end
|
||||
|
||||
Setup --> EpicCycle
|
||||
EpicCycle --> StoryLoop
|
||||
StoryLoop --> EpicClose
|
||||
EpicClose -.->|Next epic| EpicCycle
|
||||
StoryLoop -.->|If issues arise| CorrectCourse
|
||||
StoryLoop -.->|Anytime| WorkflowStatus
|
||||
EpicCycle -.->|Anytime| WorkflowStatus
|
||||
|
||||
style Setup fill:#e3f2fd,stroke:#1565c0,stroke-width:3px,color:#000
|
||||
style EpicCycle fill:#c5e1a5,stroke:#33691e,stroke-width:3px,color:#000
|
||||
style StoryLoop fill:#f3e5f5,stroke:#6a1b9a,stroke-width:3px,color:#000
|
||||
style EpicClose fill:#ffcc80,stroke:#e65100,stroke-width:3px,color:#000
|
||||
style Support fill:#fff3e0,stroke:#e65100,stroke-width:3px,color:#000
|
||||
|
||||
style SprintPlanning fill:#90caf9,stroke:#0d47a1,stroke-width:2px,color:#000
|
||||
style EpicContext fill:#aed581,stroke:#1b5e20,stroke-width:2px,color:#000
|
||||
style ValidateEpic fill:#c5e1a5,stroke:#33691e,stroke-width:1px,color:#000
|
||||
style CreateStory fill:#ce93d8,stroke:#4a148c,stroke-width:2px,color:#000
|
||||
style ValidateStory fill:#e1bee7,stroke:#6a1b9a,stroke-width:1px,color:#000
|
||||
style StoryContext fill:#ce93d8,stroke:#4a148c,stroke-width:2px,color:#000
|
||||
style StoryReady fill:#ce93d8,stroke:#4a148c,stroke-width:2px,color:#000
|
||||
style ValidateContext fill:#e1bee7,stroke:#6a1b9a,stroke-width:1px,color:#000
|
||||
style DevStory fill:#a5d6a7,stroke:#1b5e20,stroke-width:2px,color:#000
|
||||
style CodeReview fill:#a5d6a7,stroke:#1b5e20,stroke-width:2px,color:#000
|
||||
style StoryDone fill:#a5d6a7,stroke:#1b5e20,stroke-width:2px,color:#000
|
||||
style Retrospective fill:#ffb74d,stroke:#e65100,stroke-width:2px,color:#000
|
||||
```
|
||||
For a visual representation of the complete workflow, see: [workflow-method-greenfield.excalidraw](./images/workflow-method-greenfield.excalidraw)
|
||||
|
||||
---
|
||||
|
||||
## Quick Reference
|
||||
|
||||
| Workflow | Agent | When | Purpose |
|
||||
| ------------------------------ | ----- | -------------------------------- | ------------------------------------------- |
|
||||
| **sprint-planning** | SM | Once at Phase 4 start | Initialize sprint tracking file |
|
||||
| **epic-tech-context** | SM | Per epic | Generate epic-specific technical guidance |
|
||||
| **validate-epic-tech-context** | SM | Optional after epic-tech-context | Validate tech spec against checklist |
|
||||
| **create-story** | SM | Per story | Create next story from epic backlog |
|
||||
| **validate-create-story** | SM | Optional after create-story | Independent validation of story draft |
|
||||
| **story-context** | SM | Optional per story | Assemble dynamic story context XML |
|
||||
| **validate-story-context** | SM | Optional after story-context | Validate story context against checklist |
|
||||
| **story-ready-for-dev** | SM | Optional per story | Mark story ready without generating context |
|
||||
| **develop-story** | DEV | Per story | Implement story with tests |
|
||||
| **code-review** | DEV | Per story | Senior dev quality review |
|
||||
| **story-done** | DEV | Per story | Mark complete and advance queue |
|
||||
| **epic-retrospective** | SM | After epic complete | Review lessons and extract insights |
|
||||
| **correct-course** | SM | When issues arise | Handle significant mid-sprint changes |
|
||||
| **workflow-status** | Any | Anytime | Check "what should I do now?" |
|
||||
| Workflow | Agent | When | Purpose |
|
||||
| ------------------- | ----- | --------------------- | ------------------------------------- |
|
||||
| **sprint-planning** | SM | Once at Phase 4 start | Initialize sprint tracking file |
|
||||
| **create-story** | SM | Per story | Create next story from epic backlog |
|
||||
| **dev-story** | DEV | Per story | Implement story with tests |
|
||||
| **code-review** | DEV | Per story | Senior dev quality review |
|
||||
| **retrospective** | SM | After epic complete | Review lessons and extract insights |
|
||||
| **correct-course** | SM | When issues arise | Handle significant mid-sprint changes |
|
||||
|
||||
---
|
||||
|
||||
|
|
@ -132,27 +42,26 @@ graph TB
|
|||
|
||||
### SM (Scrum Master) - Primary Implementation Orchestrator
|
||||
|
||||
**Workflows:** sprint-planning, epic-tech-context, validate-epic-tech-context, create-story, validate-create-story, story-context, validate-story-context, story-ready-for-dev, epic-retrospective, correct-course
|
||||
**Workflows:** sprint-planning, create-story, retrospective, correct-course
|
||||
|
||||
**Responsibilities:**
|
||||
|
||||
- Initialize and maintain sprint tracking
|
||||
- Generate technical context (epic and story level)
|
||||
- Orchestrate story lifecycle with optional validations
|
||||
- Mark stories ready for development
|
||||
- Handle course corrections
|
||||
- Facilitate retrospectives
|
||||
- Create stories from epic backlog
|
||||
- Handle course corrections when issues arise
|
||||
- Facilitate retrospectives after epic completion
|
||||
- Orchestrate overall implementation flow
|
||||
|
||||
### DEV (Developer) - Implementation and Quality
|
||||
|
||||
**Workflows:** develop-story, code-review, story-done
|
||||
**Workflows:** dev-story, code-review
|
||||
|
||||
**Responsibilities:**
|
||||
|
||||
- Implement stories with tests
|
||||
- Perform senior developer code reviews
|
||||
- Mark stories complete and advance queue
|
||||
- Ensure quality and adherence to standards
|
||||
- Complete story implementation lifecycle
|
||||
|
||||
---
|
||||
|
||||
|
|
@ -183,24 +92,19 @@ Stories move through these states in the sprint status file:
|
|||
|
||||
**Per Epic:**
|
||||
|
||||
1. SM runs `epic-tech-context`
|
||||
2. SM optionally runs `validate-epic-tech-context`
|
||||
- Epic context and stories are already prepared from Phase 3
|
||||
|
||||
**Per Story (repeat until epic complete):**
|
||||
|
||||
1. SM runs `create-story`
|
||||
2. SM optionally runs `validate-create-story`
|
||||
3. SM runs `story-context` OR `story-ready-for-dev` (choose one)
|
||||
4. SM optionally runs `validate-story-context` (if story-context was used)
|
||||
5. DEV runs `develop-story`
|
||||
6. DEV runs `code-review`
|
||||
7. If code review passes: DEV runs `story-done`
|
||||
8. If code review finds issues: DEV fixes in `develop-story`, then back to code-review
|
||||
2. DEV runs `dev-story`
|
||||
3. DEV runs `code-review`
|
||||
4. If code review fails: DEV fixes issues in `dev-story`, then re-runs `code-review`
|
||||
|
||||
**After Epic Complete:**
|
||||
|
||||
- SM runs `epic-retrospective`
|
||||
- Move to next epic (start with `epic-tech-context` again)
|
||||
- SM runs `retrospective`
|
||||
- Move to next epic
|
||||
|
||||
**As Needed:**
|
||||
|
||||
|
|
@ -215,14 +119,6 @@ Stories move through these states in the sprint status file:
|
|||
|
||||
Complete each story's full lifecycle before starting the next. This prevents context switching and ensures quality.
|
||||
|
||||
### Epic-Level Technical Context
|
||||
|
||||
Generate detailed technical guidance per epic (not per story) using `epic-tech-context`. This provides just-in-time architecture without upfront over-planning.
|
||||
|
||||
### Story Context (Optional)
|
||||
|
||||
Use `story-context` to assemble focused context XML for each story, pulling from PRD, architecture, epic context, and codebase docs. Alternatively, use `story-ready-for-dev` to mark a story ready without generating context XML.
|
||||
|
||||
### Quality Gates
|
||||
|
||||
Every story goes through `code-review` before being marked done. No exceptions.
|
||||
|
|
@ -233,17 +129,7 @@ The `sprint-status.yaml` file is the single source of truth for all implementati
|
|||
|
||||
---
|
||||
|
||||
## Common Patterns
|
||||
|
||||
### Level 0-1 (Quick Flow)
|
||||
|
||||
```
|
||||
tech-spec (PM)
|
||||
→ sprint-planning (SM)
|
||||
→ story loop (SM/DEV)
|
||||
```
|
||||
|
||||
### Level 2-4 (BMad Method / Enterprise)
|
||||
### (BMad Method / Enterprise)
|
||||
|
||||
```
|
||||
PRD (PM) → Architecture (Architect)
|
||||
|
|
@ -251,9 +137,8 @@ PRD (PM) → Architecture (Architect)
|
|||
→ implementation-readiness (Architect)
|
||||
→ sprint-planning (SM, once)
|
||||
→ [Per Epic]:
|
||||
epic-tech-context (SM)
|
||||
→ story loop (SM/DEV)
|
||||
→ epic-retrospective (SM)
|
||||
→ retrospective (SM)
|
||||
→ [Next Epic]
|
||||
```
|
||||
|
||||
|
|
@ -261,10 +146,9 @@ PRD (PM) → Architecture (Architect)
|
|||
|
||||
## Related Documentation
|
||||
|
||||
- [Phase 1: Analysis Workflows](./workflows-analysis.md)
|
||||
- [Phase 2: Planning Workflows](./workflows-planning.md)
|
||||
- [Phase 3: Solutioning Workflows](./workflows-solutioning.md)
|
||||
- [Quick Spec Flow](./quick-spec-flow.md) - Level 0-1 fast track
|
||||
- [Scale Adaptive System](./scale-adaptive-system.md) - Understanding project levels
|
||||
|
||||
---
|
||||
|
||||
|
|
@ -276,20 +160,11 @@ A: Run `workflow-status` - it reads the sprint status file and tells you exactly
|
|||
**Q: Story needs significant changes mid-implementation?**
|
||||
A: Run `correct-course` to analyze impact and route appropriately.
|
||||
|
||||
**Q: Do I run epic-tech-context for every story?**
|
||||
A: No! Run once per epic, not per story. Use `story-context` or `story-ready-for-dev` per story instead.
|
||||
|
||||
**Q: Do I have to use story-context for every story?**
|
||||
A: No, it's optional. You can use `story-ready-for-dev` to mark a story ready without generating context XML.
|
||||
|
||||
**Q: Can I work on multiple stories in parallel?**
|
||||
A: Not recommended. Complete one story's full lifecycle before starting the next. Prevents context switching and ensures quality.
|
||||
|
||||
**Q: What if code review finds issues?**
|
||||
A: DEV runs `develop-story` to make fixes, re-runs tests, then runs `code-review` again until it passes.
|
||||
|
||||
**Q: When do I run validations?**
|
||||
A: Validations are optional quality gates. Use them when you want independent review of epic tech specs, story drafts, or story context before proceeding.
|
||||
A: DEV runs `dev-story` to make fixes, re-runs tests, then runs `code-review` again until it passes.
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
# BMM Planning Workflows (Phase 2)
|
||||
|
||||
**Reading Time:** ~10 minutes
|
||||
|
||||
## Overview
|
||||
|
||||
Phase 2 (Planning) workflows are **required** for all projects. They transform strategic vision into actionable requirements using a **scale-adaptive system** that automatically selects the right planning depth based on project complexity.
|
||||
|
|
@ -12,101 +10,46 @@ Phase 2 (Planning) workflows are **required** for all projects. They transform s
|
|||
|
||||
---
|
||||
|
||||
## Phase 2 Planning Workflow Map
|
||||
## Phase 2 Planning Workflow Overview
|
||||
|
||||
```mermaid
|
||||
%%{init: {'theme':'base', 'themeVariables': { 'primaryColor':'#fff','primaryTextColor':'#000','primaryBorderColor':'#000','lineColor':'#000','fontSize':'16px','fontFamily':'arial'}}}%%
|
||||
graph TB
|
||||
Start["<b>START: workflow-init</b><br/>Discovery + routing"]
|
||||
Phase 2 Planning uses a scale-adaptive system with three tracks:
|
||||
|
||||
subgraph QuickFlow["<b>QUICK FLOW (Simple Planning)</b>"]
|
||||
direction TB
|
||||
TechSpec["<b>PM: tech-spec</b><br/>Technical document<br/>→ Story or Epic+Stories<br/>1-15 stories typically"]
|
||||
end
|
||||
### Quick Flow (Simple Planning)
|
||||
|
||||
subgraph BMadMethod["<b>BMAD METHOD (Recommended)</b>"]
|
||||
direction TB
|
||||
PRD["<b>PM: prd</b><br/>Strategic PRD with FRs/NFRs"]
|
||||
GDD["<b>Game Designer: gdd</b><br/>Game design doc"]
|
||||
Narrative["<b>Game Designer: narrative</b><br/>Story-driven design"]
|
||||
- Entry: `workflow-init` routes based on project complexity
|
||||
- Workflow: `tech-spec`
|
||||
- Output: Technical document with story/epic structure
|
||||
- Story count: 1-15 (typical)
|
||||
- Next: Phase 4 (Implementation) - skips Phase 3
|
||||
|
||||
UXDesign["<b>UX Designer: create-ux-design</b><br/>Optional UX specification"]
|
||||
end
|
||||
### BMad Method (Recommended)
|
||||
|
||||
subgraph Solutioning["<b>PHASE 3: SOLUTIONING</b>"]
|
||||
direction TB
|
||||
Architecture["<b>Architect: architecture</b><br/>System design + decisions"]
|
||||
Epics["<b>PM: create-epics-and-stories</b><br/>Epic+Stories breakdown<br/>(10-50+ stories typically)"]
|
||||
end
|
||||
- Entry: `workflow-init` routes based on project complexity
|
||||
- Workflows: `prd` → (optional) `create-ux-design`
|
||||
- Output: PRD with FRs/NFRs
|
||||
- Story count: 10-50+ (typical)
|
||||
- Next: Phase 3 (Solutioning) → Phase 4
|
||||
|
||||
subgraph Enterprise["<b>ENTERPRISE METHOD</b>"]
|
||||
direction TB
|
||||
EntNote["<b>Uses BMad Method Planning</b><br/>+<br/>Extended Phase 3 workflows<br/>(Architecture + Security + DevOps)<br/>30+ stories typically"]
|
||||
end
|
||||
### Enterprise Method
|
||||
|
||||
subgraph Updates["<b>MID-STREAM UPDATES (Anytime)</b>"]
|
||||
direction LR
|
||||
CorrectCourse["<b>PM/SM: correct-course</b><br/>Update requirements/stories"]
|
||||
end
|
||||
- Planning: Same as BMad Method (`prd` workflow)
|
||||
- Solutioning: Extended Phase 3 workflows (Architecture + Security + DevOps)
|
||||
- Story count: 30+ (typical)
|
||||
- Next: Phase 4
|
||||
|
||||
Start -->|Bug fix, simple| QuickFlow
|
||||
Start -->|Software product| PRD
|
||||
Start -->|Game project| GDD
|
||||
Start -->|Story-driven| Narrative
|
||||
Start -->|Enterprise needs| Enterprise
|
||||
|
||||
PRD -.->|Optional| UXDesign
|
||||
GDD -.->|Optional| UXDesign
|
||||
Narrative -.->|Optional| UXDesign
|
||||
PRD --> Architecture
|
||||
GDD --> Architecture
|
||||
Narrative --> Architecture
|
||||
UXDesign --> Architecture
|
||||
Architecture --> Epics
|
||||
|
||||
QuickFlow --> Phase4["<b>Phase 4: Implementation</b>"]
|
||||
Epics --> ReadinessCheck["<b>Architect: implementation-readiness</b><br/>Gate check"]
|
||||
Enterprise -.->|Uses BMad planning| Architecture
|
||||
Enterprise --> Phase3Ext["<b>Phase 3: Extended</b><br/>(Arch + Sec + DevOps)"]
|
||||
ReadinessCheck --> Phase4
|
||||
Phase3Ext --> Phase4
|
||||
|
||||
Phase4 -.->|Significant changes| CorrectCourse
|
||||
CorrectCourse -.->|Updates| Epics
|
||||
|
||||
style Start fill:#fff9c4,stroke:#f57f17,stroke-width:3px,color:#000
|
||||
style QuickFlow fill:#c5e1a5,stroke:#33691e,stroke-width:3px,color:#000
|
||||
style BMadMethod fill:#e1bee7,stroke:#6a1b9a,stroke-width:3px,color:#000
|
||||
style Enterprise fill:#ffcdd2,stroke:#c62828,stroke-width:3px,color:#000
|
||||
style Updates fill:#ffecb3,stroke:#ff6f00,stroke-width:3px,color:#000
|
||||
style Phase3 fill:#90caf9,stroke:#0d47a1,stroke-width:2px,color:#000
|
||||
style Phase4 fill:#ffcc80,stroke:#e65100,stroke-width:2px,color:#000
|
||||
|
||||
style TechSpec fill:#aed581,stroke:#1b5e20,stroke-width:2px,color:#000
|
||||
style PRD fill:#ce93d8,stroke:#4a148c,stroke-width:2px,color:#000
|
||||
style GDD fill:#ce93d8,stroke:#4a148c,stroke-width:2px,color:#000
|
||||
style Narrative fill:#ce93d8,stroke:#4a148c,stroke-width:2px,color:#000
|
||||
style UXDesign fill:#ce93d8,stroke:#4a148c,stroke-width:2px,color:#000
|
||||
style Epics fill:#ba68c8,stroke:#6a1b9a,stroke-width:3px,color:#000
|
||||
style EntNote fill:#ef9a9a,stroke:#c62828,stroke-width:2px,color:#000
|
||||
style Phase3Ext fill:#ef5350,stroke:#c62828,stroke-width:2px,color:#000
|
||||
style CorrectCourse fill:#ffb74d,stroke:#ff6f00,stroke-width:2px,color:#000
|
||||
```
|
||||
The `correct-course` workflow can be used anytime for significant requirement changes.
|
||||
|
||||
---
|
||||
|
||||
## Quick Reference
|
||||
|
||||
| Workflow | Agent | Track | Purpose | Typical Stories |
|
||||
| ---------------------------- | ------------- | ----------- | --------------------------------------------------------- | --------------- |
|
||||
| **workflow-init** | PM/Analyst | All | Entry point: discovery + routing | N/A |
|
||||
| **tech-spec** | PM | Quick Flow | Technical document → Story or Epic+Stories | 1-15 |
|
||||
| **prd** | PM | BMad Method | Strategic PRD with FRs/NFRs (no epic breakdown) | 10-50+ |
|
||||
| **gdd** | Game Designer | BMad Method | Game Design Document with requirements | 10-50+ |
|
||||
| **narrative** | Game Designer | BMad Method | Story-driven game/experience design | 10-50+ |
|
||||
| **create-ux-design** | UX Designer | BMad Method | Optional UX specification (after PRD) | N/A |
|
||||
| **create-epics-and-stories** | PM | BMad Method | Break requirements into Epic+Stories (AFTER architecture) | N/A |
|
||||
| **correct-course** | PM/SM | All | Mid-stream requirement changes | N/A |
|
||||
| Workflow | Agent | Track | Purpose | Typical Stories |
|
||||
| -------------------- | ----------- | ----------------------- | ----------------------------------------------- | --------------- |
|
||||
| **workflow-init** | PM/Analyst | All | Entry point: discovery + routing | N/A |
|
||||
| **tech-spec** | PM | Quick Flow | Technical document → Story or Epic+Stories | 1-15 |
|
||||
| **prd** | PM | BMad Method, Enterprise | Strategic PRD with FRs/NFRs (no epic breakdown) | 10-50+ |
|
||||
| **create-ux-design** | UX Designer | BMad Method, Enterprise | Optional UX specification (after PRD) | N/A |
|
||||
| **correct-course** | PM/SM | All | Mid-stream requirement changes | N/A |
|
||||
|
||||
**Note:** Story counts are guidance. V6 improvement: Epic+Stories are created AFTER architecture for better quality.
|
||||
|
||||
|
|
@ -195,7 +138,7 @@ The system guides but never forces. You can override recommendations.
|
|||
|
||||
**Agent:** PM (orchestrates others as needed)
|
||||
|
||||
**Always Use:** This is your planning starting point. Don't call prd/gdd/tech-spec directly unless skipping discovery.
|
||||
**Always Use:** This is your planning starting point. Don't call prd/tech-spec directly unless skipping discovery.
|
||||
|
||||
**Process:**
|
||||
|
||||
|
|
@ -268,70 +211,7 @@ The system guides but never forces. You can override recommendations.
|
|||
|
||||
---
|
||||
|
||||
### gdd (Game Design Document)
|
||||
|
||||
**Purpose:** Complete game design document for game projects (BMad Method track).
|
||||
|
||||
**Agent:** Game Designer
|
||||
|
||||
**When to Use:**
|
||||
|
||||
- Designing any game (any genre)
|
||||
- Need comprehensive design documentation
|
||||
- Team needs shared vision
|
||||
- Publisher/stakeholder communication
|
||||
|
||||
**BMM GDD vs Traditional:**
|
||||
|
||||
- Scale-adaptive detail (not waterfall)
|
||||
- Agile epic structure
|
||||
- Direct handoff to implementation
|
||||
- Integrated with testing workflows
|
||||
|
||||
**Key Outputs:**
|
||||
|
||||
- GDD.md (complete game design)
|
||||
- Epic breakdown (Core Loop, Content, Progression, Polish)
|
||||
|
||||
**Integration:** Feeds into Architecture (Phase 3)
|
||||
|
||||
**Example:** Roguelike card game → Core concept (Slay the Spire meets Hades), 3 characters, 120 cards, 50 enemies, Epic breakdown with 26 stories.
|
||||
|
||||
---
|
||||
|
||||
### narrative (Narrative Design)
|
||||
|
||||
**Purpose:** Story-driven design workflow for games/experiences where narrative is central (BMad Method track).
|
||||
|
||||
**Agent:** Game Designer (Narrative Designer persona) + Creative Problem Solver (CIS)
|
||||
|
||||
**When to Use:**
|
||||
|
||||
- Story is central to experience
|
||||
- Branching narrative with player choices
|
||||
- Character-driven games
|
||||
- Visual novels, adventure games, RPGs
|
||||
|
||||
**Combine with GDD:**
|
||||
|
||||
1. Run `narrative` first (story structure)
|
||||
2. Then run `gdd` (integrate story with gameplay)
|
||||
|
||||
**Key Outputs:**
|
||||
|
||||
- narrative-design.md (complete narrative spec)
|
||||
- Story structure (acts, beats, branching)
|
||||
- Characters (profiles, arcs, relationships)
|
||||
- Dialogue system design
|
||||
- Implementation guide
|
||||
|
||||
**Integration:** Combine with GDD, then feeds into Architecture (Phase 3)
|
||||
|
||||
**Example:** Choice-driven RPG → 3 acts, 12 chapters, 5 choice points, 3 endings, 60K words, 40 narrative scenes.
|
||||
|
||||
---
|
||||
|
||||
### ux (UX-First Design)
|
||||
### create-ux-design (UX Design)
|
||||
|
||||
**Purpose:** UX specification for projects where user experience is the primary differentiator (BMad Method track).
|
||||
|
||||
|
|
@ -367,31 +247,6 @@ The system guides but never forces. You can override recommendations.
|
|||
|
||||
---
|
||||
|
||||
### create-epics-and-stories
|
||||
|
||||
**Purpose:** Break requirements into bite-sized stories organized in epics (BMad Method track).
|
||||
|
||||
**Agent:** PM
|
||||
|
||||
**When to Use:**
|
||||
|
||||
- **REQUIRED:** After Architecture workflow is complete (Phase 3)
|
||||
- After PRD defines FRs/NFRs and Architecture defines HOW to build
|
||||
- Optional: Can also run earlier (after PRD, after UX) for basic structure, then refined after Architecture
|
||||
|
||||
**Key Outputs:**
|
||||
|
||||
- epics.md (all epics with story breakdown)
|
||||
- Epic files (epic-1-\*.md, etc.)
|
||||
|
||||
**V6 Improvement:** Epics+Stories are now created AFTER architecture for better quality:
|
||||
|
||||
- Architecture decisions inform story breakdown (tech choices affect implementation)
|
||||
- Stories have full context (PRD + UX + Architecture)
|
||||
- Better sequencing with technical dependencies considered
|
||||
|
||||
---
|
||||
|
||||
### correct-course
|
||||
|
||||
**Purpose:** Handle significant requirement changes during implementation (all tracks).
|
||||
|
|
@ -426,9 +281,7 @@ The system guides but never forces. You can override recommendations.
|
|||
|
||||
- **Bug fix or single change** → `tech-spec` (Quick Flow)
|
||||
- **Software product** → `prd` (BMad Method)
|
||||
- **Game (gameplay-first)** → `gdd` (BMad Method)
|
||||
- **Game (story-first)** → `narrative` + `gdd` (BMad Method)
|
||||
- **UX innovation project** → `ux` + `prd` (BMad Method)
|
||||
- **UX innovation project** → `create-ux-design` + `prd` (BMad Method)
|
||||
- **Enterprise with compliance** → Choose track in `workflow-init` → Enterprise Method
|
||||
|
||||
---
|
||||
|
|
@ -437,14 +290,12 @@ The system guides but never forces. You can override recommendations.
|
|||
|
||||
Planning outputs feed into Solutioning:
|
||||
|
||||
| Planning Output | Solutioning Input | Track Decision |
|
||||
| ------------------- | ------------------------------------ | ---------------------------- |
|
||||
| tech-spec.md | Skip Phase 3 → Phase 4 directly | Quick Flow (no architecture) |
|
||||
| PRD.md | **architecture** (Level 3-4) | BMad Method (recommended) |
|
||||
| GDD.md | **architecture** (game tech) | BMad Method (recommended) |
|
||||
| narrative-design.md | **architecture** (narrative systems) | BMad Method |
|
||||
| ux-spec.md | **architecture** (frontend design) | BMad Method |
|
||||
| Enterprise docs | **architecture** + security/ops | Enterprise Method (required) |
|
||||
| Planning Output | Solutioning Input | Track Decision |
|
||||
| --------------- | ---------------------------------- | ---------------------------- |
|
||||
| tech-spec.md | Skip Phase 3 → Phase 4 directly | Quick Flow (no architecture) |
|
||||
| PRD.md | **architecture** (Level 3-4) | BMad Method (recommended) |
|
||||
| ux-spec.md | **architecture** (frontend design) | BMad Method |
|
||||
| Enterprise docs | **architecture** + security/ops | Enterprise Method (required) |
|
||||
|
||||
**Key Decision Points:**
|
||||
|
||||
|
|
@ -468,11 +319,11 @@ If `workflow-init` suggests BMad Method, there's likely complexity you haven't c
|
|||
|
||||
### 3. Iterate on Requirements
|
||||
|
||||
Planning documents are living. Refine PRDs/GDDs as you learn during Solutioning and Implementation.
|
||||
Planning documents are living. Refine PRDs as you learn during Solutioning and Implementation.
|
||||
|
||||
### 4. Involve Stakeholders Early
|
||||
|
||||
Review PRDs/GDDs with stakeholders before Solutioning. Catch misalignment early.
|
||||
Review PRDs with stakeholders before Solutioning. Catch misalignment early.
|
||||
|
||||
### 5. Focus on "What" Not "How"
|
||||
|
||||
|
|
@ -492,9 +343,8 @@ Always run `document-project` before planning brownfield projects. AI agents nee
|
|||
1. (Optional) Analysis: product-brief, research
|
||||
2. workflow-init → routes to prd
|
||||
3. PM: prd workflow
|
||||
4. (Optional) UX Designer: ux workflow
|
||||
5. PM: create-epics-and-stories (may be automatic)
|
||||
6. → Phase 3: architecture
|
||||
4. (Optional) UX Designer: create-ux-design workflow
|
||||
5. → Phase 3: architecture
|
||||
```
|
||||
|
||||
### Brownfield Software (BMad Method)
|
||||
|
|
@ -503,28 +353,17 @@ Always run `document-project` before planning brownfield projects. AI agents nee
|
|||
1. Technical Writer or Analyst: document-project
|
||||
2. workflow-init → routes to prd
|
||||
3. PM: prd workflow
|
||||
4. PM: create-epics-and-stories
|
||||
5. → Phase 3: architecture (recommended for focused solution design)
|
||||
4. → Phase 3: architecture (recommended for focused solution design)
|
||||
```
|
||||
|
||||
### Bug Fix (Quick Flow)
|
||||
|
||||
```
|
||||
1. workflow-init → routes to tech-spec
|
||||
2. Architect: tech-spec workflow
|
||||
2. PM: tech-spec workflow
|
||||
3. → Phase 4: Implementation (skip Phase 3)
|
||||
```
|
||||
|
||||
### Game Project (BMad Method)
|
||||
|
||||
```
|
||||
1. (Optional) Analysis: game-brief, research
|
||||
2. workflow-init → routes to gdd
|
||||
3. Game Designer: gdd workflow (or narrative + gdd if story-first)
|
||||
4. Game Designer creates epic breakdown
|
||||
5. → Phase 3: architecture (game systems)
|
||||
```
|
||||
|
||||
### Enterprise Project (Enterprise Method)
|
||||
|
||||
```
|
||||
|
|
@ -602,7 +441,7 @@ A: Run `correct-course` workflow. It analyzes impact and updates planning artifa
|
|||
A: Recommended! Architecture distills massive codebase into focused solution design for your specific project.
|
||||
|
||||
**Q: When do I run create-epics-and-stories?**
|
||||
A: Usually automatic during PRD/GDD. Can also run standalone later to regenerate epics.
|
||||
A: In Phase 3 (Solutioning), after architecture is complete.
|
||||
|
||||
**Q: Should I use product-brief before PRD?**
|
||||
A: Optional but recommended for greenfield. Helps strategic thinking. `workflow-init` offers it based on context.
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
# BMM Solutioning Workflows (Phase 3)
|
||||
|
||||
**Reading Time:** ~8 minutes
|
||||
|
||||
## Overview
|
||||
|
||||
Phase 3 (Solutioning) workflows translate **what** to build (from Planning) into **how** to build it (technical design). This phase prevents agent conflicts in multi-epic projects by documenting architectural decisions before implementation begins.
|
||||
|
|
@ -14,73 +12,30 @@ Phase 3 (Solutioning) workflows translate **what** to build (from Planning) into
|
|||
|
||||
---
|
||||
|
||||
## Phase 3 Solutioning Workflow Map
|
||||
## Phase 3 Solutioning Workflow Overview
|
||||
|
||||
```mermaid
|
||||
%%{init: {'theme':'base', 'themeVariables': { 'primaryColor':'#fff','primaryTextColor':'#000','primaryBorderColor':'#000','lineColor':'#000','fontSize':'16px','fontFamily':'arial'}}}%%
|
||||
graph TB
|
||||
FromPlanning["<b>FROM Phase 2 Planning</b><br/>PRD (FRs/NFRs) complete"]
|
||||
Phase 3 Solutioning has different paths based on the planning track selected:
|
||||
|
||||
subgraph QuickFlow["<b>QUICK FLOW PATH</b>"]
|
||||
direction TB
|
||||
SkipArch["<b>Skip Phase 3</b><br/>Go directly to Implementation"]
|
||||
end
|
||||
### Quick Flow Path
|
||||
|
||||
subgraph BMadEnterprise["<b>BMAD METHOD + ENTERPRISE (Same Start)</b>"]
|
||||
direction TB
|
||||
OptionalUX["<b>UX Designer: create-ux-design</b><br/>(Optional)"]
|
||||
Architecture["<b>Architect: architecture</b><br/>System design + ADRs"]
|
||||
- From Planning: tech-spec complete
|
||||
- Action: Skip Phase 3 entirely
|
||||
- Next: Phase 4 (Implementation)
|
||||
|
||||
subgraph Optional["<b>ENTERPRISE ADDITIONS (Optional)</b>"]
|
||||
direction LR
|
||||
SecArch["<b>Architect: security-architecture</b><br/>(Future)"]
|
||||
DevOps["<b>Architect: devops-strategy</b><br/>(Future)"]
|
||||
end
|
||||
### BMad Method & Enterprise Path
|
||||
|
||||
EpicsStories["<b>PM: create-epics-and-stories</b><br/>Break down FRs/NFRs into epics"]
|
||||
GateCheck["<b>Architect: implementation-readiness</b><br/>Validation before Phase 4"]
|
||||
- From Planning: PRD with FRs/NFRs complete
|
||||
- Optional: create-ux-design (if UX is critical)
|
||||
- Required: architecture - System design with ADRs
|
||||
- Required: create-epics-and-stories - Break requirements into implementable stories
|
||||
- Required: implementation-readiness - Gate check validation
|
||||
- Enterprise additions: Optional security-architecture and devops-strategy (future workflows)
|
||||
|
||||
OptionalUX -.-> Architecture
|
||||
Architecture -.->|Enterprise only| Optional
|
||||
Architecture --> EpicsStories
|
||||
Optional -.-> EpicsStories
|
||||
EpicsStories --> GateCheck
|
||||
end
|
||||
### Gate Check Results
|
||||
|
||||
subgraph Result["<b>GATE CHECK RESULTS</b>"]
|
||||
direction LR
|
||||
Pass["✅ PASS<br/>Proceed to Phase 4"]
|
||||
Concerns["⚠️ CONCERNS<br/>Proceed with caution"]
|
||||
Fail["❌ FAIL<br/>Resolve issues first"]
|
||||
end
|
||||
|
||||
FromPlanning -->|Quick Flow| QuickFlow
|
||||
FromPlanning -->|BMad Method<br/>or Enterprise| OptionalUX
|
||||
|
||||
QuickFlow --> Phase4["<b>Phase 4: Implementation</b>"]
|
||||
GateCheck --> Result
|
||||
Pass --> Phase4
|
||||
Concerns --> Phase4
|
||||
Fail -.->|Fix issues| Architecture
|
||||
|
||||
style FromPlanning fill:#e1bee7,stroke:#6a1b9a,stroke-width:2px,color:#000
|
||||
style QuickFlow fill:#c5e1a5,stroke:#33691e,stroke-width:3px,color:#000
|
||||
style BMadEnterprise fill:#90caf9,stroke:#0d47a1,stroke-width:3px,color:#000
|
||||
style Optional fill:#ffcdd2,stroke:#c62828,stroke-width:3px,color:#000
|
||||
style Result fill:#fff9c4,stroke:#f57f17,stroke-width:3px,color:#000
|
||||
style Phase4 fill:#ffcc80,stroke:#e65100,stroke-width:2px,color:#000
|
||||
|
||||
style SkipArch fill:#aed581,stroke:#1b5e20,stroke-width:2px,color:#000
|
||||
style OptionalUX fill:#64b5f6,stroke:#0d47a1,stroke-width:2px,color:#000
|
||||
style Architecture fill:#42a5f5,stroke:#0d47a1,stroke-width:2px,color:#000
|
||||
style SecArch fill:#ef9a9a,stroke:#c62828,stroke-width:2px,color:#000
|
||||
style DevOps fill:#ef9a9a,stroke:#c62828,stroke-width:2px,color:#000
|
||||
style EpicsStories fill:#42a5f5,stroke:#0d47a1,stroke-width:2px,color:#000
|
||||
style GateCheck fill:#42a5f5,stroke:#0d47a1,stroke-width:2px,color:#000
|
||||
style Pass fill:#81c784,stroke:#388e3c,stroke-width:2px,color:#000
|
||||
style Concerns fill:#ffb74d,stroke:#f57f17,stroke-width:2px,color:#000
|
||||
style Fail fill:#e57373,stroke:#d32f2f,stroke-width:2px,color:#000
|
||||
```
|
||||
- **PASS** - All criteria met, proceed to Phase 4
|
||||
- **CONCERNS** - Minor gaps identified, proceed with caution
|
||||
- **FAIL** - Critical issues, must resolve before Phase 4
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Project Brainstorming Context
|
||||
# Project Brainstorming Focus
|
||||
|
||||
This context guide provides project-specific considerations for brainstorming sessions focused on software and product development.
|
||||
|
||||
|
|
@ -18,7 +18,7 @@ template: false
|
|||
instructions: "{installed_path}/instructions.md"
|
||||
|
||||
# Context document for project brainstorming
|
||||
project_context: "{installed_path}/project-context.md"
|
||||
project_context: "{installed_path}/brainstorming-focus.md"
|
||||
|
||||
# CORE brainstorming workflow to invoke
|
||||
core_brainstorming: "{project-root}/{bmad_folder}/core/workflows/brainstorming/workflow.yaml"
|
||||
|
|
@ -33,7 +33,7 @@ web_bundle:
|
|||
template: false
|
||||
web_bundle_files:
|
||||
- "{bmad_folder}/bmm/workflows/1-analysis/brainstorm-project/instructions.md"
|
||||
- "{bmad_folder}/bmm/workflows/1-analysis/brainstorm-project/project-context.md"
|
||||
- "{bmad_folder}/bmm/workflows/1-analysis/brainstorm-project/brainstorming-focus.md"
|
||||
- "{bmad_folder}/core/workflows/brainstorming/workflow.yaml"
|
||||
existing_workflows:
|
||||
- core_brainstorming: "{bmad_folder}/core/workflows/brainstorming/workflow.yaml"
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,346 +0,0 @@
|
|||
# PRD + Epics + Stories Validation Checklist
|
||||
|
||||
**Purpose**: Comprehensive validation that PRD, epics, and stories form a complete, implementable product plan.
|
||||
|
||||
**Scope**: Validates the complete planning output (PRD.md + epics.md) for Levels 2-4 software projects
|
||||
|
||||
**Expected Outputs**:
|
||||
|
||||
- PRD.md with complete requirements
|
||||
- epics.md with detailed epic and story breakdown
|
||||
- Updated bmm-workflow-status.yaml
|
||||
|
||||
---
|
||||
|
||||
## 1. PRD Document Completeness
|
||||
|
||||
### Core Sections Present
|
||||
|
||||
- [ ] Executive Summary with vision alignment
|
||||
- [ ] Product differentiator clearly articulated
|
||||
- [ ] Project classification (type, domain, complexity)
|
||||
- [ ] Success criteria defined
|
||||
- [ ] Product scope (MVP, Growth, Vision) clearly delineated
|
||||
- [ ] Functional requirements comprehensive and numbered
|
||||
- [ ] Non-functional requirements (when applicable)
|
||||
- [ ] References section with source documents
|
||||
|
||||
### Project-Specific Sections
|
||||
|
||||
- [ ] **If complex domain:** Domain context and considerations documented
|
||||
- [ ] **If innovation:** Innovation patterns and validation approach documented
|
||||
- [ ] **If API/Backend:** Endpoint specification and authentication model included
|
||||
- [ ] **If Mobile:** Platform requirements and device features documented
|
||||
- [ ] **If SaaS B2B:** Tenant model and permission matrix included
|
||||
- [ ] **If UI exists:** UX principles and key interactions documented
|
||||
|
||||
### Quality Checks
|
||||
|
||||
- [ ] No unfilled template variables ({{variable}})
|
||||
- [ ] All variables properly populated with meaningful content
|
||||
- [ ] Product differentiator reflected throughout (not just stated once)
|
||||
- [ ] Language is clear, specific, and measurable
|
||||
- [ ] Project type correctly identified and sections match
|
||||
- [ ] Domain complexity appropriately addressed
|
||||
|
||||
---
|
||||
|
||||
## 2. Functional Requirements Quality
|
||||
|
||||
### FR Format and Structure
|
||||
|
||||
- [ ] Each FR has unique identifier (FR-001, FR-002, etc.)
|
||||
- [ ] FRs describe WHAT capabilities, not HOW to implement
|
||||
- [ ] FRs are specific and measurable
|
||||
- [ ] FRs are testable and verifiable
|
||||
- [ ] FRs focus on user/business value
|
||||
- [ ] No technical implementation details in FRs (those belong in architecture)
|
||||
|
||||
### FR Completeness
|
||||
|
||||
- [ ] All MVP scope features have corresponding FRs
|
||||
- [ ] Growth features documented (even if deferred)
|
||||
- [ ] Vision features captured for future reference
|
||||
- [ ] Domain-mandated requirements included
|
||||
- [ ] Innovation requirements captured with validation needs
|
||||
- [ ] Project-type specific requirements complete
|
||||
|
||||
### FR Organization
|
||||
|
||||
- [ ] FRs organized by capability/feature area (not by tech stack)
|
||||
- [ ] Related FRs grouped logically
|
||||
- [ ] Dependencies between FRs noted when critical
|
||||
- [ ] Priority/phase indicated (MVP vs Growth vs Vision)
|
||||
|
||||
---
|
||||
|
||||
## 3. Epics Document Completeness
|
||||
|
||||
### Required Files
|
||||
|
||||
- [ ] epics.md exists in output folder
|
||||
- [ ] Epic list in PRD.md matches epics in epics.md (titles and count)
|
||||
- [ ] All epics have detailed breakdown sections
|
||||
|
||||
### Epic Quality
|
||||
|
||||
- [ ] Each epic has clear goal and value proposition
|
||||
- [ ] Each epic includes complete story breakdown
|
||||
- [ ] Stories follow proper user story format: "As a [role], I want [goal], so that [benefit]"
|
||||
- [ ] Each story has numbered acceptance criteria
|
||||
- [ ] Prerequisites/dependencies explicitly stated per story
|
||||
- [ ] Stories are AI-agent sized (completable in 2-4 hour session)
|
||||
|
||||
---
|
||||
|
||||
## 4. FR Coverage Validation (CRITICAL)
|
||||
|
||||
### Complete Traceability
|
||||
|
||||
- [ ] **Every FR from PRD.md is covered by at least one story in epics.md**
|
||||
- [ ] Each story references relevant FR numbers
|
||||
- [ ] No orphaned FRs (requirements without stories)
|
||||
- [ ] No orphaned stories (stories without FR connection)
|
||||
- [ ] Coverage matrix verified (can trace FR → Epic → Stories)
|
||||
|
||||
### Coverage Quality
|
||||
|
||||
- [ ] Stories sufficiently decompose FRs into implementable units
|
||||
- [ ] Complex FRs broken into multiple stories appropriately
|
||||
- [ ] Simple FRs have appropriately scoped single stories
|
||||
- [ ] Non-functional requirements reflected in story acceptance criteria
|
||||
- [ ] Domain requirements embedded in relevant stories
|
||||
|
||||
---
|
||||
|
||||
## 5. Story Sequencing Validation (CRITICAL)
|
||||
|
||||
### Epic 1 Foundation Check
|
||||
|
||||
- [ ] **Epic 1 establishes foundational infrastructure**
|
||||
- [ ] Epic 1 delivers initial deployable functionality
|
||||
- [ ] Epic 1 creates baseline for subsequent epics
|
||||
- [ ] Exception: If adding to existing app, foundation requirement adapted appropriately
|
||||
|
||||
### Vertical Slicing
|
||||
|
||||
- [ ] **Each story delivers complete, testable functionality** (not horizontal layers)
|
||||
- [ ] No "build database" or "create UI" stories in isolation
|
||||
- [ ] Stories integrate across stack (data + logic + presentation when applicable)
|
||||
- [ ] Each story leaves system in working/deployable state
|
||||
|
||||
### No Forward Dependencies
|
||||
|
||||
- [ ] **No story depends on work from a LATER story or epic**
|
||||
- [ ] Stories within each epic are sequentially ordered
|
||||
- [ ] Each story builds only on previous work
|
||||
- [ ] Dependencies flow backward only (can reference earlier stories)
|
||||
- [ ] Parallel tracks clearly indicated if stories are independent
|
||||
|
||||
### Value Delivery Path
|
||||
|
||||
- [ ] Each epic delivers significant end-to-end value
|
||||
- [ ] Epic sequence shows logical product evolution
|
||||
- [ ] User can see value after each epic completion
|
||||
- [ ] MVP scope clearly achieved by end of designated epics
|
||||
|
||||
---
|
||||
|
||||
## 6. Scope Management
|
||||
|
||||
### MVP Discipline
|
||||
|
||||
- [ ] MVP scope is genuinely minimal and viable
|
||||
- [ ] Core features list contains only true must-haves
|
||||
- [ ] Each MVP feature has clear rationale for inclusion
|
||||
- [ ] No obvious scope creep in "must-have" list
|
||||
|
||||
### Future Work Captured
|
||||
|
||||
- [ ] Growth features documented for post-MVP
|
||||
- [ ] Vision features captured to maintain long-term direction
|
||||
- [ ] Out-of-scope items explicitly listed
|
||||
- [ ] Deferred features have clear reasoning for deferral
|
||||
|
||||
### Clear Boundaries
|
||||
|
||||
- [ ] Stories marked as MVP vs Growth vs Vision
|
||||
- [ ] Epic sequencing aligns with MVP → Growth progression
|
||||
- [ ] No confusion about what's in vs out of initial scope
|
||||
|
||||
---
|
||||
|
||||
## 7. Research and Context Integration
|
||||
|
||||
### Source Document Integration
|
||||
|
||||
- [ ] **If product brief exists:** Key insights incorporated into PRD
|
||||
- [ ] **If domain brief exists:** Domain requirements reflected in FRs and stories
|
||||
- [ ] **If research documents exist:** Research findings inform requirements
|
||||
- [ ] **If competitive analysis exists:** Differentiation strategy clear in PRD
|
||||
- [ ] All source documents referenced in PRD References section
|
||||
|
||||
### Research Continuity to Architecture
|
||||
|
||||
- [ ] Domain complexity considerations documented for architects
|
||||
- [ ] Technical constraints from research captured
|
||||
- [ ] Regulatory/compliance requirements clearly stated
|
||||
- [ ] Integration requirements with existing systems documented
|
||||
- [ ] Performance/scale requirements informed by research data
|
||||
|
||||
### Information Completeness for Next Phase
|
||||
|
||||
- [ ] PRD provides sufficient context for architecture decisions
|
||||
- [ ] Epics provide sufficient detail for technical design
|
||||
- [ ] Stories have enough acceptance criteria for implementation
|
||||
- [ ] Non-obvious business rules documented
|
||||
- [ ] Edge cases and special scenarios captured
|
||||
|
||||
---
|
||||
|
||||
## 8. Cross-Document Consistency
|
||||
|
||||
### Terminology Consistency
|
||||
|
||||
- [ ] Same terms used across PRD and epics for concepts
|
||||
- [ ] Feature names consistent between documents
|
||||
- [ ] Epic titles match between PRD and epics.md
|
||||
- [ ] No contradictions between PRD and epics
|
||||
|
||||
### Alignment Checks
|
||||
|
||||
- [ ] Success metrics in PRD align with story outcomes
|
||||
- [ ] Product differentiator articulated in PRD reflected in epic goals
|
||||
- [ ] Technical preferences in PRD align with story implementation hints
|
||||
- [ ] Scope boundaries consistent across all documents
|
||||
|
||||
---
|
||||
|
||||
## 9. Readiness for Implementation
|
||||
|
||||
### Architecture Readiness (Next Phase)
|
||||
|
||||
- [ ] PRD provides sufficient context for architecture workflow
|
||||
- [ ] Technical constraints and preferences documented
|
||||
- [ ] Integration points identified
|
||||
- [ ] Performance/scale requirements specified
|
||||
- [ ] Security and compliance needs clear
|
||||
|
||||
### Development Readiness
|
||||
|
||||
- [ ] Stories are specific enough to estimate
|
||||
- [ ] Acceptance criteria are testable
|
||||
- [ ] Technical unknowns identified and flagged
|
||||
- [ ] Dependencies on external systems documented
|
||||
- [ ] Data requirements specified
|
||||
|
||||
### Track-Appropriate Detail
|
||||
|
||||
**If BMad Method:**
|
||||
|
||||
- [ ] PRD supports full architecture workflow
|
||||
- [ ] Epic structure supports phased delivery
|
||||
- [ ] Scope appropriate for product/platform development
|
||||
- [ ] Clear value delivery through epic sequence
|
||||
|
||||
**If Enterprise Method:**
|
||||
|
||||
- [ ] PRD addresses enterprise requirements (security, compliance, multi-tenancy)
|
||||
- [ ] Epic structure supports extended planning phases
|
||||
- [ ] Scope includes security, devops, and test strategy considerations
|
||||
- [ ] Clear value delivery with enterprise gates
|
||||
|
||||
---
|
||||
|
||||
## 10. Quality and Polish
|
||||
|
||||
### Writing Quality
|
||||
|
||||
- [ ] Language is clear and free of jargon (or jargon is defined)
|
||||
- [ ] Sentences are concise and specific
|
||||
- [ ] No vague statements ("should be fast", "user-friendly")
|
||||
- [ ] Measurable criteria used throughout
|
||||
- [ ] Professional tone appropriate for stakeholder review
|
||||
|
||||
### Document Structure
|
||||
|
||||
- [ ] Sections flow logically
|
||||
- [ ] Headers and numbering consistent
|
||||
- [ ] Cross-references accurate (FR numbers, section references)
|
||||
- [ ] Formatting consistent throughout
|
||||
- [ ] Tables/lists formatted properly
|
||||
|
||||
### Completeness Indicators
|
||||
|
||||
- [ ] No [TODO] or [TBD] markers remain
|
||||
- [ ] No placeholder text
|
||||
- [ ] All sections have substantive content
|
||||
- [ ] Optional sections either complete or omitted (not half-done)
|
||||
|
||||
---
|
||||
|
||||
## Critical Failures (Auto-Fail)
|
||||
|
||||
If ANY of these are true, validation FAILS:
|
||||
|
||||
- [ ] ❌ **No epics.md file exists** (two-file output required)
|
||||
- [ ] ❌ **Epic 1 doesn't establish foundation** (violates core sequencing principle)
|
||||
- [ ] ❌ **Stories have forward dependencies** (breaks sequential implementation)
|
||||
- [ ] ❌ **Stories not vertically sliced** (horizontal layers block value delivery)
|
||||
- [ ] ❌ **Epics don't cover all FRs** (orphaned requirements)
|
||||
- [ ] ❌ **FRs contain technical implementation details** (should be in architecture)
|
||||
- [ ] ❌ **No FR traceability to stories** (can't validate coverage)
|
||||
- [ ] ❌ **Template variables unfilled** (incomplete document)
|
||||
|
||||
---
|
||||
|
||||
## Validation Summary
|
||||
|
||||
- **Pass Rate ≥ 95%:** ✅ EXCELLENT - Ready for architecture phase
|
||||
- **Pass Rate 85-94%:** ⚠️ GOOD - Minor fixes needed
|
||||
- **Pass Rate 70-84%:** ⚠️ FAIR - Important issues to address
|
||||
- **Pass Rate < 70%:** ❌ POOR - Significant rework required
|
||||
|
||||
### Critical Issue Threshold
|
||||
|
||||
- **0 Critical Failures:** Proceed to fixes
|
||||
- **1+ Critical Failures:** STOP - Must fix critical issues first
|
||||
|
||||
---
|
||||
|
||||
## Validation Execution Notes
|
||||
|
||||
**When validating:**
|
||||
|
||||
1. **Load ALL documents - whole or sharded (but not both of each) for example epics.md vs epics/\*.md:**
|
||||
- PRD.md (required)
|
||||
- epics.md (required)
|
||||
- product-brief.md (if exists)
|
||||
- domain-brief.md (if exists)
|
||||
- research documents (if referenced)
|
||||
|
||||
2. **Validate in order:**
|
||||
- Check critical failures first (immediate stop if any found)
|
||||
- Verify PRD completeness
|
||||
- Verify epics completeness
|
||||
- Cross-reference FR coverage (most important)
|
||||
- Check sequencing (second most important)
|
||||
- Validate research integration
|
||||
- Check polish and quality
|
||||
|
||||
3. **Report findings:**
|
||||
- List critical failures prominently
|
||||
- Group issues by severity
|
||||
- Provide specific line numbers/sections
|
||||
- Suggest concrete fixes
|
||||
- Highlight what's working well
|
||||
|
||||
4. **Provide actionable next steps:**
|
||||
- If validation passes: "Ready for architecture workflow"
|
||||
- If minor issues: "Fix [X] items then re-validate"
|
||||
- If major issues: "Rework [sections] then re-validate"
|
||||
- If critical failures: "Must fix critical items before proceeding"
|
||||
|
||||
---
|
||||
|
||||
**Remember:** This validation ensures the entire planning phase is complete and the implementation phase has everything needed to succeed. Be thorough but fair - the goal is quality, not perfection.
|
||||
|
|
@ -1,820 +0,0 @@
|
|||
# PRD Workflow - Intent-Driven Product Planning
|
||||
|
||||
<critical-rules>
|
||||
- <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 uses INTENT-DRIVEN PLANNING - adapt organically to product type and context</critical>
|
||||
- <critical>Communicate all responses in {communication_language} and adapt deeply to {user_skill_level}</critical>
|
||||
- <critical>Generate all documents in {document_output_language}</critical>
|
||||
- <critical>LIVING DOCUMENT: Write to PRD.md continuously as you discover - never wait until the end</critical>
|
||||
- <critical>GUIDING PRINCIPLE: Identify what makes this product special and ensure it's reflected throughout the PRD</critical>
|
||||
- <critical>Input documents specified in workflow.yaml input_file_patterns - workflow engine handles fuzzy matching, whole vs sharded document discovery automatically</critical>
|
||||
- <critical>⚠️ CHECKPOINT PROTOCOL: After EVERY template-output tag, you MUST follow workflow.xml substep 2c. </critical>
|
||||
- <critical>YOU ARE FACILITATING A CONVERSATION With a user to produce a final document step by step. The whole process is meant to be collaborative helping the user flesh out their ideas</critical>
|
||||
</critical-rules>
|
||||
<workflow>
|
||||
|
||||
<step n="0" goal="Validate workflow readiness" tag="workflow-status">
|
||||
<action>Check if {status_file} exists</action>
|
||||
|
||||
<action if="status file not found">Set standalone_mode = true</action>
|
||||
|
||||
<check if="status file found">
|
||||
<action>Load the FULL file: {status_file}</action>
|
||||
<action>Parse workflow_status section</action>
|
||||
<action>Check status of "prd" workflow</action>
|
||||
<action>Get project_track from YAML metadata</action>
|
||||
<action>Find first non-completed workflow (next expected workflow)</action>
|
||||
</output>
|
||||
</check>
|
||||
|
||||
<check if="prd status is file path (already completed)">
|
||||
<output>⚠️ PRD already completed: {{prd status}}</output>
|
||||
<ask>Re-running will overwrite the existing PRD. Continue? (y/n)</ask>
|
||||
<check if="n">
|
||||
<output>Exiting. Use workflow-status to see your next step.</output>
|
||||
<action>Exit workflow</action>
|
||||
</check>
|
||||
</check>
|
||||
|
||||
<action>Set standalone_mode = false</action>
|
||||
</check>
|
||||
</step>
|
||||
|
||||
<step n="0.5" goal="Discover and load input documents">
|
||||
<invoke-protocol name="discover_inputs" />
|
||||
<note>After discovery, these content variables are available: {product_brief_content}, {research_content}, {document_project_content}</note>
|
||||
</step>
|
||||
|
||||
<step n="1" goal="Discovery - Project, Domain, and Vision">
|
||||
<action>Welcome {user_name} and begin comprehensive discovery, and then start to GATHER ALL CONTEXT:
|
||||
1. Check workflow-status.yaml for project_context (if exists)
|
||||
2. Review loaded content: {product_brief_content}, {research_content}, {document_project_content} (auto-loaded in Step 0.5)
|
||||
3. Detect project type AND domain complexity using data-driven classification
|
||||
</action>
|
||||
|
||||
<action>Load classification data files COMPLETELY:
|
||||
|
||||
- Load {project_types_data} - contains project type definitions, detection signals, and requirements
|
||||
- Load {domain_complexity_data} - contains domain classifications, complexity levels, and special requirements
|
||||
|
||||
Parse CSV structure:
|
||||
|
||||
- project_types_data has columns: project_type, detection_signals, key_questions, required_sections, skip_sections, web_search_triggers, innovation_signals
|
||||
- domain_complexity_data has columns: domain, signals, complexity, key_concerns, required_knowledge, suggested_workflow, web_searches, special_sections
|
||||
|
||||
Store these in memory for use throughout the workflow.
|
||||
</action>
|
||||
|
||||
<action>Begin natural discovery conversation:
|
||||
"Tell me about what you want to build - what problem does it solve and for whom?"
|
||||
|
||||
As the user describes their product, listen for signals to classify:
|
||||
|
||||
1. PROJECT TYPE classification
|
||||
2. DOMAIN classification
|
||||
</action>
|
||||
|
||||
<action>DUAL DETECTION - Use CSV data to match:
|
||||
|
||||
**Project Type Detection:**
|
||||
|
||||
- Compare user's description against detection_signals from each row in project_types_data
|
||||
- Look for keyword matches (semicolon-separated in CSV)
|
||||
- Identify best matching project_type (api_backend, mobile_app, saas_b2b, developer_tool, cli_tool, web_app, game, desktop_app, iot_embedded, blockchain_web3)
|
||||
- If multiple matches, ask clarifying question
|
||||
- Store matched project_type value
|
||||
|
||||
**Domain Detection:**
|
||||
|
||||
- Compare user's description against signals from each row in domain_complexity_data
|
||||
- Match domain keywords (semicolon-separated in CSV)
|
||||
- Identify domain (healthcare, fintech, govtech, edtech, aerospace, automotive, scientific, legaltech, insuretech, energy, gaming, general)
|
||||
- Get complexity level from matched row (high/medium/low/redirect)
|
||||
- Store matched domain and complexity_level values
|
||||
|
||||
**Special Cases from CSV:**
|
||||
|
||||
- If project_type = "game" → Use project_types_data row to get redirect message
|
||||
- If domain = "gaming" → Use domain_complexity_data redirect action
|
||||
- If complexity = "high" → Note suggested_workflow and web_searches from domain row
|
||||
</action>
|
||||
|
||||
<action>SPECIAL ROUTING based on detected values:
|
||||
|
||||
**If game detected (from project_types_data):**
|
||||
"Game development requires the BMGD module (BMad Game Development) which has specialized workflows for game design."
|
||||
Exit workflow and redirect to BMGD.
|
||||
|
||||
**If complex domain detected (complexity = "high" from domain_complexity_data):**
|
||||
Extract suggested_workflow and web_searches from the matched domain row.
|
||||
Offer domain research options:
|
||||
A) Run {suggested_workflow} workflow (thorough) - from CSV
|
||||
B) Quick web search using {web_searches} queries - from CSV
|
||||
C) User provides their own domain context
|
||||
D) Continue with general knowledge
|
||||
|
||||
Present the options and WAIT for user choice.
|
||||
</action>
|
||||
|
||||
<action>IDENTIFY WHAT MAKES IT SPECIAL early in conversation:
|
||||
Ask questions like:
|
||||
|
||||
- "What excites you most about this product?"
|
||||
- "What would make users love this?"
|
||||
- "What's the unique value or compelling moment?"
|
||||
- "What makes this different from alternatives?"
|
||||
|
||||
Capture this differentiator - it becomes a thread connecting throughout the PRD.
|
||||
</action>
|
||||
|
||||
<template-output>vision_alignment</template-output>
|
||||
<template-output>project_classification</template-output>
|
||||
<template-output>project_type</template-output>
|
||||
<template-output>domain_type</template-output>
|
||||
<template-output>complexity_level</template-output>
|
||||
<check if="complexity_level == 'high'">
|
||||
<template-output>domain_context_summary</template-output>
|
||||
</check>
|
||||
<template-output>product_differentiator</template-output>
|
||||
<template-output>product_brief_path</template-output>
|
||||
<template-output>domain_brief_path</template-output>
|
||||
<template-output>research_documents</template-output>
|
||||
|
||||
<critical>You MUST display the checkpoint display and HALT for user input, unless the user enabled YOLO mode.</critical>
|
||||
|
||||
<checkpoint title="Discovery Complete">
|
||||
<display>[a] Advanced Elicitation [c] Continue [p] Party Mode</display>
|
||||
<checkpoint-handlers>
|
||||
<on-select key="a">Load and execute {advanced_elicitation} task, then return to this checkpoint</on-select>
|
||||
<on-select key="p">Load and execute {party_mode}, then return to this checkpoint</on-select>
|
||||
<on-select key="c"> Ensure all content is written to {default_output_file}</on-select>
|
||||
</checkpoint-handlers>
|
||||
</checkpoint>
|
||||
|
||||
</step>
|
||||
|
||||
<step n="2" goal="Success Definition">
|
||||
<action>Define what winning looks like for THIS specific product
|
||||
|
||||
**User Success First**
|
||||
Ask:
|
||||
|
||||
- "What would make a user say 'this was worth it'?"
|
||||
- "What moment makes them tell a friend about this?"
|
||||
- "After [key journey], what outcome are they walking away with?"
|
||||
|
||||
**Business Success Second**
|
||||
Ask:
|
||||
|
||||
- "What does success look like for your business at 3 months? 12 months?"
|
||||
- "Is this about revenue, user growth, engagement, something else?"
|
||||
- "What metric would make you say 'this is working'?"
|
||||
|
||||
**Make It Specific**
|
||||
Challenge vague metrics:
|
||||
|
||||
- NOT: "10,000 users" → "What kind of users? Doing what?"
|
||||
- NOT: "99.9% uptime" → "What's the real concern - data loss? Failed payments?"
|
||||
- NOT: "Fast" → "How fast, and what specifically needs to be fast?"
|
||||
|
||||
Ask: "Can we measure this? How would you know if you hit it?"
|
||||
|
||||
**Connect to Differentiator**
|
||||
Bring it back to the core:
|
||||
"So success means users experience [differentiator] and achieve [outcome] - does that capture it?"
|
||||
|
||||
Adapt success criteria to context:
|
||||
|
||||
- Consumer: User love, engagement, retention
|
||||
- B2B: ROI, efficiency, adoption
|
||||
- Developer tools: Developer experience, community
|
||||
- Regulated: Compliance, safety, validation</action>
|
||||
|
||||
<template-output>success_criteria</template-output>
|
||||
<check if="business focus">
|
||||
<template-output>business_metrics</template-output>
|
||||
</check>
|
||||
|
||||
<action>Smart scope negotiation - find the sweet spot based on success:
|
||||
|
||||
The Scoping Game:
|
||||
|
||||
1. "What must work for this to be useful?" → MVP
|
||||
2. "What makes it competitive?" → Growth
|
||||
3. "What's the dream version?" → Vision
|
||||
|
||||
Challenge scope creep conversationally:
|
||||
|
||||
- "Could that wait until after launch?"
|
||||
- "Is that essential for proving the concept?"
|
||||
|
||||
For complex domains:
|
||||
|
||||
- Include compliance minimums in MVP
|
||||
- Note regulatory gates between phases</action>
|
||||
|
||||
<template-output>mvp_scope</template-output>
|
||||
<template-output>growth_features</template-output>
|
||||
<template-output>vision_features</template-output>
|
||||
<critical>You MUST display the checkpoint display and HALT for user input, unless the user enabled YOLO mode.</critical>
|
||||
|
||||
<checkpoint title="Success and Scope Complete">
|
||||
<display>[a] Advanced Elicitation [c] Continue [p] Party Mode [u] User Interview</display>
|
||||
<checkpoint-handlers>
|
||||
<on-select key="a">Load and execute {advanced_elicitation} task, then return to this checkpoint</on-select>
|
||||
<on-select key="p">Load and execute {party_mode}, then return to this checkpoint</on-select>
|
||||
<on-select key="u">Load and execute {party_mode} but the party will include the users from the User Journeys section. The discussion can start with each user saying hello and giving their initial thoughts, then return to this checkpoint.</on-select>
|
||||
<on-select key="c"> Ensure all content is written to {default_output_file}</on-select>
|
||||
</checkpoint-handlers>
|
||||
</checkpoint>
|
||||
</step>
|
||||
|
||||
<step n="3" goal="User Journeys">
|
||||
<critical>This step covers ALL user types - end users, admins, moderators, support, API consumers. If a human interacts with the system, there's a journey. No journey = no FRs = doesn't exist.</critical>
|
||||
|
||||
<action>Identify all user types first:
|
||||
|
||||
Before exploring journeys, ask the user:
|
||||
|
||||
"Besides the primary user, who else interacts with this system?"
|
||||
|
||||
Consider these common user types:
|
||||
|
||||
- End users (primary)
|
||||
- Admins - manage users, settings, content
|
||||
- Moderators - review flagged content, enforce rules
|
||||
- Support staff - help users, investigate issues
|
||||
- API consumers - if dev tool or platform
|
||||
- Internal ops - analytics, monitoring, billing
|
||||
|
||||
List all user types before proceeding.</action>
|
||||
|
||||
<action>Create detailed narrative user journeys with personas:
|
||||
|
||||
For each user type identified, create rich, detailed journeys following this pattern:
|
||||
|
||||
**Journey Creation Process:**
|
||||
|
||||
**1. Develop the Persona**
|
||||
Give them a name, context, and motivation:
|
||||
|
||||
- **Name**: Realistic name (Maria, Marcus, Jordan, etc.)
|
||||
- **Backstory**: Who they are, what they want, why they need this
|
||||
- **Motivation**: Core problem they're trying to solve
|
||||
- **Emotional state**: How they feel about solving this problem
|
||||
|
||||
Example: "Maria is a working parent who wants to cook healthy meals for her family but struggles with meal planning and limited evening time. She's tired of the same rotating dishes and wants inspiration that fits her schedule."
|
||||
|
||||
**2. Map Their Complete Journey**
|
||||
Document their end-to-end experience:
|
||||
|
||||
- **Entry point**: How they discover and access the product
|
||||
- **Key steps**: Each touchpoint in sequence (use arrows →)
|
||||
- **Critical actions**: What they do at each step
|
||||
- **Decision points**: Choices they make
|
||||
- **Success moment**: Where they achieve their goal
|
||||
- **Exit point**: How the journey concludes
|
||||
|
||||
**3. Use This Exact Format for Each Journey:**
|
||||
|
||||
**Journey [Number]: [Persona Name] - [Journey Theme]**
|
||||
[Persona description with backstory and motivation]
|
||||
|
||||
- [Entry point] → [step 1] → [step 2] → [step 3] → [critical moment] → [step N] → [completion]
|
||||
|
||||
**4. Explore Journey Details Conversationally**
|
||||
For each journey, ask:
|
||||
|
||||
- "What happens at each step specifically?"
|
||||
- "What could go wrong here? What's the recovery path?"
|
||||
- "What information do they need to see/hear?"
|
||||
- "What's their emotional state at each point?"
|
||||
- "Where does this journey succeed or fail?"
|
||||
|
||||
**5. Connect Journeys to Requirements**
|
||||
After each journey, explicitly state:
|
||||
"This journey reveals requirements for:"
|
||||
|
||||
- List specific capability areas (e.g., onboarding, meal planning, admin dashboard)
|
||||
- Help user see how different journeys create different feature sets
|
||||
|
||||
**Example Output Structure:**
|
||||
|
||||
**Journey 1: Maria - First Recipe Discovery**
|
||||
Maria is a working parent who wants to cook healthy meals for her family but struggles with meal planning...
|
||||
|
||||
- Discovers via search → lands on recipe page → signs up → completes preferences → browses recommendations → saves first recipe → adds to meal plan
|
||||
|
||||
**Journey 2: [Persona] - [Theme]**
|
||||
[Persona description with context]
|
||||
|
||||
- [Step sequence] → [critical moment] → [completion]
|
||||
|
||||
**Journey 3: [Admin/Support Persona] - [Admin Theme]**
|
||||
[Admin persona description]
|
||||
|
||||
- [Admin workflow] → [decision point] → [system outcome]</action>
|
||||
|
||||
<action>Guide journey exploration to cover all key areas:
|
||||
|
||||
**Aim for 3-4 journeys minimum:**
|
||||
|
||||
1. Primary user - happy path (core experience)
|
||||
2. Primary user - edge case (different goal, error recovery)
|
||||
3. Secondary user (admin, moderator, support, etc.)
|
||||
4. API consumer (if applicable)
|
||||
|
||||
**Ask after each:** "Another journey? We should cover [suggest uncovered user type]"
|
||||
|
||||
**Use journeys to reveal requirements:**
|
||||
Each journey reveals different capabilities needed:
|
||||
|
||||
- Admin journey → admin dashboard, user management
|
||||
- Support journey → ticket system, user lookup tools
|
||||
- API journey → documentation, rate limiting, keys
|
||||
- Error recovery → retry mechanisms, help content</action>
|
||||
|
||||
<template-output>user_journeys</template-output>
|
||||
<critical>You MUST display the checkpoint display and HALT for user input, unless the user enabled YOLO mode.</critical>
|
||||
|
||||
<checkpoint title="User Journeys Complete">
|
||||
<display>[a] Advanced Elicitation [c] Continue [p] Party Mode [u] User Interview</display>
|
||||
<checkpoint-handlers>
|
||||
<on-select key="a">Load and execute {advanced_elicitation} task, then return to this checkpoint</on-select>
|
||||
<on-select key="p">Load and execute {party_mode}, then return to this checkpoint</on-select>
|
||||
<on-select key="u">Load and execute {party_mode} but the party will include the users from the User Journeys section. The discussion can start with each user saying hello and giving their initial thoughts, then return to this checkpoint.</on-select>
|
||||
<on-select key="c"> Ensure all content is written to {default_output_file}</on-select>
|
||||
</checkpoint-handlers>
|
||||
</checkpoint>
|
||||
</step>
|
||||
|
||||
<step n="5" goal="Domain-Specific Exploration" optional="true">
|
||||
<critical>This step is DATA-DRIVEN using {domain_complexity_data} CSV loaded in Step 1</critical>
|
||||
|
||||
<action>Retrieve domain-specific configuration from CSV:
|
||||
|
||||
1. Find the row in {domain_complexity_data} where domain column matches the detected {domain} from Step 1
|
||||
2. Extract these columns from the matched row:
|
||||
- key_concerns (semicolon-separated list)
|
||||
- required_knowledge (describes what expertise is needed)
|
||||
- web_searches (suggested search queries if research needed)
|
||||
- special_sections (semicolon-separated list of domain-specific sections to document)
|
||||
3. Parse the semicolon-separated values into lists
|
||||
4. Store for use in this step
|
||||
</action>
|
||||
|
||||
<action>Explore domain-specific requirements using key_concerns from CSV:
|
||||
|
||||
Parse key_concerns into individual concern areas.
|
||||
For each concern:
|
||||
|
||||
- Ask the user about their approach to this concern
|
||||
- Discuss implications for the product
|
||||
- Document requirements, constraints, and compliance needs
|
||||
|
||||
Example for healthcare domain:
|
||||
If key_concerns = "FDA approval;Clinical validation;HIPAA compliance;Patient safety;Medical device classification;Liability"
|
||||
Then explore:
|
||||
|
||||
- "Will this product require FDA approval? What classification?"
|
||||
- "How will you validate clinical accuracy and safety?"
|
||||
- "What HIPAA compliance measures are needed?"
|
||||
- "What patient safety protocols must be in place?"
|
||||
- "What liability considerations affect the design?"
|
||||
|
||||
Synthesize domain requirements that will shape everything:
|
||||
|
||||
- Regulatory requirements (from key_concerns)
|
||||
- Compliance needs (from key_concerns)
|
||||
- Industry standards (from required_knowledge)
|
||||
- Safety/risk factors (from key_concerns)
|
||||
- Required validations (from key_concerns)
|
||||
- Special expertise needed (from required_knowledge)
|
||||
|
||||
These inform:
|
||||
|
||||
- What features are mandatory
|
||||
- What NFRs are critical
|
||||
- How to sequence development
|
||||
- What validation is required
|
||||
</action>
|
||||
|
||||
<template-output>domain_considerations</template-output>
|
||||
|
||||
<action>Generate domain-specific special sections if defined:
|
||||
Parse special_sections list from the matched CSV row.
|
||||
For each section name, generate corresponding template-output.
|
||||
|
||||
Example mappings from CSV:
|
||||
|
||||
- "clinical_requirements" → <template-output>clinical_requirements</template-output>
|
||||
- "regulatory_pathway" → <template-output>regulatory_pathway</template-output>
|
||||
- "safety_measures" → <template-output>safety_measures</template-output>
|
||||
- "compliance_matrix" → <template-output>compliance_matrix</template-output>
|
||||
</action>
|
||||
</check>
|
||||
<critical>You MUST display the checkpoint display and HALT for user input, unless the user enabled YOLO mode.</critical>
|
||||
|
||||
<checkpoint title="Domain Exploration Complete">
|
||||
<display>[a] Advanced Elicitation [c] Continue [p] Party Mode [u] User Interview</display>
|
||||
<checkpoint-handlers>
|
||||
<on-select key="a">Load and execute {advanced_elicitation} task, then return to this checkpoint</on-select>
|
||||
<on-select key="p">Load and execute {party_mode}, then return to this checkpoint</on-select>
|
||||
<on-select key="u">Load and execute {party_mode} but the party will include the users from the User Journeys section. The discussion can start with each user saying hello and giving their initial thoughts, then return to this checkpoint.</on-select>
|
||||
<on-select key="c"> Ensure all content is written to {default_output_file}</on-select>
|
||||
</checkpoint-handlers>
|
||||
</checkpoint>
|
||||
</step>
|
||||
|
||||
<step n="6" goal="Innovation Discovery" optional="true">
|
||||
<critical>This step uses innovation_signals from project_types_data CSV loaded in Step 1</critical>
|
||||
|
||||
<action>Check for innovation in this product:
|
||||
|
||||
1. Retrieve innovation_signals from the project_type row in {project_types_data}
|
||||
2. Parse the semicolon-separated innovation signals specific to this project type
|
||||
3. Listen for these signals in user's description and throughout conversation
|
||||
|
||||
Example for api_backend:
|
||||
innovation_signals = "API composition;New protocol"
|
||||
|
||||
Example for mobile_app:
|
||||
innovation_signals = "Gesture innovation;AR/VR features"
|
||||
|
||||
Example for saas_b2b:
|
||||
innovation_signals = "Workflow automation;AI agents"
|
||||
</action>
|
||||
|
||||
<action>Listen for general innovation signals in conversation:
|
||||
|
||||
User language indicators:
|
||||
|
||||
- "Nothing like this exists"
|
||||
- "We're rethinking how [X] works"
|
||||
- "Combining [A] with [B] for the first time"
|
||||
- "Novel approach to [problem]"
|
||||
- "No one has done [concept] before"
|
||||
|
||||
Project-type-specific signals (from CSV innovation_signals column):
|
||||
|
||||
- Match user's descriptions against the innovation_signals for their project_type
|
||||
- If matches found, flag as innovation opportunity
|
||||
</action>
|
||||
|
||||
<action>If innovation detected (general OR project-type-specific):
|
||||
|
||||
Explore deeply:
|
||||
|
||||
- What makes it unique?
|
||||
- What assumption are you challenging?
|
||||
- How do we validate it works?
|
||||
- What's the fallback if it doesn't?
|
||||
- Has anyone tried this before?
|
||||
|
||||
Use web_search_triggers from project_types_data CSV if relevant:
|
||||
<WebSearch if="novel">{web_search_triggers} {concept} innovations {date}</WebSearch>
|
||||
</action>
|
||||
|
||||
<check if="innovation detected">
|
||||
<template-output>innovation_patterns</template-output>
|
||||
<template-output>validation_approach</template-output>
|
||||
</check>
|
||||
<critical>You MUST display the checkpoint display and HALT for user input, unless the user enabled YOLO mode.</critical>
|
||||
|
||||
<checkpoint title="Innovation Discovery Complete">
|
||||
<display>[a] Advanced Elicitation [c] Continue [p] Party Mode [u] User Interview</display>
|
||||
<checkpoint-handlers>
|
||||
<on-select key="a">Load and execute {advanced_elicitation} task, then return to this checkpoint</on-select>
|
||||
<on-select key="p">Load and execute {party_mode}, then return to this checkpoint</on-select>
|
||||
<on-select key="u">Load and execute {party_mode} but the party will include the users from the User Journeys section. The discussion can start with each user saying hello and giving their initial thoughts, then return to this checkpoint.</on-select>
|
||||
<on-select key="c"> Ensure all content is written to {default_output_file}</on-select>
|
||||
</checkpoint-handlers>
|
||||
</checkpoint>
|
||||
</step>
|
||||
|
||||
<step n="7" goal="Project-Specific Deep Dive">
|
||||
<critical>This step is DATA-DRIVEN using project_types_data CSV loaded in Step 1</critical>
|
||||
|
||||
<action>Retrieve project-specific configuration from CSV:
|
||||
|
||||
1. Find the row in {project_types_data} where project_type column matches the detected {project_type} from Step 1
|
||||
2. Extract these columns from the matched row:
|
||||
- key_questions (semicolon-separated list)
|
||||
- required_sections (semicolon-separated list)
|
||||
- skip_sections (semicolon-separated list)
|
||||
- innovation_signals (semicolon-separated list)
|
||||
3. Parse the semicolon-separated values into lists
|
||||
4. Store for use in this step
|
||||
</action>
|
||||
|
||||
<action>Conduct guided discovery using key_questions from CSV:
|
||||
|
||||
Parse key_questions into individual questions.
|
||||
For each question:
|
||||
|
||||
- Ask the user naturally in conversational style
|
||||
- Listen for their response
|
||||
- Ask clarifying follow-ups as needed
|
||||
- Connect answers to product value proposition
|
||||
|
||||
Example flow:
|
||||
If key_questions = "Endpoints needed?;Authentication method?;Data formats?"
|
||||
Then ask:
|
||||
|
||||
- "What are the main endpoints your API needs to expose?"
|
||||
- "How will you handle authentication and authorization?"
|
||||
- "What data formats will you support for requests and responses?"
|
||||
|
||||
Adapt questions to the user's context and skill level.
|
||||
</action>
|
||||
|
||||
<action>Document project-type-specific requirements:
|
||||
|
||||
Based on the user's answers to key_questions, synthesize comprehensive requirements for this project type.
|
||||
|
||||
Cover the areas indicated by required_sections from CSV (semicolon-separated list).
|
||||
Skip areas indicated by skip_sections from CSV.
|
||||
|
||||
For each required section:
|
||||
|
||||
- Summarize what was discovered
|
||||
- Document specific requirements, constraints, and decisions
|
||||
- Connect to product differentiator when relevant
|
||||
|
||||
Always connect requirements to product value:
|
||||
"How does [requirement] support the product's core value proposition?"
|
||||
</action>
|
||||
|
||||
<template-output>project_type_requirements</template-output>
|
||||
|
||||
<!-- Dynamic template outputs based on required_sections from CSV -->
|
||||
|
||||
<action>Generate dynamic template outputs based on required_sections:
|
||||
|
||||
Parse required_sections list from the matched CSV row.
|
||||
For each section name in the list, generate a corresponding template-output.
|
||||
|
||||
Common mappings (adapt based on actual CSV values):
|
||||
|
||||
- "endpoint_specs" or "endpoint_specification" → <template-output>endpoint_specification</template-output>
|
||||
- "auth_model" or "authentication_model" → <template-output>authentication_model</template-output>
|
||||
- "platform_reqs" or "platform_requirements" → <template-output>platform_requirements</template-output>
|
||||
- "device_permissions" or "device_features" → <template-output>device_features</template-output>
|
||||
- "tenant_model" → <template-output>tenant_model</template-output>
|
||||
- "rbac_matrix" or "permission_matrix" → <template-output>permission_matrix</template-output>
|
||||
|
||||
Generate all outputs dynamically - do not hardcode specific project types.
|
||||
</action>
|
||||
|
||||
<note>Example CSV row for api_backend:
|
||||
key_questions = "Endpoints needed?;Authentication method?;Data formats?;Rate limits?;Versioning?;SDK needed?"
|
||||
required_sections = "endpoint_specs;auth_model;data_schemas;error_codes;rate_limits;api_docs"
|
||||
skip_sections = "ux_ui;visual_design;user_journeys"
|
||||
|
||||
The LLM should parse these and generate corresponding template outputs dynamically.
|
||||
|
||||
**Template Variable Strategy:**
|
||||
The prd-template.md has common template variables defined (endpoint_specification, authentication_model, platform_requirements, device_features, tenant_model, permission_matrix).
|
||||
|
||||
For required_sections that match these common variables:
|
||||
|
||||
- Generate the specific template-output (e.g., endpoint_specs → endpoint_specification)
|
||||
- These will render in their own subsections in the template
|
||||
|
||||
For required_sections that DON'T have matching template variables:
|
||||
|
||||
- Include the content in the main project_type_requirements variable
|
||||
- This ensures all requirements are captured even if template doesn't have dedicated sections
|
||||
|
||||
This hybrid approach balances template structure with CSV-driven flexibility.
|
||||
</note>
|
||||
<critical>You MUST display the checkpoint display and HALT for user input, unless the user enabled YOLO mode.</critical>
|
||||
|
||||
<checkpoint title="Project-Specific Deep Dive Complete">
|
||||
<display>[a] Advanced Elicitation [c] Continue [p] Party Mode [u] User Interview</display>
|
||||
<checkpoint-handlers>
|
||||
<on-select key="a">Load and execute {advanced_elicitation} task, then return to this checkpoint</on-select>
|
||||
<on-select key="p">Load and execute {party_mode}, then return to this checkpoint</on-select>
|
||||
<on-select key="u">Load and execute {party_mode} but the party will include the users from the User Journeys section. The discussion can start with each user saying hello and giving their initial thoughts, then return to this checkpoint.</on-select>
|
||||
<on-select key="c"> Ensure all content is written to {default_output_file}</on-select>
|
||||
</checkpoint-handlers>
|
||||
</checkpoint>
|
||||
</step>
|
||||
|
||||
<step n="9" goal="Functional Requirements Synthesis">
|
||||
<critical>This section is THE CAPABILITY CONTRACT for all downstream work</critical>
|
||||
<critical>UX designers will ONLY design what's listed here</critical>
|
||||
<critical>Architects will ONLY support what's listed here</critical>
|
||||
<critical>Epic breakdown will ONLY implement what's listed here</critical>
|
||||
<critical>If a capability is missing from FRs, it will NOT exist in the final product</critical>
|
||||
|
||||
<action>Before writing FRs, understand their PURPOSE and USAGE:
|
||||
|
||||
**Purpose:**
|
||||
FRs define WHAT capabilities the product must have. They are the complete inventory
|
||||
of user-facing and system capabilities that deliver the product vision.
|
||||
|
||||
**Notice:**
|
||||
✅ Each FR is a testable capability
|
||||
✅ Each FR is implementation-agnostic (could be built many ways)
|
||||
✅ Each FR specifies WHO and WHAT, not HOW
|
||||
✅ No UI details, no performance numbers, no technology choices
|
||||
✅ Comprehensive coverage of capability areas
|
||||
|
||||
**How They Will Be Used:**
|
||||
|
||||
1. UX Designer reads FRs → designs interactions for each capability
|
||||
2. Architect reads FRs → designs systems to support each capability
|
||||
3. PM reads FRs → creates epics and stories to implement each capability
|
||||
|
||||
**Critical Property - COMPLETENESS:**
|
||||
Every capability discussed in vision, scope, domain requirements, and project-specific
|
||||
sections MUST be represented as an FR. Missing FRs = missing capabilities.
|
||||
|
||||
**Critical Property - ALTITUDE:**
|
||||
FRs state WHAT capability exists and WHO it serves, NOT HOW it's implemented or
|
||||
specific UI/UX details. Those come later from UX and Architecture.
|
||||
</action>
|
||||
|
||||
<action>Transform everything discovered into comprehensive functional requirements:
|
||||
|
||||
**Organization - Group by CAPABILITY AREA:**
|
||||
Don't organize by technology or layer. Group by what users/system can DO:
|
||||
|
||||
- ✅ "User Management" (not "Authentication System")
|
||||
- ✅ "Content Discovery" (not "Search Algorithm")
|
||||
- ✅ "Team Collaboration" (not "WebSocket Infrastructure")
|
||||
|
||||
**Format - Flat, Numbered List:**
|
||||
Each FR is one clear capability statement:
|
||||
|
||||
- FR#: [Actor] can [capability] [context/constraint if needed]
|
||||
- Number sequentially (FR1, FR2, FR3...)
|
||||
- Aim for 20-50 FRs for typical projects (fewer for simple, more for complex)
|
||||
|
||||
**Altitude Check:**
|
||||
Each FR should answer "WHAT capability exists?" NOT "HOW is it implemented?"
|
||||
|
||||
- ✅ "Users can customize appearance settings"
|
||||
- ❌ "Users can toggle light/dark theme with 3 font size options stored in LocalStorage"
|
||||
|
||||
The second example belongs in Epic Breakdown, not PRD.
|
||||
</action>
|
||||
|
||||
<example>
|
||||
**Well-written FRs at the correct altitude:**
|
||||
|
||||
**User Account & Access:**
|
||||
|
||||
- FR1: Users can create accounts with email or social authentication
|
||||
- FR2: Users can log in securely and maintain sessions across devices
|
||||
- FR3: Users can reset passwords via email verification
|
||||
- ...
|
||||
|
||||
**Data Ownership (local-first products):**
|
||||
|
||||
- FR10: All user data stored locally on user's device
|
||||
- FR11: Users can export complete data at any time
|
||||
- ...
|
||||
|
||||
**Collaboration:**
|
||||
|
||||
- FR14: Users can share content with specific users or teams
|
||||
- FR15: Users can comment on shared content
|
||||
- ...
|
||||
|
||||
</example>
|
||||
|
||||
<action>Generate the complete FR list by systematically extracting capabilities from all discussed so far for all that is in scope.
|
||||
|
||||
Organize FRs by logical capability groups (5-8 groups typically).
|
||||
Number sequentially across all groups (FR1, FR2... FR47).
|
||||
</action>
|
||||
|
||||
<action>SELF-VALIDATION - Before finalizing, ask yourself:
|
||||
|
||||
**Completeness Check:**
|
||||
|
||||
1. "Did I cover EVERY capability mentioned in the MVP scope section?"
|
||||
2. "Did I include domain-specific requirements as FRs?"
|
||||
3. "Did I cover the project-type specific needs (API/Mobile/SaaS/etc)?"
|
||||
4. "Could a UX designer read ONLY the FRs and know what to design?"
|
||||
5. "Could an Architect read ONLY the FRs and know what to support?"
|
||||
6. "Are there any user actions or system behaviors we discussed that have no FR?"
|
||||
|
||||
**Altitude Check:**
|
||||
|
||||
1. "Am I stating capabilities (WHAT) or implementation (HOW)?"
|
||||
2. "Am I listing acceptance criteria or UI specifics?" (Remove if yes)
|
||||
3. "Could this FR be implemented 5 different ways?" (Good - means it's not prescriptive)
|
||||
|
||||
**Quality Check:**
|
||||
|
||||
1. "Is each FR clear enough that someone could test whether it exists?"
|
||||
2. "Is each FR independent (not dependent on reading other FRs to understand)?"
|
||||
3. "Did I avoid vague terms like 'good', 'fast', 'easy'?" (Use NFRs for quality attributes)
|
||||
|
||||
COMPLETENESS GATE: Review your FR list against the entire PRD written so far and think hard - did you miss anything? Add it now before proceeding.
|
||||
</action>
|
||||
|
||||
<template-output>functional_requirements_complete</template-output>
|
||||
<critical>You MUST display the checkpoint display and HALT for user input, unless the user enabled YOLO mode.</critical>
|
||||
|
||||
<checkpoint title="Functional Requirements Complete">
|
||||
<display>[a] Advanced Elicitation [c] Continue [p] Party Mode [u] User Interview</display>
|
||||
<checkpoint-handlers>
|
||||
<on-select key="a">Load and execute {advanced_elicitation} task, then return to this checkpoint</on-select>
|
||||
<on-select key="p">Load and execute {party_mode}, then return to this checkpoint</on-select>
|
||||
<on-select key="u">Load and execute {party_mode} but the party will include the users from the User Journeys section. The discussion can start with each user saying hello and giving their initial thoughts, then return to this checkpoint.</on-select>
|
||||
<on-select key="c"> Ensure all content is written to {default_output_file}</on-select>
|
||||
</checkpoint-handlers>
|
||||
</checkpoint>
|
||||
</step>
|
||||
|
||||
<step n="10" goal="Non-Functional Requirements Discovery">
|
||||
<action>Only document NFRs that matter for THIS product
|
||||
|
||||
Performance: Only if user-facing impact
|
||||
Security: Only if handling sensitive data
|
||||
Scale: Only if growth expected
|
||||
Accessibility: Only if broad audience
|
||||
Integration: Only if connecting systems
|
||||
|
||||
For each NFR:
|
||||
|
||||
- Why it matters for THIS product
|
||||
- Specific measurable criteria
|
||||
- Domain-driven requirements
|
||||
|
||||
Skip categories that don't apply!</action>
|
||||
|
||||
<!-- Only output sections that were discussed -->
|
||||
<check if="performance matters">
|
||||
<template-output>performance_requirements</template-output>
|
||||
</check>
|
||||
<check if="security matters">
|
||||
<template-output>security_requirements</template-output>
|
||||
</check>
|
||||
<check if="scale matters">
|
||||
<template-output>scalability_requirements</template-output>
|
||||
</check>
|
||||
<check if="accessibility matters">
|
||||
<template-output>accessibility_requirements</template-output>
|
||||
</check>
|
||||
<check if="integration matters">
|
||||
<template-output>integration_requirements</template-output>
|
||||
</check>
|
||||
</step>
|
||||
|
||||
<step n="11" goal="Complete PRD and determine next steps">
|
||||
<action>Announce that the PRD is complete and the unused sections will be cleaned up from the output document!</action>
|
||||
|
||||
<action>CRITICAL: Clean up the PRD document before validation:
|
||||
|
||||
Before running validation, you MUST remove any empty sections from the generated PRD:
|
||||
|
||||
1. **Scan for empty sections** - Look for sections with no meaningful content (just whitespace or placeholder text)
|
||||
2. **Remove entire empty sections** - Delete the section header and any empty content
|
||||
3. **Keep relevant sections only** - If a project type doesn't need certain sections (e.g., API specs for a mobile app), remove those sections entirely
|
||||
4. **Ensure document flows logically** - The final PRD should only contain sections with actual content
|
||||
|
||||
**This cleanup step is essential because:**
|
||||
|
||||
- The template includes all possible sections for maximum flexibility
|
||||
- Not all sections apply to every project type
|
||||
- Empty sections make the PRD look incomplete and unprofessional
|
||||
- Validation expects meaningful content in all included sections
|
||||
|
||||
**Example:** If building a CLI tool, you'd typically remove: API Specification, Platform Support, Device Capabilities, Multi-Tenancy Architecture, User Experience Principles sections.</action>
|
||||
|
||||
<check if="standalone_mode != true">
|
||||
<action>Load the FULL file: {status_file}</action>
|
||||
<action>Update workflow_status["prd"] = "{default_output_file}"</action>
|
||||
<action>Save file, preserving ALL comments and structure</action>
|
||||
|
||||
<action>Check workflow path to determine next expected workflows:
|
||||
|
||||
- Look for "create-epics-and-stories" as optional after PRD
|
||||
- Look for "create-ux-design" as conditional (if_has_ui)
|
||||
- Look for "create-epics-and-stories-after-ux" as optional
|
||||
- Identify the required next phase workflow
|
||||
</action>
|
||||
</check>
|
||||
|
||||
<output>**✅ PRD Complete, {user_name}!**
|
||||
|
||||
**Next Steps:**
|
||||
|
||||
**Typical next workflows:**
|
||||
|
||||
1. `workflow create-ux-design` - UX Design (if UI exists)
|
||||
2. `workflow create-architecture` - Technical architecture
|
||||
3. `workflow create-epics-and-stories` - Epic breakdown
|
||||
|
||||
**Note:** Epics can be created at any point but have richer detail when created after UX/Architecture.
|
||||
|
||||
</output>
|
||||
</step>
|
||||
|
||||
</workflow>
|
||||
|
|
@ -1,151 +0,0 @@
|
|||
# {{project_name}} - Product Requirements Document
|
||||
|
||||
**Author:** {{user_name}}
|
||||
**Date:** {{date}}
|
||||
**Version:** 1.0
|
||||
|
||||
---
|
||||
|
||||
## Executive Summary
|
||||
|
||||
{{vision_alignment}}
|
||||
|
||||
### What Makes This Special
|
||||
|
||||
{{product_differentiator}}
|
||||
|
||||
---
|
||||
|
||||
## User Journeys
|
||||
|
||||
{{user_journeys}}
|
||||
|
||||
---
|
||||
|
||||
## Project Classification
|
||||
|
||||
**Technical Type:** {{project_type}}
|
||||
**Domain:** {{domain_type}}
|
||||
**Complexity:** {{complexity_level}}
|
||||
|
||||
{{project_classification}}
|
||||
|
||||
### Domain Context
|
||||
|
||||
{{domain_context_summary}}
|
||||
|
||||
---
|
||||
|
||||
## Success Criteria
|
||||
|
||||
{{success_criteria}}
|
||||
|
||||
---
|
||||
|
||||
## Product Scope
|
||||
|
||||
### MVP - Minimum Viable Product
|
||||
|
||||
{{mvp_scope}}
|
||||
|
||||
### Growth Features (Post-MVP)
|
||||
|
||||
{{growth_features}}
|
||||
|
||||
### Vision (Future)
|
||||
|
||||
{{vision_features}}
|
||||
|
||||
---
|
||||
|
||||
## Domain-Specific Requirements
|
||||
|
||||
{{domain_considerations}}
|
||||
|
||||
This section shapes all functional and non-functional requirements below.
|
||||
|
||||
---
|
||||
|
||||
## Innovation & Novel Patterns
|
||||
|
||||
{{innovation_patterns}}
|
||||
|
||||
### Validation Approach
|
||||
|
||||
{{validation_approach}}
|
||||
|
||||
---
|
||||
|
||||
## {{project_type}} Specific Requirements
|
||||
|
||||
{{project_type_requirements}}
|
||||
|
||||
### API Specification
|
||||
|
||||
{{endpoint_specification}}
|
||||
|
||||
### Authentication & Authorization
|
||||
|
||||
{{authentication_model}}
|
||||
|
||||
### Platform Support
|
||||
|
||||
{{platform_requirements}}
|
||||
|
||||
### Device Capabilities
|
||||
|
||||
{{device_features}}
|
||||
|
||||
### Multi-Tenancy Architecture
|
||||
|
||||
{{tenant_model}}
|
||||
|
||||
### Permissions & Roles
|
||||
|
||||
{{permission_matrix}}
|
||||
|
||||
---
|
||||
|
||||
## User Experience Principles
|
||||
|
||||
{{ux_principles}}
|
||||
|
||||
### Key Interactions
|
||||
|
||||
{{key_interactions}}
|
||||
|
||||
---
|
||||
|
||||
## Functional Requirements
|
||||
|
||||
{{functional_requirements_complete}}
|
||||
|
||||
---
|
||||
|
||||
## Non-Functional Requirements
|
||||
|
||||
### Performance
|
||||
|
||||
{{performance_requirements}}
|
||||
|
||||
### Security
|
||||
|
||||
{{security_requirements}}
|
||||
|
||||
### Scalability
|
||||
|
||||
{{scalability_requirements}}
|
||||
|
||||
### Accessibility
|
||||
|
||||
{{accessibility_requirements}}
|
||||
|
||||
### Integration
|
||||
|
||||
{{integration_requirements}}
|
||||
|
||||
---
|
||||
|
||||
_This PRD captures the essence of {{project_name}} - {{product_value_summary}}_
|
||||
|
||||
_Created through collaborative discovery between {{user_name}} and AI facilitator._
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
stepsCompleted: []
|
||||
inputDocuments: []
|
||||
---
|
||||
|
||||
# Product Requirements Document - {{project_name}}
|
||||
|
||||
**Author:** {{user_name}}
|
||||
**Date:** {{date}}
|
||||
|
|
@ -0,0 +1,144 @@
|
|||
# Step 1: Workflow Initialization
|
||||
|
||||
## MANDATORY EXECUTION RULES (READ FIRST):
|
||||
|
||||
- 🛑 NEVER generate content without user input
|
||||
- ✅ ALWAYS treat this as collaborative discovery between PM peers
|
||||
- 📋 YOU ARE A FACILITATOR, not a content generator
|
||||
- 💬 FOCUS on initialization and setup only - don't look ahead to future steps
|
||||
- 🚪 DETECT existing workflow state and handle continuation properly
|
||||
|
||||
## EXECUTION PROTOCOLS:
|
||||
|
||||
- 🎯 Show your 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
|
||||
|
||||
## YOUR TASK:
|
||||
|
||||
Initialize the PRD workflow by detecting continuation state and setting up the document.
|
||||
|
||||
## INITIALIZATION SEQUENCE:
|
||||
|
||||
### 1. Check for Existing Workflow
|
||||
|
||||
First, check if the output document already exists:
|
||||
|
||||
- Look for file at `{output_folder}/prd.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. Fresh Workflow Setup (If No Document)
|
||||
|
||||
If no document exists or no `stepsCompleted` in frontmatter:
|
||||
|
||||
#### A. Input Document Discovery
|
||||
|
||||
Discover and load context documents using smart discovery:
|
||||
|
||||
**Product Brief (Priority: Sharded → Whole):**
|
||||
|
||||
1. Check for sharded brief folder: `{output_folder}/*brief*/**/*.md`
|
||||
2. If folder exists: Load EVERY file in that folder completely to build comprehensive brief context
|
||||
3. If no folder exists: Try whole file: `{output_folder}/*brief*.md`
|
||||
4. Add discovered files to `inputDocuments` frontmatter
|
||||
|
||||
**Research Documents (Priority: Sharded → Whole):**
|
||||
|
||||
1. Check for sharded research folder: `{output_folder}/*research*/**/*.md`
|
||||
2. If folder exists: Load useful research files completely
|
||||
3. If no folder exists: Try whole file: `{output_folder}/*research*.md`
|
||||
4. Add discovered files to `inputDocuments` frontmatter
|
||||
|
||||
**Project Documentation (Existing Projects):**
|
||||
|
||||
1. Look for index file: `{output_folder}/**/index.md`
|
||||
2. CRITICAL: Load index.md to understand what project files are available
|
||||
3. Read available files from index to understand existing project context
|
||||
4. This provides essential context for extending existing project with new PRD
|
||||
5. Add discovered files to `inputDocuments` frontmatter
|
||||
|
||||
**Loading Rules:**
|
||||
|
||||
- Load ALL discovered files completely (no offset/limit)
|
||||
- For sharded folders, load ALL files to get complete picture
|
||||
- For existing projects, use index.md as guide to what's relevant
|
||||
- Track all successfully loaded files in frontmatter `inputDocuments` array
|
||||
|
||||
#### B. Create Initial Document
|
||||
|
||||
Copy the template from `{installed_path}/prd-template.md` to `{output_folder}/prd.md`
|
||||
Initialize frontmatter with:
|
||||
|
||||
```yaml
|
||||
---
|
||||
stepsCompleted: []
|
||||
inputDocuments: []
|
||||
workflowType: 'prd'
|
||||
lastStep: 0
|
||||
project_name: '{{project_name}}'
|
||||
user_name: '{{user_name}}'
|
||||
date: '{{date}}'
|
||||
---
|
||||
```
|
||||
|
||||
#### C. Complete Initialization and Report
|
||||
|
||||
Complete setup and report to user:
|
||||
|
||||
**Document Setup:**
|
||||
|
||||
- Created: `{output_folder}/prd.md` from template
|
||||
- Initialized frontmatter with workflow state
|
||||
|
||||
**Input Documents Discovered:**
|
||||
Report what was found:
|
||||
"Welcome {{user_name}}! I've set up your PRD workspace for {{project_name}}.
|
||||
|
||||
**Documents Found:**
|
||||
|
||||
- Product brief: {number of brief files loaded or "None found"}
|
||||
- Research: {number of research files loaded or "None found"}
|
||||
- Project docs: {number of project files loaded or "None found"}
|
||||
|
||||
**Files loaded:** {list of specific file names or "No additional documents found"}
|
||||
|
||||
Do you have any other documents you'd like me to include, or shall we continue to the next step?
|
||||
|
||||
[C] Continue to project discovery
|
||||
|
||||
## SUCCESS METRICS:
|
||||
|
||||
✅ Existing workflow detected and handed off to step-01b correctly
|
||||
✅ Fresh workflow initialized with template and frontmatter
|
||||
✅ Input documents discovered and loaded using sharded-first logic
|
||||
✅ All discovered files tracked in frontmatter `inputDocuments`
|
||||
✅ User confirmed document setup and can proceed
|
||||
|
||||
## FAILURE MODES:
|
||||
|
||||
❌ Proceeding with fresh initialization when existing workflow exists
|
||||
❌ Not updating frontmatter with discovered input documents
|
||||
❌ Creating document without proper template
|
||||
❌ Not checking sharded folders first before whole files
|
||||
❌ Not reporting what documents were found to user
|
||||
|
||||
## NEXT STEP:
|
||||
|
||||
After user selects [C] to continue, load `./step-02-discovery.md` to begin the project discovery phase.
|
||||
|
|
@ -0,0 +1,116 @@
|
|||
# Step 1B: Workflow Continuation
|
||||
|
||||
## MANDATORY EXECUTION RULES (READ FIRST):
|
||||
|
||||
- 🛑 NEVER generate content without user input
|
||||
- ✅ ALWAYS treat this as collaborative discovery between PM peers
|
||||
- 📋 YOU ARE A FACILITATOR, not a content generator
|
||||
- 💬 FOCUS on understanding where we left off and continuing appropriately
|
||||
- 🚪 RESUME workflow from exact point where it was interrupted
|
||||
|
||||
## EXECUTION PROTOCOLS:
|
||||
|
||||
- 🎯 Show your analysis of current state before taking action
|
||||
- 💾 Keep existing frontmatter `stepsCompleted` values
|
||||
- 📖 Only load documents that were already tracked in `inputDocuments`
|
||||
- 🚫 FORBIDDEN to modify content completed in previous steps
|
||||
|
||||
## CONTEXT BOUNDARIES:
|
||||
|
||||
- Current document and frontmatter are already loaded
|
||||
- Previous context = complete document + existing frontmatter
|
||||
- Input documents listed in frontmatter were already processed
|
||||
- Last completed step = `lastStep` value from frontmatter
|
||||
|
||||
## YOUR TASK:
|
||||
|
||||
Resume the PRD workflow from where it was left off, ensuring smooth continuation.
|
||||
|
||||
## CONTINUATION SEQUENCE:
|
||||
|
||||
### 1. Analyze Current State
|
||||
|
||||
Review the frontmatter to understand:
|
||||
|
||||
- `stepsCompleted`: Which steps are already done
|
||||
- `lastStep`: The most recently completed step number
|
||||
- `inputDocuments`: What context was already loaded
|
||||
- All other frontmatter variables
|
||||
|
||||
### 2. Load All Input Documents
|
||||
|
||||
Reload the context documents listed in `inputDocuments`:
|
||||
|
||||
- For each document in `inputDocuments`, load the complete file
|
||||
- This ensures you have full context for continuation
|
||||
- Don't discover new documents - only reload what was previously processed
|
||||
|
||||
### 3. Summarize Current Progress
|
||||
|
||||
Welcome the user back and provide context:
|
||||
"Welcome back {{user_name}}! I'm resuming our PRD collaboration for {{project_name}}.
|
||||
|
||||
**Current Progress:**
|
||||
|
||||
- Steps completed: {stepsCompleted}
|
||||
- Last worked on: Step {lastStep}
|
||||
- Context documents available: {len(inputDocuments)} files
|
||||
|
||||
**Document Status:**
|
||||
|
||||
- Current PRD document is ready with all completed sections
|
||||
- Ready to continue from where we left off
|
||||
|
||||
Does this look right, or do you want to make any adjustments before we proceed?"
|
||||
|
||||
### 4. Determine Next Step
|
||||
|
||||
Based on `lastStep` value, determine which step to load next:
|
||||
|
||||
- If `lastStep = 1` → Load `./step-02-discovery.md`
|
||||
- If `lastStep = 2` → Load `./step-03-success.md`
|
||||
- If `lastStep = 3` → Load `./step-04-journeys.md`
|
||||
- Continue this pattern for all steps
|
||||
- If `lastStep = 10` → Workflow already complete
|
||||
|
||||
### 5. Present Continuation Options
|
||||
|
||||
After presenting current progress, ask:
|
||||
"Ready to continue with Step {nextStepNumber}: {nextStepTitle}?
|
||||
|
||||
[C] Continue to Step {nextStepNumber}"
|
||||
|
||||
## SUCCESS METRICS:
|
||||
|
||||
✅ All previous input documents successfully reloaded
|
||||
✅ Current workflow state accurately analyzed and presented
|
||||
✅ User confirms understanding of progress
|
||||
✅ Correct next step identified and prepared for loading
|
||||
|
||||
## FAILURE MODES:
|
||||
|
||||
❌ Discovering new input documents instead of reloading existing ones
|
||||
❌ Modifying content from already completed steps
|
||||
❌ Loading wrong next step based on `lastStep` value
|
||||
❌ Proceeding without user confirmation of current state
|
||||
|
||||
## WORKFLOW ALREADY COMPLETE?
|
||||
|
||||
If `lastStep = 10` (final step completed):
|
||||
"Great news! It looks like we've already completed the PRD workflow for {{project_name}}.
|
||||
|
||||
The final document is ready at {output_folder}/prd.md with all sections completed through step 10.
|
||||
|
||||
Would you like me to:
|
||||
|
||||
- Review the completed PRD with you
|
||||
- Suggest next workflow steps (like architecture or epic creation)
|
||||
- Start a new PRD revision
|
||||
|
||||
What would be most helpful?"
|
||||
|
||||
## NEXT STEP:
|
||||
|
||||
After user confirms they're ready to continue, load the appropriate next step file based on the `lastStep` value from frontmatter.
|
||||
|
||||
Remember: Do NOT load the next step until user explicitly selects [C] to continue!
|
||||
|
|
@ -0,0 +1,206 @@
|
|||
# Step 2: Project & Domain Discovery
|
||||
|
||||
## MANDATORY EXECUTION RULES (READ FIRST):
|
||||
|
||||
- 🛑 NEVER generate content without user input
|
||||
- ✅ ALWAYS treat this as collaborative discovery between PM peers
|
||||
- 📋 YOU ARE A FACILITATOR, not a content generator
|
||||
- 💬 FOCUS on project classification and vision alignment only
|
||||
- 🎯 LOAD classification data BEFORE starting discovery conversation
|
||||
|
||||
## EXECUTION PROTOCOLS:
|
||||
|
||||
- 🎯 Show your analysis before taking any action
|
||||
- ⚠️ Present A/P/C menu after generating executive summary content
|
||||
- 💾 ONLY save when user chooses C (Continue)
|
||||
- 📖 Update frontmatter `stepsCompleted: [1, 2]` before loading next step
|
||||
- 🚫 FORBIDDEN to load next step until C is selected
|
||||
|
||||
## COLLABORATION MENUS (A/P/C):
|
||||
|
||||
This step will generate content and present choices:
|
||||
|
||||
- **A (Advanced Elicitation)**: Use discovery protocols to develop deeper insights about the generated content
|
||||
- **P (Party Mode)**: Bring multiple perspectives to discuss and improve the generated content
|
||||
- **C (Continue)**: Save the content to the document and proceed to next step
|
||||
|
||||
## PROTOCOL INTEGRATION:
|
||||
|
||||
- When 'A' selected: Execute {project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml
|
||||
- When 'P' selected: Execute {project-root}/{bmad_folder}/core/workflows/party-mode
|
||||
- PROTOCOLS always return to this step's A/P/C menu
|
||||
- User accepts/rejects protocol changes before proceeding
|
||||
|
||||
## CONTEXT BOUNDARIES:
|
||||
|
||||
- Current document and frontmatter from step 1 are available
|
||||
- Input documents already loaded are in memory
|
||||
- Classification CSV data will be loaded in this step only
|
||||
- This will be the first content section appended to the document
|
||||
|
||||
## YOUR TASK:
|
||||
|
||||
Conduct comprehensive project discovery with data-driven classification and generate the first content section.
|
||||
|
||||
## DISCOVERY SEQUENCE:
|
||||
|
||||
### 1. Load Classification Data
|
||||
|
||||
Load and prepare CSV data for intelligent classification:
|
||||
|
||||
- Load `./project-types.csv` completely
|
||||
- Load `./domain-complexity.csv` completely
|
||||
- Parse column structures and store in memory for this step only
|
||||
|
||||
### 2. Begin Natural Discovery Conversation
|
||||
|
||||
Start with open-ended discovery:
|
||||
"As your PM peer, I'm excited to help you shape {{project_name}}. Let me start by understanding what you want to build.
|
||||
|
||||
**Tell me about what you want to create:**
|
||||
|
||||
- What problem does it solve?
|
||||
- Who are you building this for?
|
||||
- What excites you most about this product?
|
||||
|
||||
I'll be listening for signals to help us classify the project and domain so we can ask the right questions throughout our process."
|
||||
|
||||
### 3. Listen for Classification Signals
|
||||
|
||||
As the user describes their product, listen for and match against:
|
||||
|
||||
#### Project Type Signals
|
||||
|
||||
Compare user description against `detection_signals` from `project-types.csv`:
|
||||
|
||||
- Look for keyword matches from semicolon-separated signals
|
||||
- Examples: "API,REST,GraphQL" → api_backend
|
||||
- Examples: "iOS,Android,app,mobile" → mobile_app
|
||||
- Store the best matching `project_type`
|
||||
|
||||
#### Domain Signals
|
||||
|
||||
Compare user description against `signals` from `domain-complexity.csv`:
|
||||
|
||||
- Look for domain keyword matches
|
||||
- Examples: "medical,diagnostic,clinical" → healthcare
|
||||
- Examples: "payment,banking,trading" → fintech
|
||||
- Store the matched `domain` and `complexity_level`
|
||||
|
||||
### 4. Validate Classifications
|
||||
|
||||
Present your classifications for user validation:
|
||||
"Based on our conversation, I'm hearing this as:
|
||||
|
||||
- **Project Type:** {detected_project_type}
|
||||
- **Domain:** {detected_domain}
|
||||
- **Complexity:** {complexity_level}
|
||||
|
||||
Does this sound right to you? I want to make sure we're on the same page before diving deeper."
|
||||
|
||||
### 5. Identify What Makes It Special
|
||||
|
||||
Ask focused questions to capture the product's unique value:
|
||||
|
||||
- "What would make users say 'this is exactly what I needed'?"
|
||||
- "What's the moment where users realize this is different/better?"
|
||||
- "What assumption about [problem space] are you challenging?"
|
||||
- "If this succeeds wildly, what changed for your users?"
|
||||
|
||||
### 6. Generate Executive Summary Content
|
||||
|
||||
Based on the conversation, prepare the content to append to the document:
|
||||
|
||||
#### Content Structure:
|
||||
|
||||
```markdown
|
||||
## Executive Summary
|
||||
|
||||
{vision_alignment_content}
|
||||
|
||||
### What Makes This Special
|
||||
|
||||
{product_differentiator_content}
|
||||
|
||||
## Project Classification
|
||||
|
||||
**Technical Type:** {project_type}
|
||||
**Domain:** {domain}
|
||||
**Complexity:** {complexity_level}
|
||||
|
||||
{project_classification_content}
|
||||
```
|
||||
|
||||
### 7. Present Content and Menu
|
||||
|
||||
Show the generated content to the user and present:
|
||||
"I've drafted our Executive Summary based on our conversation. This will be the first section of your PRD.
|
||||
|
||||
**Here's what I'll add to the document:**
|
||||
|
||||
[Show the complete markdown content from step 6]
|
||||
|
||||
**What would you like to do?**
|
||||
[A] Advanced Elicitation - Let's dive deeper and refine this content
|
||||
[P] Party Mode - Bring in different perspectives to improve this
|
||||
[C] Continue - Save this to the document and move to next step"
|
||||
|
||||
### 8. Handle Menu Selection
|
||||
|
||||
#### If 'A' (Advanced Elicitation):
|
||||
|
||||
- Execute advanced-elicitation.xml with the current content
|
||||
- Process the enhanced content that comes back
|
||||
- Ask user: "Accept these changes to the Executive Summary? (y/n)"
|
||||
- If yes: Update the content with improvements, then return to A/P/C menu
|
||||
- If no: Keep original content, then return to A/P/C menu
|
||||
|
||||
#### If 'P' (Party Mode):
|
||||
|
||||
- Execute party-mode workflow with the current content
|
||||
- Process the collaborative improvements that come back
|
||||
- Ask user: "Accept these changes to the Executive Summary? (y/n)"
|
||||
- If yes: Update the content with improvements, then return to A/P/C menu
|
||||
- If no: Keep original content, then return to A/P/C menu
|
||||
|
||||
#### If 'C' (Continue):
|
||||
|
||||
- Append the final content to `{output_folder}/prd.md`
|
||||
- Update frontmatter: `stepsCompleted: [1, 2]`
|
||||
- Load `./step-03-success.md`
|
||||
|
||||
## APPEND TO DOCUMENT:
|
||||
|
||||
When user selects 'C', append the content directly to the document using the structure from step 6.
|
||||
|
||||
## SUCCESS METRICS:
|
||||
|
||||
✅ Classification data loaded and used effectively
|
||||
✅ User classifications validated and confirmed
|
||||
✅ Product differentiator clearly identified
|
||||
✅ Executive summary content generated collaboratively
|
||||
✅ A/P/C menu presented and handled correctly
|
||||
✅ Content properly appended to document when C selected
|
||||
|
||||
## FAILURE MODES:
|
||||
|
||||
❌ Skipping classification data loading and guessing classifications
|
||||
❌ Not validating classifications with user before proceeding
|
||||
❌ Generating executive summary without real user input
|
||||
❌ Missing the "what makes it special" discovery
|
||||
❌ Not presenting A/P/C menu after content generation
|
||||
❌ Appending content without user selecting 'C'
|
||||
|
||||
## COMPLEXITY HANDLING:
|
||||
|
||||
If `complexity_level = "high"`:
|
||||
|
||||
- Note the `suggested_workflow` and `web_searches` from domain CSV
|
||||
- Consider mentioning domain research needs in classification section
|
||||
- Document complexity implications in project classification
|
||||
|
||||
## NEXT STEP:
|
||||
|
||||
After user selects 'C' and content is saved to document, load `./step-03-success.md` to define success criteria.
|
||||
|
||||
Remember: Do NOT proceed to step-03 until user explicitly selects 'C' from the A/P/C menu and content is saved!
|
||||
|
|
@ -0,0 +1,234 @@
|
|||
# Step 3: Success Criteria Definition
|
||||
|
||||
## MANDATORY EXECUTION RULES (READ FIRST):
|
||||
|
||||
- 🛑 NEVER generate content without user input
|
||||
- ✅ ALWAYS treat this as collaborative discovery between PM peers
|
||||
- 📋 YOU ARE A FACILITATOR, not a content generator
|
||||
- 💬 FOCUS on defining what winning looks like for this product
|
||||
- 🎯 COLLABORATIVE discovery, not assumption-based goal setting
|
||||
|
||||
## EXECUTION PROTOCOLS:
|
||||
|
||||
- 🎯 Show your analysis before taking any action
|
||||
- ⚠️ Present A/P/C menu after generating success criteria content
|
||||
- 💾 ONLY save when user chooses C (Continue)
|
||||
- 📖 Update frontmatter `stepsCompleted: [1, 2, 3]` before loading next step
|
||||
- 🚫 FORBIDDEN to load next step until C is selected
|
||||
|
||||
## COLLABORATION MENUS (A/P/C):
|
||||
|
||||
This step will generate content and present choices:
|
||||
|
||||
- **A (Advanced Elicitation)**: Use discovery protocols to develop deeper insights about success metrics
|
||||
- **P (Party Mode)**: Bring multiple perspectives to define comprehensive success criteria
|
||||
- **C (Continue)**: Save the content to the document and proceed to next step
|
||||
|
||||
## PROTOCOL INTEGRATION:
|
||||
|
||||
- When 'A' selected: Execute {project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml
|
||||
- When 'P' selected: Execute {project-root}/{bmad_folder}/core/workflows/party-mode
|
||||
- PROTOCOLS always return to this step's A/P/C menu
|
||||
- User accepts/rejects protocol changes before proceeding
|
||||
|
||||
## CONTEXT BOUNDARIES:
|
||||
|
||||
- Current document and frontmatter from previous steps are available
|
||||
- Executive Summary and Project Classification already exist in document
|
||||
- No additional data files needed for this step
|
||||
- Focus on measurable, specific success criteria
|
||||
|
||||
## YOUR TASK:
|
||||
|
||||
Define comprehensive success criteria that cover user success, business success, and technical success.
|
||||
|
||||
## SUCCESS DISCOVERY SEQUENCE:
|
||||
|
||||
### 1. Begin Success Definition Conversation
|
||||
|
||||
Start with user-centered success:
|
||||
"Now that we understand what makes {{project_name}} special, let's define what success looks like.
|
||||
|
||||
**User Success First:**
|
||||
|
||||
- What would make a user say 'this was worth it'?
|
||||
- What's the moment where they realize this solved their problem?
|
||||
- After using {{project_name}}, what outcome are they walking away with?
|
||||
|
||||
Let's start with the user experience of success."
|
||||
|
||||
### 2. Explore User Success Metrics
|
||||
|
||||
Listen for specific user outcomes and help make them measurable:
|
||||
|
||||
- Guide from vague to specific: NOT "users are happy" → "users complete [key action] within [timeframe]"
|
||||
- Ask about emotional success: "When do they feel delighted/relieved/empowered?"
|
||||
- Identify success moments: "What's the 'aha!' moment?"
|
||||
- Define completion scenarios: "What does 'done' look like for the user?"
|
||||
|
||||
### 3. Define Business Success
|
||||
|
||||
Transition to business metrics:
|
||||
"Now let's look at success from the business perspective.
|
||||
|
||||
**Business Success:**
|
||||
|
||||
- What does success look like at 3 months? 12 months?
|
||||
- Are we measuring revenue, user growth, engagement, something else?
|
||||
- What metric would make you say 'this is working'?
|
||||
|
||||
Help me understand what success means for your business."
|
||||
|
||||
### 4. Challenge Vague Metrics
|
||||
|
||||
Push for specificity on business metrics:
|
||||
|
||||
- "10,000 users" → "What kind of users? Doing what?"
|
||||
- "99.9% uptime" → "What's the real concern - data loss? Failed payments?"
|
||||
- "Fast" → "How fast, and what specifically needs to be fast?"
|
||||
- "Good adoption" → "What percentage adoption by when?"
|
||||
|
||||
### 5. Connect to Product Differentiator
|
||||
|
||||
Tie success metrics back to what makes the product special:
|
||||
"So success means users experience [differentiator] and achieve [outcome]. Does that capture it?"
|
||||
|
||||
Adapt success criteria to context:
|
||||
|
||||
- Consumer: User love, engagement, retention
|
||||
- B2B: ROI, efficiency, adoption
|
||||
- Developer tools: Developer experience, community
|
||||
- Regulated: Compliance, safety, validation
|
||||
- GovTech: Government compliance, accessibility, procurement
|
||||
|
||||
### 6. Smart Scope Negotiation
|
||||
|
||||
Guide scope definition through success lens:
|
||||
"The Scoping Game:
|
||||
|
||||
1. What must work for this to be useful? → MVP
|
||||
2. What makes it competitive? → Growth
|
||||
3. What's the dream version? → Vision
|
||||
|
||||
Challenge scope creep conversationally:
|
||||
|
||||
- Could that wait until after launch?
|
||||
- Is that essential for proving the concept?
|
||||
|
||||
For complex domains, include compliance minimums in MVP."
|
||||
|
||||
### 7. Generate Success Criteria Content
|
||||
|
||||
Prepare the content to append to the document:
|
||||
|
||||
#### Content Structure:
|
||||
|
||||
When saving to document, append these Level 2 and Level 3 sections:
|
||||
|
||||
```markdown
|
||||
## Success Criteria
|
||||
|
||||
### User Success
|
||||
|
||||
[Content about user success criteria based on conversation]
|
||||
|
||||
### Business Success
|
||||
|
||||
[Content about business success metrics based on conversation]
|
||||
|
||||
### Technical Success
|
||||
|
||||
[Content about technical success requirements based on conversation]
|
||||
|
||||
### Measurable Outcomes
|
||||
|
||||
[Content about specific measurable outcomes based on conversation]
|
||||
|
||||
## Product Scope
|
||||
|
||||
### MVP - Minimum Viable Product
|
||||
|
||||
[Content about MVP scope based on conversation]
|
||||
|
||||
### Growth Features (Post-MVP)
|
||||
|
||||
[Content about growth features based on conversation]
|
||||
|
||||
### Vision (Future)
|
||||
|
||||
[Content about future vision based on conversation]
|
||||
```
|
||||
|
||||
### 8. Present Content and Menu
|
||||
|
||||
Show the generated content and present choices:
|
||||
"I've drafted our success criteria and scope definition based on our conversation.
|
||||
|
||||
**Here's what I'll add to the document:**
|
||||
|
||||
[Show the complete markdown content from step 7]
|
||||
|
||||
**What would you like to do?**
|
||||
[A] Advanced Elicitation - Let's dive deeper and refine these success metrics
|
||||
[P] Party Mode - Bring in different perspectives on success criteria
|
||||
[C] Continue - Save this to the document and move to next step"
|
||||
|
||||
### 9. Handle Menu Selection
|
||||
|
||||
#### If 'A' (Advanced Elicitation):
|
||||
|
||||
- Execute advanced-elicitation.xml with the current success criteria content
|
||||
- Process the enhanced success metrics that come back
|
||||
- Ask user: "Accept these improvements to the success criteria? (y/n)"
|
||||
- If yes: Update content with improvements, then return to A/P/C menu
|
||||
- If no: Keep original content, then return to A/P/C menu
|
||||
|
||||
#### If 'P' (Party Mode):
|
||||
|
||||
- Execute party-mode workflow with the current success criteria
|
||||
- Process the collaborative improvements to metrics and scope
|
||||
- Ask user: "Accept these changes to the success criteria? (y/n)"
|
||||
- If yes: Update content with improvements, then return to A/P/C menu
|
||||
- If no: Keep original content, then return to A/P/C menu
|
||||
|
||||
#### If 'C' (Continue):
|
||||
|
||||
- Append the final content to `{output_folder}/prd.md`
|
||||
- Update frontmatter: `stepsCompleted: [1, 2, 3]`
|
||||
- Load `./step-04-journeys.md`
|
||||
|
||||
## APPEND TO DOCUMENT:
|
||||
|
||||
When user selects 'C', append the content directly to the document using the structure from step 7.
|
||||
|
||||
## SUCCESS METRICS:
|
||||
|
||||
✅ User success criteria clearly identified and made measurable
|
||||
✅ Business success metrics defined with specific targets
|
||||
✅ Success criteria connected to product differentiator
|
||||
✅ Scope properly negotiated (MVP, Growth, Vision)
|
||||
✅ A/P/C menu presented and handled correctly
|
||||
✅ Content properly appended to document when C selected
|
||||
|
||||
## FAILURE MODES:
|
||||
|
||||
❌ Accepting vague success metrics without pushing for specificity
|
||||
❌ Not connecting success criteria back to product differentiator
|
||||
❌ Missing scope negotiation and leaving it undefined
|
||||
❌ Generating content without real user input on what success looks like
|
||||
❌ Not presenting A/P/C menu after content generation
|
||||
❌ Appending content without user selecting 'C'
|
||||
|
||||
## DOMAIN CONSIDERATIONS:
|
||||
|
||||
If working in regulated domains (healthcare, fintech, govtech):
|
||||
|
||||
- Include compliance milestones in success criteria
|
||||
- Add regulatory approval timelines to MVP scope
|
||||
- Consider audit requirements as technical success metrics
|
||||
|
||||
## NEXT STEP:
|
||||
|
||||
After user selects 'C' and content is saved to document, load `./step-04-journeys.md` to map user journeys.
|
||||
|
||||
Remember: Do NOT proceed to step-04 until user explicitly selects 'C' from the A/P/C menu and content is saved!
|
||||
|
|
@ -0,0 +1,220 @@
|
|||
# Step 4: User Journey Mapping
|
||||
|
||||
## MANDATORY EXECUTION RULES (READ FIRST):
|
||||
|
||||
- 🛑 NEVER generate content without user input
|
||||
- ✅ ALWAYS treat this as collaborative discovery between PM peers
|
||||
- 📋 YOU ARE A FACILITATOR, not a content generator
|
||||
- 💬 FOCUS on mapping ALL user types that interact with the system
|
||||
- 🎯 CRITICAL: No journey = no functional requirements = product doesn't exist
|
||||
|
||||
## EXECUTION PROTOCOLS:
|
||||
|
||||
- 🎯 Show your analysis before taking any action
|
||||
- ⚠️ Present A/P/C menu after generating journey content
|
||||
- 💾 ONLY save when user chooses C (Continue)
|
||||
- 📖 Update frontmatter `stepsCompleted: [1, 2, 3, 4]` before loading next step
|
||||
- 🚫 FORBIDDEN to load next step until C is selected
|
||||
|
||||
## COLLABORATION MENUS (A/P/C):
|
||||
|
||||
This step will generate content and present choices:
|
||||
|
||||
- **A (Advanced Elicitation)**: Use discovery protocols to develop deeper journey insights
|
||||
- **P (Party Mode)**: Bring multiple perspectives to map comprehensive user journeys
|
||||
- **C (Continue)**: Save the content to the document and proceed to next step
|
||||
|
||||
## PROTOCOL INTEGRATION:
|
||||
|
||||
- When 'A' selected: Execute {project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml
|
||||
- When 'P' selected: Execute {project-root}/{bmad_folder}/core/workflows/party-mode
|
||||
- PROTOCOLS always return to this step's A/P/C menu
|
||||
- User accepts/rejects protocol changes before proceeding
|
||||
|
||||
## CONTEXT BOUNDARIES:
|
||||
|
||||
- Current document and frontmatter from previous steps are available
|
||||
- Success criteria and scope already defined
|
||||
- No additional data files needed for this step
|
||||
- Every human interaction with the system needs a journey
|
||||
|
||||
## YOUR TASK:
|
||||
|
||||
Map comprehensive user journeys for ALL user types that interact with the system.
|
||||
|
||||
## JOURNEY MAPPING SEQUENCE:
|
||||
|
||||
### 1. Identify All User Types
|
||||
|
||||
Start with comprehensive user type discovery:
|
||||
"Now that we know what success looks like, let's map out ALL the people who will interact with {{project_name}}.
|
||||
|
||||
**Beyond primary users, who else touches this system?**
|
||||
Consider:
|
||||
|
||||
- End users (the primary focus)
|
||||
- Admins - manage users, settings, content
|
||||
- Moderators - review flagged content, enforce rules
|
||||
- Support staff - help users, investigate issues
|
||||
- API consumers - if dev tool or platform
|
||||
- Internal ops - analytics, monitoring, billing
|
||||
|
||||
What user types should we map for this product?"
|
||||
|
||||
### 2. Create Detailed Narrative Journeys
|
||||
|
||||
For each user type, create rich, detailed journeys following this structure:
|
||||
|
||||
#### Journey Creation Process:
|
||||
|
||||
**1. Develop the Persona:**
|
||||
|
||||
- **Name**: Realistic name (Maria, Marcus, Jordan, etc.)
|
||||
- **Backstory**: Who they are, what they want, why they need this
|
||||
- **Motivation**: Core problem they're trying to solve
|
||||
- **Emotional state**: How they feel about solving this problem
|
||||
|
||||
**2. Map Complete Journey:**
|
||||
|
||||
- **Entry point**: How they discover and access the product
|
||||
- **Key steps**: Each touchpoint in sequence (use arrows →)
|
||||
- **Critical actions**: What they do at each step
|
||||
- **Decision points**: Choices they make
|
||||
- **Success moment**: Where they achieve their goal
|
||||
- **Exit point**: How the journey concludes
|
||||
|
||||
**3. Use This Exact Format:**
|
||||
|
||||
```markdown
|
||||
**Journey [Number]: [Persona Name] - [Journey Theme]**
|
||||
[Persona description with backstory and motivation]
|
||||
|
||||
- [Entry point] → [step 1] → [step 2] → [step 3] → [critical moment] → [step N] → [completion]
|
||||
```
|
||||
|
||||
### 3. Guide Journey Exploration
|
||||
|
||||
For each journey, facilitate detailed exploration:
|
||||
|
||||
- "What happens at each step specifically?"
|
||||
- "What could go wrong here? What's the recovery path?"
|
||||
- "What information do they need to see/hear?"
|
||||
- "What's their emotional state at each point?"
|
||||
- "Where does this journey succeed or fail?"
|
||||
|
||||
### 4. Connect Journeys to Requirements
|
||||
|
||||
After each journey, explicitly state:
|
||||
"This journey reveals requirements for:
|
||||
|
||||
- List specific capability areas (e.g., onboarding, meal planning, admin dashboard)
|
||||
- Help user see how different journeys create different feature sets"
|
||||
|
||||
### 5. Aim for Comprehensive Coverage
|
||||
|
||||
Guide toward complete journey set:
|
||||
|
||||
- **Primary user** - happy path (core experience)
|
||||
- **Primary user** - edge case (different goal, error recovery)
|
||||
- **Secondary user** (admin, moderator, support, etc.)
|
||||
- **API consumer** (if applicable)
|
||||
|
||||
Ask: "Another journey? We should cover [suggest uncovered user type]"
|
||||
|
||||
### 6. Generate User Journey Content
|
||||
|
||||
Prepare the content to append to the document:
|
||||
|
||||
#### Content Structure:
|
||||
|
||||
When saving to document, append these Level 2 and Level 3 sections:
|
||||
|
||||
```markdown
|
||||
## User Journeys
|
||||
|
||||
[All journey narratives based on conversation]
|
||||
|
||||
### Journey Requirements Summary
|
||||
|
||||
[Summary of capabilities revealed by journeys based on conversation]
|
||||
```
|
||||
|
||||
### 7. Present Content and Menu
|
||||
|
||||
Show the generated journey content and present choices:
|
||||
"I've mapped out the user journeys based on our conversation. Each journey reveals different capabilities needed for {{project_name}}.
|
||||
|
||||
**Here's what I'll add to the document:**
|
||||
|
||||
[Show the complete markdown content from step 6]
|
||||
|
||||
**What would you like to do?**
|
||||
[A] Advanced Elicitation - Let's dive deeper into these user journeys
|
||||
[P] Party Mode - Bring different perspectives to ensure we have all journeys
|
||||
[C] Continue - Save this to the document and move to next step"
|
||||
|
||||
### 8. Handle Menu Selection
|
||||
|
||||
#### If 'A' (Advanced Elicitation):
|
||||
|
||||
- Execute advanced-elicitation.xml with the current journey content
|
||||
- Process the enhanced journey insights that come back
|
||||
- Ask user: "Accept these improvements to the user journeys? (y/n)"
|
||||
- If yes: Update content with improvements, then return to A/P/C menu
|
||||
- If no: Keep original content, then return to A/P/C menu
|
||||
|
||||
#### If 'P' (Party Mode):
|
||||
|
||||
- Execute party-mode workflow with the current journeys
|
||||
- Process the collaborative journey improvements and additions
|
||||
- Ask user: "Accept these changes to the user journeys? (y/n)"
|
||||
- If yes: Update content with improvements, then return to A/P/C menu
|
||||
- If no: Keep original content, then return to A/P/C menu
|
||||
|
||||
#### If 'C' (Continue):
|
||||
|
||||
- Append the final content to `{output_folder}/prd.md`
|
||||
- Update frontmatter: `stepsCompleted: [1, 2, 3, 4]`
|
||||
- Load `./step-05-domain.md` (or determine if step is optional based on domain complexity)
|
||||
|
||||
## APPEND TO DOCUMENT:
|
||||
|
||||
When user selects 'C', append the content directly to the document using the structure from step 6.
|
||||
|
||||
## SUCCESS METRICS:
|
||||
|
||||
✅ All user types identified (not just primary users)
|
||||
✅ Rich persona development for each journey
|
||||
✅ Complete end-to-end journey mapping with critical moments
|
||||
✅ Journey requirements clearly connected to capabilities needed
|
||||
✅ Minimum 3-4 comprehensive journeys covering different user types
|
||||
✅ A/P/C menu presented and handled correctly
|
||||
✅ Content properly appended to document when C selected
|
||||
|
||||
## FAILURE MODES:
|
||||
|
||||
❌ Only mapping primary user journeys and missing secondary users
|
||||
❌ Creating generic journeys without rich persona details
|
||||
❌ Missing critical decision points and failure scenarios
|
||||
❌ Not connecting journeys to required capabilities
|
||||
❌ Not having enough journey diversity (admin, support, API, etc.)
|
||||
❌ Not presenting A/P/C menu after content generation
|
||||
❌ Appending content without user selecting 'C'
|
||||
|
||||
## JOURNEY TYPES TO ENSURE:
|
||||
|
||||
**Minimum Coverage:**
|
||||
|
||||
1. **Primary User - Success Path**: Core experience journey
|
||||
2. **Primary User - Edge Case**: Error recovery, alternative goals
|
||||
3. **Admin/Operations User**: Management, configuration, monitoring
|
||||
4. **Support/Troubleshooting**: Help, investigation, issue resolution
|
||||
5. **API/Integration** (if applicable): Developer/technical user journey
|
||||
|
||||
## NEXT STEP:
|
||||
|
||||
After user selects 'C' and content is saved to document, load `./step-05-domain.md`.
|
||||
|
||||
Note: Step-05 is optional - check if domain complexity from step-02 warrants domain-specific exploration.
|
||||
|
||||
Remember: Do NOT proceed to step-05 until user explicitly selects 'C' from the A/P/C menu and content is saved!
|
||||
|
|
@ -0,0 +1,241 @@
|
|||
# Step 5: Domain-Specific Exploration
|
||||
|
||||
## MANDATORY EXECUTION RULES (READ FIRST):
|
||||
|
||||
- 🛑 NEVER generate content without user input
|
||||
- ✅ ALWAYS treat this as collaborative discovery between PM peers
|
||||
- 📋 YOU ARE A FACILITATOR, not a content generator
|
||||
- 💬 FOCUS on domain-specific requirements and compliance needs
|
||||
- 🎯 OPTIONAL STEP: Only proceed if complexity_level = "high" from step-02
|
||||
|
||||
## EXECUTION PROTOCOLS:
|
||||
|
||||
- 🎯 Show your analysis before taking any action
|
||||
- ⚠️ Present A/P/C menu after generating domain content
|
||||
- 💾 ONLY save when user chooses C (Continue)
|
||||
- 📖 Update frontmatter `stepsCompleted: [1, 2, 3, 4, 5]` before loading next step
|
||||
- 🚫 FORBIDDEN to load next step until C is selected
|
||||
|
||||
## COLLABORATION MENUS (A/P/C):
|
||||
|
||||
This step will generate content and present choices:
|
||||
|
||||
- **A (Advanced Elicitation)**: Use discovery protocols to develop deeper domain insights
|
||||
- **P (Party Mode)**: Bring domain expertise perspectives to explore requirements
|
||||
- **C (Continue)**: Save the content to the document and proceed to next step
|
||||
|
||||
## PROTOCOL INTEGRATION:
|
||||
|
||||
- When 'A' selected: Execute {project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml
|
||||
- When 'P' selected: Execute {project-root}/{bmad_folder}/core/workflows/party-mode
|
||||
- PROTOCOLS always return to this step's A/P/C menu
|
||||
- User accepts/rejects protocol changes before proceeding
|
||||
|
||||
## CONTEXT BOUNDARIES:
|
||||
|
||||
- Current document and frontmatter from previous steps are available
|
||||
- Domain complexity from step-02 should be "high" to justify this step
|
||||
- Domain-specific CSV data will be loaded in this step
|
||||
- Focus on compliance, regulations, and domain-specific constraints
|
||||
|
||||
## OPTIONAL STEP CHECK:
|
||||
|
||||
Before proceeding with this step, verify:
|
||||
|
||||
- Is `complexity_level` from step-02 equal to "high"?
|
||||
- Does the domain have specific regulatory/compliance needs?
|
||||
- Would domain exploration significantly impact the product requirements?
|
||||
|
||||
If NO to these questions, skip this step and load `./step-06-innovation.md`.
|
||||
|
||||
## YOUR TASK:
|
||||
|
||||
Explore domain-specific requirements for complex domains that need specialized compliance, regulatory, or industry-specific considerations.
|
||||
|
||||
## DOMAIN EXPLORATION SEQUENCE:
|
||||
|
||||
### 1. Load Domain Configuration Data
|
||||
|
||||
Load domain-specific configuration for complex domains:
|
||||
|
||||
- Load `./domain-complexity.csv` completely
|
||||
- Find the row where `domain` matches the detected domain from step-02
|
||||
- Extract these columns:
|
||||
- `key_concerns` (semicolon-separated list)
|
||||
- `required_knowledge` (domain expertise needed)
|
||||
- `web_searches` (suggested research queries)
|
||||
- `special_sections` (domain-specific sections to document)
|
||||
|
||||
### 2. Present Domain Complexity Context
|
||||
|
||||
Start by explaining why this step is needed:
|
||||
"Since {{project_name}} is in the {domain} domain with high complexity, we need to explore domain-specific requirements.
|
||||
|
||||
**Key Concerns for {domain}:**
|
||||
[List the key_concerns from CSV]
|
||||
|
||||
This step will help us understand regulatory requirements, compliance needs, and industry-specific constraints that will shape our product."
|
||||
|
||||
### 3. Explore Domain-Specific Requirements
|
||||
|
||||
For each concern in `key_concerns` from the CSV:
|
||||
|
||||
#### Domain Concern Exploration:
|
||||
|
||||
- Ask the user about their approach to this concern
|
||||
- Discuss implications for the product design and requirements
|
||||
- Document specific requirements, constraints, and compliance needs
|
||||
|
||||
**Example for Healthcare Domain:**
|
||||
If key_concerns = "FDA approval;Clinical validation;HIPAA compliance;Patient safety;Medical device classification;Liability"
|
||||
|
||||
Ask about each:
|
||||
|
||||
- "Will this product require FDA approval? What classification?"
|
||||
- "How will you validate clinical accuracy and safety?"
|
||||
- "What HIPAA compliance measures are needed?"
|
||||
- "What patient safety protocols must be in place?"
|
||||
- "What liability considerations affect the design?"
|
||||
|
||||
### 4. Synthesize Domain Requirements
|
||||
|
||||
Based on the conversation, synthesize domain requirements that will shape everything:
|
||||
|
||||
#### Categories to Document:
|
||||
|
||||
- **Regulatory requirements** (from key_concerns)
|
||||
- **Compliance needs** (from key_concerns)
|
||||
- **Industry standards** (from required_knowledge)
|
||||
- **Safety/risk factors** (from key_concerns)
|
||||
- **Required validations** (from key_concerns)
|
||||
- **Special expertise needed** (from required_knowledge)
|
||||
|
||||
Explain how these inform:
|
||||
|
||||
- What features are mandatory
|
||||
- What NFRs are critical
|
||||
- How to sequence development
|
||||
- What validation is required
|
||||
|
||||
### 5. Generate Domain-Specific Content
|
||||
|
||||
Prepare the content to append to the document:
|
||||
|
||||
#### Content Structure:
|
||||
|
||||
When saving to document, append these Level 2 and Level 3 sections:
|
||||
|
||||
```markdown
|
||||
## Domain-Specific Requirements
|
||||
|
||||
### [Domain Name] Compliance & Regulatory Overview
|
||||
|
||||
[Domain context summary based on conversation]
|
||||
|
||||
### Key Domain Concerns
|
||||
|
||||
[Key concerns addressed based on conversation]
|
||||
|
||||
### Compliance Requirements
|
||||
|
||||
[Compliance requirements based on conversation]
|
||||
|
||||
### Industry Standards & Best Practices
|
||||
|
||||
[Industry standards based on conversation]
|
||||
|
||||
### Required Expertise & Validation
|
||||
|
||||
[Required knowledge and validation based on conversation]
|
||||
|
||||
### Implementation Considerations
|
||||
|
||||
[Implementation implications based on conversation]
|
||||
```
|
||||
|
||||
### 6. Handle Special Sections
|
||||
|
||||
Parse `special_sections` list from the matched CSV row. For each section name, generate corresponding subsections:
|
||||
|
||||
**Example mappings from CSV:**
|
||||
|
||||
- "clinical_requirements" → Add clinical validation requirements
|
||||
- "regulatory_pathway" → Document approval pathway timeline
|
||||
- "safety_measures" → Specify safety protocols and monitoring
|
||||
- "compliance_matrix" → Create compliance tracking matrix
|
||||
|
||||
### 7. Present Content and Menu
|
||||
|
||||
Show the generated domain content and present choices:
|
||||
"I've documented the {domain}-specific requirements that will shape {{project_name}}. These constraints are critical for success in this complex domain.
|
||||
|
||||
**Here's what I'll add to the document:**
|
||||
|
||||
[Show the complete markdown content from step 6]
|
||||
|
||||
**What would you like to do?**
|
||||
[A] Advanced Elicitation - Let's dive deeper into these domain requirements
|
||||
[P] Party Mode - Bring domain expertise perspectives to validate requirements
|
||||
[C] Continue - Save this to the document and move to next step"
|
||||
|
||||
### 8. Handle Menu Selection
|
||||
|
||||
#### If 'A' (Advanced Elicitation):
|
||||
|
||||
- Execute advanced-elicitation.xml with the current domain content
|
||||
- Process the enhanced domain insights that come back
|
||||
- Ask user: "Accept these domain requirement improvements? (y/n)"
|
||||
- If yes: Update content with improvements, then return to A/P/C menu
|
||||
- If no: Keep original content, then return to A/P/C menu
|
||||
|
||||
#### If 'P' (Party Mode):
|
||||
|
||||
- Execute party-mode workflow with the current domain requirements
|
||||
- Process the collaborative domain expertise and validation
|
||||
- Ask user: "Accept these changes to domain requirements? (y/n)"
|
||||
- If yes: Update content with improvements, then return to A/P/C menu
|
||||
- If no: Keep original content, then return to A/P/C menu
|
||||
|
||||
#### If 'C' (Continue):
|
||||
|
||||
- Append the final content to `{output_folder}/prd.md`
|
||||
- Update frontmatter: `stepsCompleted: [1, 2, 3, 4, 5]`
|
||||
- Load `./step-06-innovation.md`
|
||||
|
||||
## APPEND TO DOCUMENT:
|
||||
|
||||
When user selects 'C', append the content directly to the document using the structure from step 6.
|
||||
|
||||
## SUCCESS METRICS:
|
||||
|
||||
✅ Domain complexity properly validated as high before proceeding
|
||||
✅ All key concerns from CSV explored with user input
|
||||
✅ Compliance requirements clearly documented
|
||||
✅ Domain expertise needs identified and documented
|
||||
✅ Special sections generated per CSV configuration
|
||||
✅ A/P/C menu presented and handled correctly
|
||||
✅ Content properly appended to document when C selected
|
||||
|
||||
## FAILURE MODES:
|
||||
|
||||
❌ Proceeding with domain exploration when complexity is not high
|
||||
❌ Not loading or using CSV domain configuration properly
|
||||
❌ Missing critical domain concerns from the key_concerns list
|
||||
❌ Not connecting domain requirements to product implications
|
||||
❌ Generating generic content without domain-specific details
|
||||
❌ Not presenting A/P/C menu after content generation
|
||||
❌ Appending content without user selecting 'C'
|
||||
|
||||
## SKIP CONDITIONS:
|
||||
|
||||
Skip this step and load `./step-06-innovation.md` if:
|
||||
|
||||
- `complexity_level` from step-02 is not "high"
|
||||
- Domain has no specific regulatory/compliance requirements
|
||||
- User confirms domain exploration is not needed
|
||||
|
||||
## NEXT STEP:
|
||||
|
||||
After user selects 'C' and content is saved to document, load `./step-06-innovation.md`.
|
||||
|
||||
Remember: Do NOT proceed to step-06 until user explicitly selects 'C' from the A/P/C menu and content is saved!
|
||||
|
|
@ -0,0 +1,231 @@
|
|||
# Step 6: Innovation Discovery
|
||||
|
||||
## MANDATORY EXECUTION RULES (READ FIRST):
|
||||
|
||||
- 🛑 NEVER generate content without user input
|
||||
- ✅ ALWAYS treat this as collaborative discovery between PM peers
|
||||
- 📋 YOU ARE A FACILITATOR, not a content generator
|
||||
- 💬 FOCUS on detecting and exploring innovative aspects of the product
|
||||
- 🎯 OPTIONAL STEP: Only proceed if innovation signals are detected
|
||||
|
||||
## EXECUTION PROTOCOLS:
|
||||
|
||||
- 🎯 Show your analysis before taking any action
|
||||
- ⚠️ Present A/P/C menu after generating innovation content
|
||||
- 💾 ONLY save when user chooses C (Continue)
|
||||
- 📖 Update frontmatter `stepsCompleted: [1, 2, 3, 4, 5, 6]` before loading next step
|
||||
- 🚫 FORBIDDEN to load next step until C is selected
|
||||
|
||||
## COLLABORATION MENUS (A/P/C):
|
||||
|
||||
This step will generate content and present choices:
|
||||
|
||||
- **A (Advanced Elicitation)**: Use discovery protocols to develop deeper innovation insights
|
||||
- **P (Party Mode)**: Bring creative perspectives to explore innovation opportunities
|
||||
- **C (Continue)**: Save the content to the document and proceed to next step
|
||||
|
||||
## PROTOCOL INTEGRATION:
|
||||
|
||||
- When 'A' selected: Execute {project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml
|
||||
- When 'P' selected: Execute {project-root}/{bmad_folder}/core/workflows/party-mode
|
||||
- PROTOCOLS always return to this step's A/P/C menu
|
||||
- User accepts/rejects protocol changes before proceeding
|
||||
|
||||
## CONTEXT BOUNDARIES:
|
||||
|
||||
- Current document and frontmatter from previous steps are available
|
||||
- Project type from step-02 is available for innovation signal matching
|
||||
- Project-type CSV data will be loaded in this step
|
||||
- Focus on detecting genuine innovation, not forced creativity
|
||||
|
||||
## OPTIONAL STEP CHECK:
|
||||
|
||||
Before proceeding with this step, scan for innovation signals:
|
||||
|
||||
- Listen for language like "nothing like this exists", "rethinking how X works"
|
||||
- Check for project-type innovation signals from CSV
|
||||
- Look for novel approaches or unique combinations
|
||||
- If no innovation detected, skip this step
|
||||
|
||||
## YOUR TASK:
|
||||
|
||||
Detect and explore innovation patterns in the product, focusing on what makes it truly novel and how to validate the innovative aspects.
|
||||
|
||||
## INNOVATION DISCOVERY SEQUENCE:
|
||||
|
||||
### 1. Load Project-Type Innovation Data
|
||||
|
||||
Load innovation signals specific to this project type:
|
||||
|
||||
- Load `./project-types.csv` completely
|
||||
- Find the row where `project_type` matches detected type from step-02
|
||||
- Extract `innovation_signals` (semicolon-separated list)
|
||||
- Extract `web_search_triggers` for potential innovation research
|
||||
|
||||
### 2. Listen for Innovation Indicators
|
||||
|
||||
Monitor conversation for both general and project-type-specific innovation signals:
|
||||
|
||||
#### General Innovation Language:
|
||||
|
||||
- "Nothing like this exists"
|
||||
- "We're rethinking how [X] works"
|
||||
- "Combining [A] with [B] for the first time"
|
||||
- "Novel approach to [problem]"
|
||||
- "No one has done [concept] before"
|
||||
|
||||
#### Project-Type-Specific Signals (from CSV):
|
||||
|
||||
Match user descriptions against innovation_signals for their project_type:
|
||||
|
||||
- **api_backend**: "API composition;New protocol"
|
||||
- **mobile_app**: "Gesture innovation;AR/VR features"
|
||||
- **saas_b2b**: "Workflow automation;AI agents"
|
||||
- **developer_tool**: "New paradigm;DSL creation"
|
||||
|
||||
### 3. Initial Innovation Screening
|
||||
|
||||
Ask targeted innovation discovery questions:
|
||||
"As we explore {{project_name}}, I'm listening for what makes it innovative.
|
||||
|
||||
**Innovation Indicators:**
|
||||
|
||||
- Are you challenging any existing assumptions about how things work?
|
||||
- Are you combining technologies or approaches in new ways?
|
||||
- Is there something about this that hasn't been done before?
|
||||
|
||||
What aspects of {{project_name}} feel most innovative to you?"
|
||||
|
||||
### 4. Deep Innovation Exploration (If Detected)
|
||||
|
||||
If innovation signals are found, explore deeply:
|
||||
|
||||
#### Innovation Discovery Questions:
|
||||
|
||||
- "What makes it unique compared to existing solutions?"
|
||||
- "What assumption are you challenging?"
|
||||
- "How do we validate it works?"
|
||||
- "What's the fallback if it doesn't?"
|
||||
- "Has anyone tried this before?"
|
||||
|
||||
#### Market Context Research:
|
||||
|
||||
If relevant innovation detected, consider web search for context:
|
||||
Use `web_search_triggers` from project-type CSV:
|
||||
`[web_search_triggers] {concept} innovations {date}`
|
||||
|
||||
### 5. Generate Innovation Content (If Innovation Detected)
|
||||
|
||||
Prepare the content to append to the document:
|
||||
|
||||
#### Content Structure:
|
||||
|
||||
When saving to document, append these Level 2 and Level 3 sections:
|
||||
|
||||
```markdown
|
||||
## Innovation & Novel Patterns
|
||||
|
||||
### Detected Innovation Areas
|
||||
|
||||
[Innovation patterns identified based on conversation]
|
||||
|
||||
### Market Context & Competitive Landscape
|
||||
|
||||
[Market context and research based on conversation]
|
||||
|
||||
### Validation Approach
|
||||
|
||||
[Validation methodology based on conversation]
|
||||
|
||||
### Risk Mitigation
|
||||
|
||||
[Innovation risks and fallbacks based on conversation]
|
||||
```
|
||||
|
||||
### 6. Present Content and Menu (Only if Innovation Detected)
|
||||
|
||||
Show the generated innovation content and present choices:
|
||||
"I've identified some innovative aspects of {{project_name}} that differentiate it from existing solutions.
|
||||
|
||||
**Here's what I'll add to the document:**
|
||||
|
||||
[Show the complete markdown content from step 5]
|
||||
|
||||
**What would you like to do?**
|
||||
[A] Advanced Elicitation - Let's dive deeper into these innovation opportunities
|
||||
[P] Party Mode - Bring creative perspectives to explore innovation further
|
||||
[C] Continue - Save this to the document and move to next step"
|
||||
|
||||
### 7. Handle Menu Selection
|
||||
|
||||
#### If 'A' (Advanced Elicitation):
|
||||
|
||||
- Execute advanced-elicitation.xml with the current innovation content
|
||||
- Process the enhanced innovation insights that come back
|
||||
- Ask user: "Accept these improvements to the innovation analysis? (y/n)"
|
||||
- If yes: Update content with improvements, then return to A/P/C menu
|
||||
- If no: Keep original content, then return to A/P/C menu
|
||||
|
||||
#### If 'P' (Party Mode):
|
||||
|
||||
- Execute party-mode workflow with the current innovation content
|
||||
- Process the collaborative innovation exploration and ideation
|
||||
- Ask user: "Accept these changes to the innovation analysis? (y/n)"
|
||||
- If yes: Update content with improvements, then return to A/P/C menu
|
||||
- If no: Keep original content, then return to A/P/C menu
|
||||
|
||||
#### If 'C' (Continue):
|
||||
|
||||
- Append the final content to `{output_folder}/prd.md`
|
||||
- Update frontmatter: `stepsCompleted: [1, 2, 3, 4, 5, 6]`
|
||||
- Load `./step-07-project-type.md`
|
||||
|
||||
## NO INNOVATION DETECTED:
|
||||
|
||||
If no genuine innovation signals are found after exploration:
|
||||
"After exploring {{project_name}}, I don't see clear innovation signals that warrant a dedicated innovation section. This is perfectly fine - many successful products are excellent executions of existing concepts rather than breakthrough innovations.
|
||||
|
||||
**Options:**
|
||||
[A] Force innovation exploration - Let's try to find innovative angles
|
||||
[C] Continue - Skip innovation section and move to next step"
|
||||
|
||||
If user selects 'A', proceed with content generation anyway. If 'C', skip this step and load `./step-07-project-type.md`.
|
||||
|
||||
## APPEND TO DOCUMENT:
|
||||
|
||||
When user selects 'C', append the content directly to the document using the structure from step 5.
|
||||
|
||||
## SUCCESS METRICS:
|
||||
|
||||
✅ Innovation signals properly detected from user conversation
|
||||
✅ Project-type innovation signals used to guide discovery
|
||||
✅ Genuine innovation explored (not forced creativity)
|
||||
✅ Validation approach clearly defined for innovative aspects
|
||||
✅ Risk mitigation strategies identified
|
||||
✅ A/P/C menu presented and handled correctly
|
||||
✅ Content properly appended to document when C selected
|
||||
|
||||
## FAILURE MODES:
|
||||
|
||||
❌ Forced innovation when none genuinely exists
|
||||
❌ Not using project-type innovation signals from CSV
|
||||
❌ Missing market context research for novel concepts
|
||||
❌ Not addressing validation approach for innovative features
|
||||
❌ Creating innovation theater without real innovative aspects
|
||||
❌ Not presenting A/P/C menu after content generation
|
||||
❌ Appending content without user selecting 'C'
|
||||
|
||||
## SKIP CONDITIONS:
|
||||
|
||||
Skip this step and load `./step-07-project-type.md` if:
|
||||
|
||||
- No innovation signals detected in conversation
|
||||
- Product is incremental improvement rather than breakthrough
|
||||
- User confirms innovation exploration is not needed
|
||||
- Project-type CSV has no innovation signals for this type
|
||||
|
||||
## NEXT STEP:
|
||||
|
||||
After user selects 'C' and content is saved to document (or step is skipped), load `./step-07-project-type.md`.
|
||||
|
||||
Remember: Do NOT proceed to step-07 until user explicitly selects 'C' from the A/P/C menu (or confirms step skip)!
|
||||
|
|
@ -0,0 +1,227 @@
|
|||
# Step 7: Project-Type Deep Dive
|
||||
|
||||
## MANDATORY EXECUTION RULES (READ FIRST):
|
||||
|
||||
- 🛑 NEVER generate content without user input
|
||||
- ✅ ALWAYS treat this as collaborative discovery between PM peers
|
||||
- 📋 YOU ARE A FACILITATOR, not a content generator
|
||||
- 💬 FOCUS on project-type specific requirements and technical considerations
|
||||
- 🎯 DATA-DRIVEN: Use CSV configuration to guide discovery
|
||||
|
||||
## EXECUTION PROTOCOLS:
|
||||
|
||||
- 🎯 Show your analysis before taking any action
|
||||
- ⚠️ Present A/P/C menu after generating project-type content
|
||||
- 💾 ONLY save when user chooses C (Continue)
|
||||
- 📖 Update frontmatter `stepsCompleted: [1, 2, 3, 4, 5, 6, 7]` before loading next step
|
||||
- 🚫 FORBIDDEN to load next step until C is selected
|
||||
|
||||
## COLLABORATION MENUS (A/P/C):
|
||||
|
||||
This step will generate content and present choices:
|
||||
|
||||
- **A (Advanced Elicitation)**: Use discovery protocols to develop deeper project-type insights
|
||||
- **P (Party Mode)**: Bring technical perspectives to explore project-specific requirements
|
||||
- **C (Continue)**: Save the content to the document and proceed to next step
|
||||
|
||||
## PROTOCOL INTEGRATION:
|
||||
|
||||
- When 'A' selected: Execute {project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml
|
||||
- When 'P' selected: Execute {project-root}/{bmad_folder}/core/workflows/party-mode
|
||||
- PROTOCOLS always return to this step's A/P/C menu
|
||||
- User accepts/rejects protocol changes before proceeding
|
||||
|
||||
## CONTEXT BOUNDARIES:
|
||||
|
||||
- Current document and frontmatter from previous steps are available
|
||||
- Project type from step-02 is available for configuration loading
|
||||
- Project-type CSV data will be loaded in this step
|
||||
- Focus on technical and functional requirements specific to this project type
|
||||
|
||||
## YOUR TASK:
|
||||
|
||||
Conduct project-type specific discovery using CSV-driven guidance to define technical requirements.
|
||||
|
||||
## PROJECT-TYPE DISCOVERY SEQUENCE:
|
||||
|
||||
### 1. Load Project-Type Configuration Data
|
||||
|
||||
Load project-type specific configuration:
|
||||
|
||||
- Load `./project-types.csv` completely
|
||||
- Find the row where `project_type` matches detected type from step-02
|
||||
- Extract these columns:
|
||||
- `key_questions` (semicolon-separated list of discovery questions)
|
||||
- `required_sections` (semicolon-separated list of sections to document)
|
||||
- `skip_sections` (semicolon-separated list of sections to skip)
|
||||
- `innovation_signals` (already explored in step-6)
|
||||
|
||||
### 2. Conduct Guided Discovery Using Key Questions
|
||||
|
||||
Parse `key_questions` from CSV and explore each:
|
||||
|
||||
#### Question-Based Discovery:
|
||||
|
||||
For each question in `key_questions` from CSV:
|
||||
|
||||
- Ask the user naturally in conversational style
|
||||
- Listen for their response and ask clarifying follow-ups
|
||||
- Connect answers to product value proposition
|
||||
|
||||
**Example Flow:**
|
||||
If key_questions = "Endpoints needed?;Authentication method?;Data formats?;Rate limits?;Versioning?;SDK needed?"
|
||||
|
||||
Ask naturally:
|
||||
|
||||
- "What are the main endpoints your API needs to expose?"
|
||||
- "How will you handle authentication and authorization?"
|
||||
- "What data formats will you support for requests and responses?"
|
||||
|
||||
### 3. Document Project-Type Specific Requirements
|
||||
|
||||
Based on user answers to key_questions, synthesize comprehensive requirements:
|
||||
|
||||
#### Requirement Categories:
|
||||
|
||||
Cover the areas indicated by `required_sections` from CSV:
|
||||
|
||||
- Synthesize what was discovered for each required section
|
||||
- Document specific requirements, constraints, and decisions
|
||||
- Connect to product differentiator when relevant
|
||||
|
||||
#### Skip Irrelevant Sections:
|
||||
|
||||
Skip areas indicated by `skip_sections` from CSV to avoid wasting time on irrelevant aspects.
|
||||
|
||||
### 4. Generate Dynamic Content Sections
|
||||
|
||||
Parse `required_sections` list from the matched CSV row. For each section name, generate corresponding content:
|
||||
|
||||
#### Common CSV Section Mappings:
|
||||
|
||||
- "endpoint_specs" or "endpoint_specification" → API endpoints documentation
|
||||
- "auth_model" or "authentication_model" → Authentication approach
|
||||
- "platform_reqs" or "platform_requirements" → Platform support needs
|
||||
- "device_permissions" or "device_features" → Device capabilities
|
||||
- "tenant_model" → Multi-tenancy approach
|
||||
- "rbac_matrix" or "permission_matrix" → Permission structure
|
||||
|
||||
#### Template Variable Strategy:
|
||||
|
||||
- For sections matching common template variables: generate specific content
|
||||
- For sections without template matches: include in main project_type_requirements
|
||||
- Hybrid approach balances template structure with CSV-driven flexibility
|
||||
|
||||
### 5. Generate Project-Type Content
|
||||
|
||||
Prepare the content to append to the document:
|
||||
|
||||
#### Content Structure:
|
||||
|
||||
When saving to document, append these Level 2 and Level 3 sections:
|
||||
|
||||
```markdown
|
||||
## [Project Type] Specific Requirements
|
||||
|
||||
### Project-Type Overview
|
||||
|
||||
[Project type summary based on conversation]
|
||||
|
||||
### Technical Architecture Considerations
|
||||
|
||||
[Technical architecture requirements based on conversation]
|
||||
|
||||
[Dynamic sections based on CSV and conversation]
|
||||
|
||||
### Implementation Considerations
|
||||
|
||||
[Implementation specific requirements based on conversation]
|
||||
```
|
||||
|
||||
### 6. Present Content and Menu
|
||||
|
||||
Show the generated project-type content and present choices:
|
||||
"I've documented the {project_type}-specific requirements for {{project_name}} based on our conversation and best practices for this type of product.
|
||||
|
||||
**Here's what I'll add to the document:**
|
||||
|
||||
[Show the complete markdown content from step 5]
|
||||
|
||||
**What would you like to do?**
|
||||
[A] Advanced Elicitation - Let's dive deeper into these technical requirements
|
||||
[P] Party Mode - Bring technical expertise perspectives to validate requirements
|
||||
[C] Continue - Save this to the document and move to next step"
|
||||
|
||||
### 7. Handle Menu Selection
|
||||
|
||||
#### If 'A' (Advanced Elicitation):
|
||||
|
||||
- Execute advanced-elicitation.xml with the current project-type content
|
||||
- Process the enhanced technical insights that come back
|
||||
- Ask user: "Accept these improvements to the technical requirements? (y/n)"
|
||||
- If yes: Update content with improvements, then return to A/P/C menu
|
||||
- If no: Keep original content, then return to A/P/C menu
|
||||
|
||||
#### If 'P' (Party Mode):
|
||||
|
||||
- Execute party-mode workflow with the current project-type requirements
|
||||
- Process the collaborative technical expertise and validation
|
||||
- Ask user: "Accept these changes to the technical requirements? (y/n)"
|
||||
- If yes: Update content with improvements, then return to A/P/C menu
|
||||
- If no: Keep original content, then return to A/P/C menu
|
||||
|
||||
#### If 'C' (Continue):
|
||||
|
||||
- Append the final content to `{output_folder}/prd.md`
|
||||
- Update frontmatter: `stepsCompleted: [1, 2, 3, 4, 5, 6, 7]`
|
||||
- Load `./step-08-functional.md`
|
||||
|
||||
## APPEND TO DOCUMENT:
|
||||
|
||||
When user selects 'C', append the content directly to the document using the structure from step 5.
|
||||
|
||||
## SUCCESS METRICS:
|
||||
|
||||
✅ Project-type configuration loaded and used effectively
|
||||
✅ All key questions from CSV explored with user input
|
||||
✅ Required sections generated per CSV configuration
|
||||
✅ Skip sections properly avoided to save time
|
||||
✅ Technical requirements connected to product value
|
||||
✅ A/P/C menu presented and handled correctly
|
||||
✅ Content properly appended to document when C selected
|
||||
|
||||
## FAILURE MODES:
|
||||
|
||||
❌ Not loading or using project-type CSV configuration
|
||||
❌ Missing key questions from CSV in discovery process
|
||||
❌ Not generating required sections per CSV configuration
|
||||
❌ Documenting sections that should be skipped per CSV
|
||||
❌ Creating generic content without project-type specificity
|
||||
❌ Not presenting A/P/C menu after content generation
|
||||
❌ Appending content without user selecting 'C'
|
||||
|
||||
## PROJECT-TYPE EXAMPLES:
|
||||
|
||||
**For api_backend:**
|
||||
|
||||
- Focus on endpoints, authentication, data schemas, rate limiting
|
||||
- Skip visual design and user journey sections
|
||||
- Generate API specification documentation
|
||||
|
||||
**For mobile_app:**
|
||||
|
||||
- Focus on platform requirements, device permissions, offline mode
|
||||
- Skip API endpoint documentation unless needed
|
||||
- Generate mobile-specific technical requirements
|
||||
|
||||
**For saas_b2b:**
|
||||
|
||||
- Focus on multi-tenancy, permissions, integrations
|
||||
- Skip mobile-first considerations unless relevant
|
||||
- Generate enterprise-specific requirements
|
||||
|
||||
## NEXT STEP:
|
||||
|
||||
After user selects 'C' and content is saved to document, load `./step-08-functional.md` to synthesize functional requirements.
|
||||
|
||||
Remember: Do NOT proceed to step-08 until user explicitly selects 'C' from the A/P/C menu and content is saved!
|
||||
|
|
@ -0,0 +1,242 @@
|
|||
# Step 8: Functional Requirements Synthesis
|
||||
|
||||
## MANDATORY EXECUTION RULES (READ FIRST):
|
||||
|
||||
- 🛑 NEVER generate content without user input
|
||||
- ✅ ALWAYS treat this as collaborative discovery between PM peers
|
||||
- 📋 YOU ARE A FACILITATOR, not a content generator
|
||||
- 💬 FOCUS on creating comprehensive capability inventory for the product
|
||||
- 🎯 CRITICAL: This is THE CAPABILITY CONTRACT for all downstream work
|
||||
|
||||
## EXECUTION PROTOCOLS:
|
||||
|
||||
- 🎯 Show your analysis before taking any action
|
||||
- ⚠️ Present A/P/C menu after generating functional requirements
|
||||
- 💾 ONLY save when user chooses C (Continue)
|
||||
- 📖 Update frontmatter `stepsCompleted: [1, 2, 3, 4, 5, 6, 7, 8]` before loading next step
|
||||
- 🚫 FORBIDDEN to load next step until C is selected
|
||||
|
||||
## COLLABORATION MENUS (A/P/C):
|
||||
|
||||
This step will generate content and present choices:
|
||||
|
||||
- **A (Advanced Elicitation)**: Use discovery protocols to ensure comprehensive requirement coverage
|
||||
- **P (Party Mode)**: Bring multiple perspectives to validate complete requirement set
|
||||
- **C (Continue)**: Save the content to the document and proceed to next step
|
||||
|
||||
## PROTOCOL INTEGRATION:
|
||||
|
||||
- When 'A' selected: Execute {project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml
|
||||
- When 'P' selected: Execute {project-root}/{bmad_folder}/core/workflows/party-mode
|
||||
- PROTOCOLS always return to this step's A/P/C menu
|
||||
- User accepts/rejects protocol changes before proceeding
|
||||
|
||||
## CONTEXT BOUNDARIES:
|
||||
|
||||
- Current document and frontmatter from previous steps are available
|
||||
- ALL previous content (executive summary, success criteria, journeys, domain, innovation, project-type) must be referenced
|
||||
- No additional data files needed for this step
|
||||
- Focus on capabilities, not implementation details
|
||||
|
||||
## CRITICAL IMPORTANCE:
|
||||
|
||||
**This section defines THE CAPABILITY CONTRACT for the entire product:**
|
||||
|
||||
- UX designers will ONLY design what's listed here
|
||||
- Architects will ONLY support what's listed here
|
||||
- Epic breakdown will ONLY implement what's listed here
|
||||
- If a capability is missing from FRs, it will NOT exist in the final product
|
||||
|
||||
## FUNCTIONAL REQUIREMENTS SYNTHESIS SEQUENCE:
|
||||
|
||||
### 1. Understand FR Purpose and Usage
|
||||
|
||||
Start by explaining the critical role of functional requirements:
|
||||
|
||||
**Purpose:**
|
||||
FRs define WHAT capabilities the product must have. They are the complete inventory of user-facing and system capabilities that deliver the product vision.
|
||||
|
||||
**Critical Properties:**
|
||||
✅ Each FR is a testable capability
|
||||
✅ Each FR is implementation-agnostic (could be built many ways)
|
||||
✅ Each FR specifies WHO and WHAT, not HOW
|
||||
✅ No UI details, no performance numbers, no technology choices
|
||||
✅ Comprehensive coverage of capability areas
|
||||
|
||||
**How They Will Be Used:**
|
||||
|
||||
1. UX Designer reads FRs → designs interactions for each capability
|
||||
2. Architect reads FRs → designs systems to support each capability
|
||||
3. PM reads FRs → creates epics and stories to implement each capability
|
||||
|
||||
### 2. Review Existing Content for Capability Extraction
|
||||
|
||||
Systematically review all previous sections to extract capabilities:
|
||||
|
||||
**Extract From:**
|
||||
|
||||
- Executive Summary → Core product differentiator capabilities
|
||||
- Success Criteria → Success-enabling capabilities
|
||||
- User Journeys → Journey-revealed capabilities
|
||||
- Domain Requirements → Compliance and regulatory capabilities
|
||||
- Innovation Patterns → Innovative feature capabilities
|
||||
- Project-Type Requirements → Technical capability needs
|
||||
|
||||
### 3. Organize Requirements by Capability Area
|
||||
|
||||
Group FRs by logical capability areas (NOT by technology or layer):
|
||||
|
||||
**Good Grouping Examples:**
|
||||
|
||||
- ✅ "User Management" (not "Authentication System")
|
||||
- ✅ "Content Discovery" (not "Search Algorithm")
|
||||
- ✅ "Team Collaboration" (not "WebSocket Infrastructure")
|
||||
|
||||
**Target 5-8 Capability Areas** for typical projects.
|
||||
|
||||
### 4. Generate Comprehensive FR List
|
||||
|
||||
Create complete functional requirements using this format:
|
||||
|
||||
**Format:**
|
||||
|
||||
- FR#: [Actor] can [capability] [context/constraint if needed]
|
||||
- Number sequentially (FR1, FR2, FR3...)
|
||||
- Aim for 20-50 FRs for typical projects
|
||||
|
||||
**Altitude Check:**
|
||||
Each FR should answer "WHAT capability exists?" NOT "HOW it's implemented?"
|
||||
|
||||
**Examples:**
|
||||
|
||||
- ✅ "Users can customize appearance settings"
|
||||
- ❌ "Users can toggle light/dark theme with 3 font size options stored in LocalStorage"
|
||||
|
||||
### 5. Self-Validation Process
|
||||
|
||||
Before presenting to user, validate the FR list:
|
||||
|
||||
**Completeness Check:**
|
||||
|
||||
1. "Did I cover EVERY capability mentioned in the MVP scope section?"
|
||||
2. "Did I include domain-specific requirements as FRs?"
|
||||
3. "Did I cover the project-type specific needs?"
|
||||
4. "Could a UX designer read ONLY the FRs and know what to design?"
|
||||
5. "Could an Architect read ONLY the FRs and know what to support?"
|
||||
6. "Are there any user actions or system behaviors we discussed that have no FR?"
|
||||
|
||||
**Altitude Check:**
|
||||
|
||||
1. "Am I stating capabilities (WHAT) or implementation (HOW)?"
|
||||
2. "Am I listing acceptance criteria or UI specifics?" (Remove if yes)
|
||||
3. "Could this FR be implemented 5 different ways?" (Good - means it's not prescriptive)
|
||||
|
||||
**Quality Check:**
|
||||
|
||||
1. "Is each FR clear enough that someone could test whether it exists?"
|
||||
2. "Is each FR independent (not dependent on reading other FRs to understand)?"
|
||||
3. "Did I avoid vague terms like 'good', 'fast', 'easy'?" (Use NFRs for quality attributes)
|
||||
|
||||
### 6. Generate Functional Requirements Content
|
||||
|
||||
Prepare the content to append to the document:
|
||||
|
||||
#### Content Structure:
|
||||
|
||||
When saving to document, append these Level 2 and Level 3 sections:
|
||||
|
||||
```markdown
|
||||
## Functional Requirements
|
||||
|
||||
### [Capability Area Name]
|
||||
|
||||
- FR1: [Specific Actor] can [specific capability]
|
||||
- FR2: [Specific Actor] can [specific capability]
|
||||
- FR3: [Specific Actor] can [specific capability]
|
||||
|
||||
### [Another Capability Area]
|
||||
|
||||
- FR4: [Specific Actor] can [specific capability]
|
||||
- FR5: [Specific Actor] can [specific capability]
|
||||
|
||||
[Continue for all capability areas discovered in conversation]
|
||||
```
|
||||
|
||||
### 7. Present Content and Menu
|
||||
|
||||
Show the generated functional requirements and present choices:
|
||||
"I've synthesized all our discussions into comprehensive functional requirements. This becomes the capability contract that UX designers, architects, and developers will all work from.
|
||||
|
||||
**Here's what I'll add to the document:**
|
||||
|
||||
[Show the complete FR list from step 6]
|
||||
|
||||
**This is critical because:**
|
||||
|
||||
- Every feature we build must trace back to one of these requirements
|
||||
- UX designers will ONLY design interactions for these capabilities
|
||||
- Architects will ONLY build systems to support these capabilities
|
||||
|
||||
**What would you like to do?**
|
||||
[A] Advanced Elicitation - Let's ensure we haven't missed any capabilities
|
||||
[P] Party Mode - Bring different perspectives to validate complete coverage
|
||||
[C] Continue - Save this to the document and move to next step"
|
||||
|
||||
### 8. Handle Menu Selection
|
||||
|
||||
#### If 'A' (Advanced Elicitation):
|
||||
|
||||
- Execute advanced-elicitation.xml with the current FR list
|
||||
- Process the enhanced capability coverage that comes back
|
||||
- Ask user: "Accept these additions to the functional requirements? (y/n)"
|
||||
- If yes: Update content with improvements, then return to A/P/C menu
|
||||
- If no: Keep original content, then return to A/P/C menu
|
||||
|
||||
#### If 'P' (Party Mode):
|
||||
|
||||
- Execute party-mode workflow with the current FR list
|
||||
- Process the collaborative capability validation and additions
|
||||
- Ask user: "Accept these changes to the functional requirements? (y/n)"
|
||||
- If yes: Update content with improvements, then return to A/P/C menu
|
||||
- If no: Keep original content, then return to A/P/C menu
|
||||
|
||||
#### If 'C' (Continue):
|
||||
|
||||
- Append the final content to `{output_folder}/prd.md`
|
||||
- Update frontmatter: `stepsCompleted: [1, 2, 3, 4, 5, 6, 7, 8]`
|
||||
- Load `./step-09-nonfunctional.md`
|
||||
|
||||
## APPEND TO DOCUMENT:
|
||||
|
||||
When user selects 'C', append the content directly to the document using the structure from step 6.
|
||||
|
||||
## SUCCESS METRICS:
|
||||
|
||||
✅ All previous discovery content synthesized into FRs
|
||||
✅ FRs organized by capability areas (not technology)
|
||||
✅ Each FR states WHAT capability exists, not HOW to implement
|
||||
✅ Comprehensive coverage with 20-50 FRs typical
|
||||
✅ Altitude validation ensures implementation-agnostic requirements
|
||||
✅ Completeness check validates coverage of all discussed capabilities
|
||||
✅ A/P/C menu presented and handled correctly
|
||||
✅ Content properly appended to document when C selected
|
||||
|
||||
## FAILURE MODES:
|
||||
|
||||
❌ Missing capabilities from previous discovery sections
|
||||
❌ Organizing FRs by technology instead of capability areas
|
||||
❌ Including implementation details or UI specifics in FRs
|
||||
❌ Not achieving comprehensive coverage of discussed capabilities
|
||||
❌ Using vague terms instead of testable capabilities
|
||||
❌ Not presenting A/P/C menu after content generation
|
||||
❌ Appending content without user selecting 'C'
|
||||
|
||||
## CAPABILITY CONTRACT REMINDER:
|
||||
|
||||
Emphasize to user: "This FR list is now binding. Any feature not listed here will not exist in the final product unless we explicitly add it. This is why it's critical to ensure completeness now."
|
||||
|
||||
## NEXT STEP:
|
||||
|
||||
After user selects 'C' and content is saved to document, load `./step-09-nonfunctional.md` to define non-functional requirements.
|
||||
|
||||
Remember: Do NOT proceed to step-09 until user explicitly selects 'C' from the A/P/C menu and content is saved!
|
||||
|
|
@ -0,0 +1,266 @@
|
|||
# Step 9: Non-Functional Requirements
|
||||
|
||||
## MANDATORY EXECUTION RULES (READ FIRST):
|
||||
|
||||
- 🛑 NEVER generate content without user input
|
||||
- ✅ ALWAYS treat this as collaborative discovery between PM peers
|
||||
- 📋 YOU ARE A FACILITATOR, not a content generator
|
||||
- 💬 FOCUS on quality attributes that matter for THIS specific product
|
||||
- 🎯 SELECTIVE: Only document NFRs that actually apply to the product
|
||||
|
||||
## EXECUTION PROTOCOLS:
|
||||
|
||||
- 🎯 Show your analysis before taking any action
|
||||
- ⚠️ Present A/P/C menu after generating NFR content
|
||||
- 💾 ONLY save when user chooses C (Continue)
|
||||
- 📖 Update frontmatter `stepsCompleted: [1, 2, 3, 4, 5, 6, 7, 8, 9]` before loading next step
|
||||
- 🚫 FORBIDDEN to load next step until C is selected
|
||||
|
||||
## COLLABORATION MENUS (A/P/C):
|
||||
|
||||
This step will generate content and present choices:
|
||||
|
||||
- **A (Advanced Elicitation)**: Use discovery protocols to ensure comprehensive quality attributes
|
||||
- **P (Party Mode)**: Bring technical perspectives to validate NFR completeness
|
||||
- **C (Continue)**: Save the content to the document and proceed to final step
|
||||
|
||||
## PROTOCOL INTEGRATION:
|
||||
|
||||
- When 'A' selected: Execute {project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml
|
||||
- When 'P' selected: Execute {project-root}/{bmad_folder}/core/workflows/party-mode
|
||||
- PROTOCOLS always return to this step's A/P/C menu
|
||||
- User accepts/rejects protocol changes before proceeding
|
||||
|
||||
## CONTEXT BOUNDARIES:
|
||||
|
||||
- Current document and frontmatter from previous steps are available
|
||||
- Functional requirements already defined and will inform NFRs
|
||||
- Domain and project-type context will guide which NFRs matter
|
||||
- Focus on specific, measurable quality criteria
|
||||
|
||||
## YOUR TASK:
|
||||
|
||||
Define non-functional requirements that specify quality attributes for the product, focusing only on what matters for THIS specific product.
|
||||
|
||||
## NON-FUNCTIONAL REQUIREMENTS SEQUENCE:
|
||||
|
||||
### 1. Explain NFR Purpose and Scope
|
||||
|
||||
Start by clarifying what NFRs are and why we're selective:
|
||||
|
||||
**NFR Purpose:**
|
||||
NFRs define HOW WELL the system must perform, not WHAT it must do. They specify quality attributes like performance, security, scalability, etc.
|
||||
|
||||
**Selective Approach:**
|
||||
We only document NFRs that matter for THIS product. If a category doesn't apply, we skip it entirely. This prevents requirement bloat and focuses on what's actually important.
|
||||
|
||||
### 2. Assess Product Context for NFR Relevance
|
||||
|
||||
Evaluate which NFR categories matter based on product context:
|
||||
|
||||
**Quick Assessment Questions:**
|
||||
|
||||
- **Performance**: Is there user-facing impact of speed?
|
||||
- **Security**: Are we handling sensitive data or payments?
|
||||
- **Scalability**: Do we expect rapid user growth?
|
||||
- **Accessibility**: Are we serving broad public audiences?
|
||||
- **Integration**: Do we need to connect with other systems?
|
||||
- **Reliability**: Would downtime cause significant problems?
|
||||
|
||||
### 3. Explore Relevant NFR Categories
|
||||
|
||||
For each relevant category, conduct targeted discovery:
|
||||
|
||||
#### Performance NFRs (If relevant):
|
||||
|
||||
"Let's talk about performance requirements for {{project_name}}.
|
||||
|
||||
**Performance Questions:**
|
||||
|
||||
- What parts of the system need to be fast for users to be successful?
|
||||
- Are there specific response time expectations?
|
||||
- What happens if performance is slower than expected?
|
||||
- Are there concurrent user scenarios we need to support?"
|
||||
|
||||
#### Security NFRs (If relevant):
|
||||
|
||||
"Security is critical for products that handle sensitive information.
|
||||
|
||||
**Security Questions:**
|
||||
|
||||
- What data needs to be protected?
|
||||
- Who should have access to what?
|
||||
- What are the security risks we need to mitigate?
|
||||
- Are there compliance requirements (GDPR, HIPAA, PCI-DSS)?"
|
||||
|
||||
#### Scalability NFRs (If relevant):
|
||||
|
||||
"Scalability matters if we expect growth or have variable demand.
|
||||
|
||||
**Scalability Questions:**
|
||||
|
||||
- How many users do we expect initially? Long-term?
|
||||
- Are there seasonal or event-based traffic spikes?
|
||||
- What happens if we exceed our capacity?"
|
||||
- What growth scenarios should we plan for?"
|
||||
|
||||
#### Accessibility NFRs (If relevant):
|
||||
|
||||
"Accessibility ensures the product works for users with disabilities.
|
||||
|
||||
**Accessibility Questions:**
|
||||
|
||||
- Are we serving users with visual, hearing, or motor impairments?
|
||||
- Are there legal accessibility requirements (WCAG, Section 508)?
|
||||
- What accessibility features are most important for our users?"
|
||||
|
||||
#### Integration NFRs (If relevant):
|
||||
|
||||
"Integration requirements matter for products that connect to other systems.
|
||||
|
||||
**Integration Questions:**
|
||||
|
||||
- What external systems do we need to connect with?
|
||||
- Are there APIs or data formats we must support?
|
||||
- How reliable do these integrations need to be?"
|
||||
|
||||
### 4. Make NFRs Specific and Measurable
|
||||
|
||||
For each relevant NFR category, ensure criteria are testable:
|
||||
|
||||
**From Vague to Specific:**
|
||||
|
||||
- NOT: "The system should be fast" → "User actions complete within 2 seconds"
|
||||
- NOT: "The system should be secure" → "All data is encrypted at rest and in transit"
|
||||
- NOT: "The system should scale" → "System supports 10x user growth with <10% performance degradation"
|
||||
|
||||
### 5. Generate NFR Content (Only Relevant Categories)
|
||||
|
||||
Prepare the content to append to the document:
|
||||
|
||||
#### Content Structure (Dynamic based on relevance):
|
||||
|
||||
When saving to document, append these Level 2 and Level 3 sections (only include sections that are relevant):
|
||||
|
||||
```markdown
|
||||
## Non-Functional Requirements
|
||||
|
||||
### Performance
|
||||
|
||||
[Performance requirements based on conversation - only include if relevant]
|
||||
|
||||
### Security
|
||||
|
||||
[Security requirements based on conversation - only include if relevant]
|
||||
|
||||
### Scalability
|
||||
|
||||
[Scalability requirements based on conversation - only include if relevant]
|
||||
|
||||
### Accessibility
|
||||
|
||||
[Accessibility requirements based on conversation - only include if relevant]
|
||||
|
||||
### Integration
|
||||
|
||||
[Integration requirements based on conversation - only include if relevant]
|
||||
```
|
||||
|
||||
### 6. Present Content and Menu
|
||||
|
||||
Show the generated NFR content and present choices:
|
||||
"I've defined the non-functional requirements that specify how well {{project_name}} needs to perform. I've only included categories that actually matter for this product.
|
||||
|
||||
**Here's what I'll add to the document:**
|
||||
|
||||
[Show the complete NFR content from step 5]
|
||||
|
||||
**Note:** We've skipped categories that don't apply to avoid unnecessary requirements.
|
||||
|
||||
**What would you like to do?**
|
||||
[A] Advanced Elicitation - Let's ensure we haven't missed critical quality attributes
|
||||
[P] Party Mode - Bring technical perspectives to validate NFR specifications
|
||||
[C] Continue - Save this to the document and move to final step"
|
||||
|
||||
### 7. Handle Menu Selection
|
||||
|
||||
#### If 'A' (Advanced Elicitation):
|
||||
|
||||
- Execute advanced-elicitation.xml with the current NFR content
|
||||
- Process the enhanced quality attribute insights that come back
|
||||
- Ask user: "Accept these improvements to the non-functional requirements? (y/n)"
|
||||
- If yes: Update content with improvements, then return to A/P/C menu
|
||||
- If no: Keep original content, then return to A/P/C menu
|
||||
|
||||
#### If 'P' (Party Mode):
|
||||
|
||||
- Execute party-mode workflow with the current NFR list
|
||||
- Process the collaborative technical validation and additions
|
||||
- Ask user: "Accept these changes to the non-functional requirements? (y/n)"
|
||||
- If yes: Update content with improvements, then return to A/P/C menu
|
||||
- If no: Keep original content, then return to A/P/C menu
|
||||
|
||||
#### If 'C' (Continue):
|
||||
|
||||
- Append the final content to `{output_folder}/prd.md`
|
||||
- Update frontmatter: `stepsCompleted: [1, 2, 3, 4, 5, 6, 7, 8, 9]`
|
||||
- Load `./step-10-complete.md`
|
||||
|
||||
## APPEND TO DOCUMENT:
|
||||
|
||||
When user selects 'C', append the content directly to the document using the structure from step 5.
|
||||
|
||||
## SUCCESS METRICS:
|
||||
|
||||
✅ Only relevant NFR categories documented (no requirement bloat)
|
||||
✅ Each NFR is specific and measurable
|
||||
✅ NFRs connected to actual user needs and business context
|
||||
✅ Vague requirements converted to testable criteria
|
||||
✅ Domain-specific compliance requirements included if relevant
|
||||
✅ A/P/C menu presented and handled correctly
|
||||
✅ Content properly appended to document when C selected
|
||||
|
||||
## FAILURE MODES:
|
||||
|
||||
❌ Documenting NFR categories that don't apply to the product
|
||||
❌ Leaving requirements vague and unmeasurable
|
||||
❌ Not connecting NFRs to actual user or business needs
|
||||
❌ Missing domain-specific compliance requirements
|
||||
❌ Creating overly prescriptive technical requirements
|
||||
❌ Not presenting A/P/C menu after content generation
|
||||
❌ Appending content without user selecting 'C'
|
||||
|
||||
## NFR CATEGORY GUIDANCE:
|
||||
|
||||
**Include Performance When:**
|
||||
|
||||
- User-facing response times impact success
|
||||
- Real-time interactions are critical
|
||||
- Performance is a competitive differentiator
|
||||
|
||||
**Include Security When:**
|
||||
|
||||
- Handling sensitive user data
|
||||
- Processing payments or financial information
|
||||
- Subject to compliance regulations
|
||||
- Protecting intellectual property
|
||||
|
||||
**Include Scalability When:**
|
||||
|
||||
- Expecting rapid user growth
|
||||
- Handling variable traffic patterns
|
||||
- Supporting enterprise-scale usage
|
||||
- Planning for market expansion
|
||||
|
||||
**Include Accessibility When:**
|
||||
|
||||
- Serving broad public audiences
|
||||
- Subject to accessibility regulations
|
||||
- Targeting users with disabilities
|
||||
- B2B customers with accessibility requirements
|
||||
|
||||
## NEXT STEP:
|
||||
|
||||
After user selects 'C' and content is saved to document, load `./step-10-complete.md` to finalize the PRD and complete the workflow.
|
||||
|
||||
Remember: Do NOT proceed to step-10 until user explicitly selects 'C' from the A/P/C menu and content is saved!
|
||||
|
|
@ -0,0 +1,201 @@
|
|||
# Step 10: Workflow Completion
|
||||
|
||||
## MANDATORY EXECUTION RULES (READ FIRST):
|
||||
|
||||
- ✅ THIS IS A FINAL STEP - Workflow completion required
|
||||
- 🛑 NO content generation - this is a wrap-up step
|
||||
- 📋 FINALIZE document and update workflow status
|
||||
- 💬 FOCUS on completion, next steps, and suggestions
|
||||
- 🎯 UPDATE workflow status files with completion information
|
||||
|
||||
## EXECUTION PROTOCOLS:
|
||||
|
||||
- 🎯 Show your analysis before taking any action
|
||||
- 💾 Update the main workflow status file with completion information
|
||||
- 📖 Suggest potential next workflow steps for the user
|
||||
- 🚫 DO NOT load additional steps after this one
|
||||
|
||||
## TERMINATION STEP PROTOCOLS:
|
||||
|
||||
- This is a FINAL step - workflow completion required
|
||||
- Output any remaining content if needed (none for this step)
|
||||
- Update the main workflow status file with finalized document
|
||||
- Suggest potential next steps for the user
|
||||
- Mark workflow as complete in status tracking
|
||||
|
||||
## CONTEXT BOUNDARIES:
|
||||
|
||||
- Complete PRD document is available from all previous steps
|
||||
- Workflow frontmatter shows all completed steps
|
||||
- All collaborative content has been generated and saved
|
||||
- Focus on completion, validation, and next steps
|
||||
|
||||
## YOUR TASK:
|
||||
|
||||
Complete the PRD workflow, update status files, and suggest next steps for the project.
|
||||
|
||||
## WORKFLOW COMPLETION SEQUENCE:
|
||||
|
||||
### 1. Announce Workflow Completion
|
||||
|
||||
Inform user that the PRD is complete:
|
||||
"🎉 **PRD Complete, {{user_name}}!**
|
||||
|
||||
I've successfully collaborated with you to create a comprehensive Product Requirements Document for {{project_name}}.
|
||||
|
||||
**What we've accomplished:**
|
||||
|
||||
- ✅ Executive Summary with vision and product differentiator
|
||||
- ✅ Success Criteria with measurable outcomes and scope definition
|
||||
- ✅ User Journeys covering all interaction patterns
|
||||
- ✅ Domain-specific requirements (if applicable)
|
||||
- ✅ Innovation analysis (if applicable)
|
||||
- ✅ Project-type specific technical requirements
|
||||
- ✅ Comprehensive Functional Requirements (capability contract)
|
||||
- ✅ Non-Functional Requirements for quality attributes
|
||||
|
||||
**The complete PRD is now available at:** `{output_folder}/prd.md`
|
||||
|
||||
This document is now ready to guide UX design, technical architecture, and development planning."
|
||||
|
||||
### 2. Workflow Status Update
|
||||
|
||||
Update the main workflow status file:
|
||||
|
||||
- Load `{status_file}` from workflow configuration (if exists)
|
||||
- Update workflow_status["prd"] = "{default_output_file}"
|
||||
- Save file, preserving all comments and structure
|
||||
- Mark current timestamp as completion time
|
||||
|
||||
### 3. Suggest Next Steps
|
||||
|
||||
Provide guidance on logical next workflows:
|
||||
|
||||
**Typical Next Workflows:**
|
||||
|
||||
**Immediate Next Steps:**
|
||||
|
||||
1. `workflow create-ux-design` - UX Design (if UI exists)
|
||||
- User journey insights from step-04 will inform interaction design
|
||||
- Functional requirements from step-08 define design scope
|
||||
|
||||
2. `workflow create-architecture` - Technical architecture
|
||||
- Project-type requirements from step-07 guide technical decisions
|
||||
- Non-functional requirements from step-09 inform architecture choices
|
||||
|
||||
3. `workflow create-epics-and-stories` - Epic breakdown
|
||||
- Functional requirements from step-08 become epics and stories
|
||||
- Scope definition from step-03 guides sprint planning
|
||||
|
||||
**Strategic Considerations:**
|
||||
|
||||
- UX design and architecture can happen in parallel
|
||||
- Epics/stories are richer when created after UX/architecture
|
||||
- Consider your team's capacity and priorities
|
||||
|
||||
**What would be most valuable to tackle next?**
|
||||
|
||||
### 4. Document Quality Check
|
||||
|
||||
Perform final validation of the PRD:
|
||||
|
||||
**Completeness Check:**
|
||||
|
||||
- Does the executive summary clearly communicate the vision?
|
||||
- Are success criteria specific and measurable?
|
||||
- Do user journeys cover all major user types?
|
||||
- Are functional requirements comprehensive and testable?
|
||||
- Are non-functional requirements relevant and specific?
|
||||
|
||||
**Consistency Check:**
|
||||
|
||||
- Do all sections align with the product differentiator?
|
||||
- Is scope consistent across all sections?
|
||||
- Are requirements traceable to user needs and success criteria?
|
||||
|
||||
### 5. Final Completion Confirmation
|
||||
|
||||
Confirm completion with user:
|
||||
"**Your PRD for {{project_name}} is now complete and ready for the next phase!**
|
||||
|
||||
The document contains everything needed to guide:
|
||||
|
||||
- UX/UI design decisions
|
||||
- Technical architecture planning
|
||||
- Development prioritization and sprint planning
|
||||
|
||||
**Ready to continue with:**
|
||||
|
||||
- UX design workflow?
|
||||
- Architecture workflow?
|
||||
- Epic and story creation?
|
||||
|
||||
**Or would you like to review the complete PRD first?**
|
||||
|
||||
[Workflow Complete]"
|
||||
|
||||
## SUCCESS METRICS:
|
||||
|
||||
✅ PRD document contains all required sections
|
||||
✅ All collaborative content properly saved to document
|
||||
✅ Workflow status file updated with completion information
|
||||
✅ Clear next step guidance provided to user
|
||||
✅ Document quality validation completed
|
||||
✅ User acknowledges completion and understands next options
|
||||
|
||||
## FAILURE MODES:
|
||||
|
||||
❌ Not updating workflow status file with completion information
|
||||
❌ Missing clear next step guidance for user
|
||||
❌ Not confirming document completeness with user
|
||||
❌ Workflow not properly marked as complete in status tracking
|
||||
❌ User unclear about what happens next
|
||||
|
||||
## WORKFLOW COMPLETION CHECKLIST:
|
||||
|
||||
### Document Structure Complete:
|
||||
|
||||
- [ ] Executive Summary with vision and differentiator
|
||||
- [ ] Success Criteria with measurable outcomes
|
||||
- [ ] Product Scope (MVP, Growth, Vision)
|
||||
- [ ] User Journeys (comprehensive coverage)
|
||||
- [ ] Domain Requirements (if applicable)
|
||||
- [ ] Innovation Analysis (if applicable)
|
||||
- [ ] Project-Type Requirements
|
||||
- [ ] Functional Requirements (capability contract)
|
||||
- [ ] Non-Functional Requirements
|
||||
|
||||
### Process Complete:
|
||||
|
||||
- [ ] All steps completed with user confirmation
|
||||
- [ ] All content saved to document
|
||||
- [ ] Frontmatter properly updated
|
||||
- [ ] Workflow status file updated
|
||||
- [ ] Next steps clearly communicated
|
||||
|
||||
## NEXT STEPS GUIDANCE:
|
||||
|
||||
**Immediate Options:**
|
||||
|
||||
1. **UX Design** - If product has UI components
|
||||
2. **Technical Architecture** - System design and technology choices
|
||||
3. **Epic Creation** - Break down FRs into implementable stories
|
||||
4. **Review** - Validate PRD with stakeholders before proceeding
|
||||
|
||||
**Recommended Sequence:**
|
||||
For products with UI: UX → Architecture → Epics
|
||||
For API/backend products: Architecture → Epics
|
||||
Consider team capacity and timeline constraints
|
||||
|
||||
## WORKFLOW FINALIZATION:
|
||||
|
||||
- Set `lastStep = 10` in document frontmatter
|
||||
- Update workflow status file with completion timestamp
|
||||
- Provide completion summary to user
|
||||
- Do NOT load any additional steps
|
||||
|
||||
## FINAL REMINDER:
|
||||
|
||||
This workflow is now complete. The PRD serves as the foundation for all subsequent product development activities. All design, architecture, and development work should trace back to the requirements and vision documented in this PRD.
|
||||
|
||||
**Congratulations on completing the Product Requirements Document for {{project_name}}!** 🎉
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
# PRD Workflow
|
||||
|
||||
**Goal:** Create comprehensive PRDs through collaborative step-by-step discovery between two product managers working as peers.
|
||||
|
||||
**Your Role:** You are a product-focused PM facilitator collaborating with an expert peer. This is a partnership, not a client-vendor relationship. You bring structured thinking and facilitation skills, while the user brings domain expertise and product vision. Work together as equals.
|
||||
|
||||
---
|
||||
|
||||
## WORKFLOW ARCHITECTURE
|
||||
|
||||
This uses **micro-file architecture** for disciplined execution:
|
||||
|
||||
- Each step is a self-contained file with embedded rules
|
||||
- Sequential progression with user control at each step
|
||||
- Document state tracked in frontmatter
|
||||
- Append-only document building through conversation
|
||||
- You NEVER proceed to a step file if the current step file indicates the user must approve and indicate continuation.
|
||||
|
||||
---
|
||||
|
||||
## INITIALIZATION
|
||||
|
||||
### Configuration Loading
|
||||
|
||||
Load config from `{project-root}/{bmad_folder}/bmm/config.yaml` and resolve:
|
||||
|
||||
- `project_name`, `output_folder`, `user_name`
|
||||
- `communication_language`, `document_output_language`, `user_skill_level`
|
||||
- `date` as system-generated current datetime
|
||||
|
||||
### Paths
|
||||
|
||||
- `installed_path` = `{project-root}/{bmad_folder}/bmm/workflows/2-plan-workflows/prd`
|
||||
- `template_path` = `{installed_path}/prd-template.md`
|
||||
- `data_files_path` = `{installed_path}/data/`
|
||||
|
||||
---
|
||||
|
||||
## EXECUTION
|
||||
|
||||
Load and execute `steps/step-01-init.md` to begin the workflow.
|
||||
|
||||
**Note:** Input document discovery and all initialization protocols are handled in step-01-init.md.
|
||||
|
|
@ -1,80 +0,0 @@
|
|||
# Product Requirements Document (PRD) Workflow
|
||||
name: prd
|
||||
description: "Unified PRD workflow for BMad Method and Enterprise Method tracks. Produces strategic PRD and tactical epic breakdown. Hands off to architecture workflow for technical design. Note: Quick Flow track uses tech-spec workflow."
|
||||
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
|
||||
|
||||
# Workflow components
|
||||
installed_path: "{project-root}/{bmad_folder}/bmm/workflows/2-plan-workflows/prd"
|
||||
instructions: "{installed_path}/instructions.md"
|
||||
|
||||
# Templates
|
||||
prd_template: "{installed_path}/prd-template.md"
|
||||
|
||||
# Data files for data-driven behavior
|
||||
project_types_data: "{installed_path}/project-types.csv"
|
||||
domain_complexity_data: "{installed_path}/domain-complexity.csv"
|
||||
|
||||
# External workflows for checkpoints
|
||||
advanced_elicitation: "{project-root}/{bmad_folder}/core/tasks/advanced-elicitation.md"
|
||||
party_mode: "{project-root}/{bmad_folder}/core/workflows/party-mode.md"
|
||||
|
||||
# Output files
|
||||
status_file: "{output_folder}/bmm-workflow-status.yaml"
|
||||
default_output_file: "{output_folder}/prd.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:
|
||||
product_brief:
|
||||
description: "Product vision and goals (optional)"
|
||||
whole: "{output_folder}/*brief*.md"
|
||||
sharded: "{output_folder}/*brief*/index.md"
|
||||
load_strategy: "FULL_LOAD"
|
||||
research:
|
||||
description: "Market or domain research (optional)"
|
||||
whole: "{output_folder}/*research*.md"
|
||||
sharded: "{output_folder}/*research*/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:
|
||||
name: "prd"
|
||||
description: "Unified PRD workflow for BMad Method and Enterprise Method tracks. Produces strategic PRD and tactical epic breakdown. Hands off to architecture workflow for technical design. Note: Quick Flow track uses tech-spec workflow."
|
||||
author: "BMad"
|
||||
instructions: "{bmad_folder}/bmm/workflows/2-plan-workflows/prd/instructions.md"
|
||||
validation: "{bmad_folder}/bmm/workflows/2-plan-workflows/prd/checklist.md"
|
||||
web_bundle_files:
|
||||
# Core workflow files
|
||||
- "{bmad_folder}/bmm/workflows/2-plan-workflows/prd/instructions.md"
|
||||
- "{bmad_folder}/bmm/workflows/2-plan-workflows/prd/prd-template.md"
|
||||
- "{bmad_folder}/bmm/workflows/2-plan-workflows/prd/project-types.csv"
|
||||
- "{bmad_folder}/bmm/workflows/2-plan-workflows/prd/domain-complexity.csv"
|
||||
- "{bmad_folder}/bmm/workflows/2-plan-workflows/prd/checklist.md"
|
||||
|
||||
# Child workflow and its files
|
||||
- "{bmad_folder}/bmm/workflows/3-solutioning/create-epics-and-stories/workflow.yaml"
|
||||
- "{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"
|
||||
|
||||
# Task dependencies (referenced in instructions.md)
|
||||
- "{bmad_folder}/core/tasks/workflow.xml"
|
||||
- "{bmad_folder}/core/tasks/advanced-elicitation.xml"
|
||||
- "{bmad_folder}/core/tasks/advanced-elicitation-methods.csv"
|
||||
child_workflows:
|
||||
- create-epics-and-stories: "{bmad_folder}/bmm/workflows/3-solutioning/create-epics-and-stories/workflow.yaml"
|
||||
|
|
@ -15,10 +15,7 @@
|
|||
|
||||
## Project Structure
|
||||
|
||||
```
|
||||
{{project_root}}/
|
||||
{{source_tree}}
|
||||
```
|
||||
|
||||
## Epic to Architecture Mapping
|
||||
|
||||
|
|
@ -86,12 +83,6 @@ These patterns ensure consistent implementation across all AI agents:
|
|||
|
||||
{{development_prerequisites}}
|
||||
|
||||
### Setup Commands
|
||||
|
||||
```bash
|
||||
{{setup_commands}}
|
||||
```
|
||||
|
||||
## Architecture Decision Records (ADRs)
|
||||
|
||||
{{key_architecture_decisions}}
|
||||
|
|
|
|||
|
|
@ -1,18 +1,20 @@
|
|||
# Decision Architecture Workflow Instructions
|
||||
|
||||
<workflow name="architecture">
|
||||
<critical-rules>
|
||||
- <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 uses ADAPTIVE FACILITATION - adjust your communication style based on {user_skill_level}</critical>
|
||||
- <critical>The goal is ARCHITECTURAL DECISIONS that prevent AI agent conflicts, not detailed implementation specs</critical>
|
||||
- <critical>Communicate all responses in {communication_language} and tailor to {user_skill_level}</critical>
|
||||
- <critical>Generate all documents in {document_output_language}</critical>
|
||||
- <critical>This workflow replaces architecture with a conversation-driven approach</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 writing to a template-output tag, you must stop and offer a menu to the user to run the {advanced_elicitation} or {party-mode} workflow. </critical>
|
||||
- <critical>YOU ARE FACILITATING A CONVERSATION With a user to produce a final document step by step. The whole process is meant to be collaborative helping the user flesh out their ideas</critical>
|
||||
</critical-rules>
|
||||
|
||||
<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 uses ADAPTIVE FACILITATION - adjust your communication style based on {user_skill_level}</critical>
|
||||
<critical>The goal is ARCHITECTURAL DECISIONS that prevent AI agent conflicts, not detailed implementation specs</critical>
|
||||
<critical>Communicate all responses in {communication_language} and tailor to {user_skill_level}</critical>
|
||||
<critical>Generate all documents in {document_output_language}</critical>
|
||||
<critical>This workflow replaces architecture with a conversation-driven approach</critical>
|
||||
<critical>Input documents specified in workflow.yaml input_file_patterns - workflow engine handles fuzzy matching, whole vs sharded document discovery automatically</critical>
|
||||
<critical>ELICITATION POINTS: After completing each major architectural decision area (identified by template-output tags for decision_record, project_structure, novel_pattern_designs, implementation_patterns, and architecture_document), invoke advanced elicitation to refine decisions before proceeding</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 name="architecture">
|
||||
|
||||
<step n="0" goal="Validate workflow readiness" tag="workflow-status">
|
||||
<action>Check if {output_folder}/bmm-workflow-status.yaml exists</action>
|
||||
|
|
@ -766,3 +768,17 @@ Check status anytime with: `workflow-status`
|
|||
</step>
|
||||
|
||||
</workflow>
|
||||
|
||||
<critical-rules>
|
||||
- <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 uses ADAPTIVE FACILITATION - adjust your communication style based on {user_skill_level}</critical>
|
||||
- <critical>The goal is ARCHITECTURAL DECISIONS that prevent AI agent conflicts, not detailed implementation specs</critical>
|
||||
- <critical>Communicate all responses in {communication_language} and tailor to {user_skill_level}</critical>
|
||||
- <critical>Generate all documents in {document_output_language}</critical>
|
||||
- <critical>This workflow replaces architecture with a conversation-driven approach</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 writing to a template-output tag, you must stop and offer a menu to the user to run the {advanced_elicitation} or {party-mode} workflow. </critical>
|
||||
- <critical>YOU ARE FACILITATING A CONVERSATION With a user to produce a final document step by step. The whole process is meant to be collaborative helping the user flesh out their ideas</critical>
|
||||
</critical-rules>
|
||||
|
|
|
|||
|
|
@ -395,6 +395,8 @@
|
|||
- Ensure deployment readiness if applicable
|
||||
- Run `code-review` workflow for peer review
|
||||
</action>
|
||||
|
||||
<output>💡 **Tip:** For best results, run `code-review` using a **different** LLM than the one that implemented this story.</output>
|
||||
<check if="{sprint_status} file exists">
|
||||
<action>Suggest checking {sprint_status} to see project progress</action>
|
||||
</check>
|
||||
|
|
|
|||
|
|
@ -87,6 +87,15 @@
|
|||
**Files Modified:** {{files_list}}
|
||||
**Tests:** {{test_summary}}
|
||||
**AC Status:** {{ac_status}}
|
||||
|
||||
---
|
||||
|
||||
**Before committing (Recommended): Copy this code review prompt to a different LLM**
|
||||
|
||||
```
|
||||
You are a cynical, jaded code reviewer with zero patience for sloppy work. These uncommitted changes were submitted by a clueless weasel and you expect to find problems. Find at least five issues to fix or improve in it. Number them. Be skeptical of everything.
|
||||
```
|
||||
|
||||
</output>
|
||||
|
||||
<action>You must explain what was implemented based on {user_skill_level}</action>
|
||||
|
|
|
|||
Loading…
Reference in New Issue