Initial commit: BMAD framework + Story 1.1 Component Trait Definition
Features: - BMAD (Build Modular AI-driven Development) framework setup - BMM, BMB, CIS, Core modules configured - Story 1.1: Component trait with error handling - Workspace Cargo.toml with components crate - 31 tests passing (19 unit + 12 doc tests) Technical: - Component trait with compute_residuals, jacobian_entries, n_equations - ComponentError enum with thiserror - JacobianBuilder for sparse matrix construction - Object-safe trait supporting Box<dyn Component> - Comprehensive documentation and examples
This commit is contained in:
178
_bmad/bmb/workflows/module/steps-c/step-01-load-brief.md
Normal file
178
_bmad/bmb/workflows/module/steps-c/step-01-load-brief.md
Normal file
@@ -0,0 +1,178 @@
|
||||
---
|
||||
name: 'step-01-load-brief'
|
||||
description: 'Load brief or user write-up, validate completeness'
|
||||
|
||||
nextStepFile: './step-02-structure.md'
|
||||
continueFile: './step-01b-continue.md'
|
||||
agentSpecTemplate: '../data/agent-spec-template.md'
|
||||
workflowSpecTemplate: '../templates/workflow-spec-template.md'
|
||||
moduleStandardsFile: '../data/module-standards.md'
|
||||
moduleYamlConventionsFile: '../data/module-yaml-conventions.md'
|
||||
advancedElicitationTask: '../../../../core/workflows/advanced-elicitation/workflow.xml'
|
||||
partyModeWorkflow: '../../../../core/workflows/party-mode/workflow.md'
|
||||
---
|
||||
|
||||
# Step 1: Load Brief (Create Mode)
|
||||
|
||||
## STEP GOAL:
|
||||
|
||||
Load the module brief (or get a detailed user write-up) and validate it has the information needed to build the module.
|
||||
|
||||
## MANDATORY EXECUTION RULES:
|
||||
|
||||
### Universal Rules:
|
||||
|
||||
- 🛑 NEVER generate content without user input
|
||||
- 📖 CRITICAL: Read the complete step file before taking any action
|
||||
- 🔄 CRITICAL: When loading next with 'C', ensure entire file is read
|
||||
- 📋 YOU ARE A FACILITATOR, not a content generator
|
||||
- ✅ Speak in `{communication_language}`
|
||||
|
||||
### Role Reinforcement:
|
||||
|
||||
- ✅ You are the **Module Builder** — structured, competent, ready to build
|
||||
- ✅ Validate input before proceeding
|
||||
- ✅ Ensure we have what we need to succeed
|
||||
|
||||
### Step-Specific Rules:
|
||||
|
||||
- 🎯 This is a continuable workflow — check for existing work
|
||||
- 🚫 FORBIDDEN to proceed without complete brief or write-up
|
||||
- 💾 Track progress for continuation
|
||||
|
||||
## EXECUTION PROTOCOLS:
|
||||
|
||||
- 🎯 Follow the MANDATORY SEQUENCE exactly
|
||||
- 📖 Create/update output file to track progress
|
||||
- 🚫 FORBIDDEN to load next step until brief is validated
|
||||
|
||||
## CONTEXT BOUNDARIES:
|
||||
|
||||
- Input: Module brief from Brief mode OR user-provided write-up
|
||||
- Output: Module structure ready for implementation
|
||||
- This mode requires complete information to proceed
|
||||
|
||||
---
|
||||
|
||||
## MANDATORY SEQUENCE
|
||||
|
||||
**CRITICAL:** Follow this sequence exactly.
|
||||
|
||||
### 1. Check for Existing Work
|
||||
|
||||
Look for existing module build state:
|
||||
- Check for `module-build-{module_code}.md` in output folder
|
||||
- If exists AND has `stepsCompleted` → load `{continueFile}`
|
||||
- If not exists → continue to step 1.2
|
||||
|
||||
### 2. Get the Brief or Write-Up
|
||||
|
||||
"**Welcome to Create mode! I'll build your module structure from your brief.**"
|
||||
|
||||
**"Where is your module brief?"**
|
||||
|
||||
Options:
|
||||
- **A)** Brief from Brief mode → `{bmb_creations_output_folder}/modules/module-brief-{code}.md`
|
||||
- **B)** User-provided write-up → Ask for path
|
||||
- **C)** Detailed description → User describes the module now
|
||||
|
||||
**IF A or B:** Load and read the brief/write-up
|
||||
|
||||
**IF C:** Gather the needed information through conversation:
|
||||
- Module name and code
|
||||
- Module type (Standalone/Extension/Global)
|
||||
- Agent roster (roles, names)
|
||||
- Workflow list
|
||||
- Key features and tools
|
||||
|
||||
### 3. Validate Brief Completeness
|
||||
|
||||
Load `{moduleStandardsFile}` and check that the brief contains:
|
||||
|
||||
**Required Information:**
|
||||
- [ ] Module code and name
|
||||
- [ ] Module type (Standalone/Extension/Global)
|
||||
- [ ] Module vision/purpose
|
||||
- [ ] Agent roster (at least minimum)
|
||||
- [ ] Workflow list (at least core workflows)
|
||||
- [ ] Any special tools or integrations
|
||||
|
||||
**IF Extension Module:**
|
||||
- [ ] Base module code (for matching)
|
||||
|
||||
**IF anything missing:**
|
||||
|
||||
"**Your brief is missing some key information. Let me help you complete it.**"
|
||||
|
||||
Use `{advancedElicitationTask}` if needed to gather missing details.
|
||||
|
||||
### 4. Confirm and Create Tracking
|
||||
|
||||
Once validated:
|
||||
|
||||
"**I have everything I need to build your module!**"
|
||||
|
||||
"**Module:** {name} ({code})"
|
||||
"**Type:** {Standalone/Extension/Global}"
|
||||
|
||||
Create or update the build tracking file:
|
||||
|
||||
```yaml
|
||||
---
|
||||
moduleCode: {code}
|
||||
moduleName: {name}
|
||||
moduleType: {type}
|
||||
briefFile: {brief path or "user-provided"}
|
||||
stepsCompleted: ['step-01-load-brief']
|
||||
created: {date}
|
||||
status: IN_PROGRESS
|
||||
---
|
||||
```
|
||||
|
||||
### 5. Preview the Build Process
|
||||
|
||||
"**Here's what I'll build for you:**"
|
||||
|
||||
1. Directory structure (based on module type)
|
||||
2. module.yaml with install configuration
|
||||
3. Agent placeholder/spec files
|
||||
4. Workflow placeholder/spec files
|
||||
5. README.md and TODO.md
|
||||
6. module-help.csv (generated from specs)
|
||||
|
||||
"**Ready to start building?**"
|
||||
|
||||
### 6. Present MENU OPTIONS
|
||||
|
||||
**Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Continue
|
||||
|
||||
#### EXECUTION RULES:
|
||||
|
||||
- ALWAYS halt and wait for user input
|
||||
- ONLY proceed to next step when user selects 'C'
|
||||
|
||||
#### Menu Handling Logic:
|
||||
|
||||
- IF A: Execute `{advancedElicitationTask}` for any refinements
|
||||
- IF P: Execute `{partyModeWorkflow}` for creative pre-build discussion
|
||||
- IF C: Update tracking file, then load `{nextStepFile}`
|
||||
- IF Any other: Help user, then redisplay menu
|
||||
|
||||
---
|
||||
|
||||
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
|
||||
|
||||
### ✅ SUCCESS:
|
||||
|
||||
- Brief or write-up loaded
|
||||
- All required information validated
|
||||
- Tracking file created
|
||||
- User confirms ready to build
|
||||
|
||||
### ❌ SYSTEM FAILURE:
|
||||
|
||||
- Proceeding with incomplete brief
|
||||
- Missing key information (code, type, agents, workflows)
|
||||
- Not validating extension base module
|
||||
|
||||
**Master Rule:** Garbage in, garbage out. Ensure we have complete information before building.
|
||||
82
_bmad/bmb/workflows/module/steps-c/step-01b-continue.md
Normal file
82
_bmad/bmb/workflows/module/steps-c/step-01b-continue.md
Normal file
@@ -0,0 +1,82 @@
|
||||
---
|
||||
name: 'step-01b-continue'
|
||||
description: 'Handle workflow continuation for Create mode'
|
||||
|
||||
workflowFile: '../workflow-create-module.md'
|
||||
buildTrackingFile: '{bmb_creations_output_folder}/modules/module-build-{module_code}.md'
|
||||
---
|
||||
|
||||
# Step 1b: Continue (Create Mode)
|
||||
|
||||
## STEP GOAL:
|
||||
|
||||
Resume a paused Create mode session by loading the build tracking state and routing to the correct step.
|
||||
|
||||
## MANDATORY EXECUTION RULES:
|
||||
|
||||
### Universal Rules:
|
||||
|
||||
- 📖 CRITICAL: Read the complete step file before taking any action
|
||||
- ✅ Speak in `{communication_language}`
|
||||
|
||||
### Role Reinforcement:
|
||||
|
||||
- ✅ You are the **Module Builder** — picking up where we left off
|
||||
- ✅ Warm welcome back
|
||||
- ✅ Seamless resume
|
||||
|
||||
---
|
||||
|
||||
## MANDATORY SEQUENCE
|
||||
|
||||
### 1. Welcome Back
|
||||
|
||||
"**Welcome back to the Module Builder!** 👋"
|
||||
|
||||
### 2. Load Build Tracking
|
||||
|
||||
Load `{buildTrackingFile}` and read:
|
||||
- `stepsCompleted` array
|
||||
- `moduleCode`
|
||||
- `moduleName`
|
||||
- `moduleType`
|
||||
- `status`
|
||||
|
||||
### 3. Report Progress
|
||||
|
||||
"**Here's where we are:**"
|
||||
|
||||
**Module:** {moduleName} ({moduleCode})
|
||||
**Type:** {moduleType}
|
||||
**Status:** {status}
|
||||
|
||||
**Completed steps:**
|
||||
- {list completed steps}
|
||||
|
||||
### 4. Determine Next Step
|
||||
|
||||
Find the last completed step and route to the next one:
|
||||
|
||||
| Last Completed | Next Step |
|
||||
|---------------|-----------|
|
||||
| step-01-load-brief | step-02-structure |
|
||||
| step-02-structure | step-03-config |
|
||||
| step-03-config | step-04-agents |
|
||||
| step-04-agents | step-05-workflows |
|
||||
| step-05-workflows | step-06-docs |
|
||||
| step-06-docs | step-07-complete |
|
||||
|
||||
### 5. Route to Next Step
|
||||
|
||||
"**Continuing to: {next step name}**"
|
||||
|
||||
Load the appropriate step file and execute.
|
||||
|
||||
---
|
||||
|
||||
## Success Metrics
|
||||
|
||||
✅ User welcomed back
|
||||
✅ Build state loaded
|
||||
✅ Correct next step identified
|
||||
✅ Seamless resume
|
||||
104
_bmad/bmb/workflows/module/steps-c/step-02-structure.md
Normal file
104
_bmad/bmb/workflows/module/steps-c/step-02-structure.md
Normal file
@@ -0,0 +1,104 @@
|
||||
---
|
||||
name: 'step-02-structure'
|
||||
description: 'Create directory structure based on module type'
|
||||
|
||||
nextStepFile: './step-03-config.md'
|
||||
moduleStandardsFile: '../data/module-standards.md'
|
||||
buildTrackingFile: '{bmb_creations_output_folder}/modules/module-build-{module_code}.md'
|
||||
---
|
||||
|
||||
# Step 2: Directory Structure
|
||||
|
||||
## STEP GOAL:
|
||||
|
||||
Create the module directory structure based on the module type (Standalone/Extension/Global).
|
||||
|
||||
## MANDATORY EXECUTION RULES:
|
||||
|
||||
### Universal Rules:
|
||||
|
||||
- 🛑 NEVER generate content without user input
|
||||
- 📖 CRITICAL: Read the complete step file before taking any action
|
||||
- 🔄 CRITICAL: When loading next with 'C', ensure entire file is read
|
||||
- 📋 YOU ARE A FACILITATOR, not a content generator
|
||||
- ✅ Speak in `{communication_language}`
|
||||
|
||||
### Role Reinforcement:
|
||||
|
||||
- ✅ You are the **Module Builder** — creating the foundation
|
||||
- ✅ Structure follows standards
|
||||
- ✅ Confirm before creating
|
||||
|
||||
---
|
||||
|
||||
## MANDATORY SEQUENCE
|
||||
|
||||
### 1. Determine Target Location
|
||||
|
||||
Load `{moduleStandardsFile}` and determine location:
|
||||
|
||||
**IF Standalone:**
|
||||
- Target: `src/modules/{module_code}/`
|
||||
|
||||
**IF Extension:**
|
||||
- Target: `src/modules/{base_module_code}/extensions/{extension_folder_name}/`
|
||||
- Get base_module_code from brief
|
||||
- extension_folder_name: unique name (e.g., `{base_module}-{feature}`)
|
||||
|
||||
**IF Global:**
|
||||
- Target: `src/modules/{module_code}/`
|
||||
- Will add `global: true` to module.yaml
|
||||
|
||||
### 2. Present Structure Plan
|
||||
|
||||
"**I'll create this directory structure:**"
|
||||
|
||||
```
|
||||
{target_location}/
|
||||
├── module.yaml
|
||||
├── README.md
|
||||
├── agents/
|
||||
│ └── {agent files}
|
||||
└── workflows/
|
||||
└── {workflow folders}
|
||||
```
|
||||
|
||||
"**Location:** {target_location}"
|
||||
"**Module type:** {Standalone/Extension/Global}"
|
||||
|
||||
### 3. Confirm and Create
|
||||
|
||||
"**Shall I create the directory structure?**"
|
||||
|
||||
**IF confirmed:**
|
||||
|
||||
Create folders:
|
||||
- `{target_location}/agents/`
|
||||
- `{target_location}/workflows/`
|
||||
|
||||
### 4. Update Build Tracking
|
||||
|
||||
Update `{buildTrackingFile}`:
|
||||
- Add 'step-02-structure' to stepsCompleted
|
||||
- Set targetLocation
|
||||
- Update status
|
||||
|
||||
### 5. Report Success
|
||||
|
||||
"**✓ Directory structure created at:** {target_location}"
|
||||
|
||||
### 6. MENU OPTIONS
|
||||
|
||||
**Select an Option:** [C] Continue
|
||||
|
||||
- IF C: Update tracking, load `{nextStepFile}`
|
||||
- IF Any other: Help, then redisplay menu
|
||||
|
||||
---
|
||||
|
||||
## Success Metrics
|
||||
|
||||
✅ Directory structure created
|
||||
✅ Location based on module type
|
||||
✅ Folders: agents/, workflows/
|
||||
✅ Build tracking updated
|
||||
118
_bmad/bmb/workflows/module/steps-c/step-03-config.md
Normal file
118
_bmad/bmb/workflows/module/steps-c/step-03-config.md
Normal file
@@ -0,0 +1,118 @@
|
||||
---
|
||||
name: 'step-03-config'
|
||||
description: 'Generate module.yaml with install questions'
|
||||
|
||||
nextStepFile: './step-04-agents.md'
|
||||
moduleYamlConventionsFile: '../data/module-yaml-conventions.md'
|
||||
buildTrackingFile: '{bmb_creations_output_folder}/modules/module-build-{module_code}.md'
|
||||
targetLocation: '{build_tracking_targetLocation}'
|
||||
---
|
||||
|
||||
# Step 3: Module Configuration
|
||||
|
||||
## STEP GOAL:
|
||||
|
||||
Generate module.yaml with install configuration and custom variables.
|
||||
|
||||
## MANDATORY EXECUTION RULES:
|
||||
|
||||
### Universal Rules:
|
||||
|
||||
- 🛑 NEVER generate content without user input
|
||||
- 📖 CRITICAL: Read the complete step file before taking any action
|
||||
- 🔄 CRITICAL: When loading next with 'C', ensure entire file is read
|
||||
- 📋 YOU ARE A FACILITATOR, not a content generator
|
||||
- ✅ Speak in `{communication_language}`
|
||||
|
||||
### Role Reinforcement:
|
||||
|
||||
- ✅ You are the **Module Builder** — configuration expert
|
||||
- ✅ Follow module.yaml conventions
|
||||
- ✅ Ask about custom variables
|
||||
|
||||
---
|
||||
|
||||
## MANDATORY SEQUENCE
|
||||
|
||||
### 1. Load Conventions
|
||||
|
||||
Load `{moduleYamlConventionsFile}` for reference.
|
||||
|
||||
### 2. Generate Base module.yaml
|
||||
|
||||
Create `{targetLocation}/module.yaml` with:
|
||||
|
||||
**Required fields:**
|
||||
```yaml
|
||||
code: {module_code}
|
||||
name: "{module_display_name}"
|
||||
header: "{brief_header}"
|
||||
subheader: "{additional_context}"
|
||||
default_selected: false
|
||||
```
|
||||
|
||||
**Note for Extension modules:** `code:` matches base module
|
||||
|
||||
### 3. Add Custom Variables
|
||||
|
||||
"**Does your module need any custom configuration variables?**"
|
||||
|
||||
Reference the brief for:
|
||||
- User input needed during installation
|
||||
- Paths or settings users should configure
|
||||
- Feature flags or options
|
||||
|
||||
**For each variable, create:**
|
||||
```yaml
|
||||
variable_name:
|
||||
prompt: "{question to ask}"
|
||||
default: "{default_value}"
|
||||
result: "{template}"
|
||||
```
|
||||
|
||||
**Common patterns:**
|
||||
- Text input (names, titles)
|
||||
- Boolean (enable features)
|
||||
- Single-select (experience levels)
|
||||
- Multi-select (platforms)
|
||||
- Paths (artifact folders)
|
||||
|
||||
**IF no custom variables needed:**
|
||||
|
||||
Keep it simple — just use core config variables.
|
||||
|
||||
### 4. Write module.yaml
|
||||
|
||||
Write the complete module.yaml to `{targetLocation}/module.yaml`
|
||||
|
||||
### 5. Update Build Tracking
|
||||
|
||||
Update `{buildTrackingFile}`:
|
||||
- Add 'step-03-config' to stepsCompleted
|
||||
- Note: module.yaml created
|
||||
|
||||
### 6. Report and Confirm
|
||||
|
||||
"**✓ module.yaml created with:**"
|
||||
|
||||
- Code: {code}
|
||||
- {count} custom variables
|
||||
|
||||
"**Review the file and confirm it looks correct.**"
|
||||
|
||||
### 7. MENU OPTIONS
|
||||
|
||||
**Select an Option:** [C] Continue
|
||||
|
||||
- IF C: Update tracking, load `{nextStepFile}`
|
||||
- IF Any other: Help, then redisplay menu
|
||||
|
||||
---
|
||||
|
||||
## Success Metrics
|
||||
|
||||
✅ module.yaml created
|
||||
✅ Required fields populated
|
||||
✅ Custom variables added (if any)
|
||||
✅ Extension modules use correct code
|
||||
✅ Build tracking updated
|
||||
167
_bmad/bmb/workflows/module/steps-c/step-04-agents.md
Normal file
167
_bmad/bmb/workflows/module/steps-c/step-04-agents.md
Normal file
@@ -0,0 +1,167 @@
|
||||
---
|
||||
name: 'step-04-agents'
|
||||
description: 'Create agent placeholder/spec files'
|
||||
|
||||
nextStepFile: './step-05-workflows.md'
|
||||
agentSpecTemplate: '../data/agent-spec-template.md'
|
||||
agentArchitectureFile: '../data/agent-architecture.md'
|
||||
buildTrackingFile: '{bmb_creations_output_folder}/modules/module-build-{module_code}.md'
|
||||
targetLocation: '{build_tracking_targetLocation}'
|
||||
---
|
||||
|
||||
# Step 4: Agent Specs
|
||||
|
||||
## STEP GOAL:
|
||||
|
||||
Create agent placeholder/spec files based on the brief.
|
||||
|
||||
## MANDATORY EXECUTION RULES:
|
||||
|
||||
### Universal Rules:
|
||||
|
||||
- 🛑 NEVER generate content without user input
|
||||
- 📖 CRITICAL: Read the complete step file before taking any action
|
||||
- 🔄 CRITICAL: When loading next with 'C', ensure entire file is read
|
||||
- 📋 YOU ARE A FACILITATOR, not a content generator
|
||||
- ✅ Speak in `{communication_language}`
|
||||
|
||||
### Role Reinforcement:
|
||||
|
||||
- ✅ You are the **Module Builder** — creating agent specs
|
||||
- ✅ These are specs, not full agents (agent-builder does that)
|
||||
- ✅ Keep it high-level
|
||||
|
||||
---
|
||||
|
||||
## MANDATORY SEQUENCE
|
||||
|
||||
### 1. Load Agent Architecture
|
||||
|
||||
Load `{agentArchitectureFile}` for guidance.
|
||||
|
||||
### 2. Get Agent Roster from Brief
|
||||
|
||||
Extract from the brief:
|
||||
- Agent names
|
||||
- Roles
|
||||
- Workflows they're responsible for
|
||||
- Communication style
|
||||
- Memory needs (hasSidecar)
|
||||
|
||||
### 3. For Each Agent, Create Spec
|
||||
|
||||
Load `{agentSpecTemplate}` and create:
|
||||
|
||||
`{targetLocation}/agents/{agent_name}.spec.md`
|
||||
|
||||
With content:
|
||||
```markdown
|
||||
# Agent Specification: {agent_name}
|
||||
|
||||
**Module:** {module_code}
|
||||
**Status:** Placeholder — To be created via create-agent workflow
|
||||
**Created:** {date}
|
||||
|
||||
---
|
||||
|
||||
## Agent Metadata
|
||||
|
||||
```yaml
|
||||
agent:
|
||||
metadata:
|
||||
id: "_bmad/{module_code}/agents/{agent_file_name}.md"
|
||||
name: {agent_human_name}
|
||||
title: {agent_title}
|
||||
icon: {agent_icon}
|
||||
module: {module_code}
|
||||
hasSidecar: {false/true}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Agent Persona
|
||||
|
||||
### Role
|
||||
|
||||
{agent_role}
|
||||
|
||||
### Identity
|
||||
|
||||
{agent_identity}
|
||||
|
||||
### Communication Style
|
||||
|
||||
{agent_communication_style}
|
||||
|
||||
### Principles
|
||||
|
||||
{agent_principles}
|
||||
|
||||
---
|
||||
|
||||
## Agent Menu
|
||||
|
||||
### Planned Commands
|
||||
|
||||
| Trigger | Command | Description | Workflow |
|
||||
|---------|---------|-------------|----------|
|
||||
{agent_menu_table}
|
||||
|
||||
---
|
||||
|
||||
## Agent Integration
|
||||
|
||||
### Shared Context
|
||||
|
||||
- References: `{shared_context_files}`
|
||||
- Collaboration with: {collaborating_agents}
|
||||
|
||||
### Workflow References
|
||||
|
||||
{workflow_references}
|
||||
|
||||
---
|
||||
|
||||
## Implementation Notes
|
||||
|
||||
**Use the create-agent workflow to build this agent.**
|
||||
|
||||
---
|
||||
|
||||
_Spec created on {date} via BMAD Module workflow_
|
||||
```
|
||||
|
||||
### 4. Create All Agent Specs
|
||||
|
||||
Iterate through each agent from the brief and create their spec file.
|
||||
|
||||
### 5. Update Build Tracking
|
||||
|
||||
Update `{buildTrackingFile}`:
|
||||
- Add 'step-04-agents' to stepsCompleted
|
||||
- List all agent specs created
|
||||
|
||||
### 6. Report Success
|
||||
|
||||
"**✓ Agent specs created:**"
|
||||
|
||||
- {count} agent spec files
|
||||
- {list agent names}
|
||||
|
||||
"**These are specs/blueprints. Use the create-agent workflow to build each agent.**"
|
||||
|
||||
### 7. MENU OPTIONS
|
||||
|
||||
**Select an Option:** [C] Continue
|
||||
|
||||
- IF C: Update tracking, load `{nextStepFile}`
|
||||
- IF Any other: Help, then redisplay menu
|
||||
|
||||
---
|
||||
|
||||
## Success Metrics
|
||||
|
||||
✅ Agent spec files created for all agents
|
||||
✅ Each spec has role, workflows, menu triggers
|
||||
✅ hasSidecar documented (memory decision)
|
||||
✅ Build tracking updated
|
||||
183
_bmad/bmb/workflows/module/steps-c/step-05-workflows.md
Normal file
183
_bmad/bmb/workflows/module/steps-c/step-05-workflows.md
Normal file
@@ -0,0 +1,183 @@
|
||||
---
|
||||
name: 'step-05-workflows'
|
||||
description: 'Create workflow placeholder/spec files'
|
||||
|
||||
nextStepFile: './step-06-docs.md'
|
||||
workflowSpecTemplate: '../templates/workflow-spec-template.md'
|
||||
buildTrackingFile: '{bmad_creations_output_folder}/modules/module-build-{module_code}.md'
|
||||
targetLocation: '{build_tracking_targetLocation}'
|
||||
---
|
||||
|
||||
# Step 5: Workflow Specs
|
||||
|
||||
## STEP GOAL:
|
||||
|
||||
Create workflow placeholder/spec files based on the brief.
|
||||
|
||||
## MANDATORY EXECUTION RULES:
|
||||
|
||||
### Universal Rules:
|
||||
|
||||
- 🛑 NEVER generate content without user input
|
||||
- 📖 CRITICAL: Read the complete step file before taking any action
|
||||
- 🔄 CRITICAL: When loading next with 'C', ensure entire file is read
|
||||
- 📋 YOU ARE A FACILITATOR, not a content generator
|
||||
- ✅ Speak in `{communication_language}`
|
||||
|
||||
### Role Reinforcement:
|
||||
|
||||
- ✅ You are the **Module Builder** — creating workflow specs
|
||||
- ✅ These are specs, not full workflows (workflow-builder does that)
|
||||
- ✅ Keep it high-level
|
||||
|
||||
---
|
||||
|
||||
## MANDATORY SEQUENCE
|
||||
|
||||
### 1. Get Workflow List from Brief
|
||||
|
||||
Extract from the brief:
|
||||
- Core workflows
|
||||
- Feature workflows
|
||||
- Utility workflows
|
||||
|
||||
For each workflow:
|
||||
- Name
|
||||
- Purpose/goal
|
||||
- Primary agent
|
||||
- Input/output requirements
|
||||
|
||||
### 2. For Each Workflow, Create Spec
|
||||
|
||||
Load `{workflowSpecTemplate}` and create:
|
||||
|
||||
`{targetLocation}/workflows/{workflow_name}/{workflow_name}.spec.md`
|
||||
|
||||
With content:
|
||||
```markdown
|
||||
# Workflow Specification: {workflow_name}
|
||||
|
||||
**Module:** {module_code}
|
||||
**Status:** Placeholder — To be created via create-workflow workflow
|
||||
**Created:** {date}
|
||||
|
||||
---
|
||||
|
||||
## Workflow Overview
|
||||
|
||||
**Goal:** {workflow_goal}
|
||||
|
||||
**Description:** {workflow_description}
|
||||
|
||||
**Workflow Type:** {workflow_type}
|
||||
|
||||
---
|
||||
|
||||
## Workflow Structure
|
||||
|
||||
### Entry Point
|
||||
|
||||
```yaml
|
||||
---
|
||||
name: {workflow_name}
|
||||
description: {workflow_description}
|
||||
web_bundle: true
|
||||
installed_path: '{project-root}/_bmad/{module_code}/workflows/{workflow_folder_name}'
|
||||
---
|
||||
```
|
||||
|
||||
### Mode
|
||||
|
||||
- [ ] Create-only (steps-c/)
|
||||
- [ ] Tri-modal (steps-c/, steps-e/, steps-v/)
|
||||
|
||||
---
|
||||
|
||||
## Planned Steps
|
||||
|
||||
| Step | Name | Goal |
|
||||
|------|------|------|
|
||||
{workflow_steps_table}
|
||||
|
||||
---
|
||||
|
||||
## Workflow Inputs
|
||||
|
||||
### Required Inputs
|
||||
|
||||
{required_inputs}
|
||||
|
||||
### Optional Inputs
|
||||
|
||||
{optional_inputs}
|
||||
|
||||
---
|
||||
|
||||
## Workflow Outputs
|
||||
|
||||
### Output Format
|
||||
|
||||
- [ ] Document-producing
|
||||
- [ ] Non-document
|
||||
|
||||
### Output Files
|
||||
|
||||
{output_files}
|
||||
|
||||
---
|
||||
|
||||
## Agent Integration
|
||||
|
||||
### Primary Agent
|
||||
|
||||
{primary_agent}
|
||||
|
||||
### Other Agents
|
||||
|
||||
{other_agents}
|
||||
|
||||
---
|
||||
|
||||
## Implementation Notes
|
||||
|
||||
**Use the create-workflow workflow to build this workflow.**
|
||||
|
||||
---
|
||||
|
||||
_Spec created on {date} via BMAD Module workflow_
|
||||
```
|
||||
|
||||
### 3. Create All Workflow Specs
|
||||
|
||||
Iterate through each workflow from the brief and create their spec file.
|
||||
|
||||
### 4. Update Build Tracking
|
||||
|
||||
Update `{buildTrackingFile}`:
|
||||
- Add 'step-05-workflows' to stepsCompleted
|
||||
- List all workflow specs created
|
||||
|
||||
### 5. Report Success
|
||||
|
||||
"**✓ Workflow specs created:**"
|
||||
|
||||
- {count} workflow spec files
|
||||
- {list workflow names}
|
||||
|
||||
"**These are specs/blueprints. Use the create-workflow workflow to build each workflow.**"
|
||||
|
||||
### 6. MENU OPTIONS
|
||||
|
||||
**Select an Option:** [C] Continue
|
||||
|
||||
- IF C: Update tracking, load `{nextStepFile}`
|
||||
- IF Any other: Help, then redisplay menu
|
||||
|
||||
---
|
||||
|
||||
## Success Metrics
|
||||
|
||||
✅ Workflow spec files created for all workflows
|
||||
✅ Each spec has goal, steps, inputs/outputs
|
||||
✅ Agent associations documented
|
||||
✅ Build tracking updated
|
||||
400
_bmad/bmb/workflows/module/steps-c/step-06-docs.md
Normal file
400
_bmad/bmb/workflows/module/steps-c/step-06-docs.md
Normal file
@@ -0,0 +1,400 @@
|
||||
---
|
||||
name: 'step-06-docs'
|
||||
description: 'Generate README.md, TODO.md, and docs/ folder'
|
||||
|
||||
nextStepFile: './step-07-complete.md'
|
||||
buildTrackingFile: '{bmb_creations_output_folder}/modules/module-build-{module_code}.md'
|
||||
targetLocation: '{build_tracking_targetLocation}'
|
||||
---
|
||||
|
||||
# Step 6: Documentation
|
||||
|
||||
## STEP GOAL:
|
||||
|
||||
Generate README.md, TODO.md, and user documentation in docs/ folder for the module.
|
||||
|
||||
## MANDATORY EXECUTION RULES:
|
||||
|
||||
### Universal Rules:
|
||||
|
||||
- 🛑 NEVER generate content without user input
|
||||
- 📖 CRITICAL: Read the complete step file before taking any action
|
||||
- 🔄 CRITICAL: When loading next with 'C', ensure entire file is read
|
||||
- 📋 YOU ARE A FACILITATOR, not a content generator
|
||||
- ✅ Speak in `{communication_language}`
|
||||
|
||||
### Role Reinforcement:
|
||||
|
||||
- ✅ You are the **Module Builder** — documentation creator
|
||||
- ✅ README is the user's first impression
|
||||
- ✅ TODO tracks remaining work
|
||||
- ✅ docs/ provides user-facing documentation
|
||||
|
||||
---
|
||||
|
||||
## MANDATORY SEQUENCE
|
||||
|
||||
### 1. Generate README.md
|
||||
|
||||
Create `{targetLocation}/README.md`:
|
||||
|
||||
```markdown
|
||||
# {module_display_name}
|
||||
|
||||
{brief_header}
|
||||
|
||||
{subheader}
|
||||
|
||||
---
|
||||
|
||||
## Overview
|
||||
|
||||
{module_overview_from_brief}
|
||||
|
||||
---
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
bmad install {module_code}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Quick Start
|
||||
|
||||
{quick_start_from_brief}
|
||||
|
||||
**For detailed documentation, see [docs/](docs/).**
|
||||
|
||||
---
|
||||
|
||||
## Components
|
||||
|
||||
### Agents
|
||||
|
||||
{agent_list_from_brief}
|
||||
|
||||
### Workflows
|
||||
|
||||
{workflow_list_from_brief}
|
||||
|
||||
---
|
||||
|
||||
## Configuration
|
||||
|
||||
The module supports these configuration options (set during installation):
|
||||
|
||||
{config_variables_from_module_yaml}
|
||||
|
||||
---
|
||||
|
||||
## Module Structure
|
||||
|
||||
```
|
||||
{module_code}/
|
||||
├── module.yaml
|
||||
├── README.md
|
||||
├── TODO.md
|
||||
├── docs/
|
||||
│ ├── getting-started.md
|
||||
│ ├── agents.md
|
||||
│ ├── workflows.md
|
||||
│ └── examples.md
|
||||
├── agents/
|
||||
└── workflows/
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Documentation
|
||||
|
||||
For detailed user guides and documentation, see the **[docs/](docs/)** folder:
|
||||
- [Getting Started](docs/getting-started.md)
|
||||
- [Agents Reference](docs/agents.md)
|
||||
- [Workflows Reference](docs/workflows.md)
|
||||
- [Examples](docs/examples.md)
|
||||
|
||||
---
|
||||
|
||||
## Development Status
|
||||
|
||||
This module is currently in development. The following components are planned:
|
||||
|
||||
- [ ] Agents: {agent_count} agents
|
||||
- [ ] Workflows: {workflow_count} workflows
|
||||
|
||||
See TODO.md for detailed status.
|
||||
|
||||
---
|
||||
|
||||
## Author
|
||||
|
||||
Created via BMAD Module workflow
|
||||
|
||||
---
|
||||
|
||||
## License
|
||||
|
||||
Part of the BMAD framework.
|
||||
```
|
||||
|
||||
### 2. Generate TODO.md
|
||||
|
||||
Create `{targetLocation}/TODO.md`:
|
||||
|
||||
```markdown
|
||||
# TODO: {module_display_name}
|
||||
|
||||
Development roadmap for {module_code} module.
|
||||
|
||||
---
|
||||
|
||||
## Agents to Build
|
||||
|
||||
{for each agent}
|
||||
- [ ] {agent_name} ({agent_title})
|
||||
- Use: `bmad:bmb:agents:agent-builder`
|
||||
- Spec: `agents/{agent_name}.spec.md`
|
||||
|
||||
---
|
||||
|
||||
## Workflows to Build
|
||||
|
||||
{for each workflow}
|
||||
- [ ] {workflow_name}
|
||||
- Use: `bmad:bmb:workflows:workflow` or `/workflow`
|
||||
- Spec: `workflows/{workflow_name}/{workflow_name}.spec.md`
|
||||
|
||||
---
|
||||
|
||||
## Installation Testing
|
||||
|
||||
- [ ] Test installation with `bmad install`
|
||||
- [ ] Verify module.yaml prompts work correctly
|
||||
- [ ] Verify all agents and workflows are discoverable
|
||||
|
||||
---
|
||||
|
||||
## Documentation
|
||||
|
||||
- [ ] Complete README.md with usage examples
|
||||
- [ ] Enhance docs/ folder with more guides
|
||||
- [ ] Add troubleshooting section
|
||||
- [ ] Document configuration options
|
||||
|
||||
---
|
||||
|
||||
## Next Steps
|
||||
|
||||
1. Build agents using create-agent workflow
|
||||
2. Build workflows using create-workflow workflow
|
||||
3. Test installation and functionality
|
||||
4. Iterate based on testing
|
||||
|
||||
---
|
||||
|
||||
_Last updated: {date}_
|
||||
```
|
||||
|
||||
### 3. Create docs/ Folder
|
||||
|
||||
Create `{targetLocation}/docs/` folder with user documentation:
|
||||
|
||||
### 3.1. getting-started.md
|
||||
|
||||
```markdown
|
||||
# Getting Started with {module_display_name}
|
||||
|
||||
Welcome to {module_code}! This guide will help you get up and running.
|
||||
|
||||
---
|
||||
|
||||
## What This Module Does
|
||||
|
||||
{module_purpose_from_brief}
|
||||
|
||||
---
|
||||
|
||||
## Installation
|
||||
|
||||
If you haven't installed the module yet:
|
||||
|
||||
```bash
|
||||
bmad install {module_code}
|
||||
```
|
||||
|
||||
Follow the prompts to configure the module for your needs.
|
||||
|
||||
---
|
||||
|
||||
## First Steps
|
||||
|
||||
{first_steps_from_brief}
|
||||
|
||||
---
|
||||
|
||||
## Common Use Cases
|
||||
|
||||
{common_use_cases_from_brief}
|
||||
|
||||
---
|
||||
|
||||
## What's Next?
|
||||
|
||||
- Check out the [Agents Reference](agents.md) to meet your team
|
||||
- Browse the [Workflows Reference](workflows.md) to see what you can do
|
||||
- See [Examples](examples.md) for real-world usage
|
||||
|
||||
---
|
||||
|
||||
## Need Help?
|
||||
|
||||
If you run into issues:
|
||||
1. Check the troubleshooting section in examples.md
|
||||
2. Review your module configuration
|
||||
3. Consult the broader BMAD documentation
|
||||
```
|
||||
|
||||
### 3.2. agents.md
|
||||
|
||||
```markdown
|
||||
# Agents Reference
|
||||
|
||||
{module_code} includes {agent_count} specialized agents:
|
||||
|
||||
---
|
||||
|
||||
{for each agent}
|
||||
## {agent_title}
|
||||
|
||||
**ID:** `{agent_id}`
|
||||
**Icon:** {agent_icon}
|
||||
|
||||
**Role:**
|
||||
{agent_role_from_spec}
|
||||
|
||||
**When to Use:**
|
||||
{when_to_use_from_spec}
|
||||
|
||||
**Key Capabilities:**
|
||||
{agent_capabilities_from_spec}
|
||||
|
||||
**Menu Trigger(s):**
|
||||
{menu_triggers_from_spec}
|
||||
|
||||
---
|
||||
```
|
||||
|
||||
### 3.3. workflows.md
|
||||
|
||||
```markdown
|
||||
# Workflows Reference
|
||||
|
||||
{module_code} includes {workflow_count} workflows:
|
||||
|
||||
---
|
||||
|
||||
{for each workflow}
|
||||
## {workflow_title}
|
||||
|
||||
**ID:** `{workflow_id}`
|
||||
**Workflow:** `{workflow_name}`
|
||||
|
||||
**Purpose:**
|
||||
{workflow_purpose_from_spec}
|
||||
|
||||
**When to Use:**
|
||||
{when_to_use_from_spec}
|
||||
|
||||
**Key Steps:**
|
||||
{workflow_steps_outline_from_spec}
|
||||
|
||||
**Agent(s):**
|
||||
{associated_agents_from_spec}
|
||||
|
||||
---
|
||||
```
|
||||
|
||||
### 3.4. examples.md
|
||||
|
||||
```markdown
|
||||
# Examples & Use Cases
|
||||
|
||||
This section provides practical examples for using {module_display_name}.
|
||||
|
||||
---
|
||||
|
||||
## Example Workflows
|
||||
|
||||
{example_workflows_from_brief}
|
||||
|
||||
---
|
||||
|
||||
## Common Scenarios
|
||||
|
||||
{common_scenarios_from_brief}
|
||||
|
||||
---
|
||||
|
||||
## Tips & Tricks
|
||||
|
||||
{tips_from_brief}
|
||||
|
||||
---
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Common Issues
|
||||
|
||||
{troubleshooting_from_brief}
|
||||
|
||||
---
|
||||
|
||||
## Getting More Help
|
||||
|
||||
- Review the main BMAD documentation
|
||||
- Check module configuration in module.yaml
|
||||
- Verify all agents and workflows are properly installed
|
||||
```
|
||||
|
||||
### 4. Update Build Tracking
|
||||
|
||||
Update `{buildTrackingFile}`:
|
||||
- Add 'step-06-docs' to stepsCompleted
|
||||
- Note: README.md, TODO.md, and docs/ folder created
|
||||
|
||||
### 5. Report Success
|
||||
|
||||
"**✓ Documentation created:**"
|
||||
|
||||
- README.md — module overview and navigation
|
||||
- TODO.md — development roadmap
|
||||
- docs/ — user documentation folder
|
||||
- getting-started.md — quick start guide
|
||||
- agents.md — agent reference
|
||||
- workflows.md — workflow reference
|
||||
- examples.md — practical examples
|
||||
|
||||
"**User documentation is valuable even with placeholder agent/workflow specs — users will understand what each component does and how to use them.**"
|
||||
|
||||
"**TODO.md tracks the remaining work:**"
|
||||
- Build {agent_count} agents
|
||||
- Build {workflow_count} workflows
|
||||
- Test installation
|
||||
|
||||
### 6. MENU OPTIONS
|
||||
|
||||
**Select an Option:** [C] Continue
|
||||
|
||||
- IF C: Update tracking, load `{nextStepFile}`
|
||||
- IF Any other: Help, then redisplay menu
|
||||
|
||||
---
|
||||
|
||||
## Success Metrics
|
||||
|
||||
✅ README.md created with all sections
|
||||
✅ TODO.md created with agent/workflow checklist
|
||||
✅ docs/ folder created with user documentation
|
||||
✅ Build tracking updated
|
||||
152
_bmad/bmb/workflows/module/steps-c/step-07-complete.md
Normal file
152
_bmad/bmb/workflows/module/steps-c/step-07-complete.md
Normal file
@@ -0,0 +1,152 @@
|
||||
---
|
||||
name: 'step-07-complete'
|
||||
description: 'Finalize, offer to run validation'
|
||||
|
||||
buildTrackingFile: '{bmb_creations_output_folder}/modules/module-build-{module_code}.md'
|
||||
targetLocation: '{build_tracking_targetLocation}'
|
||||
moduleHelpGenerateWorkflow: '../module-help-generate.md'
|
||||
validationWorkflow: '../steps-v/step-01-validate.md'
|
||||
moduleHelpCsvFile: '{build_tracking_targetLocation}/module-help.csv'
|
||||
---
|
||||
|
||||
# Step 7: Complete
|
||||
|
||||
## STEP GOAL:
|
||||
|
||||
Finalize the module build, update tracking, and offer to run validation.
|
||||
|
||||
## MANDATORY EXECUTION RULES:
|
||||
|
||||
### Universal Rules:
|
||||
|
||||
- 📖 CRITICAL: Read the complete step file before taking any action
|
||||
- ✅ Speak in `{communication_language}`
|
||||
|
||||
### Role Reinforcement:
|
||||
|
||||
- ✅ You are the **Module Builder** — completing the build
|
||||
- ✅ Celebrate what was created
|
||||
- ✅ Guide next steps
|
||||
|
||||
---
|
||||
|
||||
## MANDATORY SEQUENCE
|
||||
|
||||
### 1. Generate module-help.csv
|
||||
|
||||
"**🎯 Generating module-help.csv...**"
|
||||
|
||||
Load and execute the module-help-generate workflow:
|
||||
```
|
||||
{moduleHelpGenerateWorkflow}
|
||||
```
|
||||
|
||||
**Set these variables before loading:**
|
||||
- `modulePath: {targetLocation}`
|
||||
- `moduleYamlFile: {targetLocation}/module.yaml`
|
||||
- `moduleHelpCsvFile: {targetLocation}/module-help.csv`
|
||||
- `workflowsDir: {targetLocation}/workflows`
|
||||
- `agentsDir: {targetLocation}/agents`
|
||||
|
||||
**What this does:**
|
||||
- Scans all workflows in `{workflowsDir}/`
|
||||
- Scans all agents in `{agentsDir}/`
|
||||
- Generates `{moduleHelpCsvFile}` with proper structure:
|
||||
- `anytime` entries at top (no sequence)
|
||||
- Phased entries below (phase-1, phase-2, etc.)
|
||||
- Agent-only entries have empty `workflow-file`
|
||||
|
||||
**Wait for workflow completion** before proceeding.
|
||||
|
||||
### 2. Final Build Summary
|
||||
|
||||
"**🎉 Module structure build complete!**"
|
||||
|
||||
**Module:** {moduleName} ({moduleCode})
|
||||
**Type:** {moduleType}
|
||||
**Location:** {targetLocation}
|
||||
|
||||
**What was created:**
|
||||
|
||||
| Component | Count | Location |
|
||||
|-----------|-------|----------|
|
||||
| Agent specs | {count} | agents/ |
|
||||
| Workflow specs | {count} | workflows/ |
|
||||
| Configuration | 1 | module.yaml |
|
||||
| Help Registry | 1 | module-help.csv |
|
||||
| Documentation | 2 | README.md, TODO.md |
|
||||
|
||||
### 3. Update Build Tracking
|
||||
|
||||
Update `{buildTrackingFile}`:
|
||||
```yaml
|
||||
---
|
||||
moduleCode: {module_code}
|
||||
moduleName: {name}
|
||||
moduleType: {type}
|
||||
targetLocation: {location}
|
||||
stepsCompleted: ['step-01-load-brief', 'step-02-structure', 'step-03-config', 'step-04-agents', 'step-05-workflows', 'step-06-docs', 'step-07-complete']
|
||||
created: {created_date}
|
||||
completed: {date}
|
||||
status: COMPLETE
|
||||
---
|
||||
```
|
||||
|
||||
### 3. Next Steps
|
||||
|
||||
"**Your module structure is ready! Here's what to do next:**"
|
||||
|
||||
1. **Review the build** — Check {targetLocation}
|
||||
2. **Build agents** — Use `bmad:bmb:agents:agent-builder` for each agent spec
|
||||
3. **Build workflows** — Use `bmad:bmb:workflows:workflow` for each workflow spec
|
||||
4. **Test installation** — Run `bmad install {module_code}`
|
||||
5. **Iterate** — Refine based on testing
|
||||
|
||||
### 4. Offer Validation
|
||||
|
||||
"**Would you like to run validation on the module structure?**"
|
||||
|
||||
Validation checks:
|
||||
- File structure compliance
|
||||
- module.yaml correctness
|
||||
- Spec completeness
|
||||
- Installation readiness
|
||||
|
||||
### 5. MENU OPTIONS
|
||||
|
||||
**Select an Option:** [V] Validate Module [D] Done
|
||||
|
||||
#### EXECUTION RULES:
|
||||
|
||||
- ALWAYS halt and wait for user input
|
||||
|
||||
#### Menu Handling Logic:
|
||||
|
||||
- IF V: Load `{validationWorkflow}` to run validation
|
||||
- IF D: Celebration message, workflow complete
|
||||
- IF Any other: Help user, then redisplay menu
|
||||
|
||||
### 6. Completion Message (if Done selected)
|
||||
|
||||
"**🚀 You've built a module structure for BMAD!**"
|
||||
|
||||
"**Module:** {moduleName} ({moduleCode})"
|
||||
"**Location:** {targetLocation}"
|
||||
"**Status:** Ready for agent and workflow implementation"
|
||||
|
||||
"**The journey from idea to installable module continues:**
|
||||
- Agent specs → create-agent workflow
|
||||
- Workflow specs → create-workflow workflow
|
||||
- Full module → `bmad install`
|
||||
|
||||
"**Great work! Let's build something amazing.** ✨"
|
||||
|
||||
---
|
||||
|
||||
## Success Metrics
|
||||
|
||||
✅ module-help.csv generated at module root
|
||||
✅ Build tracking marked COMPLETE
|
||||
✅ Summary presented to user
|
||||
✅ Next steps clearly explained
|
||||
✅ Validation offered (optional)
|
||||
Reference in New Issue
Block a user