Files
FlowReader/_bmad/bmb/workflows/agent/steps-e/e-08a-edit-simple.md
T

3.8 KiB

name, description, nextStepFile, editPlan, agentFile, agentBackup, simpleTemplate, simpleArch, agentCompilation, agentMetadata, personaProperties, principlesCrafting, agentMenuPatterns, criticalActions
name description nextStepFile editPlan agentFile agentBackup simpleTemplate simpleArch agentCompilation agentMetadata personaProperties principlesCrafting agentMenuPatterns criticalActions
e-08a-edit-simple Apply edits to Simple agent ./e-09-celebrate.md {bmb_creations_output_folder}/edit-plan-{agent-name}.md {original-agent-path} {original-agent-path}.backup ../templates/simple-agent.template.md ../data/simple-agent-architecture.md ../data/agent-compilation.md ../data/agent-metadata.md ../data/persona-properties.md ../data/principles-crafting.md ../data/agent-menu-patterns.md ../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}:

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...