feat(ux): fix focus swipe animation, button visibility and mobile scroll

This commit is contained in:
Michael committed 2026-02-13 08:35:13 +01:00
1 parent 22e002f47f
commit 9d41a74b36
466 files changed
+6111 -42082

No files matched your search

@@ -4,7 +4,7 @@ description: 'Load and analyze existing agent for editing'
# File References
thisStepFile: ./e-01-load-existing.md
workflowFile: ../workflow.md
workflowFile: ../workflow-edit-agent.md
nextStepFile: './e-02-discover-edits.md'
editPlan: '{bmb_creations_output_folder}/edit-plan-{agent-name}.md'
agentMetadata: ../data/agent-metadata.md
@@ -2,7 +2,7 @@
name: 'e-02-discover-edits'
description: 'Discover what user wants to change about the agent'
nextStepFile: './e-04-type-metadata.md'
nextStepFile: './e-04-sidecar-metadata.md'
editPlan: '{bmb_creations_output_folder}/edit-plan-{agent-name}.md'
advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml'
@@ -74,8 +74,8 @@ I can help you modify:
**[P]ersona** - Role, identity, communication style, principles
**[C]ommands** - Add, remove, or modify commands and menu structure
**[M]etadata** - Name, description, version, tags, category
**[S]idecar** - Add or remove memory (convert hasSidecar: true/false)
**[A]ctions** - Critical actions and activation behaviors
**[T]ype** - Convert between Simple/Expert/Module types
**[O]ther** - Configuration, capabilities, system context
Which areas would you like to edit? (You can select multiple)"
@@ -107,10 +107,10 @@ Which areas would you like to edit? (You can select multiple)"
- "Should new activation behaviors be added?"
- "Are current actions executing as expected?"
#### If Type conversion selected:
- "What type are you converting from/to?"
- "What's driving this conversion?"
- "Are you aware of the implications (e.g., Expert needs sidecar)?"
#### If Sidecar selected:
- "Do you want to add memory (hasSidecar: true) or remove it (hasSidecar: false)?"
- "What should the agent remember across sessions?"
- "Are you aware of the implications?"
### 4. Document Edits to Plan
@@ -135,8 +135,9 @@ Which areas would you like to edit? (You can select multiple)"
- [ ] {edit description}
- [ ] {edit description}
### Type Conversion
- [ ] {from: X, to: Y, rationale: ...}
### Sidecar Conversion
- [ ] {from: hasSidecar: false, to: hasSidecar: true, rationale: ...}
- [ ] {from: hasSidecar: true, to: hasSidecar: false, rationale: ...}
### Other Edits
- [ ] {edit description}
@@ -1,5 +1,5 @@
---
name: 'e-04-type-metadata'
name: 'e-04-sidecar-metadata'
description: 'Review and plan metadata edits'
nextStepFile: './e-05-persona.md'
@@ -11,11 +11,11 @@ advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitati
partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md'
---
# Edit Step 4: Type and Metadata
# Edit Step 4: Sidecar and Metadata
## STEP GOAL:
Review the agent's type and metadata, and plan any changes. If edits involve type conversion, identify the implications.
Review the agent's hasSidecar decision and metadata, and plan any changes. If edits involve sidecar conversion, identify the implications.
## MANDATORY EXECUTION RULES:
@@ -26,7 +26,7 @@ Review the agent's type and metadata, and plan any changes. If edits involve typ
### Step-Specific Rules:
- 🎯 Load reference documents before discussing edits
- 📊 Document type conversion requirements if applicable
- 📊 Document sidecar conversion requirements if applicable
- 💬 Focus on metadata that user wants to change
## EXECUTION PROTOCOLS:
@@ -42,22 +42,24 @@ Review the agent's type and metadata, and plan any changes. If edits involve typ
### 1. Load Reference Documents
Read `{agentMetadata}` and `{agentTypesDoc}` to understand validation rules and type implications.
Read `{agentMetadata}` and `{agentTypesDoc}` to understand validation rules and sidecar implications.
### 2. Review Current Metadata
From `{editPlan}`, display current:
- agentType (simple/expert/module)
- All metadata fields: id, name, title, icon, module, hasSidecar
- hasSidecar (true/false)
- All metadata fields: id, name, title, icon, module
### 3. Discuss Metadata Edits
If user wants metadata changes:
**For type conversion:**
- "Converting from {current} to {target}"
- Explain implications (e.g., Simple → Expert requires sidecar)
- Update editPlan with type conversion
**For sidecar conversion:**
- "Converting from hasSidecar: {current} to {target}"
- Explain implications:
- false → true: Need to create sidecar folder, add critical_actions with sidecar file loading
- true → false: Remove sidecar fields; if critical_actions only has sidecar references, remove section; otherwise keep non-sidecar critical_actions
- Update editPlan with conversion
**For metadata field changes:**
- id: kebab-case requirements
@@ -65,7 +67,6 @@ If user wants metadata changes:
- title: function description format
- icon: emoji/symbol
- module: path format
- hasSidecar: boolean implications
### 4. Document to Edit Plan
@@ -73,9 +74,9 @@ Append to `{editPlan}`:
```yaml
metadataEdits:
typeConversion:
from: {current-type}
to: {target-type}
sidecarConversion:
from: {current-hasSidecar}
to: {target-hasSidecar}
rationale: {explanation}
fieldChanges:
- field: {field-name}
@@ -112,13 +113,13 @@ ONLY WHEN [C continue option] is selected and [metadata changes documented], wil
- Reference documents loaded
- Metadata changes discussed and documented
- Type conversion implications understood
- Sidecar conversion implications understood
- Edit plan updated
### ❌ SYSTEM FAILURE:
- Proceeded without loading reference documents
- Type conversion without understanding implications
- Sidecar conversion without understanding implications
- Changes not documented to edit plan
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.
@@ -1,14 +1,12 @@
---
name: 'e-07-activation'
description: 'Review critical_actions and route to type-specific edit'
description: 'Review critical_actions and route to edit step'
editPlan: '{bmb_creations_output_folder}/edit-plan-{agent-name}.md'
criticalActions: ../data/critical-actions.md
# Type-specific edit routes
simpleEdit: './e-08a-edit-simple.md'
expertEdit: './e-08b-edit-expert.md'
moduleEdit: './e-08c-edit-module.md'
# Edit step route (determined by hasSidecar)
agentEdit: './e-08-edit-agent.md'
advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml'
partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md'
@@ -18,26 +16,26 @@ partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md'
## STEP GOAL:
Review critical_actions and route to the appropriate type-specific edit step (Simple/Expert/Module).
Review critical_actions and route to the agent edit step based on hasSidecar value.
## MANDATORY EXECUTION RULES:
- 📖 CRITICAL: Read the complete step file before taking any action
- 🔄 CRITICAL: Load criticalActions and editPlan first
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}}`
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
### Step-Specific Rules:
- 🎯 Load criticalActions.md before discussing activation
- 📊 Determine target type for routing
- 💬 Route based on POST-EDIT agent type
- 📊 Determine hasSidecar for routing
- 💬 Route based on POST-EDIT hasSidecar value
## EXECUTION PROTOCOLS:
- 🎯 Load criticalActions.md
- 📊 Check editPlan for target agent type
- 💾 Route to appropriate type-specific edit step
- ➡️ Auto-advance to type-specific edit on [C]
- 📊 Check editPlan for target hasSidecar value
- 💾 Route to agent edit step
- ➡️ Auto-advance to edit step on [C]
## MANDATORY SEQUENCE
@@ -47,26 +45,27 @@ Review critical_actions and route to the appropriate type-specific edit step (Si
Read `{criticalActions}` and `{editPlan}` to understand:
- Current critical_actions (if any)
- Target agent type after edits
- Target hasSidecar value after edits
### 2. Review Critical Actions
If user wants to add/modify critical_actions:
- Reference patterns from criticalActions.md
- Define action name, description, invocation
- For Expert agents: specify sidecar-folder and file paths
- For hasSidecar: true — specify sidecar-folder and file paths
### 3. Determine Routing
Check `{editPlan}` for agent metadata (module and hasSidecar):
Check `{editPlan}` for agent metadata (hasSidecar):
```yaml
# Determine agent type from module + hasSidecar combination
module ≠ "stand-alone" → route to e-08c-edit-module.md
module = "stand-alone" + hasSidecar: true → route to e-08b-edit-expert.md
module = "stand-alone" + hasSidecar: false → route to e-08a-edit-simple.md
# Simple routing based on hasSidecar
hasSidecar: true → route to e-08-edit-agent.md (create sidecar structure)
hasSidecar: false → route to e-08-edit-agent.md (single YAML file)
```
The edit step handles both cases based on hasSidecar value.
### 4. Document to Edit Plan
Append to `{editPlan}`:
@@ -77,19 +76,19 @@ activationEdits:
additions: []
modifications: []
routing:
destinationEdit: {e-08a|e-08b|e-08c}
sourceType: {simple|expert|module} # Derived from module + hasSidecar
destinationEdit: e-08-edit-agent.md
hasSidecar: {true|false} # Derived from edit plan
```
### 5. Present MENU OPTIONS
Display: "**Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Continue to Type-Specific Edit"
Display: "**Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Continue to Edit Agent"
#### Menu Handling Logic:
- IF A: Execute {advancedElicitationTask}, and when finished redisplay the menu
- IF P: Execute {partyModeWorkflow}, and when finished redisplay the menu
- IF C: Save to {editPlan}, determine routing based on module + hasSidecar, then only then load and execute the appropriate type-specific edit step
- IF C: Save to {editPlan}, then only then load and execute the agent edit step
- IF Any other comments or queries: help user respond then [Redisplay Menu Options](#5-present-menu-options)
#### EXECUTION RULES:
@@ -100,11 +99,10 @@ Display: "**Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Cont
## CRITICAL STEP COMPLETION NOTE
This is the **ROUTING HUB** for edit flow. ONLY WHEN [C continue option] is selected and [routing determined], load and execute the appropriate type-specific edit step:
This is the **ROUTING HUB** for edit flow. ONLY WHEN [C continue option] is selected and [routing determined], load and execute the agent edit step:
- module ≠ "stand-alone" → e-08c-edit-module.md (Module agent)
- module = "stand-alone" + hasSidecar: true → e-08b-edit-expert.md (Expert agent)
- module = "stand-alone" + hasSidecar: false → e-08a-edit-simple.md (Simple agent)
- hasSidecar: false → Single YAML file edit
- hasSidecar: true → YAML + sidecar folder structure edit
---
@@ -113,13 +111,13 @@ This is the **ROUTING HUB** for edit flow. ONLY WHEN [C continue option] is sele
### ✅ SUCCESS:
- criticalActions.md loaded
- Routing determined based on target type
- Routing determined based on hasSidecar
- Edit plan updated with routing info
### ❌ SYSTEM FAILURE:
- Proceeded without loading reference documents
- Routing not determined
- Wrong type-specific edit step selected
- Wrong edit step selected
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.
@@ -0,0 +1,196 @@
---
name: 'e-08-edit-agent'
description: 'Apply edits to agent (with or without sidecar)'
nextStepFile: './e-09-celebrate.md'
editPlan: '{bmb_creations_output_folder}/edit-plan-{agent-name}.md'
agentFile: '{original-agent-path}'
agentBackup: '{original-agent-path}.backup'
# Template and Architecture
agentTemplate: ../templates/agent-template.md
agentArch: ../data/agent-architecture.md
agentValidation: ../data/agent-validation.md
agentCompilation: ../data/agent-compilation.md
agentMetadata: ../data/agent-metadata.md
personaProperties: ../data/persona-properties.md
principlesCrafting: ../data/principles-crafting.md
agentMenuPatterns: ../data/agent-menu-patterns.md
criticalActions: ../data/critical-actions.md
# Reference examples
noSidecarExample: ../data/reference/without-sidecar/commit-poet.agent.yaml
withSidecarExample: ../data/reference/with-sidecar/journal-keeper/journal-keeper.agent.yaml
advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml'
partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md'
---
# Edit Step 8: Edit Agent
## STEP GOAL:
Apply all planned edits to the agent YAML file. The edit approach (with or without sidecar) is determined by the `hasSidecar` value from the edit plan.
## MANDATORY EXECUTION RULES:
- 🛑 ALWAYS create backup before modifying agent file
- 📖 CRITICAL: Read template and architecture files first
- 🔄 CRITICAL: Load editPlan and agentFile
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
### Step-Specific Rules:
- 🎯 Load all reference files before applying edits
- 📊 Apply edits exactly as specified in editPlan
- 💾 Validate YAML after each edit
- 🎭 Handle sidecar structure if hasSidecar: true
- ➡️ Auto-advance to celebration when complete
## EXECUTION PROTOCOLS:
- 🎯 Load template, architecture, and validation files
- 📊 Read editPlan to get all planned changes
- 💾 Create backup
- 📝 Apply edits: sidecar conversion, metadata, persona, commands, critical_actions
- 🎭 Manage sidecar folder structure (if applicable)
- ✅ Validate YAML and sidecar paths
- ➡️ Auto-advance to next step
## MANDATORY SEQUENCE
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change.
### 1. Load Reference Documents
Read all files before editing:
- `{agentTemplate}` - YAML structure reference
- `{agentArch}` - Agent architecture (with/without sidecar)
- `{agentValidation}` - Validation checklist
- `{agentCompilation}` - Assembly guidelines
- `{agentMetadata}`, `{personaProperties}`, `{principlesCrafting}`
- `{agentMenuPatterns}`, `{criticalActions}`
### 2. Load Edit Plan and Agent
Read `{editPlan}` to get all planned edits.
Read `{agentFile}` to get current agent YAML.
Check the `hasSidecar` value from editPlan to determine edit approach.
### 3. Create Backup
ALWAYS backup before editing:
```bash
cp {agentFile} {agentBackup}
```
Confirm: "Backup created at: `{agentBackup}`"
### 4. Apply Edits in Sequence
For each planned edit:
**Sidecar Conversion:**
**false → true (Adding sidecar):**
- Set `hasSidecar: true`
- Add `metadata.sidecar-folder` if not present
- Add `critical_actions` section with sidecar file references
- Create sidecar directory: `{agent-folder}/{agent-name}-sidecar/`
- Create starter files: `memories.md`, `instructions.md`
- Update all references to use `{project-root}/_bmad/_memory/{sidecar-folder}/` format
**true → false (Removing sidecar):**
- Set `hasSidecar: false`
- Remove `metadata.sidecar-folder` and `metadata.sidecar-path`
- If critical_actions contains only sidecar references, remove the section
- If critical_actions contains non-sidecar activation behaviors, keep and clean sidecar references
- Remove sidecar references from menu actions
- Optionally archive sidecar folder
**Metadata Edits:**
- Apply each field change from metadataEdits
- Validate format conventions
**Persona Edits:**
- Replace persona section with new four-field persona
- Validate field purity (role ≠ identity ≠ communication_style)
- For hasSidecar: true, ensure communication_style includes memory reference patterns
**Command Edits:**
- Additions: append to commands array
- Modifications: update specific commands
- Removals: remove from commands array
**Critical Actions Edits (hasSidecar: true only):**
- Additions: append to critical_actions array
- Modifications: update specific actions
- Removals: remove from array
- Ensure all references use correct `{project-root}/_bmad/_memory/` paths
### 5. Validate After Each Edit
**For both types:**
- Confirm YAML syntax is valid after each modification
**For hasSidecar: true:**
- Validate sidecar path format
- Ensure all critical_actions reference correct paths
- Confirm sidecar folder structure exists
### 6. Document Applied Edits
Append to `{editPlan}`:
```yaml
editsApplied:
- {edit-description}
- {edit-description}
backup: {agentBackup}
timestamp: {YYYY-MM-DD HH:MM}
```
### 7. Present MENU OPTIONS
Display: "**Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Continue"
#### Menu Handling Logic:
- IF A: Execute {advancedElicitationTask}, and when finished redisplay the menu
- IF P: Execute {partyModeWorkflow}, and when finished redisplay the menu
- IF C: Save to {editPlan}, then only then load, read entire file, then execute {nextStepFile}
- IF Any other comments or queries: help user respond then [Redisplay Menu Options](#7-present-menu-options)
#### EXECUTION RULES:
- ALWAYS halt and wait for user input after presenting menu
- ONLY proceed to next step when user selects 'C'
- After other menu items execution, return to this menu
## CRITICAL STEP COMPLETION NOTE
ONLY WHEN [C continue option] is selected and [all edits applied and validated], will you then load and read fully `{nextStepFile}` to execute and celebrate.
---
## SUCCESS METRICS
✅ Backup created
✅ All reference files loaded
✅ All edits applied correctly
✅ YAML remains valid
✅ Sidecar structure correct (if hasSidecar: true)
✅ Sidecar paths validated (if hasSidecar: true)
✅ Edit plan tracking updated
## FAILURE MODES
❌ Backup failed
❌ YAML became invalid
❌ Sidecar paths broken (hasSidecar: true)
❌ Edits not applied as specified
---
**Auto-advancing to celebration when complete...**
@@ -1,137 +0,0 @@
---
name: 'e-08a-edit-simple'
description: 'Apply edits to Simple agent'
nextStepFile: './e-09-celebrate.md'
editPlan: '{bmb_creations_output_folder}/edit-plan-{agent-name}.md'
agentFile: '{original-agent-path}'
agentBackup: '{original-agent-path}.backup'
# Template and Architecture
simpleTemplate: ../templates/simple-agent.template.md
simpleArch: ../data/simple-agent-architecture.md
agentCompilation: ../data/agent-compilation.md
agentMetadata: ../data/agent-metadata.md
personaProperties: ../data/persona-properties.md
principlesCrafting: ../data/principles-crafting.md
agentMenuPatterns: ../data/agent-menu-patterns.md
criticalActions: ../data/critical-actions.md
---
# Edit Step 8a: Edit Simple Agent
## STEP GOAL:
Apply all planned edits to the Simple agent YAML file using templates and architecture references for validation.
## MANDATORY EXECUTION RULES:
- 🛑 ALWAYS create backup before modifying agent file
- 📖 CRITICAL: Read template and architecture files first
- 🔄 CRITICAL: Load editPlan and agentFile
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
### Step-Specific Rules:
- 🎯 Load all reference files before applying edits
- 📊 Apply edits exactly as specified in editPlan
- 💾 Validate YAML after each edit
- ➡️ Auto-advance to post-edit validation when complete
## EXECUTION PROTOCOLS:
- 🎯 Load template, architecture, and data files
- 📊 Read editPlan to get all planned changes
- 💾 Create backup
- 📝 Apply edits: type conversion, metadata, persona, commands, critical_actions
- ✅ Validate YAML syntax
- ➡️ Auto-advance to next validation step
## MANDATORY SEQUENCE
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change.
### 1. Load Reference Documents
Read all files before editing:
- `{simpleTemplate}` - YAML structure reference
- `{simpleArch}` - Simple agent architecture
- `{agentCompilation}` - Assembly guidelines
- `{agentMetadata}`, `{personaProperties}`, `{principlesCrafting}`
- `{agentMenuPatterns}`, `{criticalActions}`
### 2. Load Edit Plan and Agent
Read `{editPlan}` to get all planned edits.
Read `{agentFile}` to get current agent YAML.
### 3. Create Backup
ALWAYS backup before editing:
`cp {agentFile} {agentBackup}`
Confirm: "Backup created at: `{agentBackup}`"
### 4. Apply Edits in Sequence
For each planned edit:
**Type Conversion (Simple ← Expert/Module):**
- Converting TO Simple: Remove `metadata.sidecar-folder`, remove all sidecar references
- Set `module: stand-alone` and `hasSidecar: false`
- Remove type-specific fields from source type
**Metadata Edits:**
- Apply each field change from metadataEdits
**Persona Edits:**
- Replace persona section with new four-field persona
- Validate field purity (role ≠ identity ≠ communication_style)
**Command Edits:**
- Additions: append to commands array
- Modifications: update specific commands
- Removals: remove from commands array
**Critical Actions Edits:**
- Additions: append to critical_actions array
- Modifications: update specific actions
- Removals: remove from array
### 5. Validate YAML After Each Edit
Confirm YAML syntax is valid after each modification.
### 6. Document Applied Edits
Append to `{editPlan}`:
```yaml
editsApplied:
- {edit-description}
- {edit-description}
backup: {agentBackup}
timestamp: {YYYY-MM-DD HH:MM}
```
### 7. Auto-Advance
When all edits applied successfully, load and execute `{nextStepFile}` immediately.
## SUCCESS METRICS
✅ Backup created
✅ All reference files loaded
✅ All edits applied correctly
✅ YAML remains valid
✅ Edit plan tracking updated
## FAILURE MODES
❌ Backup failed
❌ YAML became invalid
❌ Edits not applied as specified
---
**Auto-advancing to post-edit validation...
@@ -1,119 +0,0 @@
---
name: 'e-08b-edit-expert'
description: 'Apply edits to Expert agent'
nextStepFile: './e-09-celebrate.md'
editPlan: '{bmb_creations_output_folder}/edit-plan-{agent-name}.md'
agentFile: '{original-agent-path}'
agentBackup: '{original-agent-path}.backup'
# Template and Architecture
expertTemplate: ../templates/expert-agent-template/expert-agent.template.md
expertArch: ../data/expert-agent-architecture.md
agentCompilation: ../data/agent-compilation.md
agentMetadata: ../data/agent-metadata.md
personaProperties: ../data/persona-properties.md
principlesCrafting: ../data/principles-crafting.md
agentMenuPatterns: ../data/agent-menu-patterns.md
criticalActions: ../data/critical-actions.md
expertValidation: ../data/expert-agent-validation.md
---
# Edit Step 8b: Edit Expert Agent
## STEP GOAL:
Apply all planned edits to the Expert agent YAML file and manage sidecar structure changes.
## MANDATORY EXECUTION RULES:
- 🛑 ALWAYS create backup before modifying agent file
- 📖 CRITICAL: Read template and architecture files first
- 🔄 CRITICAL: Load editPlan and agentFile
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
### Step-Specific Rules:
- 🎯 Load all reference files before applying edits
- 📊 Manage sidecar structure for Expert agents
- 💾 Validate YAML and sidecar paths after edits
- ➡️ Auto-advance to post-edit validation when complete
## EXECUTION PROTOCOLS:
- 🎯 Load template, architecture, and data files
- 📊 Read editPlan to get all planned changes
- 💾 Create backup
- 📝 Apply edits including sidecar management
- ✅ Validate YAML and sidecar paths
- ➡️ Auto-advance to next validation step
## MANDATORY SEQUENCE
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change.
### 1. Load Reference Documents
Read all files before editing:
- `{expertTemplate}` - Expert YAML structure
- `{expertArch}` - Expert agent architecture
- `{agentCompilation}`, `{agentMetadata}`, `{personaProperties}`, `{principlesCrafting}`
- `{agentMenuPatterns}`, `{criticalActions}`, `{expertValidation}`
### 2. Load Edit Plan and Agent
Read `{editPlan}` to get all planned edits.
Read `{agentFile}` to get current agent YAML.
### 3. Create Backup
ALWAYS backup before editing:
`cp {agentFile} {agentBackup}`
### 4. Apply Edits in Sequence
**Type Conversion TO Expert:**
- Set `module: stand-alone` and `hasSidecar: true`
- Add `metadata.sidecar-folder` if not present
- Create sidecar directory next to agent.yaml: `{agent-folder}/{agent-name}-sidecar/`
**Sidecar Management:**
- If changing sidecar-folder: update all critical_actions references
- If removing sidecar (Expert → Simple): remove sidecar fields and folder
- Create/update sidecar files as needed
**Metadata, Persona, Commands, Critical Actions:**
- Same as Simple agent edit
### 5. Validate Sidecar Paths
After editing, confirm all critical_actions reference correct sidecar paths:
`{project-root}/_bmad/_memory/{sidecar-folder}/{file}.md`
### 6. Document Applied Edits
Append to `{editPlan}` with sidecar changes noted.
### 7. Auto-Advance
When all edits applied successfully, load and execute `{nextStepFile}` immediately.
## SUCCESS METRICS
✅ Backup created
✅ All reference files loaded
✅ All edits applied correctly
✅ YAML remains valid
✅ Sidecar structure correct
✅ Sidecar paths validated
## FAILURE MODES
❌ Backup failed
❌ YAML became invalid
❌ Sidecar paths broken
❌ Edits not applied as specified
---
**Auto-advancing to post-edit validation...
@@ -1,123 +0,0 @@
---
name: 'e-08c-edit-module'
description: 'Apply edits to Module agent'
nextStepFile: './e-09-celebrate.md'
editPlan: '{bmb_creations_output_folder}/edit-plan-{agent-name}.md'
agentFile: '{original-agent-path}'
agentBackup: '{original-agent-path}.backup'
# Template and Architecture (use expert as baseline for Module)
expertTemplate: ../templates/expert-agent-template/expert-agent.template.md
expertArch: ../data/expert-agent-architecture.md
moduleArch: ../data/module-agent-validation.md
agentCompilation: ../data/agent-compilation.md
agentMetadata: ../data/agent-metadata.md
personaProperties: ../data/persona-properties.md
principlesCrafting: ../data/principles-crafting.md
agentMenuPatterns: ../data/agent-menu-patterns.md
criticalActions: ../data/critical-actions.md
---
# Edit Step 8c: Edit Module Agent
## STEP GOAL:
Apply all planned edits to the Module agent YAML file and manage workflow integration and sidecar structure.
## MANDATORY EXECUTION RULES:
- 🛑 ALWAYS create backup before modifying agent file
- 📖 CRITICAL: Read template and architecture files first
- 🔄 CRITICAL: Load editPlan and agentFile
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
### Step-Specific Rules:
- 🎯 Load all reference files before applying edits
- 📊 Manage workflow integration paths for Module agents
- 💾 Validate YAML and workflow paths after edits
- ➡️ Auto-advance to post-edit validation when complete
## EXECUTION PROTOCOLS:
- 🎯 Load template, architecture, and data files
- 📊 Read editPlan to get all planned changes
- 💾 Create backup
- 📝 Apply edits including workflow paths
- ✅ Validate YAML and workflow paths
- ➡️ Auto-advance to next validation step
## MANDATORY SEQUENCE
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change.
### 1. Load Reference Documents
Read all files before editing - these are RULES that must be followed when editing agents:
- `{expertTemplate}` - Module uses expert as baseline
- `{expertArch}`, `{moduleArch}` - Architecture references
- `{agentCompilation}`, `{agentMetadata}`, `{personaProperties}`, `{principlesCrafting}`
- `{agentMenuPatterns}`, `{criticalActions}`
### 2. Load Edit Plan and Agent
Read `{editPlan}` to get all planned edits.
Read `{agentFile}` to get current agent YAML.
### 3. Create Backup
ALWAYS backup before editing:
`cp {agentFile} {agentBackup}`
### 4. Apply Edits in Sequence
**Type Conversion TO Module:**
- Set `module` to module code (e.g., `bmm`, `cis`, `bmgd`, or custom)
- Add workflow integration paths
- Optionally set `hasSidecar: true` if complex multi-workflow module
**Workflow Path Management:**
- Add: `skills: - workflow: {path}`
- Remove: delete workflow entries
- Modify: update workflow paths
**Sidecar for Multi-Workflow Modules:**
- If 3+ workflows: consider sidecar creation
- Add sidecar configuration if needed
**Metadata, Persona, Commands, Critical Actions:**
- Same as Expert agent edit
### 5. Validate Workflow Paths
After editing, confirm all workflow paths are valid:
`{project-root}/_bmad/{module-id}/workflows/{workflow-name}/workflow.md`
### 6. Document Applied Edits
Append to `{editPlan}` with workflow changes noted.
### 7. Auto-Advance
When all edits applied successfully, load and execute `{nextStepFile}` immediately.
## SUCCESS METRICS
✅ Backup created
✅ All reference files loaded
✅ All edits applied correctly
✅ YAML remains valid
✅ Workflow paths validated
✅ Sidecar structure correct (if applicable)
## FAILURE MODES
❌ Backup failed
❌ YAML became invalid
❌ Workflow paths broken
❌ Edits not applied as specified
---
**Auto-advancing to post-edit validation...