- Fix ChatBubble to handle non-string content with String() wrapper - Fix API route to use generateText for non-streaming requests - Add @ai-sdk/openai-compatible for non-OpenAI providers (DeepSeek, etc.) - Use Chat Completions API instead of Responses API for compatible providers - Update ChatBubble tests and fix component exports to kebab-case - Remove stale PascalCase ChatBubble.tsx file
7.3 KiB
name, description, nextStepFile, agentPlan, agentBuildOutput, agentYamlOutput, expertTemplate, expertArch, agentCompilation, criticalActions, advancedElicitationTask, partyModeWorkflow
| name | description | nextStepFile | agentPlan | agentBuildOutput | agentYamlOutput | expertTemplate | expertArch | agentCompilation | criticalActions | advancedElicitationTask | partyModeWorkflow |
|---|---|---|---|---|---|---|---|---|---|---|---|
| step-06-build-expert | Generate Expert agent YAML with sidecar from plan | ./step-08-celebrate.md | {bmb_creations_output_folder}/agent-plan-{agent_name}.md | {bmb_creations_output_folder}/{agent-name}/ | {bmb_creations_output_folder}/{agent-name}/{agent-name}.agent.yaml | ../templates/expert-agent-template/expert-agent.template.md | ../data/expert-agent-architecture.md | ../data/agent-compilation.md | ../data/critical-actions.md | {project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml | {project-root}/_bmad/core/workflows/party-mode/workflow.md |
STEP GOAL
Assemble the agent plan content into a complete Expert agent YAML file with sidecar folder structure. Expert agents require persistent memory storage, so the build creates a sidecar folder next to the agent.yaml (which gets installed to _bmad/_memory/ during BMAD installation).
MANDATORY EXECUTION RULES
- EXPERT AGENT = SIDECAR REQUIRED: Every Expert agent MUST have a sidecar folder created next to agent.yaml (build location), which will be installed to
_bmad/_memory/during BMAD installation - CRITICAL_ACTIONS FORMAT: All critical_actions MUST use
{project-root}/_bmad/_memory/{sidecar-folder}/for file operations (runtime path) - TEMPLATE COMPLIANCE: Follow expert-agent-template.md structure exactly
- YAML VALIDATION: Ensure valid YAML syntax with proper indentation (2-space)
- EXISTING CHECK: If agentYamlOutput exists, ask user before overwriting
- NO DRIFT: Use ONLY content from agentPlan - no additions or interpretations
EXECUTION PROTOCOLS
Phase 1: Load Architecture and Templates
- Read
expertTemplate- defines YAML structure for Expert agents - Read
expertArch- architecture requirements for Expert-level agents - Read
agentCompilation- assembly rules for YAML generation - Read
criticalActions- validation requirements for critical_actions
Phase 2: Load Agent Plan
- Read
agentPlancontaining all collected content from Steps 1-5 - Verify plan contains:
- Agent type: "expert"
- Sidecar folder name
- Persona content
- Commands structure
- Critical actions (if applicable)
Phase 3: Assemble Expert YAML
Using expertTemplate as structure:
name: '{agent-name}'
description: '{short-description}'
author:
name: '{author}'
created: '{date}'
persona: |
{multi-line persona content from plan}
system-context: |
{expanded context from plan}
capabilities:
- {capability from plan}
- {capability from plan}
# ... all capabilities
critical-actions:
- name: '{action-name}'
description: '{what it does}'
invocation: '{when/how to invoke}'
implementation: |
{multi-line implementation}
output: '{expected-output}'
sidecar-folder: '{sidecar-folder-name}'
sidecar-files:
- '{project-root}/_bmad/_memory/{sidecar-folder}/{file1}.md'
- '{project-root}/_bmad/_memory/{sidecar-folder}/{file2}.md'
# ... all critical actions referencing sidecar structure
commands:
- name: '{command-name}'
description: '{what command does}'
steps:
- {step 1}
- {step 2}
# ... all commands from plan
configuration:
temperature: {temperature}
max-tokens: {max-tokens}
response-format: {format}
# ... other configuration from plan
metadata:
sidecar-folder: '{sidecar-folder-name}'
sidecar-path: '{project-root}/_bmad/_memory/{sidecar-folder}/'
agent-type: 'expert'
memory-type: 'persistent'
Phase 4: Create Sidecar Structure
-
Create Sidecar Directory (NEXT TO agent.yaml):
- Path:
{agentBuildOutput}/{agent-name}-sidecar/ - Use
mkdir -pto create full path - Note: This folder gets installed to
_bmad/_memory/during BMAD installation
- Path:
-
Create Starter Files (if specified in critical_actions):
touch {agentBuildOutput}/{agent-name}-sidecar/{file1}.md touch {agentBuildOutput}/{agent-name}-sidecar/{file2}.md -
Add README to Sidecar:
# {sidecar-folder} Sidecar This folder stores persistent memory for the **{agent-name}** Expert agent. ## Purpose {purpose from critical_actions} ## Files - {file1}.md: {description} - {file2}.md: {description} ## Runtime Access After BMAD installation, this folder will be accessible at: `{project-root}/_bmad/_memory/{sidecar-folder}/{filename}.md`
Phase 5: Write Agent YAML
- Create
agentBuildOutputdirectory:mkdir -p {agentBuildOutput} - Write YAML to
agentYamlOutput - Confirm write success
- Display file location to user
Phase 6: 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: Write agent YAML to {agentBuildOutput}/{agent-name}/{agent-name}.agent.yaml (or appropriate output path), update frontmatter, then only then load, read entire file, then execute {nextStepFile}
- IF Any other comments or queries: help user respond then Redisplay 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
- User can chat or ask questions - always respond and then end with display again of the menu options
CONTEXT BOUNDARIES
- USE ONLY: Content from agentPlan, expertTemplate, expertArch, agentCompilation, criticalActions
- DO NOT ADD: New capabilities, commands, or actions not in plan
- DO NOT INTERPRET: Use exact language from plan
- DO NOT SKIP: Any field in expertTemplate structure
- CRITICAL: Expert agents MUST have sidecar-folder metadata
CRITICAL STEP COMPLETION NOTE
ONLY WHEN [C continue option] is selected and [complete YAML generated and written to output], will you then load and read fully {nextStepFile} to execute and celebrate completion.
This step produces TWO artifacts:
- Agent YAML: Complete expert agent definition at
{agentYamlOutput} - Sidecar Structure: Folder and files at
{agentBuildOutput}/{agent-name}-sidecar/(build location, installs to_bmad/_memory/during BMAD installation)
Both must exist before proceeding to validation.
SUCCESS METRICS
✅ Agent YAML file created at expected location
✅ Valid YAML syntax (no parse errors)
✅ All template fields populated
✅ Sidecar folder created at {agentBuildOutput}/{agent-name}-sidecar/ (build location)
✅ Sidecar folder contains starter files from critical_actions
✅ critical_actions reference {project-root}/_bmad/_memory/{sidecar-folder}/ paths
✅ metadata.sidecar-folder populated
✅ metadata.agent-type = "expert"
✅ User validation choice received (one-at-a-time or YOLO)
FAILURE MODES
❌ Missing required template fields ❌ Invalid YAML syntax ❌ Sidecar folder creation failed ❌ critical_actions missing sidecar-folder references ❌ agentPlan missing expert-specific content (sidecar-folder name) ❌ File write permission errors