Files
brachnha-insight/_bmad/bmb/workflows/agent/steps-e/e-08b-edit-expert.md
Max 3fbbb1a93b Initial commit: Brachnha Insight project setup
- Next.js 14+ with App Router and TypeScript
- Tailwind CSS and ShadCN UI styling
- Zustand state management
- Dexie.js for IndexedDB (local-first data)
- Auth.js v5 for authentication
- BMAD framework integration

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-26 12:28:43 +07:00

3.5 KiB

name, description, nextStepFile, editPlan, agentFile, agentBackup, expertTemplate, expertArch, agentCompilation, agentMetadata, personaProperties, principlesCrafting, agentMenuPatterns, criticalActions, expertValidation
name description nextStepFile editPlan agentFile agentBackup expertTemplate expertArch agentCompilation agentMetadata personaProperties principlesCrafting agentMenuPatterns criticalActions expertValidation
e-08b-edit-expert Apply edits to Expert agent ./e-09-celebrate.md {bmb_creations_output_folder}/edit-plan-{agent-name}.md {original-agent-path} {original-agent-path}.backup ../templates/expert-agent-template/expert-agent.template.md ../data/expert-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 ../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...