Edit Agents and Workflows
Modify existing agents and workflows using the builderâs edit workflows, which help you make changes while maintaining compliance with best practices.
Before You Begin
Section titled âBefore You Beginâ- Have an existing agent or workflow you want to modify
- Understand what changes you want to make
- Completed the relevant creation tutorial (agent or workflow)
Editing Workflows
Section titled âEditing WorkflowsâUsing the Edit Workflow Workflow
Section titled âUsing the Edit Workflow WorkflowâUse Wendyâs edit workflow for comprehensive workflow modifications:
[EW] or "edit-workflow"Wendy will guide you through:
| Step | What Happens |
|---|---|
| Assess | Load and review the existing workflow |
| Discover | Describe what changes you want |
| Select | Choose which parts to modify (steps, menus, frontmatter) |
| Apply | Make the changes |
| Validate | Check for compliance issues |
What You Can Edit
Section titled âWhat You Can Editâ| Element | Description |
|---|---|
| Frontmatter | Name, description, goal, configuration |
| Steps | Add, remove, or modify step files |
| Menus | Change menu options and handlers |
| Templates | Update output templates |
| Data | Modify reference materials |
Workflow Conversion
Section titled âWorkflow ConversionâThe edit workflow can convert non-compliant workflows to BMad format:
Detection: Edit mode assesses workflow compliance first
- Compliant â Continue to edit steps
- Non-compliant â Offer conversion to
step-00-conversion
Conversion process:
- Load non-compliant workflow
- Extract essence and structure
- Create plan with
conversionFrommetadata - Build compliant workflow
- Verify coverage of original functionality
Tri-Modal Workflows
Section titled âTri-Modal WorkflowsâFor complex workflows with create/edit/validate modes, edit mode handles cross-mode integration:
Edit to Create: Route to conversion for non-compliant input Edit to Validation: After edits, offer to run validation Validation to Edit: Validation reports consumed by edit mode for fixes
Direct Editing
Section titled âDirect EditingâWorkflows are markdown files. You can edit directly:
---name: my-workflowdescription: My workflow description# Edit frontmatter here---
# Workflow content hereAfter editing, validate your workflow:
[VW] or "validate-workflow"Adding Steps
Section titled âAdding StepsâTo add a step to an existing workflow:
- Create new step file:
step-XX-new-step.md - Update the previous step to load the new step
- Set the new stepâs
nextStepFileto continue the sequence - Validate the workflow
Step Type Considerations
Section titled âStep Type ConsiderationsâWhen adding steps, consider the step type:
| Step Type | When to Use | Menu Pattern |
|---|---|---|
| Init | Starting a new workflow phase | Auto-proceed |
| Middle | Collaborative content creation | A/P/C or C only |
| Branch | User choice determines path | Custom letters |
| Final | Completing the workflow | No menu |
Replacing Steps
Section titled âReplacing StepsâTo replace a step entirely:
- Create replacement step file with same or new name
- Update previous stepâs
nextStepFileto load replacement - Remove or archive old step file
- Validate the workflow
Extracting to Data Files
Section titled âExtracting to Data FilesâWhen a step exceeds 200-250 lines, extract content to /data/ files.
Good candidates for extraction:
- Domain-specific reference materials
- Reusable patterns or examples
- Configuration data
- Large lookup tables
Editing Agents
Section titled âEditing AgentsâUsing the Edit Agent Workflow
Section titled âUsing the Edit Agent WorkflowâBondâs edit workflow helps you modify agents while maintaining compliance:
[EA] or "edit-agent"Bond will guide you through:
| Step | What Happens |
|---|---|
| Load | Select the agent file to edit |
| Discover | Describe what changes you want |
| Select | Choose which elements to modify |
| Apply | Make the changes with validation |
| Celebrate | Review and confirm |
What You Can Edit
Section titled âWhat You Can Editâ| Element | Description |
|---|---|
| Persona | Role, identity, communication style, principles |
| Menu Commands | Add, remove, or modify commands |
| Critical Actions | Autonomous behaviors |
| Metadata | Name, description, version |
| Sidecar | Expert agent memory files |
Direct Editing
Section titled âDirect EditingâFor simple changes, you can edit the agent YAML file directly:
agent: metadata: name: "My Agent" # Edit metadata here
persona: role: "What they do" # Edit persona fields here
menu: - trigger: "my-command" # Edit commands hereAfter editing, rebuild the agent:
npx bmad-method build <agent-name>Editing Modules
Section titled âEditing ModulesâFor module-level changes (configuration, install questions), use Morganâs edit workflow:
[EM] or "edit-module"This guides you through:
- Modifying
module.yaml - Updating install questions
- Changing configuration values
Validation After Editing
Section titled âValidation After EditingâAlways validate after making changes:
| Content Type | Validation Command |
|---|---|
| Agents | [VA] or validate-agent |
| Workflows | [VW] or validate-workflow |
| Modules | [VM] or validate-module |
Max-Parallel Workflow Validation
Section titled âMax-Parallel Workflow ValidationâFor high-capability LLMs (like Claude):
[MV] or "validate-max-parallel-workflow"This hyper-optimized validation uses task agents to validate multiple workflow aspects simultaneously in sub-processes for dramatically faster results.
Validation checks for:
- Proper YAML formatting
- Required fields are present
- Compliance with BMad standards
- Menu and command structure
- Frontmatter variable usage
- Step file size limits
Common Edit Scenarios
Section titled âCommon Edit ScenariosâAdding a Menu Command to an Agent
Section titled âAdding a Menu Command to an Agentâ- Run
[EA]or open the agent YAML file - Add to the
menusection:
menu: - trigger: "new-command" exec: "path/to/workflow.md" description: "What this command does"- Rebuild or validate
Adding a Step to a Workflow
Section titled âAdding a Step to a Workflowâ- Run
[EW]or open the workflow - Create new step file:
step-XX-new-step.md - Update the previous step to load the new step
- Validate the workflow
Converting a Non-Compliant Workflow
Section titled âConverting a Non-Compliant Workflowâ- Run
[EW]or[RW](rework) - Edit mode detects non-compliance
- Accept conversion offer
- Review conversion plan
- Build compliant workflow
- Verify coverage
Tips for Effective Editing
Section titled âTips for Effective Editingâ| Tip | Why |
|---|---|
| Validate often | Catch issues early |
| Test changes | Verify behavior matches expectations |
| Backup first | Keep a copy before major edits |
| Iterate | Make small changes and test |
| Document | Note why you made changes |
Getting Help
Section titled âGetting Helpâ- Discord Community â Ask in #bmad-method-help
- GitHub Issues â Report bugs
Related Guides
Section titled âRelated Guidesâ| Guide | Description |
|---|---|
| Validate Agents and Workflows | Quality assurance |
| Create a Custom Agent | Creating agents |
| Create Your First Workflow | Creating workflows |
| Workflow Customization | Tri-modal structure and patterns |