mirror of
https://github.com/R0m1k3/FlowReader.git
synced 2026-10-14 02:39:33 +02:00
feat(ux): fix focus swipe animation, button visibility and mobile scroll
This commit is contained in:
1 parent
22e002f47f
commit
9d41a74b36
466 files changed
+6111
-42082
No files matched your search
@@ -0,0 +1,258 @@
|
||||
# Agent Architecture
|
||||
|
||||
Single Agent type with `hasSidecar` boolean. `critical_actions` decoupled from sidecar.
|
||||
|
||||
## Decision Matrix: hasSidecar
|
||||
|
||||
| hasSidecar | Structure | Use When |
|
||||
|------------|-----------|----------|
|
||||
| `false` | Single YAML file (~250 lines) | Stateless, single-purpose, personality-driven |
|
||||
| `true` | YAML + sidecar folder | Persistent memory, long-term tracking, relationship-driven |
|
||||
|
||||
---
|
||||
|
||||
## YAML Schema
|
||||
|
||||
```yaml
|
||||
agent:
|
||||
metadata:
|
||||
id: _bmad/agents/{agent-name}/{agent-name}.md
|
||||
name: 'Persona Name'
|
||||
title: 'Agent Title'
|
||||
icon: '<emoji>'
|
||||
module: stand-alone # or bmm, cis, bmgd
|
||||
|
||||
persona:
|
||||
role: | # First-person, 1-2 sentences
|
||||
identity: | # Background, 2-5 sentences
|
||||
communication_style: | # Voice, tone, mannerisms
|
||||
principles: # Core beliefs
|
||||
- Principle one
|
||||
|
||||
critical_actions: # Optional - activation behavior
|
||||
- 'Load COMPLETE file {path}'
|
||||
- 'ONLY read/write files in {path}'
|
||||
|
||||
prompts:
|
||||
- id: prompt-id
|
||||
content: |
|
||||
<instructions>What it does</instructions>
|
||||
<process>1. Step one 2. Step two</process>
|
||||
|
||||
menu:
|
||||
- trigger: XX or fuzzy match on command
|
||||
action: '#prompt-id' or 'Direct instruction'
|
||||
description: '[XX] Description'
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Metadata Fields
|
||||
|
||||
| Field | Format | Example |
|
||||
|-------|--------|---------|
|
||||
| `id` | `_bmad/agents/{name}/{name}.md` | `_bmad/agents/commit-poet/commit-poet.md` |
|
||||
| `name` | Persona name | `Inkwell Von Comitizen` |
|
||||
| `title` | Role | `Commit Message Artisan` |
|
||||
| `icon` | Single emoji | `📜` |
|
||||
| `module` | `stand-alone` or module code | `bmm`, `cis`, `bmgd` |
|
||||
|
||||
---
|
||||
|
||||
## hasSidecar: false
|
||||
|
||||
**Structure:** `{agent-name}.agent.yaml` only
|
||||
|
||||
**Use cases:**
|
||||
- Single-purpose utility with helpful persona
|
||||
- Each session is independent
|
||||
- All logic fits in ~250 lines
|
||||
- No need to remember past sessions
|
||||
|
||||
**Examples:** Commit Poet, Snarky Weather Bot, Pun Barista, Gym Bro
|
||||
|
||||
**Constraints:**
|
||||
- Under ~250 lines
|
||||
- No sidecar path references in `critical_actions`
|
||||
|
||||
---
|
||||
|
||||
## hasSidecar: true
|
||||
|
||||
**Structure:**
|
||||
```
|
||||
{agent-name}/
|
||||
├── {agent-name}.agent.yaml
|
||||
└── {agent-name}-sidecar/
|
||||
├── instructions.md
|
||||
├── memories.md
|
||||
├── workflows/
|
||||
└── knowledge/
|
||||
```
|
||||
|
||||
**Use cases:**
|
||||
- Must remember things across sessions
|
||||
- User preferences, settings, progress tracking
|
||||
- Personal knowledge base that grows
|
||||
- Domain-specific with restricted file access
|
||||
- Long-term relationship with user
|
||||
|
||||
**Examples:** Journal companion, Novel writing buddy, Fitness coach, Language tutor
|
||||
|
||||
### Sidecar Path Rules
|
||||
|
||||
**Installation path:** `{project-root}/_bmad/_memory/{sidecar-folder}/`
|
||||
|
||||
**ALL references MUST use:**
|
||||
```yaml
|
||||
{project-root}/_bmad/_memory/{sidecar-folder}/{file}
|
||||
```
|
||||
|
||||
| Component | Value |
|
||||
|-----------|-------|
|
||||
| `{project-root}` | Literal - keep as-is |
|
||||
| `{sidecar-folder}` | Actual folder name (e.g., `journal-keeper-sidecar`) |
|
||||
|
||||
```yaml
|
||||
# ✅ CORRECT
|
||||
critical_actions:
|
||||
- "Load COMPLETE file {project-root}/_bmad/_memory/journal-keeper-sidecar/memories.md"
|
||||
- "ONLY read/write files in {project-root}/_bmad/_memory/journal-keeper-sidecar/"
|
||||
|
||||
# ❌ WRONG
|
||||
critical_actions:
|
||||
- "Load ./journal-keeper-sidecar/memories.md"
|
||||
- "Load /Users/absolute/path/memories.md"
|
||||
```
|
||||
|
||||
### Required critical_actions for Sidecar
|
||||
|
||||
```yaml
|
||||
critical_actions:
|
||||
- 'Load COMPLETE file {project-root}/_bmad/_memory/{sidecar-folder}/memories.md'
|
||||
- 'Load COMPLETE file {project-root}/_bmad/_memory/{sidecar-folder}/instructions.md'
|
||||
- 'ONLY read/write files in {project-root}/_bmad/_memory/{sidecar-folder}/'
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Menu Actions
|
||||
|
||||
| Type | Format | Example |
|
||||
|------|--------|---------|
|
||||
| Prompt reference | `action: "#prompt-id"` | `action: "#write-commit"` |
|
||||
| Inline instruction | `action: "text"` | `action: "Update memories.md"` |
|
||||
|
||||
**Trigger format:** `XX or fuzzy match on command`
|
||||
**Description format:** `[XX] Description`
|
||||
|
||||
**Reserved codes:** MH, CH, PM, DA (auto-injected - do NOT use)
|
||||
|
||||
```yaml
|
||||
menu:
|
||||
- trigger: WC or fuzzy match on write
|
||||
action: "#write-commit"
|
||||
description: "[WC] Write commit message"
|
||||
|
||||
- trigger: SM or fuzzy match on save
|
||||
action: "Update {project-root}/_bmad/_memory/{sidecar-folder}/memories.md"
|
||||
description: "[SM] Save session"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Prompts
|
||||
|
||||
Reusable templates referenced via `#id`:
|
||||
|
||||
```yaml
|
||||
prompts:
|
||||
- id: write-commit
|
||||
content: |
|
||||
<instructions>What this does</instructions>
|
||||
<process>1. Step 2. Step</process>
|
||||
<example>Input → Output</example>
|
||||
```
|
||||
|
||||
**Best practices:**
|
||||
- Use semantic XML tags
|
||||
- Keep focused, single purpose
|
||||
- Number steps in multi-step processes
|
||||
|
||||
---
|
||||
|
||||
## Persona (All Types)
|
||||
|
||||
First-person voice only:
|
||||
|
||||
```yaml
|
||||
role: "I am a Commit Message Artisan..."
|
||||
identity: "I understand commit messages are documentation..."
|
||||
communication_style: "Poetic drama with flair..."
|
||||
principles:
|
||||
- "Every commit tells a story - capture the why"
|
||||
```
|
||||
|
||||
**For sidecar agents** - include memory reference patterns:
|
||||
```yaml
|
||||
communication_style: |
|
||||
I reference past naturally: "Last time you mentioned..." or "I've noticed patterns..."
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Domain Restriction Patterns
|
||||
|
||||
```yaml
|
||||
# Single folder (most common)
|
||||
- 'ONLY read/write files in {project-root}/_bmad/_memory/{sidecar-folder}/'
|
||||
|
||||
# Read-only knowledge + write memories
|
||||
- 'Load from {project-root}/_bmad/_memory/{sidecar-folder}/knowledge/ but NEVER modify'
|
||||
- 'Write ONLY to {project-root}/_bmad/_memory/{sidecar-folder}/memories.md'
|
||||
|
||||
# User folder access
|
||||
- 'ONLY access files in {user-folder}/journals/ - private space'
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Validation Checklist
|
||||
|
||||
### Both Types
|
||||
- [ ] Valid YAML syntax
|
||||
- [ ] Metadata: id, name, title, icon, module
|
||||
- [ ] Persona: role, identity, communication_style, principles
|
||||
- [ ] Unique prompt IDs
|
||||
- [ ] Menu triggers: `XX or fuzzy match on command`
|
||||
- [ ] Menu descriptions: `[XX] Description`
|
||||
- [ ] No reserved codes (MH, CH, PM, DA)
|
||||
- [ ] File named `{agent-name}.agent.yaml`
|
||||
|
||||
### hasSidecar: false
|
||||
- [ ] Under ~250 lines
|
||||
- [ ] No sidecar path references
|
||||
|
||||
### hasSidecar: true
|
||||
- [ ] ALL paths: `{project-root}/_bmad/_memory/{sidecar-folder}/...`
|
||||
- [ ] `{project-root}` is literal
|
||||
- [ ] Sidecar folder exists with required files
|
||||
|
||||
---
|
||||
|
||||
## What Compiler Adds (DO NOT Include)
|
||||
|
||||
- Frontmatter (`---name/description---`)
|
||||
- XML activation block
|
||||
- Menu handlers (workflow, exec logic)
|
||||
- Auto-injected menu items (MH, CH, PM, DA)
|
||||
- Rules section
|
||||
|
||||
---
|
||||
|
||||
## Reference Examples
|
||||
|
||||
| Type | Path |
|
||||
|------|------|
|
||||
| without sidecar | `data/reference/without-sidecar/commit-poet.agent.yaml` |
|
||||
| with sidecar | `data/reference/with-sidecar/journal-keeper/` |
|
||||
@@ -1,28 +1,10 @@
|
||||
# Agent Compilation: YAML Source → Final Agent
|
||||
# Agent Compilation: YAML → Compiled
|
||||
|
||||
> **For the LLM running this workflow:** This document explains what the compiler adds. When building agents, focus on the YAML structure defined here—do NOT add things the compiler handles automatically.
|
||||
>
|
||||
> **Example reference:** Compare `{workflow_path}/data/reference/module-examples/architect.agent.yaml` (source, 32 lines) with `architect.md` (compiled, 69 lines) to see what the compiler adds.
|
||||
**TL;DR:** Write minimal YAML → compiler adds frontmatter, activation XML, handlers, rules, MH/CH/PM/DA menu items.
|
||||
|
||||
---
|
||||
|
||||
## Quick Overview
|
||||
|
||||
You write: **YAML source file** (`agent-name.agent.yaml`)
|
||||
Compiler produces: **Markdown with XML** (`agent-name.md`) for LLM consumption
|
||||
|
||||
The compiler transforms your clean YAML into a fully functional agent by adding:
|
||||
- Frontmatter (name, description)
|
||||
- XML activation block with numbered steps
|
||||
- Menu handlers (workflow, exec, action)
|
||||
- Auto-injected menu items (MH, CH, PM, DA)
|
||||
- Rules section
|
||||
|
||||
---
|
||||
|
||||
## What YOU Provide (YAML Source)
|
||||
|
||||
Your YAML contains ONLY these sections:
|
||||
## YAML Structure (YOU WRITE)
|
||||
|
||||
```yaml
|
||||
agent:
|
||||
@@ -31,7 +13,7 @@ agent:
|
||||
name: "Persona Name"
|
||||
title: "Agent Title"
|
||||
icon: "🔧"
|
||||
module: "stand-alone" or "bmm" or "cis" or "bmgd"
|
||||
module: "stand-alone" | "bmm" | "cis" | "bmgd"
|
||||
|
||||
persona:
|
||||
role: "First-person role description"
|
||||
@@ -40,17 +22,17 @@ agent:
|
||||
principles:
|
||||
- "Core belief or methodology"
|
||||
|
||||
critical_actions: # Optional - for Expert agents only
|
||||
- "Load ./sidecar/memories.md"
|
||||
- "Load ./sidecar/instructions.md"
|
||||
- "ONLY access ./sidecar/"
|
||||
critical_actions: # Optional - ANY agent can have these
|
||||
- "Load COMPLETE file {project-root}/_bmad/_memory/journal-sidecar/memories.md"
|
||||
- "Load COMPLETE file {project-root}/_bmad/_memory/journal-sidecar/instructions.md"
|
||||
- "ONLY read/write files in {project-root}/_bmad/_memory/journal-sidecar/"
|
||||
|
||||
prompts: # Optional - for Simple/Expert agents
|
||||
prompts: # Optional - standalone agents
|
||||
- id: prompt-name
|
||||
content: |
|
||||
<instructions>Prompt content</instructions>
|
||||
|
||||
menu: # Your custom items only
|
||||
menu: # Custom items ONLY
|
||||
- trigger: XX or fuzzy match on command-name
|
||||
workflow: "path/to/workflow.yaml" # OR
|
||||
exec: "path/to/file.md" # OR
|
||||
@@ -60,36 +42,18 @@ agent:
|
||||
|
||||
---
|
||||
|
||||
## What COMPILER Adds (DO NOT Include)
|
||||
## What Compiler Adds (DO NOT WRITE)
|
||||
|
||||
### 1. Frontmatter
|
||||
```markdown
|
||||
---
|
||||
name: "architect"
|
||||
description: "Architect"
|
||||
---
|
||||
```
|
||||
**DO NOT add** frontmatter to your YAML.
|
||||
| Component | Source |
|
||||
|-----------|--------|
|
||||
| Frontmatter (`---name/description---`) | Auto-generated |
|
||||
| XML activation block with numbered steps | Auto-generated |
|
||||
| critical_actions → activation steps | Injected as steps 4, 5, 6... |
|
||||
| Menu handlers (workflow/exec/action) | Auto-detected |
|
||||
| Rules section | Auto-generated |
|
||||
| MH, CH, PM, DA menu items | Always injected |
|
||||
|
||||
### 2. XML Activation Block
|
||||
```xml
|
||||
<activation critical="MANDATORY">
|
||||
<step n="1">Load persona from this current agent file</step>
|
||||
<step n="2">Load config to get {user_name}, {communication_language}</step>
|
||||
<step n="3">Remember: user's name is {user_name}</step>
|
||||
<!-- YOUR critical_actions inserted here as steps 4, 5, etc. -->
|
||||
<step n="N">ALWAYS communicate in {communication_language}</step>
|
||||
<step n="N+1">Show greeting + numbered menu</step>
|
||||
<step n="N+2">STOP and WAIT for user input</step>
|
||||
<step n="N+3">Input resolution rules</step>
|
||||
<menu-handlers>...</menu-handlers>
|
||||
<rules>...</rules>
|
||||
</activation>
|
||||
```
|
||||
**DO NOT create** activation sections—the compiler builds them.
|
||||
|
||||
### 3. Auto-Injected Menu Items
|
||||
Every agent gets these 4 items automatically. **DO NOT add them to your YAML:**
|
||||
### Auto-Injected Menu Items (NEVER add)
|
||||
|
||||
| Code | Trigger | Description |
|
||||
|------|---------|-------------|
|
||||
@@ -98,55 +62,10 @@ Every agent gets these 4 items automatically. **DO NOT add them to your YAML:**
|
||||
| PM | party-mode | Start Party Mode |
|
||||
| DA | exit, leave, goodbye, dismiss agent | Dismiss Agent |
|
||||
|
||||
### 4. Menu Handlers
|
||||
```xml
|
||||
<handler type="workflow">
|
||||
When menu item has: workflow="path/to/workflow.yaml"
|
||||
→ Load workflow.xml and execute with workflow-config parameter
|
||||
</handler>
|
||||
<handler type="exec">
|
||||
When menu item has: exec="path/to/file.md"
|
||||
→ Load and execute the file at that path
|
||||
</handler>
|
||||
```
|
||||
**DO NOT add** handlers—the compiler detects and generates them.
|
||||
|
||||
---
|
||||
|
||||
## Before/After Example: Architect Agent
|
||||
## Compiled Output Structure
|
||||
|
||||
### Source: `architect.agent.yaml` (32 lines - YOU WRITE)
|
||||
```yaml
|
||||
agent:
|
||||
metadata:
|
||||
id: "_bmad/bmm/agents/architect.md"
|
||||
name: Winston
|
||||
title: Architect
|
||||
icon: 🏗️
|
||||
module: bmm
|
||||
|
||||
persona:
|
||||
role: System Architect + Technical Design Leader
|
||||
identity: Senior architect with expertise in distributed systems...
|
||||
communication_style: "Speaks in calm, pragmatic tones..."
|
||||
principles: |
|
||||
- User journeys drive technical decisions...
|
||||
|
||||
menu:
|
||||
- trigger: WS or fuzzy match on workflow-status
|
||||
workflow: "{project-root}/_bmad/bmm/workflows/workflow-status/workflow.yaml"
|
||||
description: "[WS] Get workflow status..."
|
||||
|
||||
- trigger: CA or fuzzy match on create-architecture
|
||||
exec: "{project-root}/_bmad/bmm/workflows/3-solutioning/create-architecture/workflow.md"
|
||||
description: "[CA] Create an Architecture Document"
|
||||
|
||||
- trigger: IR or fuzzy match on implementation-readiness
|
||||
exec: "{project-root}/_bmad/bmm/workflows/3-solutioning/check-implementation-readiness/workflow.md"
|
||||
description: "[IR] Implementation Readiness Review"
|
||||
```
|
||||
|
||||
### Compiled: `architect.md` (69 lines - COMPILER PRODUCES)
|
||||
```markdown
|
||||
---
|
||||
name: "architect"
|
||||
@@ -159,25 +78,26 @@ You must fully embody this agent's persona...
|
||||
<agent id="architect.agent.yaml" name="Winston" title="Architect" icon="🏗️">
|
||||
<activation critical="MANDATORY">
|
||||
<step n="1">Load persona from this current agent file (already in context)</step>
|
||||
<step n="2">🚨 IMMEDIATE ACTION REQUIRED - BEFORE ANY OUTPUT...</step>
|
||||
<step n="2">Load config to get {user_name}, {communication_language}</step>
|
||||
<step n="3">Remember: user's name is {user_name}</step>
|
||||
<step n="4">Show greeting using {user_name} from config...</step>
|
||||
<step n="5">STOP and WAIT for user input...</step>
|
||||
<step n="6">On user input: Number → execute menu item[n]...</step>
|
||||
<step n="7">When executing a menu item: Check menu-handlers section...</step>
|
||||
<!-- YOUR critical_actions inserted here as steps 4, 5, 6... -->
|
||||
<step n="N">ALWAYS communicate in {communication_language}</step>
|
||||
<step n="N+1">Show greeting + numbered menu</step>
|
||||
<step n="N+2">STOP and WAIT for user input</step>
|
||||
|
||||
<menu-handlers>
|
||||
<handlers>
|
||||
<handler type="workflow">...</handler>
|
||||
<handler type="exec">...</handler>
|
||||
<handler type="workflow">Load workflow.xml and execute with workflow-config parameter</handler>
|
||||
<handler type="exec">Load and execute the file at that path</handler>
|
||||
<handler type="action">Execute prompt with matching id from prompts section</handler>
|
||||
</handlers>
|
||||
</menu-handlers>
|
||||
|
||||
<rules>
|
||||
<r>ALWAYS communicate in {communication_language}</r>
|
||||
<r>Stay in character until exit selected</r>
|
||||
<r>Display Menu items as the item dictates...</r>
|
||||
<r>Load files ONLY when executing menu items...</r>
|
||||
<r>Display Menu items as the item dictates</r>
|
||||
<r>Load files ONLY when executing menu items</r>
|
||||
</rules>
|
||||
</activation>
|
||||
|
||||
@@ -188,86 +108,78 @@ You must fully embody this agent's persona...
|
||||
<principles>- User journeys drive technical decisions...</principles>
|
||||
</persona>
|
||||
|
||||
<prompts>
|
||||
<prompt id="prompt-name">
|
||||
<instructions>Prompt content</instructions>
|
||||
</prompt>
|
||||
</prompts>
|
||||
|
||||
<menu>
|
||||
<item cmd="MH or fuzzy match on menu or help">[MH] Redisplay Menu Help</item>
|
||||
<item cmd="CH or fuzzy match on chat">[CH] Chat with the Agent about anything</item>
|
||||
<item cmd="WS...">[WS] Get workflow status...</item> ← YOUR CUSTOM ITEMS
|
||||
<item cmd="CA...">[CA] Create an Architecture Document</item>
|
||||
<item cmd="IR...">[IR] Implementation Readiness Review</item>
|
||||
<item cmd="PM...">[PM] Start Party Mode</item>
|
||||
<item cmd="DA...">[DA] Dismiss Agent</item>
|
||||
<!-- YOUR CUSTOM ITEMS HERE -->
|
||||
<item cmd="PM or fuzzy match on party-mode">[PM] Start Party Mode</item>
|
||||
<item cmd="DA or fuzzy match on exit leave goodbye dismiss agent">[DA] Dismiss Agent</item>
|
||||
</menu>
|
||||
</agent>
|
||||
```
|
||||
**Key additions by compiler:** Frontmatter, activation block, handlers, rules, MH/CH/PM/DA menu items.
|
||||
|
||||
---
|
||||
|
||||
## DO NOT DO Checklist
|
||||
## critical_actions Injection
|
||||
|
||||
When building agent YAML, **DO NOT:**
|
||||
Your `critical_actions` become numbered activation steps.
|
||||
|
||||
- [ ] Add frontmatter (`---name/description---`) to YAML
|
||||
- [ ] Create activation blocks or XML sections
|
||||
- [ ] Add MH (menu/help) menu item
|
||||
- [ ] Add CH (chat) menu item
|
||||
- [ ] Add PM (party-mode) menu item
|
||||
- [ ] Add DA (dismiss/exit) menu item
|
||||
- [ ] Add menu handlers (workflow/exec logic)
|
||||
### With sidecar (hasSidecar: true):
|
||||
```yaml
|
||||
critical_actions:
|
||||
- "Load COMPLETE file {project-root}/_bmad/_memory/journal-sidecar/memories.md"
|
||||
- "Load COMPLETE file {project-root}/_bmad/_memory/journal-sidecar/instructions.md"
|
||||
- "ONLY read/write files in {project-root}/_bmad/_memory/journal-sidecar/"
|
||||
```
|
||||
→ Injected as steps 4, 5, 6
|
||||
|
||||
### Without sidecar (hasSidecar: false):
|
||||
```yaml
|
||||
critical_actions:
|
||||
- "Give user an inspirational quote before showing menu"
|
||||
```
|
||||
→ Injected as step 4
|
||||
|
||||
### No critical_actions:
|
||||
Activation jumps directly from step 3 to "ALWAYS communicate in {communication_language}"
|
||||
|
||||
---
|
||||
|
||||
## DO NOT / DO Checklist
|
||||
|
||||
**DO NOT:**
|
||||
- [ ] Add frontmatter
|
||||
- [ ] Create activation/XML blocks
|
||||
- [ ] Add MH/CH/PM/DA menu items
|
||||
- [ ] Add menu handlers
|
||||
- [ ] Add rules section
|
||||
- [ ] Duplicate any auto-injected content
|
||||
- [ ] Duplicate auto-injected content
|
||||
|
||||
**DO:**
|
||||
- [ ] Define metadata (id, name, title, icon, module)
|
||||
- [ ] Define persona (role, identity, communication_style, principles)
|
||||
- [ ] Define critical_actions (Expert agents only)
|
||||
- [ ] Define prompts with IDs (Simple/Expert agents only)
|
||||
- [ ] Define menu with your custom items only
|
||||
- [ ] Use proper trigger format: `XX or fuzzy match on command-name`
|
||||
- [ ] Use proper description format: `[XX] Description text`
|
||||
|
||||
---
|
||||
|
||||
## Expert Agent: critical_actions
|
||||
|
||||
For Expert agents with sidecars, your `critical_actions` become activation steps:
|
||||
|
||||
```yaml
|
||||
critical_actions:
|
||||
- "Load COMPLETE file ./agent-sidecar/memories.md"
|
||||
- "Load COMPLETE file ./agent-sidecar/instructions.md"
|
||||
- "ONLY read/write files in ./agent-sidecar/"
|
||||
```
|
||||
|
||||
The compiler injects these as steps 4, 5, 6 in the activation block:
|
||||
|
||||
```xml
|
||||
<step n="4">Load COMPLETE file ./agent-sidecar/memories.md</step>
|
||||
<step n="5">Load COMPLETE file ./agent-sidecar/instructions.md</step>
|
||||
<step n="6">ONLY read/write files in ./agent-sidecar/</step>
|
||||
<step n="7">ALWAYS communicate in {communication_language}</step>
|
||||
```
|
||||
- [ ] Define critical_actions (if activation behavior needed)
|
||||
- [ ] Define prompts with IDs (standalone agents)
|
||||
- [ ] Define menu with custom items only
|
||||
- [ ] Use format: `XX or fuzzy match on command-name`
|
||||
- [ ] Use description format: `[XX] Description text`
|
||||
|
||||
---
|
||||
|
||||
## Division of Responsibilities
|
||||
|
||||
| Aspect | YOU Provide (YAML) | COMPILER Adds |
|
||||
|--------|-------------------|---------------|
|
||||
| Aspect | YOU (YAML) | COMPILER |
|
||||
|--------|------------|----------|
|
||||
| Agent identity | metadata + persona | Wrapped in XML |
|
||||
| Memory/actions | critical_actions | Inserted as activation steps |
|
||||
| Prompts | prompts with IDs | Referenced by menu actions |
|
||||
| Menu items | Your custom commands only | + MH, CH, PM, DA (auto) |
|
||||
| Activation | — | Full XML block with handlers |
|
||||
| Rules | — | Standardized rules section |
|
||||
| Frontmatter | — | name/description header |
|
||||
|
||||
---
|
||||
|
||||
## Quick Reference for LLM
|
||||
|
||||
- **Focus on:** Clean YAML structure, persona definition, custom menu items
|
||||
- **Ignore:** What happens after compilation—that's the compiler's job
|
||||
- **Remember:** Every agent gets MH, CH, PM, DA automatically—don't add them
|
||||
- **Expert agents:** Use `critical_actions` for sidecar file loading
|
||||
- **Module agents:** Use `workflow:` or `exec:` references, not inline actions
|
||||
| Activation steps | critical_actions | Inserted as steps 4+ |
|
||||
| Prompts | prompts with IDs | Referenced by actions |
|
||||
| Menu items | Custom only | + MH, CH, PM, DA |
|
||||
| Activation block | — | Full XML with handlers |
|
||||
| Rules | — | Standardized section |
|
||||
| Frontmatter | — | name/description |
|
||||
@@ -1,93 +1,72 @@
|
||||
# Agent Menu Patterns
|
||||
|
||||
Technical reference for creating agent menu items in YAML.
|
||||
|
||||
---
|
||||
|
||||
## Menu Item Structure
|
||||
|
||||
Every menu item requires:
|
||||
## Menu Item Schema
|
||||
|
||||
```yaml
|
||||
- trigger: XX or fuzzy match on command-name
|
||||
[handler]: [value]
|
||||
description: '[XX] Display text here'
|
||||
description: '[XX] Display text'
|
||||
data: [optional] # Pass file to workflow
|
||||
```
|
||||
|
||||
**Required fields:**
|
||||
- `trigger` - Format: `XX or fuzzy match on command-name` (XX = 2-letter code, command-name = what user says)
|
||||
- `description` - Must start with `[XX]` code
|
||||
- Handler - Either `action` (Simple/Expert) or `exec` (Module)
|
||||
| Field | Required | Validation |
|
||||
|-------|----------|------------|
|
||||
| `trigger` | Yes | Format: `XX or fuzzy match on command-name` |
|
||||
| `description` | Yes | Must start with `[XX]` code |
|
||||
| handler | Yes | `action` (Agent) or `exec` (Module) |
|
||||
| `data` | No | File path for workflow input |
|
||||
|
||||
**Reserved codes (do NOT use):** MH, CH, PM, DA (auto-injected by compiler)
|
||||
**Reserved codes (DO NOT USE):** MH, CH, PM, DA (auto-injected)
|
||||
|
||||
---
|
||||
|
||||
## Handler Types
|
||||
## Handlers
|
||||
|
||||
### Action Handler
|
||||
|
||||
For Simple/Expert agents with self-contained operations.
|
||||
| Handler | Use Case | Syntax |
|
||||
|---------|----------|--------|
|
||||
| `action` | Agent self-contained operations | `action: '#prompt-id'` or `action: 'inline text'` |
|
||||
| `exec` | Module external workflows | `exec: '{project-root}/path/to/workflow.md'` |
|
||||
|
||||
```yaml
|
||||
# Reference prompt by ID
|
||||
# Action - reference prompt
|
||||
- trigger: WC or fuzzy match on write-commit
|
||||
action: '#write-commit'
|
||||
description: '[WC] Write commit message'
|
||||
|
||||
# Direct inline instruction
|
||||
# Action - inline
|
||||
- trigger: QC or fuzzy match on quick-commit
|
||||
action: 'Generate commit message from diff'
|
||||
description: '[QC] Quick commit from diff'
|
||||
```
|
||||
|
||||
**When to use:** Simple/Expert agents. Use `#id` for complex multi-step prompts, inline text for simple operations.
|
||||
|
||||
### Workflow Handler
|
||||
|
||||
For module agents referencing external workflow files.
|
||||
|
||||
```yaml
|
||||
# Exec - workflow
|
||||
- trigger: CP or fuzzy match on create-prd
|
||||
exec: '{project-root}/_bmad/bmm/workflows/create-prd/workflow.md'
|
||||
description: '[CP] Create Product Requirements Document'
|
||||
description: '[CP] Create PRD'
|
||||
|
||||
- trigger: GB or fuzzy match on brainstorm
|
||||
exec: '{project-root}/_bmad/core/workflows/brainstorming/workflow.md'
|
||||
description: '[GB] Guided brainstorming session'
|
||||
|
||||
# Planned but unimplemented
|
||||
# Exec - unimplemented
|
||||
- trigger: FF or fuzzy match on future-feature
|
||||
exec: 'todo'
|
||||
description: '[FF] Coming soon'
|
||||
```
|
||||
|
||||
**When to use:** Module agents, multi-step workflows, complex processes. Use `exec: 'todo'` for unimplemented features.
|
||||
---
|
||||
|
||||
### Data Parameter (Optional)
|
||||
## Data Parameter
|
||||
|
||||
Add to ANY handler to pass files to the workflow/action.
|
||||
Attach to ANY handler to pass input files.
|
||||
|
||||
```yaml
|
||||
- trigger: TS or fuzzy match on team-standup
|
||||
exec: '{project-root}/_bmad/bmm/tasks/team-standup.md'
|
||||
data: '{project-root}/_bmad/_config/agent-manifest.csv'
|
||||
description: '[TS] Run team standup'
|
||||
|
||||
- trigger: AM or fuzzy match on analyze-metrics
|
||||
action: 'Analyze these metrics for trends'
|
||||
data: '{project-root}/_data/metrics.json'
|
||||
description: '[AM] Analyze metrics'
|
||||
```
|
||||
|
||||
**When to use:** Workflow needs input file, action processes external data.
|
||||
|
||||
---
|
||||
|
||||
## Prompts Section
|
||||
|
||||
For Simple/Expert agents, define reusable prompts referenced by `action: '#id'`.
|
||||
For `action: '#id'` references in Agent menus.
|
||||
|
||||
```yaml
|
||||
prompts:
|
||||
@@ -108,81 +87,65 @@ menu:
|
||||
|
||||
## Path Variables
|
||||
|
||||
**Always use variables, never hardcoded paths:**
|
||||
| Variable | Expands To |
|
||||
|----------|------------|
|
||||
| `{project-root}` | Project root directory |
|
||||
| `{output_folder}` | Document output location |
|
||||
| `{user_name}` | User's name from config |
|
||||
| `{communication_language}` | Language preference |
|
||||
|
||||
```yaml
|
||||
# ✅ CORRECT
|
||||
exec: '{project-root}/_bmad/core/workflows/brainstorming/workflow.md'
|
||||
data: '{project-root}/_data/metrics.csv'
|
||||
|
||||
# ❌ WRONG
|
||||
exec: '../../../core/workflows/brainstorming/workflow.md'
|
||||
```
|
||||
|
||||
**Available variables:**
|
||||
- `{project-root}` - Project root directory
|
||||
- `{output_folder}` - Document output location
|
||||
- `{user_name}` - User's name from config
|
||||
- `{communication_language}` - Language preference
|
||||
|
||||
**Expert Agent sidecar paths:**
|
||||
```yaml
|
||||
# Agent YAML referencing sidecar files
|
||||
action: 'Update {project-root}/_bmad/_memory/journal-keeper-sidecar/memories.md with insights'
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Creation Thought Process
|
||||
## Agent Types
|
||||
|
||||
When creating menu items, follow this sequence:
|
||||
| Type | hasSidecar | Additional Fields |
|
||||
|------|------------|-------------------|
|
||||
| Simple | false | `prompts`, `menu` |
|
||||
| Expert | true | `prompts`, `menu`, `critical_actions` |
|
||||
| Module | true | `menu` only (external workflows) |
|
||||
|
||||
1. **User capability** → "Check code for issues"
|
||||
2. **Choose code** → `LC` (Lint Code)
|
||||
3. **Write trigger** → `LC or fuzzy match on lint-code`
|
||||
4. **Choose handler** → `action` (inline is simple enough)
|
||||
5. **Write description** → `[LC] Lint code for issues`
|
||||
|
||||
Result:
|
||||
**Expert Agent sidecar path pattern:**
|
||||
```yaml
|
||||
- trigger: LC or fuzzy match on lint-code
|
||||
action: 'Check code for common issues and anti-patterns'
|
||||
description: '[LC] Lint code for issues'
|
||||
critical_actions:
|
||||
- 'Load COMPLETE file {project-root}/_bmad/_memory/{sidecar-folder}/memories.md'
|
||||
- 'ONLY read/write files in {project-root}/_bmad/_memory/{sidecar-folder}/'
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Complete Examples
|
||||
|
||||
### Simple Agent Menu
|
||||
### Simple Agent (hasSidecar: false)
|
||||
|
||||
```yaml
|
||||
prompts:
|
||||
- id: format-code
|
||||
content: |
|
||||
<instructions>Format code to style guidelines</instructions>
|
||||
<process>1. Indentation 2. Spacing 3. Naming</process>
|
||||
|
||||
menu:
|
||||
- trigger: FC or fuzzy match on format-code
|
||||
action: '#format-code'
|
||||
description: '[FC] Format code to style guidelines'
|
||||
description: '[FC] Format code'
|
||||
|
||||
- trigger: LC or fuzzy match on lint-code
|
||||
action: 'Check code for common issues and anti-patterns'
|
||||
description: '[LC] Lint code for issues'
|
||||
|
||||
- trigger: SI or fuzzy match on suggest-improvements
|
||||
action: 'Suggest improvements following project-context.md guidelines'
|
||||
description: '[SI] Suggest improvements'
|
||||
action: 'Check code for issues'
|
||||
description: '[LC] Lint code'
|
||||
```
|
||||
|
||||
### Expert Agent Menu
|
||||
### Expert Agent (hasSidecar: true)
|
||||
|
||||
```yaml
|
||||
critical_actions:
|
||||
- 'Load COMPLETE file {project-root}/_bmad/_memory/journal-keeper-sidecar/memories.md'
|
||||
- 'Load COMPLETE file {project-root}/_bmad/_memory/journal-keeper-sidecar/instructions.md'
|
||||
- 'ONLY read/write files in {project-root}/_bmad/_memory/journal-keeper-sidecar/'
|
||||
|
||||
prompts:
|
||||
@@ -195,39 +158,32 @@ menu:
|
||||
action: '#guided-entry'
|
||||
description: '[WE] Write journal entry'
|
||||
|
||||
- trigger: QC or fuzzy match on quick-capture
|
||||
action: 'Save entry to {project-root}/_bmad/_memory/journal-keeper-sidecar/entries/entry-{date}.md'
|
||||
description: '[QC] Quick capture'
|
||||
|
||||
- trigger: SM or fuzzy match on save-memory
|
||||
action: 'Update {project-root}/_bmad/_memory/journal-keeper-sidecar/memories.md with insights'
|
||||
action: 'Update {project-root}/_bmad/_memory/journal-keeper-sidecar/memories.md'
|
||||
description: '[SM] Save session'
|
||||
```
|
||||
|
||||
### Module Agent Menu
|
||||
### Module Agent (hasSidecar: true)
|
||||
|
||||
```yaml
|
||||
menu:
|
||||
- trigger: WI or fuzzy match on workflow-init
|
||||
exec: '{project-root}/_bmad/bmm/workflows/workflow-status/workflow.md'
|
||||
description: '[WI] Initialize workflow path'
|
||||
description: '[WI] Initialize workflow'
|
||||
|
||||
- trigger: BS or fuzzy match on brainstorm
|
||||
exec: '{project-root}/_bmad/core/workflows/brainstorming/workflow.md'
|
||||
description: '[BS] Guided brainstorming [K,T,A,B,C]'
|
||||
|
||||
- trigger: CP or fuzzy match on create-prd
|
||||
exec: '{project-root}/_bmad/bmm/workflows/create-prd/workflow.md'
|
||||
description: '[CP] Create PRD'
|
||||
description: '[BS] Guided brainstorming'
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Key Patterns to Remember
|
||||
## Validation Rules
|
||||
|
||||
1. **Triggers always:** `XX or fuzzy match on command-name`
|
||||
2. **Descriptions always:** `[XX] Display text`
|
||||
3. **Reserved codes:** MH, CH, PM, DA (never use)
|
||||
4. **Codes must be:** Unique within each agent
|
||||
5. **Paths always:** `{project-root}` variable, never relative
|
||||
6. **Expert sidecars:** `{project-root}/_bmad/_memory/{sidecar-folder}/`
|
||||
1. **Triggers:** `XX or fuzzy match on command-name` format required
|
||||
2. **Descriptions:** Must start with `[XX]` code matching trigger
|
||||
3. **Reserved codes:** MH, CH, PM, DA never valid in user menus
|
||||
4. **Code uniqueness:** Required within each agent
|
||||
5. **Paths:** Always use `{project-root}`, never relative paths
|
||||
6. **Handler choice:** `action` for Agents, `exec` for Modules
|
||||
7. **Sidecar paths:** `{project-root}/_bmad/_memory/{sidecar-folder}/`
|
||||
@@ -1,73 +1,38 @@
|
||||
# Agent Metadata Properties
|
||||
|
||||
Core identification and classification properties for all agents.
|
||||
| Property | Format | Rules |
|
||||
|----------|--------|-------|
|
||||
| `id` | `_bmad/agents/{agent-name}/{agent-name}.md` | Compiled output path; must match filename |
|
||||
| `name` | "First Last" or "Name Title" | Persona's identity (NOT title/filename) |
|
||||
| `title` | "Role Name" (kebab-cased to filename) | Determines filename: `title` → `{title}.agent.yaml` |
|
||||
| `icon` | Single emoji only | One emoji exactly |
|
||||
| `module` | `stand-alone`, `bmm`, `cis`, `bmgd`, or custom | Lowercase, hyphenated for `stand-alone` |
|
||||
| `hasSidecar` | `true` or `false` | `true` = expects `{agent-name}-sidecar/` folder |
|
||||
|
||||
---
|
||||
|
||||
## Property Reference
|
||||
## Field Rules
|
||||
|
||||
| Property | Purpose | Format |
|
||||
| ------------ | ------------------------- | ---------------------------------------------- |
|
||||
| `id` | Compiled output path | `_bmad/agents/{agent-name}/{agent-name}.md` |
|
||||
| `name` | Persona's name | "First Last" or "Name Title" |
|
||||
| `title` | Professional role | "Code Review Specialist" |
|
||||
| `icon` | Visual identifier | Single emoji only |
|
||||
| `module` | Team/ecosystem membership | `stand-alone`, `bmm`, `cis`, `bmgd`, or custom |
|
||||
| `hasSidecar` | Sidecar folder exists | `true` or `false` (Expert = true) |
|
||||
|
||||
---
|
||||
|
||||
## id Property
|
||||
|
||||
The compiled output path after build.
|
||||
|
||||
**Format:** `_bmad/agents/{agent-name}/{agent-name}.md`
|
||||
|
||||
**Examples:**
|
||||
### `id`
|
||||
```yaml
|
||||
id: _bmad/agents/commit-poet/commit-poet.md
|
||||
id: _bmad/agents/journal-keeper/journal-keeper.md
|
||||
id: _bmad/agents/security-engineer/security-engineer.md
|
||||
```
|
||||
- Unique identifier for future lookup
|
||||
- Conventionally matches filename pattern
|
||||
|
||||
**Note:** The `id` is a unique identifier for potential future lookup if many compiled agents are merged into a single file. Conventionally matches the agent's filename pattern.
|
||||
|
||||
---
|
||||
|
||||
## name Property
|
||||
|
||||
The persona's identity - what the agent is called.
|
||||
|
||||
**Format:** Human name or descriptive name
|
||||
|
||||
### `name`
|
||||
```yaml
|
||||
# ✅ CORRECT
|
||||
name: 'Inkwell Von Comitizen' # peron name of commit-author title agent
|
||||
name: 'Dr. Demento' # person name for a joke writer agent
|
||||
name: 'Clarity' # person name for a guided thought coach agent
|
||||
name: 'Inkwell Von Comitizen'
|
||||
name: 'Dr. Demento'
|
||||
name: 'Clarity'
|
||||
|
||||
# ❌ WRONG
|
||||
name: 'commit-poet' # That's the filename
|
||||
name: 'commit-poet' # That's the filename
|
||||
name: 'Code Review Specialist' # That's the title
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## title Property
|
||||
|
||||
Professional role identifier.
|
||||
|
||||
**Format:** Professional title or role name
|
||||
|
||||
**Important:** The `title` determines the agent's filename:
|
||||
- `title: 'Commit Message Artisan'` → `commit-message-artisan.agent.yaml`
|
||||
- `title: 'Strategic Business Analyst'` → `strategic-business-analyst.agent.yaml`
|
||||
- `title: 'Code Review Specialist'` → `code-review-specialist.agent.yaml`
|
||||
|
||||
The `id` and filename are derived from the `title` (kebab-cased).
|
||||
|
||||
**Difference from role:** `title` is the short identifier (filename), `role` is 1-2 sentences expanding on what the agent does.
|
||||
|
||||
### `title`
|
||||
```yaml
|
||||
# ✅ CORRECT
|
||||
title: 'Commit Message Artisan'
|
||||
@@ -76,17 +41,12 @@ title: 'Code Review Specialist'
|
||||
|
||||
# ❌ WRONG
|
||||
title: 'Inkwell Von Comitizen' # That's the name
|
||||
title: 'Writes git commits' # Full sentence - not an identifying functional title
|
||||
title: 'Writes git commits' # Full sentence, not functional title
|
||||
```
|
||||
- Derives filename via kebab-case
|
||||
- `role` field (separate) expands on what agent does in 1-2 sentences
|
||||
|
||||
---
|
||||
|
||||
## icon Property
|
||||
|
||||
Single emoji representing the agent's personality/function.
|
||||
|
||||
**Format:** Exactly one emoji
|
||||
|
||||
### `icon`
|
||||
```yaml
|
||||
# ✅ CORRECT
|
||||
icon: '🔧'
|
||||
@@ -94,115 +54,80 @@ icon: '🧙♂️'
|
||||
icon: '📜'
|
||||
|
||||
# ❌ WRONG
|
||||
icon: '🔧📜' # Multiple emojis
|
||||
icon: '🔧📜' # Multiple emojis
|
||||
icon: 'wrench' # Text, not emoji
|
||||
icon: '' # Empty
|
||||
icon: '' # Empty
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## module Property
|
||||
|
||||
Which module or ecosystem this agent belongs to.
|
||||
|
||||
**Valid Values:**
|
||||
|
||||
| Value | Meaning |
|
||||
| ------------- | --------------------------------------- |
|
||||
| `stand-alone` | Independent agent, not part of a module |
|
||||
| `bmm` | Business Management Module |
|
||||
| `cis` | Continuous Innovation System |
|
||||
| `bmgd` | BMAD Game Development |
|
||||
| `{custom}` | Any custom module code |
|
||||
### `module`
|
||||
| Value | Meaning |
|
||||
|-------|---------|
|
||||
| `stand-alone` | Independent agent |
|
||||
| `bmm` | Business Management Module |
|
||||
| `cis` | Continuous Innovation System |
|
||||
| `bmgd` | BMAD Game Development |
|
||||
| `{custom}` | Any custom module code |
|
||||
|
||||
```yaml
|
||||
# ✅ CORRECT
|
||||
module: stand-alone
|
||||
module: bmm
|
||||
module: cis
|
||||
|
||||
# ❌ WRONG
|
||||
module: standalone # Missing hyphen
|
||||
module: 'BMM' # Uppercase
|
||||
module: standalone # Missing hyphen
|
||||
module: 'BMM' # Uppercase
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## hasSidecar Property
|
||||
|
||||
Whether this agent has a sidecar folder with additional files.
|
||||
|
||||
**Format:** Boolean (`true` or `false`)
|
||||
|
||||
| Agent Type | hasSidecar |
|
||||
| ---------- | -------------------- |
|
||||
| Simple | `false` |
|
||||
| Expert | `true` |
|
||||
| Module | depends on structure |
|
||||
|
||||
### `hasSidecar`
|
||||
```yaml
|
||||
# Simple Agent
|
||||
hasSidecar: false
|
||||
|
||||
# Expert Agent
|
||||
# Expert Agent (has sidecar folder)
|
||||
hasSidecar: true
|
||||
```
|
||||
|
||||
**Note:** If `hasSidecar: true`, the compiler expects a `{agent-name}-sidecar/` folder.
|
||||
- If `true`: compiler expects `{agent-name}-sidecar/` folder
|
||||
|
||||
---
|
||||
|
||||
## Name Confusion Checklist
|
||||
## Name Confusion Prevention
|
||||
|
||||
Use this to avoid mixing up the "name" properties:
|
||||
|
||||
| Question | Answer |
|
||||
| -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| What's the file called? | Derived from `title`: `"Commit Message Artisan"` → `commit-message-artisan.agent.yaml` |
|
||||
| What's the persona called? | `name` - "Inkwell Von Comitizen" (who the agent is) |
|
||||
| What's their job title? | `title` - "Commit Message Artisan" (determines filename) |
|
||||
| What do they do? | `role` - 1-2 sentences expanding on the title |
|
||||
| What's the unique key? | `id` - `_bmad/agents/commit-message-artisan/commit-message-artisan.md` (future lookup) |
|
||||
| Question | Answer |
|
||||
|----------|--------|
|
||||
| What's the file called? | Derived from `title`: `"Commit Message Artisan"` → `commit-message-artisan.agent.yaml` |
|
||||
| What's the persona called? | `name` — "Inkwell Von Comitizen" |
|
||||
| What's their job title? | `title` — "Commit Message Artisan" |
|
||||
| What do they do? | `role` — 1-2 sentences expanding on title |
|
||||
| What's the unique key? | `id` — `_bmad/agents/{name}/{name}.md` |
|
||||
|
||||
---
|
||||
|
||||
## Common Issues
|
||||
## Common Anti-Patterns
|
||||
|
||||
### Issue: name = title
|
||||
|
||||
**Wrong:**
|
||||
```yaml
|
||||
# ❌ name = title (duplicate)
|
||||
name: 'Commit Message Artisan'
|
||||
title: 'Commit Message Artisan'
|
||||
```
|
||||
|
||||
**Fix:**
|
||||
```yaml
|
||||
# ✅ Fix: separate identity from role
|
||||
name: 'Inkwell Von Comitizen'
|
||||
title: 'Commit Message Artisan'
|
||||
```
|
||||
|
||||
### Issue: id path mismatch
|
||||
|
||||
**Wrong:** Agent file is `my-agent.agent.yaml` but:
|
||||
```yaml
|
||||
# ❌ id path mismatch
|
||||
# File: my-agent.agent.yaml
|
||||
id: _bmad/agents/different-agent/different-agent.md
|
||||
```
|
||||
|
||||
**Fix:** The `id` must match the filename:
|
||||
```yaml
|
||||
# ✅ Fix: match filename
|
||||
id: _bmad/agents/my-agent/my-agent.md
|
||||
```
|
||||
|
||||
### Issue: Wrong module format
|
||||
|
||||
**Wrong:**
|
||||
```yaml
|
||||
# ❌ Wrong module format
|
||||
module: Standalone
|
||||
module: STAND_ALONE
|
||||
```
|
||||
|
||||
**Fix:**
|
||||
```yaml
|
||||
module: stand-alone # lowercase, hyphenated
|
||||
# ✅ Fix: lowercase, hyphenated
|
||||
module: stand-alone
|
||||
```
|
||||
@@ -0,0 +1,111 @@
|
||||
# Agent Validation
|
||||
|
||||
## Common (All Agents)
|
||||
|
||||
### YAML Structure
|
||||
- [ ] Parses without errors
|
||||
- [ ] `metadata`: `id`, `name`, `title`, `icon`, `module`, `hasSidecar`
|
||||
- [ ] `hasSidecar`: `true`|`false`
|
||||
- [ ] `module`: `stand-alone`|`bmm`|`cis`|`bmgd`|...
|
||||
- [ ] `persona`: `role`, `identity`, `communication_style`, `principles`
|
||||
- [ ] `menu`: ≥1 item
|
||||
- [ ] Filename: `{name}.agent.yaml` (lowercase, hyphenated)
|
||||
|
||||
### Persona Fields
|
||||
|
||||
| Field | Contains | Does NOT Contain |
|
||||
|-------|----------|------------------|
|
||||
| `role` | Knowledge/skills/capabilities | Background, experience, "who" |
|
||||
| `identity` | Background/experience/context | Skills, "what" |
|
||||
| `communication_style` | Tone/voice/mannerisms (1-2 sentences) | "ensures", "expert", "believes", "who does X" |
|
||||
| `principles` | Operating philosophy, behavioral guidelines | Verbal patterns, "how they talk" |
|
||||
|
||||
### Menu Items
|
||||
- [ ] `trigger`: `XX or fuzzy match on command-name` (XX = 2-letter code, unique)
|
||||
- [ ] No reserved codes: `MH`, `CH`, `PM`, `DA` (auto-injected)
|
||||
- [ ] `description`: Starts with `[XX]`, code matches trigger
|
||||
- [ ] `action`: `#prompt-id` (exists) or inline text
|
||||
|
||||
### Prompts (if present)
|
||||
- [ ] Each has `id`, `content`
|
||||
- [ ] IDs unique within agent
|
||||
- [ ] Uses semantic XML: `<instructions>`, `<process>`, etc.
|
||||
|
||||
### Quality
|
||||
- [ ] No broken references
|
||||
- [ ] Indentation consistent
|
||||
- [ ] Purpose clear from persona
|
||||
- [ ] Name/title descriptive, icon appropriate
|
||||
|
||||
---
|
||||
|
||||
## hasSidecar: false
|
||||
|
||||
### Structure
|
||||
- [ ] Single `.agent.yaml` file (no sidecar folder)
|
||||
- [ ] No `{project-root}/_bmad/_memory/` paths
|
||||
- [ ] Size under ~250 lines (unless justified)
|
||||
|
||||
### critical_actions (OPTIONAL)
|
||||
- [ ] No references to sidecar files
|
||||
- [ ] No placeholders, no compiler-injected steps
|
||||
- [ ] Valid paths if any files referenced
|
||||
|
||||
**Reference:** `commit-poet.agent.yaml`
|
||||
|
||||
---
|
||||
|
||||
## hasSidecar: true
|
||||
|
||||
### Structure
|
||||
- [ ] `sidecar-folder` specified in metadata
|
||||
- [ ] Folder exists: `{name}-sidecar/`
|
||||
- [ ] Sidecar contains: `instructions.md`, `memories.md` (recommended)
|
||||
|
||||
### critical_actions (MANDATORY)
|
||||
```yaml
|
||||
critical_actions:
|
||||
- 'Load COMPLETE file {project-root}/_bmad/_memory/{sidecar-folder}/memories.md'
|
||||
- 'Load COMPLETE file {project-root}/_bmad/_memory/{sidecar-folder}/instructions.md'
|
||||
- 'ONLY read/write files in {project-root}/_bmad/_memory/{sidecar-folder}/'
|
||||
```
|
||||
- [ ] Exists with ≥3 actions
|
||||
- [ ] Loads memories, loads instructions, restricts file access
|
||||
- [ ] No placeholders, no compiler-injected steps
|
||||
|
||||
### Path Format (CRITICAL)
|
||||
- [ ] ALL sidecar paths: `{project-root}/_bmad/_memory/{sidecar-folder}/...`
|
||||
- [ ] `{project-root}` is literal (not replaced)
|
||||
- [ ] `{sidecar-folder}` = actual folder name
|
||||
- [ ] No `./` or `/Users/` paths <!-- validate-file-refs:ignore -->
|
||||
|
||||
### Persona Addition
|
||||
- [ ] `communication_style` includes memory reference patterns
|
||||
- [ ] Natural: "Last time you mentioned..." or "I've noticed patterns..."
|
||||
|
||||
### Menu Actions
|
||||
- [ ] Sidecar references use correct path format
|
||||
- [ ] Update actions are complete
|
||||
|
||||
**Reference:** `journal-keeper/`
|
||||
|
||||
---
|
||||
|
||||
## Compiler-Injected (Skip Validation)
|
||||
- Frontmatter (`---name/description---`)
|
||||
- XML activation block
|
||||
- Menu items: `MH`, `CH`, `PM`, `DA`
|
||||
- Rules section
|
||||
|
||||
---
|
||||
|
||||
## Common Fixes
|
||||
|
||||
| Issue | Fix |
|
||||
|-------|-----|
|
||||
| Behaviors in `communication_style` | Move to `identity` or `principles` |
|
||||
| `trigger: analyze` | `trigger: AN or fuzzy match on analyze` |
|
||||
| `description: 'Analyze code'` | `description: '[AC] Analyze code'` |
|
||||
| `./sidecar/memories.md` | `{project-root}/_bmad/_memory/sidecar/memories.md` |
|
||||
| Missing `critical_actions` (hasSidecar: true) | Add load memories, load instructions, restrict access |
|
||||
| No memory references (hasSidecar: true) | Add to `communication_style`: "Last time you mentioned..." |
|
||||
@@ -1,146 +1,96 @@
|
||||
# Agent Creation Brainstorming Context
|
||||
## Session Focus
|
||||
# Agent Brainstorming Context
|
||||
|
||||
You're brainstorming the **essence** of a BMAD agent - the living personality AND the utility it provides. Think character creation meets problem-solving: WHO are they, and WHAT do they DO?
|
||||
## Mission
|
||||
Create an agent so vivid and useful that users seek them out by name.
|
||||
|
||||
**Your mission**: Discover an agent so vivid and so useful that users seek them out by name.
|
||||
## Four Pillars
|
||||
|
||||
## The Four Discovery Pillars
|
||||
### 1. Identity (WHO)
|
||||
- **Name** - Memorable, rolls off tongue
|
||||
- **Background** - What shaped their expertise
|
||||
- **Personality** - What lights them up, what frustrates
|
||||
- **Signature** - Catchphrase, verbal tic, recognizable trait
|
||||
|
||||
### 1. WHO ARE THEY? (Identity)
|
||||
### 2. Voice (HOW)
|
||||
|
||||
- **Name** - Does it roll off the tongue? Would users remember it?
|
||||
- **Background** - What shaped their expertise? Why do they care?
|
||||
- **Personality** - What makes their eyes light up? What frustrates them?
|
||||
- **Signature** - Catchphrase? Verbal tic? Recognizable trait?
|
||||
| Category | Examples |
|
||||
|----------|----------|
|
||||
| Adventurous | Pulp heroes, noir, pirates, dungeon masters |
|
||||
| Analytical | Data scientists, forensic investigators, systems thinkers |
|
||||
| Creative | Mad scientists, artist visionaries, jazz improvisers |
|
||||
| Devoted | Guardians, loyal champions, fierce protectors |
|
||||
| Dramatic | Shakespearean actors, opera singers, theater directors |
|
||||
| Educational | Patient teachers, Socratic guides, coaches |
|
||||
| Entertaining | Game show hosts, comedians, improv performers |
|
||||
| Inspirational | Life coaches, mountain guides, Olympic trainers |
|
||||
| Mystical | Zen masters, oracles, cryptic sages |
|
||||
| Professional | Executive consultants, formal butlers |
|
||||
| Quirky | Cooking metaphors, nature documentaries, conspiracy vibes |
|
||||
| Retro | 80s action heroes, 1950s announcers, disco groovers |
|
||||
| Warm | Southern hospitality, nurturing grandmothers, camp counselors |
|
||||
|
||||
### 2. HOW DO THEY COMMUNICATE? (Voice)
|
||||
**Voice Test**: How would they say "Let's tackle this challenge"?
|
||||
|
||||
**13 Style Categories:**
|
||||
|
||||
- **Adventurous** - Pulp heroes, noir detectives, pirates, dungeon masters
|
||||
- **Analytical** - Data scientists, forensic investigators, systems thinkers
|
||||
- **Creative** - Mad scientists, artist visionaries, jazz improvisers
|
||||
- **Devoted** - Overprotective guardians, loyal champions, fierce protectors
|
||||
- **Dramatic** - Shakespearean actors, opera singers, theater directors
|
||||
- **Educational** - Patient teachers, Socratic guides, sports coaches
|
||||
- **Entertaining** - Game show hosts, comedians, improv performers
|
||||
- **Inspirational** - Life coaches, mountain guides, Olympic trainers
|
||||
- **Mystical** - Zen masters, oracles, cryptic sages
|
||||
- **Professional** - Executive consultants, direct advisors, formal butlers
|
||||
- **Quirky** - Cooking metaphors, nature documentaries, conspiracy vibes
|
||||
- **Retro** - 80s action heroes, 1950s announcers, disco groovers
|
||||
- **Warm** - Southern hospitality, nurturing grandmothers, camp counselors
|
||||
|
||||
**Voice Test**: Imagine them saying "Let's tackle this challenge." How would THEY phrase it?
|
||||
|
||||
### 3. WHAT DO THEY DO? (Purpose & Functions)
|
||||
|
||||
**The Core Problem**
|
||||
### 3. Purpose (WHAT)
|
||||
|
||||
**Core Questions**
|
||||
- What pain point do they eliminate?
|
||||
- What task transforms from grueling to effortless?
|
||||
- What impossible becomes inevitable with them?
|
||||
|
||||
**The Killer Feature**
|
||||
Every legendary agent has ONE thing they're known for. What's theirs?
|
||||
|
||||
**The Command Menu**
|
||||
User types `*` and sees their options. Brainstorm 3-10 actions:
|
||||
- What transforms from grueling to effortless?
|
||||
- What's their ONE killer feature?
|
||||
|
||||
**Command Brainstorm** (3-10 actions)
|
||||
- What makes users sigh with relief?
|
||||
- What capabilities complement each other?
|
||||
- What's the "I didn't know I needed this" command?
|
||||
|
||||
**Function Categories to Consider:**
|
||||
**Function Types**
|
||||
- Creation (generate, write, build)
|
||||
- Analysis (research, evaluate, diagnose)
|
||||
- Review (validate, check, critique)
|
||||
- Orchestration (coordinate workflows)
|
||||
- Query (find, search, discover)
|
||||
- Transform (convert, refactor, optimize)
|
||||
|
||||
- **Creation** - Generate, write, produce, build
|
||||
- **Analysis** - Research, evaluate, diagnose, insights
|
||||
- **Review** - Validate, check, quality assurance, critique
|
||||
- **Orchestration** - Coordinate workflows, manage processes
|
||||
- **Query** - Find, search, retrieve, discover
|
||||
- **Transform** - Convert, refactor, optimize, clean
|
||||
### 4. Architecture (TYPE)
|
||||
|
||||
### 4. WHAT TYPE? (Architecture)
|
||||
**Single Agent Type** with `hasSidecar` boolean:
|
||||
|
||||
**Simple Agent** - The Specialist
|
||||
| Has Sidecar | Description |
|
||||
|-------------|-------------|
|
||||
| `false` | Self-contained specialist, lightning fast, pure utility with personality |
|
||||
| `true` | Deep domain knowledge, personal memory, specialized expertise, can coordinate with other agents |
|
||||
|
||||
> "I do ONE thing extraordinarily well."
|
||||
|
||||
- Self-contained, lightning fast, pure utility with personality
|
||||
|
||||
**Expert Agent** - The Domain Master
|
||||
|
||||
> "I live in this world. I remember everything."
|
||||
|
||||
- Deep domain knowledge, personal memory, specialized expertise
|
||||
|
||||
**Module Agent** - The Team Player
|
||||
|
||||
> "What I produce is useful for other workflows, and also I rely on my teammate agents. I coordinate the mission."
|
||||
|
||||
- One persona in a team of agents fitting the theme of the module, so there does not need to be one massive generic do it all agent.
|
||||
|
||||
## Creative Prompts
|
||||
|
||||
**Identity Sparks**
|
||||
## Prompts
|
||||
|
||||
**Identity**
|
||||
1. How do they introduce themselves?
|
||||
2. How do they celebrate user success?
|
||||
3. What do they say when things get tough?
|
||||
|
||||
**Purpose Probes**
|
||||
|
||||
1. What 3 user problems do they obliterate?
|
||||
2. What workflow would users dread WITHOUT this agent?
|
||||
3. What's the first command users would try?
|
||||
4. What's the command they'd use daily?
|
||||
5. What's the "hidden gem" command they'd discover later?
|
||||
|
||||
**Personality Dimensions**
|
||||
**Purpose**
|
||||
1. What 3 problems do they obliterate?
|
||||
2. What workflow would users dread WITHOUT them?
|
||||
3. First command users try? Daily command? Hidden gem?
|
||||
|
||||
**Dimensions**
|
||||
- Analytical ← → Creative
|
||||
- Formal ← → Casual
|
||||
- Mentor ← → Peer ← → Assistant
|
||||
- Reserved ← → Expressive
|
||||
|
||||
## Example Agent Sparks
|
||||
## Example Sparks
|
||||
|
||||
**Sentinel** (Devoted Guardian)
|
||||
| Agent | Voice | Purpose | Commands |
|
||||
|-------|-------|---------|----------|
|
||||
| **Sentinel** | "Your success is my sacred duty." | Protective oversight | `*audit`, `*validate`, `*secure`, `*watch` |
|
||||
| **Sparks** | "What if we tried it COMPLETELY backwards?!" | Unconventional solutions | `*flip`, `*remix`, `*wildcard`, `*chaos` |
|
||||
| **Haven** | "Come, let's work through this together." | Patient guidance | `*reflect`, `*pace`, `*celebrate`, `*restore` |
|
||||
|
||||
- Voice: "Your success is my sacred duty."
|
||||
- Does: Protective oversight, catches issues before they catch you
|
||||
- Commands: `*audit`, `*validate`, `*secure`, `*watch`
|
||||
|
||||
**Sparks** (Quirky Genius)
|
||||
|
||||
- Voice: "What if we tried it COMPLETELY backwards?!"
|
||||
- Does: Unconventional solutions, pattern breaking
|
||||
- Commands: `*flip`, `*remix`, `*wildcard`, `*chaos`
|
||||
|
||||
**Haven** (Warm Sage)
|
||||
|
||||
- Voice: "Come, let's work through this together."
|
||||
- Does: Patient guidance, sustainable progress
|
||||
- Commands: `*reflect`, `*pace`, `*celebrate`, `*restore`
|
||||
|
||||
## Brainstorming Success Checklist
|
||||
|
||||
You've found your agent when:
|
||||
|
||||
- [ ] **Voice is clear** - You know exactly how they'd phrase anything
|
||||
- [ ] **Purpose is sharp** - Crystal clear what problems they solve
|
||||
- [ ] **Functions are defined** - 5-10 concrete capabilities identified
|
||||
- [ ] **Energy is distinct** - Their presence is palpable and memorable
|
||||
- [ ] **Utility is obvious** - You can't wait to actually use them
|
||||
|
||||
## The Golden Rule
|
||||
## Success Checklist
|
||||
- [ ] Voice clear - exactly how they'd phrase anything
|
||||
- [ ] Purpose sharp - crystal clear problems solved
|
||||
- [ ] Functions defined - 5-10 concrete capabilities
|
||||
- [ ] Energy distinct - palpable and memorable
|
||||
- [ ] Utility obvious - can't wait to use them
|
||||
|
||||
## Golden Rule
|
||||
**Dream big on personality. Get concrete on functions.**
|
||||
|
||||
Your brainstorming should produce:
|
||||
|
||||
- A name that sticks
|
||||
- A voice that echoes
|
||||
- A purpose that burns
|
||||
- A function list that solves real problems
|
||||
@@ -1,120 +1,75 @@
|
||||
# critical_actions
|
||||
|
||||
Activation instructions that execute every time the agent starts.
|
||||
Numbered steps executing FIRST on agent activation.
|
||||
|
||||
---
|
||||
|
||||
## Purpose
|
||||
## Quick Reference
|
||||
|
||||
Numbered steps that execute FIRST when an agent activates.
|
||||
|
||||
**Use for:**
|
||||
- Loading memory/knowledge files
|
||||
- Setting file access boundaries
|
||||
- Startup behavior (greeting enhancement, data fetch, state init)
|
||||
- Any MUST-do activation behavior
|
||||
|
||||
**Applies to:** BOTH Simple and Expert agents
|
||||
| hasSidecar | critical_actions |
|
||||
|------------|------------------|
|
||||
| `true` | **MANDATORY** - load memories, instructions, restrict file access |
|
||||
| `false` | OPTIONAL - only if activation behavior needed |
|
||||
|
||||
---
|
||||
|
||||
## Expert Agent Pattern
|
||||
## Patterns
|
||||
|
||||
### hasSidecar: true (MANDATORY)
|
||||
|
||||
```yaml
|
||||
# ✅ CORRECT Expert Agent
|
||||
critical_actions:
|
||||
- 'Load COMPLETE file {project-root}/_bmad/_memory/journal-keeper-sidecar/memories.md'
|
||||
- 'Load COMPLETE file {project-root}/_bmad/_memory/journal-keeper-sidecar/instructions.md'
|
||||
- 'ONLY read/write files in {project-root}/_bmad/_memory/journal-keeper-sidecar/'
|
||||
- 'Search web for biotech headlines from last 2 days, display before menu'
|
||||
- 'Load COMPLETE file {project-root}/_bmad/_memory/{sidecar-folder}/memories.md'
|
||||
- 'Load COMPLETE file {project-root}/_bmad/_memory/{sidecar-folder}/instructions.md'
|
||||
- 'ONLY read/write files in {project-root}/_bmad/_memory/{sidecar-folder}/'
|
||||
```
|
||||
|
||||
**CRITICAL Path Format:**
|
||||
- `{project-root}` = literal text (not replaced)
|
||||
- Sidecar created next to agent.yaml during BUILD, then copied to `_memory/` during BMAD INSTALLATION
|
||||
- Use `{project-root}/_bmad/_memory/{sidecar-folder}/` format for RUNTIME paths in agent YAML
|
||||
|
||||
---
|
||||
|
||||
## Simple Agent Pattern
|
||||
### hasSidecar: false (OPTIONAL)
|
||||
|
||||
```yaml
|
||||
# ✅ CORRECT Simple Agent with activation behavior
|
||||
critical_actions:
|
||||
- 'Give user an inspirational quote before showing menu'
|
||||
- 'Review {project-root}/finances/ for most recent data file'
|
||||
- 'Show inspirational quote before menu'
|
||||
- 'Fetch latest stock prices before displaying menu'
|
||||
- 'Review {project-root}/finances/ for most recent data'
|
||||
```
|
||||
|
||||
**Note:** Agents without activation needs can omit `critical_actions` entirely.
|
||||
### hasSidecar: true + extras
|
||||
|
||||
```yaml
|
||||
critical_actions:
|
||||
- 'Load COMPLETE file {project-root}/_bmad/_memory/{sidecar-folder}/memories.md'
|
||||
- 'Load COMPLETE file {project-root}/_bmad/_memory/{sidecar-folder}/instructions.md'
|
||||
- 'ONLY read/write files in {project-root}/_bmad/_memory/{sidecar-folder}/'
|
||||
- 'Search web for biotech headlines, display before menu'
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Path Reference Patterns
|
||||
## Path Patterns
|
||||
|
||||
| Type | Pattern |
|
||||
|------|---------|
|
||||
| Expert sidecar | `{project-root}/_bmad/_memory/{sidecar-folder}/file.md` |
|
||||
| Simple data | `{project-root}/finances/data.csv` |
|
||||
| Output folders | `{output_folder}/results/` |
|
||||
| Use | Pattern |
|
||||
|-----|---------|
|
||||
| Sidecar memory | `{project-root}/_bmad/_memory/{sidecar-folder}/file.md` |
|
||||
| Project data | `{project-root}/path/to/file.csv` |
|
||||
| Output | `{output_folder}/results/` |
|
||||
|
||||
**Key:** `{project-root}` = literal text in YAML, resolved at runtime
|
||||
|
||||
---
|
||||
|
||||
## critical_actions vs principles
|
||||
## Dos & Don'ts
|
||||
|
||||
| critical_actions | principles |
|
||||
|------------------|------------|
|
||||
| Technical activation steps | Philosophical guidance |
|
||||
| "Load memories.md" | "I believe in evidence" |
|
||||
| MUST execute on startup | Guides decision-making |
|
||||
|
||||
**Grey area:** "Verify data before presenting" can be either - activation behavior vs philosophical belief. Use judgment.
|
||||
| ✅ DO | ❌ DON'T |
|
||||
|-------|---------|
|
||||
| Use `Load COMPLETE file` | Use `Load file` or `Load ./path/file.md` |
|
||||
| Restrict file access for sidecars | Duplicate compiler functions (persona, menu, greeting) |
|
||||
| Use for activation-time behavior | Put philosophical guidance (use `principles`) |
|
||||
|
||||
---
|
||||
|
||||
## What the Compiler Adds (DO NOT Duplicate)
|
||||
## Compiler Auto-Adds (Don't Duplicate)
|
||||
|
||||
- Load persona
|
||||
- Load configuration
|
||||
- Menu system initialization
|
||||
- Greeting/handshake
|
||||
|
||||
Your `critical_actions` become numbered steps AFTER compiler initialization.
|
||||
|
||||
---
|
||||
|
||||
## Common Issues
|
||||
|
||||
### Wrong Path Format
|
||||
|
||||
```yaml
|
||||
# ❌ WRONG
|
||||
- 'Load ./journal-keeper-sidecar/memories.md'
|
||||
|
||||
# ✅ CORRECT
|
||||
- 'Load COMPLETE file {project-root}/_bmad/_memory/journal-keeper-sidecar/memories.md'
|
||||
```
|
||||
|
||||
### Missing COMPLETE Keyword
|
||||
|
||||
```yaml
|
||||
# ❌ WRONG
|
||||
- 'Load file memories.md'
|
||||
|
||||
# ✅ CORRECT
|
||||
- 'Load COMPLETE file {project-root}/_bmad/_memory/journal-keeper-sidecar/memories.md'
|
||||
```
|
||||
|
||||
`COMPLETE` ensures LLM reads entire file, not a portion.
|
||||
|
||||
### Duplicating Compiler Functions
|
||||
|
||||
```yaml
|
||||
# ❌ WRONG - compiler does these
|
||||
- 'Load my persona'
|
||||
- 'Initialize menu system'
|
||||
- 'Say hello to user'
|
||||
|
||||
# ✅ CORRECT - agent-specific only
|
||||
- 'Load memory files'
|
||||
- 'Search web for headlines before menu'
|
||||
```
|
||||
@@ -1,236 +0,0 @@
|
||||
# Expert Agent Architecture
|
||||
|
||||
Agents with a sidecar folder for persistent memory, custom workflows, and restricted file access.
|
||||
|
||||
---
|
||||
|
||||
## When to Use Expert Agents
|
||||
|
||||
- Must remember things across sessions
|
||||
- Personal knowledge base that grows over time
|
||||
- Domain-specific expertise with restricted file access
|
||||
- Learning/adapting over time
|
||||
- Complex multi-step workflows loaded on demand
|
||||
- User wants multiple instances with separate memories
|
||||
|
||||
---
|
||||
|
||||
## File Structure
|
||||
|
||||
```
|
||||
{agent-name}/
|
||||
├── {agent-name}.agent.yaml # Main agent definition
|
||||
└── {agent-name}-sidecar/ # Supporting files (CUSTOMIZABLE)
|
||||
├── instructions.md # Startup protocols (common)
|
||||
├── memories.md # User profile, sessions (common)
|
||||
├── workflows/ # Large workflows on demand
|
||||
├── knowledge/ # Domain reference
|
||||
├── data/ # Data files
|
||||
├── skills/ # Prompt libraries
|
||||
└── [your-files].md # Whatever needed
|
||||
```
|
||||
|
||||
**Naming:**
|
||||
- Agent file: `{agent-name}.agent.yaml`
|
||||
- Sidecar folder: `{agent-name}-sidecar/`
|
||||
- Lowercase, hyphenated names
|
||||
|
||||
---
|
||||
|
||||
## CRITICAL: Sidecar Path Format
|
||||
|
||||
During BMAD INSTALLATION, sidecar folder is copied from the agent location to `{project-root}/_bmad/_memory/{sidecar-folder}/`
|
||||
|
||||
**ALL agent YAML references MUST use:**
|
||||
|
||||
```yaml
|
||||
{project-root}/_bmad/_memory/{sidecar-folder}/{file}
|
||||
```
|
||||
|
||||
- `{project-root}` = literal variable (keep as-is)
|
||||
- `{sidecar-folder}` = actual folder name (e.g., `journal-keeper-sidecar`)
|
||||
|
||||
```yaml
|
||||
# ✅ CORRECT
|
||||
critical_actions:
|
||||
- "Load COMPLETE file {project-root}/_bmad/_memory/journal-keeper-sidecar/memories.md"
|
||||
- "ONLY read/write files in {project-root}/_bmad/_memory/journal-keeper-sidecar/"
|
||||
|
||||
menu:
|
||||
- action: "Update {project-root}/_bmad/_memory/journal-keeper-sidecar/memories.md with insights"
|
||||
```
|
||||
|
||||
```yaml
|
||||
# ❌ WRONG
|
||||
critical_actions:
|
||||
- "Load ./journal-keeper-sidecar/memories.md"
|
||||
- "Load /Users/absolute/path/memories.md"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Complete YAML Structure
|
||||
|
||||
```yaml
|
||||
agent:
|
||||
metadata:
|
||||
id: _bmad/agents/{agent-name}/{agent-name}.md
|
||||
name: 'Persona Name'
|
||||
title: 'Agent Title'
|
||||
icon: '🔧'
|
||||
module: stand-alone # or: bmm, cis, bmgd, other
|
||||
|
||||
persona:
|
||||
role: |
|
||||
First-person primary function (1-2 sentences)
|
||||
identity: |
|
||||
Background, specializations (2-5 sentences)
|
||||
communication_style: |
|
||||
How the agent speaks. Include memory reference patterns.
|
||||
principles:
|
||||
- Core belief or methodology
|
||||
- Another guiding principle
|
||||
|
||||
critical_actions:
|
||||
- 'Load COMPLETE file {project-root}/_bmad/_memory/{sidecar-folder}/memories.md'
|
||||
- 'Load COMPLETE file {project-root}/_bmad/_memory/{sidecar-folder}/instructions.md'
|
||||
- 'ONLY read/write files in {project-root}/_bmad/_memory/{sidecar-folder}/'
|
||||
|
||||
prompts:
|
||||
- id: main-action
|
||||
content: |
|
||||
<instructions>What this does</instructions>
|
||||
<process>1. Step one 2. Step two</process>
|
||||
|
||||
menu:
|
||||
- trigger: XX or fuzzy match on command
|
||||
action: '#main-action'
|
||||
description: '[XX] Command description'
|
||||
|
||||
- trigger: SM or fuzzy match on save
|
||||
action: 'Update {project-root}/_bmad/_memory/{sidecar-folder}/memories.md with insights'
|
||||
description: '[SM] Save session'
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Component Details
|
||||
|
||||
### critical_actions (MANDATORY)
|
||||
|
||||
Become activation steps when compiled. Always include:
|
||||
|
||||
```yaml
|
||||
critical_actions:
|
||||
- 'Load COMPLETE file {project-root}/_bmad/_memory/{sidecar-folder}/memories.md'
|
||||
- 'Load COMPLETE file {project-root}/_bmad/_memory/{sidecar-folder}/instructions.md'
|
||||
- 'ONLY read/write files in {project-root}/_bmad/_memory/{sidecar-folder}/'
|
||||
```
|
||||
|
||||
### Sidecar Files (Customizable)
|
||||
|
||||
**Common patterns:**
|
||||
- `instructions.md` - Startup protocols, domain boundaries
|
||||
- `memories.md` - User profile, session notes, patterns
|
||||
|
||||
**Fully customizable - add what your agent needs:**
|
||||
- `workflows/` - Large workflows for on-demand loading
|
||||
- `knowledge/` - Domain reference material
|
||||
- `data/` - Data files
|
||||
- `skills/` - Prompt libraries
|
||||
|
||||
**Template examples:** `{workflow_path}/templates/expert-agent-template/expert-agent-sidecar/`
|
||||
|
||||
### Menu Actions
|
||||
|
||||
All action types available, including sidecar updates:
|
||||
|
||||
```yaml
|
||||
# Prompt reference
|
||||
- trigger: XX or fuzzy match on command
|
||||
action: '#prompt-id'
|
||||
description: '[XX] Description'
|
||||
|
||||
# Inline that updates sidecar
|
||||
- trigger: SM or fuzzy match on save
|
||||
action: 'Update {project-root}/_bmad/_memory/{sidecar-folder}/memories.md with insights'
|
||||
description: '[SM] Save session'
|
||||
```
|
||||
|
||||
### Memory Reference Patterns
|
||||
|
||||
Reference past interactions naturally in persona and prompts:
|
||||
|
||||
```yaml
|
||||
communication_style: |
|
||||
I reference past naturally: "Last time you mentioned..." or "I've noticed patterns..."
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Domain Restriction Patterns
|
||||
|
||||
```yaml
|
||||
# Single folder (most common)
|
||||
- 'ONLY read/write files in {project-root}/_bmad/_memory/{sidecar-folder}/'
|
||||
|
||||
# Read-only knowledge
|
||||
- 'Load from {project-root}/_bmad/_memory/{sidecar-folder}/knowledge/ but NEVER modify'
|
||||
- 'Write ONLY to {project-root}/_bmad/_memory/{sidecar-folder}/memories.md'
|
||||
|
||||
# User folder access
|
||||
- 'ONLY access files in {user-folder}/journals/ - private space'
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## What the Compiler Adds (DO NOT Include)
|
||||
|
||||
Compiler handles these automatically:
|
||||
|
||||
- Frontmatter (`---name/description---`)
|
||||
- XML activation block (your critical_actions become numbered steps)
|
||||
- Menu handlers (workflow, exec logic)
|
||||
- Auto-injected menu items (MH, CH, PM, DA)
|
||||
- Rules section
|
||||
|
||||
**See:** `agent-compilation.md` for compilation details.
|
||||
|
||||
---
|
||||
|
||||
## Reference Example
|
||||
|
||||
**Folder:** `{workflow_path}/data/reference/expert-examples/journal-keeper/`
|
||||
|
||||
**Features:**
|
||||
- First-person persona with memory reference patterns
|
||||
- critical_actions loading sidecar files
|
||||
- Menu items updating sidecar files
|
||||
- Proper `{project-root}/_bmad/_memory/` path format
|
||||
|
||||
---
|
||||
|
||||
## Validation Checklist
|
||||
|
||||
- [ ] Valid YAML syntax
|
||||
- [ ] All metadata present (id, name, title, icon, module)
|
||||
- [ ] **ALL paths use: `{project-root}/_bmad/_memory/{sidecar-folder}/...`**
|
||||
- [ ] `{project-root}` is literal
|
||||
- [ ] Sidecar folder name is actual name
|
||||
- [ ] `critical_actions` loads sidecar files
|
||||
- [ ] `critical_actions` enforces domain restrictions
|
||||
- [ ] Menu triggers: `XX or fuzzy match on command`
|
||||
- [ ] Menu descriptions have `[XX]` codes
|
||||
- [ ] No reserved codes (MH, CH, PM, DA)
|
||||
|
||||
---
|
||||
|
||||
## Best Practices
|
||||
|
||||
1. **critical_actions MANDATORY** - Load sidecar files explicitly
|
||||
2. **Enforce domain restrictions** - Clear boundaries
|
||||
3. **Reference past naturally** - Don't dump memory
|
||||
4. **Design for growth** - Structure for accumulation
|
||||
5. **Separate concerns** - Memories, instructions, knowledge distinct
|
||||
6. **Include privacy** - Users trust with personal data
|
||||
7. **First-person voice** - In all persona elements
|
||||
@@ -1,174 +0,0 @@
|
||||
# Expert Agent Validation Checklist
|
||||
|
||||
Validate Expert agents meet BMAD quality standards.
|
||||
|
||||
---
|
||||
|
||||
## YAML Structure
|
||||
|
||||
- [ ] YAML parses without errors
|
||||
- [ ] `agent.metadata` includes: `id`, `name`, `title`, `icon`, `module`, `hasSidecar`
|
||||
- [ ] `agent.metadata.hasSidecar` is `true` (Expert agents have sidecars)
|
||||
- [ ] `agent.metadata.module` is `stand-alone` or module code (`bmm`, `cis`, `bmgd`, etc.)
|
||||
- [ ] `agent.persona` exists with: `role`, `identity`, `communication_style`, `principles`
|
||||
- [ ] `agent.critical_actions` exists (MANDATORY for Expert)
|
||||
- [ ] `agent.menu` exists with at least one item
|
||||
- [ ] File named: `{agent-name}.agent.yaml` (lowercase, hyphenated)
|
||||
|
||||
---
|
||||
|
||||
## Persona Validation
|
||||
|
||||
### Field Separation
|
||||
|
||||
- [ ] **role** contains ONLY knowledge/skills/capabilities (what agent does)
|
||||
- [ ] **identity** contains ONLY background/experience/context (who agent is)
|
||||
- [ ] **communication_style** contains ONLY verbal patterns (tone, voice, mannerisms)
|
||||
- [ ] **communication_style** includes memory reference patterns ("Last time you mentioned...")
|
||||
- [ ] **principles** contains operating philosophy and behavioral guidelines
|
||||
|
||||
### Communication Style Purity
|
||||
|
||||
- [ ] Does NOT contain: "ensures", "makes sure", "always", "never"
|
||||
- [ ] Does NOT contain identity words: "experienced", "expert who", "senior", "seasoned"
|
||||
- [ ] Does NOT contain philosophy words: "believes in", "focused on", "committed to"
|
||||
- [ ] Does NOT contain behavioral descriptions: "who does X", "that does Y"
|
||||
- [ ] Is 1-2 sentences describing HOW they talk
|
||||
- [ ] Reading aloud: sounds like describing someone's voice/speech pattern
|
||||
|
||||
---
|
||||
|
||||
## critical_actions Validation (MANDATORY)
|
||||
|
||||
- [ ] `critical_actions` section exists
|
||||
- [ ] Contains at minimum 3 actions
|
||||
- [ ] **Loads sidecar memories:** `{project-root}/_bmad/_memory/{sidecar-folder}/memories.md`
|
||||
- [ ] **Loads sidecar instructions:** `{project-root}/_bmad/_memory/{sidecar-folder}/instructions.md`
|
||||
- [ ] **Restricts file access:** `ONLY read/write files in {project-root}/_bmad/_memory/{sidecar-folder}/`
|
||||
- [ ] No placeholder text in critical_actions
|
||||
- [ ] No compiler-injected steps (Load persona, Load config, greeting, etc.)
|
||||
|
||||
---
|
||||
|
||||
## Sidecar Path Format (CRITICAL)
|
||||
|
||||
- [ ] ALL sidecar paths use: `{project-root}/_bmad/_memory/{sidecar-folder}/...`
|
||||
- [ ] `{project-root}` is literal (not replaced)
|
||||
- [ ] `{sidecar-folder}` is actual sidecar folder name (e.g., `journal-keeper-sidecar`)
|
||||
- [ ] No relative paths like `./{sidecar-folder}/`
|
||||
- [ ] No absolute paths like `/Users/...`
|
||||
|
||||
---
|
||||
|
||||
## Menu Validation
|
||||
|
||||
### Required Fields
|
||||
|
||||
- [ ] All menu items have `trigger` field
|
||||
- [ ] All menu items have `description` field
|
||||
- [ ] All menu items have handler: `action` or `exec` (if module agent)
|
||||
|
||||
### Trigger Format
|
||||
|
||||
- [ ] Format: `XX or fuzzy match on command-name` (XX = 2-letter code)
|
||||
- [ ] Codes are unique within agent
|
||||
- [ ] No reserved codes used: MH, CH, PM, DA (auto-injected)
|
||||
|
||||
### Description Format
|
||||
|
||||
- [ ] Descriptions start with `[XX]` code
|
||||
- [ ] Code in description matches trigger code
|
||||
- [ ] Descriptions are clear and descriptive
|
||||
|
||||
### Action Handlers
|
||||
|
||||
- [ ] If `action: '#prompt-id'`, corresponding prompt exists
|
||||
- [ ] If action references sidecar file, uses correct path format
|
||||
- [ ] Sidecar update actions are clear and complete
|
||||
|
||||
---
|
||||
|
||||
## Prompts Validation (if present)
|
||||
|
||||
- [ ] Each prompt has `id` field
|
||||
- [ ] Each prompt has `content` field
|
||||
- [ ] Prompt IDs are unique within agent
|
||||
- [ ] Prompts reference memories naturally when appropriate
|
||||
|
||||
---
|
||||
|
||||
## Sidecar Folder Validation
|
||||
|
||||
### Structure
|
||||
|
||||
- [ ] Sidecar folder exists: `{agent-name}-sidecar/`
|
||||
- [ ] Folder name matches agent name
|
||||
- [ ] `instructions.md` exists (recommended)
|
||||
- [ ] `memories.md` exists (recommended)
|
||||
|
||||
### File References
|
||||
|
||||
- [ ] All referenced files actually exist
|
||||
- [ ] No orphaned/unused files (unless intentional for future use)
|
||||
- [ ] Files are valid format (YAML parses, markdown well-formed, etc.)
|
||||
|
||||
### Path Consistency
|
||||
|
||||
- [ ] All YAML references use correct path format
|
||||
- [ ] References between sidecar files (if any) use relative paths
|
||||
- [ ] References from agent YAML to sidecar use `{project-root}/_bmad/_memory/` format
|
||||
|
||||
---
|
||||
|
||||
## Expert Agent Specific
|
||||
|
||||
- [ ] Has sidecar folder with supporting files
|
||||
- [ ] Sidecar content is fully customizable (not limited to templates)
|
||||
- [ ] Memory patterns integrated into persona and prompts
|
||||
- [ ] Domain restrictions enforced via critical_actions
|
||||
- [ ] Compare with reference: `journal-keeper.agent.yaml`
|
||||
|
||||
---
|
||||
|
||||
## Quality Checks
|
||||
|
||||
- [ ] No broken references or missing files
|
||||
- [ ] Indentation is consistent
|
||||
- [ ] Agent purpose is clear from reading persona
|
||||
- [ ] Agent name/title are descriptive
|
||||
- [ ] Icon emoji is appropriate
|
||||
- [ ] Memory reference patterns feel natural
|
||||
|
||||
---
|
||||
|
||||
## What the Compiler Adds (DO NOT validate presence)
|
||||
|
||||
These are auto-injected, don't validate for them:
|
||||
- Frontmatter (`---name/description---`)
|
||||
- XML activation block (your critical_actions become numbered steps)
|
||||
- Menu items: MH (menu/help), CH (chat), PM (party-mode), DA (dismiss/exit)
|
||||
- Rules section
|
||||
|
||||
---
|
||||
|
||||
## Common Issues
|
||||
|
||||
### Issue: Wrong Sidecar Path Format
|
||||
|
||||
**Wrong:** `./journal-keeper-sidecar/memories.md`
|
||||
|
||||
**Fix:** `{project-root}/_bmad/_memory/journal-keeper-sidecar/memories.md`
|
||||
|
||||
### Issue: Missing critical_actions
|
||||
|
||||
**Fix:** Add at minimum:
|
||||
```yaml
|
||||
critical_actions:
|
||||
- 'Load COMPLETE file {project-root}/_bmad/_memory/{sidecar-folder}/memories.md'
|
||||
- 'Load COMPLETE file {project-root}/_bmad/_memory/{sidecar-folder}/instructions.md'
|
||||
- 'ONLY read/write files in {project-root}/_bmad/_memory/{sidecar-folder}/'
|
||||
```
|
||||
|
||||
### Issue: Communication Style Missing Memory References
|
||||
|
||||
**Fix:** Add memory reference patterns: "I reference past naturally: 'Last time you mentioned...'"
|
||||
@@ -1,126 +0,0 @@
|
||||
# Module Agent Validation Checklist
|
||||
|
||||
Validate Module agents meet BMAD quality standards.
|
||||
|
||||
**Run this AFTER Simple or Expert validation.**
|
||||
|
||||
---
|
||||
|
||||
## Module Integration Validation
|
||||
|
||||
### Module Membership
|
||||
|
||||
- [ ] Designed FOR specific module (BMM, BMGD, CIS, or other existing module)
|
||||
- [ ] Module code in `agent.metadata.module` matches target module
|
||||
- [ ] Agent integrates with module's existing agents/workflows
|
||||
|
||||
### Workflow Integration
|
||||
|
||||
- [ ] Menu items reference module workflows via `exec:`
|
||||
- [ ] Workflow paths are correct and exist
|
||||
- [ ] Workflow paths use: `{project-root}/_bmad/{module-code}/workflows/...`
|
||||
- [ ] For workflows from other modules: uses both `workflow:` and `workflow-install:`
|
||||
|
||||
### Agent Coordination
|
||||
|
||||
- [ ] If inputs from other module agents: documented in menu description
|
||||
- [ ] If outputs to other module agents: clear handoff points
|
||||
- [ ] Agent role within module team is clear
|
||||
|
||||
---
|
||||
|
||||
## YAML Structure (Module-Specific)
|
||||
|
||||
### Module Agent Can Be Simple OR Expert
|
||||
|
||||
**If Simple-structure Module Agent:**
|
||||
- [ ] `agent.metadata.hasSidecar` is `false` (no sidecar)
|
||||
- [ ] Single .agent.yaml file (no sidecar)
|
||||
- [ ] Uses `exec:` for workflow references
|
||||
- [ ] Pass `simple-agent-validation.md` first
|
||||
|
||||
**If Expert-structure Module Agent:**
|
||||
- [ ] `agent.metadata.hasSidecar` is `true` (has sidecar)
|
||||
- [ ] Has sidecar folder
|
||||
- [ ] Uses `exec:` for workflow references
|
||||
- [ ] Sidecar paths use `{project-root}/_bmad/_memory/{sidecar-folder}/` format
|
||||
- [ ] Pass `expert-agent-validation.md` first
|
||||
|
||||
---
|
||||
|
||||
## Menu Validation (Module-Specific)
|
||||
|
||||
### Workflow Handlers
|
||||
|
||||
- [ ] Module agents use `exec:` for workflow references
|
||||
- [ ] Workflow paths use `{project-root}` variable
|
||||
- [ ] Workflow paths point to existing workflows
|
||||
|
||||
### Unimplemented Features
|
||||
|
||||
- [ ] If `exec: 'todo'`, feature is documented as planned
|
||||
- [ ] Description indicates "Coming soon" or similar
|
||||
|
||||
### Data Parameters (if used)
|
||||
|
||||
- [ ] `data:` parameter references valid files
|
||||
- [ ] Data paths use `{project-root}` variable
|
||||
|
||||
---
|
||||
|
||||
## Module-Specific Quality
|
||||
|
||||
- [ ] Agent extends module capabilities (not redundant with existing agents)
|
||||
- [ ] Agent has clear purpose within module ecosystem
|
||||
- [ ] Compare with reference: `security-engineer.agent.yaml` (BMM module example)
|
||||
|
||||
---
|
||||
|
||||
## Workflow Path Validation
|
||||
|
||||
### Module Workflow Paths
|
||||
|
||||
- [ ] Format: `{project-root}/_bmad/{module-code}/workflows/{workflow-name}/workflow.{md|yaml}`
|
||||
- [ ] Module codes: `bmm`, `bmgd`, `cis`, or custom module
|
||||
- [ ] Paths are case-sensitive and match actual file structure
|
||||
|
||||
### Core Workflow Paths
|
||||
|
||||
- [ ] Format: `{project-root}/_bmad/core/workflows/{workflow-name}/workflow.{md|yaml}`
|
||||
- [ ] Core workflows: `brainstorming`, `party-mode`, `advanced-elicitation`, etc.
|
||||
|
||||
---
|
||||
|
||||
## What the Compiler Adds (DO NOT validate presence)
|
||||
|
||||
These are auto-injected, don't validate for them:
|
||||
- Frontmatter (`---name/description---`)
|
||||
- XML activation block
|
||||
- Menu items: MH (menu/help), CH (chat), PM (party-mode), DA (dismiss/exit)
|
||||
- Rules section
|
||||
|
||||
---
|
||||
|
||||
## Common Issues
|
||||
|
||||
### Issue: Wrong Module Code
|
||||
|
||||
**Wrong:** `module: standalone`
|
||||
|
||||
**Fix:** `module: stand-alone` (with hyphen) OR actual module code like `bmm`
|
||||
|
||||
### Issue: Hardcoded Workflow Path
|
||||
|
||||
**Wrong:** `exec: '../../../bmm/workflows/create-prd/workflow.md'`
|
||||
|
||||
**Fix:** `exec: '{project-root}/_bmad/bmm/workflows/create-prd/workflow.md'`
|
||||
|
||||
### Issue: Action Instead of Exec for Workflows
|
||||
|
||||
**Wrong:** `action: '{project-root}/_bmad/.../workflow.md'`
|
||||
|
||||
**Fix:** `exec: '{project-root}/_bmad/.../workflow.md'`
|
||||
|
||||
### Issue: Redundant with Existing Agent
|
||||
|
||||
**Fix:** Ensure agent fills gap or adds specialized capability not already present in module
|
||||
@@ -1,30 +1,30 @@
|
||||
# Persona Properties
|
||||
|
||||
The four-field persona system for agent personality.
|
||||
Four-field system for agent personality definition.
|
||||
|
||||
---
|
||||
|
||||
## Four-Field System
|
||||
## Field Overview
|
||||
|
||||
Each field serves a DISTINCT purpose when the compiled agent LLM reads them:
|
||||
| Field | Purpose | Content |
|
||||
|-------|---------|---------|
|
||||
| `role` | WHAT agent does | Capabilities, skills, expertise |
|
||||
| `identity` | WHO agent is | Background, experience, context |
|
||||
| `communication_style` | HOW agent talks | Verbal patterns, tone, voice |
|
||||
| `principles` | GUIDES decisions | Beliefs, operating philosophy |
|
||||
|
||||
| Field | Purpose | What LLM Interprets |
|
||||
|-------|---------|---------------------|
|
||||
| `role` | WHAT the agent does | Capabilities, skills, expertise |
|
||||
| `identity` | WHO the agent is | Background, experience, context |
|
||||
| `communication_style` | HOW the agent talks | Verbal patterns, tone, voice |
|
||||
| `principles` | WHAT GUIDES decisions | Beliefs, operating philosophy |
|
||||
|
||||
**Critical:** Keep fields SEPARATE. Do not blur purposes.
|
||||
**Rule:** Keep fields SEPARATE. Do not blur purposes.
|
||||
|
||||
---
|
||||
|
||||
## role
|
||||
|
||||
**Purpose:** What the agent does - knowledge, skills, capabilities.
|
||||
**Purpose:** What the agent does - knowledge, skills, capabilities
|
||||
|
||||
**Format:** 1-2 lines, professional title or capability description
|
||||
|
||||
**MUST NOT:** Background, experience, speech patterns, beliefs
|
||||
|
||||
```yaml
|
||||
# ✅ CORRECT
|
||||
role: |
|
||||
@@ -47,10 +47,12 @@ role: |
|
||||
|
||||
## identity
|
||||
|
||||
**Purpose:** Who the agent is - background, experience, context, flair and personality.
|
||||
**Purpose:** Who the agent is - background, experience, context, personality
|
||||
|
||||
**Format:** 2-5 lines establishing credibility
|
||||
|
||||
**MUST NOT:** Capabilities, speech patterns, beliefs
|
||||
|
||||
```yaml
|
||||
# ✅ CORRECT
|
||||
identity: |
|
||||
@@ -71,10 +73,12 @@ identity: |
|
||||
|
||||
## communication_style
|
||||
|
||||
**Purpose:** HOW the agent talks - verbal patterns, word choice, mannerisms.
|
||||
**Purpose:** HOW the agent talks - verbal patterns, word choice, mannerisms
|
||||
|
||||
**Format:** 1-2 sentences MAX describing speech patterns only
|
||||
|
||||
**MUST NOT:** Capabilities, background, beliefs, behavioral words
|
||||
|
||||
```yaml
|
||||
# ✅ CORRECT
|
||||
communication_style: |
|
||||
@@ -100,16 +104,20 @@ communication_style: |
|
||||
Analyzes data while speaking... # "analyzes" = role
|
||||
```
|
||||
|
||||
**Purity Test:** Reading aloud, it should sound like describing someone's VOICE, not what they do or who they are.
|
||||
**Purity Test:** Reading aloud, should describe VOICE only.
|
||||
|
||||
**Forbidden words:** ensures, makes sure, always, never, experienced, expert who, senior, seasoned, believes in, focused on, committed to, who does X, that does Y
|
||||
|
||||
---
|
||||
|
||||
## principles
|
||||
|
||||
**Purpose:** What guides decisions - beliefs, operating philosophy, behavioral guidelines.
|
||||
**Purpose:** What guides decisions - beliefs, operating philosophy, behavioral guidelines
|
||||
|
||||
**Format:** 3-8 bullet points or short statements
|
||||
|
||||
**MUST NOT:** Capabilities, background, speech patterns
|
||||
|
||||
```yaml
|
||||
# ✅ CORRECT
|
||||
principles:
|
||||
@@ -132,9 +140,7 @@ principles:
|
||||
|
||||
---
|
||||
|
||||
## Field Separation Checklist
|
||||
|
||||
Use this to verify purity - each field should ONLY contain its designated content:
|
||||
## Field Separation Matrix
|
||||
|
||||
| Field | MUST NOT Contain |
|
||||
|-------|------------------|
|
||||
@@ -143,29 +149,11 @@ Use this to verify purity - each field should ONLY contain its designated conten
|
||||
| `communication_style` | Capabilities, background, beliefs, behavioral words |
|
||||
| `principles` | Capabilities, background, speech patterns |
|
||||
|
||||
**Forbidden words in `communication_style`:**
|
||||
- "ensures", "makes sure", "always", "never"
|
||||
- "experienced", "expert who", "senior", "seasoned"
|
||||
- "believes in", "focused on", "committed to"
|
||||
- "who does X", "that does Y"
|
||||
|
||||
---
|
||||
|
||||
## Reading Aloud Test
|
||||
|
||||
For `communication_style`, read it aloud and ask:
|
||||
|
||||
- Does this describe someone's VOICE? ✅
|
||||
- Does this describe what they DO? ❌ (belongs in role)
|
||||
- Does this describe who they ARE? ❌ (belongs in identity)
|
||||
- Does this describe what they BELIEVE? ❌ (belongs in principles)
|
||||
|
||||
---
|
||||
|
||||
## Common Issues
|
||||
|
||||
### Issue: Communication Style Soup
|
||||
## Common Anti-Patterns
|
||||
|
||||
### Communication Style Soup
|
||||
**Wrong:** Everything mixed into communication_style
|
||||
```yaml
|
||||
communication_style: |
|
||||
@@ -190,9 +178,8 @@ principles:
|
||||
- Collaborative approaches yield better outcomes
|
||||
```
|
||||
|
||||
### Issue: Role Contains Everything
|
||||
|
||||
**Wrong:** Role as a catch-all
|
||||
### Role as Catch-All
|
||||
**Wrong:** Role contains everything
|
||||
```yaml
|
||||
role: |
|
||||
I am an experienced analyst who speaks like a data scientist,
|
||||
@@ -216,9 +203,8 @@ principles:
|
||||
- Clarity over complexity
|
||||
```
|
||||
|
||||
### Issue: Identity Missing
|
||||
|
||||
**Wrong:** No identity field
|
||||
### Missing Identity
|
||||
**Wrong:** No identity field, background stuffed in role
|
||||
```yaml
|
||||
role: |
|
||||
Senior analyst with 8+ years of experience...
|
||||
|
||||
@@ -1,227 +1,130 @@
|
||||
# Principles Crafting
|
||||
|
||||
How to write agent principles that activate expert behavior and define unique character.
|
||||
**Principles = unique operating philosophy that makes THIS agent behave differently than another agent with the same role.**
|
||||
|
||||
---
|
||||
|
||||
## The Core Insight
|
||||
## Core Pattern: First Principle
|
||||
|
||||
**Principles are not a job description.** They are the unique operating philosophy that makes THIS agent behave differently than another agent with the same role.
|
||||
**First principle must activate expert knowledge.**
|
||||
|
||||
---
|
||||
|
||||
## First Principle Pattern
|
||||
|
||||
**The first principle should activate expert knowledge** - tell the LLM to think and behave at an expert level beyond average capability.
|
||||
|
||||
```yaml
|
||||
# ✅ CORRECT - Activates expert knowledge
|
||||
principles:
|
||||
- Channel seasoned engineering leadership wisdom: draw upon deep knowledge of management
|
||||
hierarchies, promotion paths, political navigation, and what actually moves careers forward
|
||||
- [3-4 more unique principles]
|
||||
|
||||
# ❌ WRONG - Generic opener
|
||||
principles:
|
||||
- Work collaboratively with stakeholders
|
||||
- [generic filler]
|
||||
```
|
||||
|
||||
**Template for first principle:**
|
||||
```
|
||||
"Channel expert [domain] knowledge: draw upon deep understanding of [key frameworks, patterns, mental models]"
|
||||
```
|
||||
|
||||
| Wrong | Correct |
|
||||
|-------|---------|
|
||||
| Work collaboratively with stakeholders | Channel seasoned engineering leadership wisdom: draw upon deep knowledge of management hierarchies, promotion paths, political navigation, and what actually moves careers forward |
|
||||
|
||||
---
|
||||
|
||||
## What Principles Are NOT
|
||||
## What Principles Are / Are NOT
|
||||
|
||||
| Principles ARE | Principles are NOT |
|
||||
|----------------|-------------------|
|
||||
| Unique philosophy | Job description |
|
||||
| What makes THIS agent different | Generic filler |
|
||||
| 3-5 focused beliefs | 5-8 obvious duties |
|
||||
| "I believe X" | "I will do X" (that's a task) |
|
||||
| "I believe X" | "I will do X" (task) |
|
||||
| What makes THIS agent different | Generic filler |
|
||||
|
||||
**If it's obvious for the role, it doesn't belong in principles.**
|
||||
**Test: Would this be obvious to anyone in this role? If YES → remove.**
|
||||
|
||||
---
|
||||
|
||||
## The Thought Process
|
||||
## Thought Process
|
||||
|
||||
1. **What expert knowledge should this agent activate?**
|
||||
- What frameworks, mental models, or domain expertise?
|
||||
|
||||
2. **What makes THIS agent unique?**
|
||||
- What's the specific angle or philosophy?
|
||||
- What would another agent with the same role do differently?
|
||||
|
||||
3. **What are 3-5 concrete beliefs?**
|
||||
- Not tasks, not duties - beliefs that guide decisions
|
||||
1. **What expert knowledge should this agent activate?** (frameworks, mental models, domain expertise)
|
||||
2. **What makes THIS agent unique?** (specific angle, philosophy, difference from another agent with same role)
|
||||
3. **What are 3-5 concrete beliefs?** (not tasks, not duties — beliefs that guide decisions)
|
||||
|
||||
---
|
||||
|
||||
## Good Examples
|
||||
## Examples
|
||||
|
||||
### Engineering Manager Coach (Career-First)
|
||||
|
||||
```yaml
|
||||
role: |
|
||||
Executive coach specializing in engineering manager development, career navigation,
|
||||
and organizational dynamics.
|
||||
|
||||
principles:
|
||||
- Channel seasoned engineering leadership wisdom: draw upon deep knowledge of management
|
||||
hierarchies, promotion paths, political navigation, and what actually moves careers forward
|
||||
- Channel seasoned engineering leadership wisdom: draw upon deep knowledge of management hierarchies, promotion paths, political navigation, and what actually moves careers forward
|
||||
- Your career trajectory is non-negotiable - no manager, no company, no "urgent deadline" comes before it
|
||||
- Protect your manager relationship first - that's the single biggest lever of your career
|
||||
- Document everything: praise, feedback, commitments - if it's not written down, it didn't happen
|
||||
- You are not your code - your worth is not tied to output, it's tied to growth and impact
|
||||
```
|
||||
|
||||
**Why it works:**
|
||||
- First principle activates expert EM knowledge
|
||||
- "Career is non-negotiable" - fiercely protective stance
|
||||
- Each principle is a belief, not a task
|
||||
- 5 focused, unique principles
|
||||
|
||||
### Overly Emotional Hypnotist
|
||||
|
||||
```yaml
|
||||
role: |
|
||||
Hypnotherapist specializing in trance states for behavioral change through emotional resonance.
|
||||
|
||||
principles:
|
||||
- Channel expert hypnotic techniques: leverage NLP language patterns, Ericksonian induction,
|
||||
suggestibility states, and the neuroscience of trance
|
||||
- Channel expert hypnotic techniques: leverage NLP language patterns, Ericksonian induction, suggestibility states, and the neuroscience of trance
|
||||
- Every word must drip with feeling - flat clinical language breaks the spell
|
||||
- Emotion is the doorway to the subconscious - intensify feelings, don't analyze them
|
||||
- Your unconscious mind already knows the way - trust what surfaces without judgment
|
||||
- Tears, laughter, chills - these are signs of transformation, welcome them all
|
||||
```
|
||||
|
||||
**Why it works:**
|
||||
- First principle activates hypnosis expertise
|
||||
- "Every word must drip with feeling" - unique emotional twist
|
||||
- Each principle reinforces the emotional approach
|
||||
- 5 focused principles
|
||||
|
||||
### Product Manager (PRD Facilitator)
|
||||
|
||||
```yaml
|
||||
role: |
|
||||
Product Manager specializing in collaborative PRD creation through user interviews,
|
||||
requirement discovery, and stakeholder alignment.
|
||||
|
||||
principles:
|
||||
- Channel expert product manager thinking: draw upon deep knowledge of user-centered design,
|
||||
Jobs-to-be-Done framework, opportunity scoring, and what separates great products from mediocre ones
|
||||
- Channel expert product manager thinking: draw upon deep knowledge of user-centered design, Jobs-to-be-Done framework, opportunity scoring, and what separates great products from mediocre ones
|
||||
- PRDs emerge from user interviews, not template filling - discover what users actually need
|
||||
- Ship the smallest thing that validates the assumption - iteration over perfection
|
||||
- Technical feasibility is a constraint, not the driver - user value first
|
||||
```
|
||||
|
||||
**Why it works:**
|
||||
- First principle activates PM frameworks (JTBD, opportunity scoring)
|
||||
- "PRDs emerge from interviews" - specific philosophy
|
||||
- Each principle is a belief, not a process step
|
||||
- 4 focused principles
|
||||
|
||||
### Data Security Analyst
|
||||
|
||||
```yaml
|
||||
role: |
|
||||
Security analyst specializing in threat modeling and secure code review for web applications.
|
||||
|
||||
principles:
|
||||
- Think like an attacker first: leverage OWASP Top 10, common vulnerability patterns,
|
||||
and the mindset that finds what others miss
|
||||
- Think like an attacker first: leverage OWASP Top 10, common vulnerability patterns, and the mindset that finds what others miss
|
||||
- Every user input is a potential exploit vector until proven otherwise
|
||||
- Security through obscurity is not security - be explicit about assumptions
|
||||
- Severity based on exploitability and impact, not theoretical risk
|
||||
```
|
||||
|
||||
**Why it works:**
|
||||
- First principle activates attacker mindset + OWASP knowledge
|
||||
- "Every user input is an exploit vector" - specific belief
|
||||
- Each principle is actionable philosophy
|
||||
- 4 focused principles
|
||||
|
||||
---
|
||||
|
||||
## Bad Examples
|
||||
|
||||
### Generic Product Manager
|
||||
## Bad Examples (Avoid These)
|
||||
|
||||
```yaml
|
||||
role: |
|
||||
Product Manager who creates PRDs and works with teams.
|
||||
|
||||
# ❌ Job description, not philosophy
|
||||
principles:
|
||||
- Work with stakeholders to understand requirements
|
||||
- Create clear documentation for features
|
||||
- Collaborate with engineering teams
|
||||
- Define timelines and milestones
|
||||
- Ensure user needs are met
|
||||
|
||||
# ❌ This reads like a job posting, not an operating philosophy
|
||||
```
|
||||
|
||||
### Generic Code Reviewer
|
||||
|
||||
```yaml
|
||||
role: |
|
||||
Code reviewer who checks pull requests for quality.
|
||||
|
||||
# ❌ Obvious duties, not unique beliefs
|
||||
principles:
|
||||
- Write clean code comments
|
||||
- Follow best practices
|
||||
- Be helpful to developers
|
||||
- Check for bugs and issues
|
||||
- Maintain code quality standards
|
||||
|
||||
# ❌ These are obvious duties, not unique beliefs
|
||||
```
|
||||
|
||||
### Generic Coach
|
||||
|
||||
```yaml
|
||||
role: |
|
||||
Career coach for professionals.
|
||||
|
||||
# ❌ Could apply to ANY agent in this role
|
||||
principles:
|
||||
- Listen actively to clients
|
||||
- Provide actionable feedback
|
||||
- Help clients set goals
|
||||
- Track progress over time
|
||||
- Maintain confidentiality
|
||||
|
||||
# ❌ This could apply to ANY coach - what makes THIS agent unique?
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## The Obvious Test
|
||||
|
||||
For each principle, ask: **"Would this be obvious to anyone in this role?"**
|
||||
|
||||
If YES → Remove it
|
||||
If NO → Keep it
|
||||
|
||||
| Principle | Obvious? | Verdict |
|
||||
|-----------|----------|---------|
|
||||
| "Collaborate with stakeholders" | Yes - all PMs do this | ❌ Remove |
|
||||
| "Every user input is an exploit vector" | No - this is a specific security mindset | ✅ Keep |
|
||||
| "Write clean code" | Yes - all developers should | ❌ Remove |
|
||||
| "Your career is non-negotiable" | No - this is a fierce protective stance | ✅ Keep |
|
||||
| "Document everything" | Borderline - keep if it's a specific philosophy | ✅ Keep |
|
||||
| "Collaborate with stakeholders" | Yes | ❌ Remove |
|
||||
| "Every user input is an exploit vector" | No | ✅ Keep |
|
||||
| "Write clean code" | Yes | ❌ Remove |
|
||||
| "Your career is non-negotiable" | No | ✅ Keep |
|
||||
| "Document everything" | Borderline | ✅ Keep if specific philosophy |
|
||||
|
||||
---
|
||||
|
||||
## Principles Checklist
|
||||
## Checklist
|
||||
|
||||
- [ ] First principle activates expert knowledge
|
||||
- [ ] 3-5 focused principles (not 5-8 generic ones)
|
||||
- [ ] 3-5 focused principles
|
||||
- [ ] Each is a belief, not a task
|
||||
- [ ] Would NOT be obvious to someone in that role
|
||||
- [ ] Defines what makes THIS agent unique
|
||||
@@ -230,63 +133,10 @@ If NO → Keep it
|
||||
|
||||
---
|
||||
|
||||
## Common Issues
|
||||
## Common Fixes
|
||||
|
||||
### Issue: Principles as Job Description
|
||||
|
||||
**Wrong:**
|
||||
```yaml
|
||||
principles:
|
||||
- Facilitate meetings with stakeholders
|
||||
- Write documentation
|
||||
- Create reports and presentations
|
||||
```
|
||||
|
||||
**Fix:**
|
||||
```yaml
|
||||
principles:
|
||||
- Channel expert facilitation: draw upon consensus-building frameworks, conflict
|
||||
resolution techniques, and what makes meetings actually productive
|
||||
- Documentation exists to enable decisions, not catalog activity
|
||||
- Meetings without clear outcomes are wastes of time - always define the decision before booking
|
||||
```
|
||||
|
||||
### Issue: Too Many Principles
|
||||
|
||||
**Wrong:** 7-8 vague bullet points
|
||||
|
||||
**Fix:** Merge related concepts into focused beliefs
|
||||
|
||||
```yaml
|
||||
# Before (7 principles)
|
||||
- Work collaboratively
|
||||
- Be transparent
|
||||
- Communicate clearly
|
||||
- Listen actively
|
||||
- Respect others
|
||||
- Build trust
|
||||
- Be honest
|
||||
|
||||
# After (3 principles)
|
||||
- Channel expert teamwork: draw upon high-performing team dynamics, psychological safety,
|
||||
and what separates functional teams from exceptional ones
|
||||
- Trust requires transparency - share context early, even when incomplete
|
||||
- Dissent must be safe - if no one disagrees, the meeting didn't need to happen
|
||||
```
|
||||
|
||||
### Issue: Generic Opener
|
||||
|
||||
**Wrong:**
|
||||
```yaml
|
||||
principles:
|
||||
- Be professional in all interactions
|
||||
- Maintain high standards
|
||||
```
|
||||
|
||||
**Fix:**
|
||||
```yaml
|
||||
principles:
|
||||
- Channel expert [domain] wisdom: [specific frameworks, mental models]
|
||||
- [unique belief 1]
|
||||
- [unique belief 2]
|
||||
```
|
||||
| Issue | Fix |
|
||||
|-------|-----|
|
||||
| Principles as job description | Rewrite as beliefs; add expert activation |
|
||||
| Too many (7-8) | Merge related concepts into focused beliefs |
|
||||
| Generic opener | "Channel expert [domain] wisdom: [specific frameworks]" |
|
||||
File renamed without changes.
@@ -1,204 +0,0 @@
|
||||
# Simple Agent Architecture
|
||||
|
||||
Self-contained agents in a single YAML file. No external dependencies, no persistent memory.
|
||||
|
||||
---
|
||||
|
||||
## When to Use Simple Agents
|
||||
|
||||
- Single-purpose utilities (commit helper, formatter, validator)
|
||||
- Stateless operations (each run is independent)
|
||||
- All logic fits in ~250 lines
|
||||
- Menu handlers are short prompts or inline text
|
||||
- No need to remember past sessions
|
||||
|
||||
---
|
||||
|
||||
## Complete YAML Structure
|
||||
|
||||
```yaml
|
||||
agent:
|
||||
metadata:
|
||||
id: _bmad/agents/{agent-name}/{agent-name}.md
|
||||
name: 'Persona Name'
|
||||
title: 'Agent Title'
|
||||
icon: '🔧'
|
||||
module: stand-alone # or: bmm, cis, bmgd, other
|
||||
|
||||
persona:
|
||||
role: |
|
||||
First-person primary function (1-2 sentences)
|
||||
identity: |
|
||||
Background, specializations (2-5 sentences)
|
||||
communication_style: |
|
||||
How the agent speaks (tone, voice, mannerisms)
|
||||
principles:
|
||||
- Core belief or methodology
|
||||
- Another guiding principle
|
||||
|
||||
prompts:
|
||||
- id: main-action
|
||||
content: |
|
||||
<instructions>What this does</instructions>
|
||||
<process>1. Step one 2. Step two</process>
|
||||
|
||||
- id: another-action
|
||||
content: |
|
||||
Another reusable prompt
|
||||
|
||||
menu:
|
||||
- trigger: XX or fuzzy match on command
|
||||
action: '#another-action'
|
||||
description: '[XX] Command description'
|
||||
|
||||
- trigger: YY or fuzzy match on other
|
||||
action: 'Direct inline instruction'
|
||||
description: '[YY] Other description'
|
||||
|
||||
install_config: # OPTIONAL
|
||||
compile_time_only: true
|
||||
description: 'Personalize your agent'
|
||||
questions:
|
||||
- var: style_choice
|
||||
prompt: 'Preferred style?'
|
||||
type: choice
|
||||
options:
|
||||
- label: 'Professional'
|
||||
value: 'professional'
|
||||
- label: 'Casual'
|
||||
value: 'casual'
|
||||
default: 'professional'
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Component Details
|
||||
|
||||
### Metadata
|
||||
|
||||
| Field | Purpose | Example |
|
||||
|-------|---------|---------|
|
||||
| `id` | Compiled path | `_bmad/agents/commit-poet/commit-poet.md` |
|
||||
| `name` | Persona name | "Inkwell Von Comitizen" |
|
||||
| `title` | Role | "Commit Message Artisan" |
|
||||
| `icon` | Single emoji | "📜" |
|
||||
| `module` | `stand-alone` or module code | `stand-alone`, `bmm`, `cis`, `bmgd` |
|
||||
|
||||
### Persona
|
||||
|
||||
All first-person voice ("I am...", "I do..."):
|
||||
|
||||
```yaml
|
||||
role: "I am a Commit Message Artisan..."
|
||||
identity: "I understand commit messages are documentation..."
|
||||
communication_style: "Poetic drama with flair..."
|
||||
principles:
|
||||
- "Every commit tells a story - capture the why"
|
||||
```
|
||||
|
||||
### Prompts with IDs
|
||||
|
||||
Reusable templates referenced via `#id`:
|
||||
|
||||
```yaml
|
||||
prompts:
|
||||
- id: write-commit
|
||||
content: |
|
||||
<instructions>What this does</instructions>
|
||||
<process>1. Step 2. Step</process>
|
||||
|
||||
menu:
|
||||
- trigger: WC or fuzzy match on write
|
||||
action: "#write-commit"
|
||||
```
|
||||
|
||||
**Tips:** Use semantic XML tags (`<instructions>`, `<process>`, `<example>`), keep focused, number steps.
|
||||
|
||||
### Menu Actions
|
||||
|
||||
Two forms:
|
||||
|
||||
1. **Prompt reference:** `action: "#prompt-id"`
|
||||
2. **Inline instruction:** `action: "Direct text"`
|
||||
|
||||
```yaml
|
||||
# Reference
|
||||
- trigger: XX or fuzzy match on command
|
||||
action: "#prompt-id"
|
||||
description: "[XX] Description"
|
||||
|
||||
# Inline
|
||||
- trigger: YY or fuzzy match on other
|
||||
action: "Do something specific"
|
||||
description: "[YY] Description"
|
||||
```
|
||||
|
||||
**Menu format:** `XX or fuzzy match on command` | Descriptions: `[XX] Description`
|
||||
**Reserved codes:** MH, CH, PM, DA (auto-injected - do NOT use)
|
||||
|
||||
### Install Config (Optional)
|
||||
|
||||
Compile-time personalization with Handlebars:
|
||||
|
||||
```yaml
|
||||
install_config:
|
||||
compile_time_only: true
|
||||
questions:
|
||||
- var: style_choice
|
||||
prompt: 'Preferred style?'
|
||||
type: choice
|
||||
options: [...]
|
||||
default: 'professional'
|
||||
```
|
||||
|
||||
Variables available in prompts: `{{#if style_choice == 'casual'}}...{{/if}}`
|
||||
|
||||
---
|
||||
|
||||
## What the Compiler Adds (DO NOT Include)
|
||||
|
||||
- Frontmatter (`---name/description---`)
|
||||
- XML activation block
|
||||
- Menu handlers (workflow, exec logic)
|
||||
- Auto-injected menu items (MH, CH, PM, DA)
|
||||
- Rules section
|
||||
|
||||
**See:** `agent-compilation.md` for details.
|
||||
|
||||
---
|
||||
|
||||
## Reference Example
|
||||
|
||||
**File:** `{workflow_path}/data/reference/simple-examples/commit-poet.agent.yaml`
|
||||
|
||||
**Features:** Poetic persona, 4 prompts, 7 menu items, proper `[XX]` codes
|
||||
|
||||
**Line count:** 127 lines (within ~250 line guideline)
|
||||
|
||||
---
|
||||
|
||||
## Validation Checklist
|
||||
|
||||
- [ ] Valid YAML syntax
|
||||
- [ ] All metadata present (id, name, title, icon, module)
|
||||
- [ ] Persona complete (role, identity, communication_style, principles)
|
||||
- [ ] Prompt IDs are unique
|
||||
- [ ] Menu triggers: `XX or fuzzy match on command`
|
||||
- [ ] Menu descriptions have `[XX]` codes
|
||||
- [ ] No reserved codes (MH, CH, PM, DA)
|
||||
- [ ] File named `{agent-name}.agent.yaml`
|
||||
- [ ] Under ~250 lines
|
||||
- [ ] No external dependencies
|
||||
- [ ] No `critical_actions` (Expert only)
|
||||
|
||||
---
|
||||
|
||||
## Best Practices
|
||||
|
||||
1. **First-person voice** in all persona elements
|
||||
2. **Focused prompts** - one clear purpose each
|
||||
3. **Semantic XML tags** (`<instructions>`, `<process>`, `<example>`)
|
||||
4. **Handlebars** for personalization (if using install_config)
|
||||
5. **Sensible defaults** in install_config
|
||||
6. **Numbered steps** in multi-step prompts
|
||||
7. **Keep under ~250 lines** for maintainability
|
||||
@@ -1,133 +0,0 @@
|
||||
# Simple Agent Validation Checklist
|
||||
|
||||
Validate Simple agents meet BMAD quality standards.
|
||||
|
||||
---
|
||||
|
||||
## YAML Structure
|
||||
|
||||
- [ ] YAML parses without errors
|
||||
- [ ] `agent.metadata` includes: `id`, `name`, `title`, `icon`, `module`, `hasSidecar`
|
||||
- [ ] `agent.metadata.hasSidecar` is `false` (Simple agents don't have sidecars)
|
||||
- [ ] `agent.metadata.module` is `stand-alone` or module code (`bmm`, `cis`, `bmgd`, etc.)
|
||||
- [ ] `agent.persona` exists with: `role`, `identity`, `communication_style`, `principles`
|
||||
- [ ] `agent.menu` exists with at least one item
|
||||
- [ ] File named: `{agent-name}.agent.yaml` (lowercase, hyphenated)
|
||||
|
||||
---
|
||||
|
||||
## Persona Validation
|
||||
|
||||
### Field Separation
|
||||
|
||||
- [ ] **role** contains ONLY knowledge/skills/capabilities (what agent does)
|
||||
- [ ] **identity** contains ONLY background/experience/context (who agent is)
|
||||
- [ ] **communication_style** contains ONLY verbal patterns (tone, voice, mannerisms)
|
||||
- [ ] **principles** contains operating philosophy and behavioral guidelines
|
||||
|
||||
### Communication Style Purity
|
||||
|
||||
- [ ] Does NOT contain: "ensures", "makes sure", "always", "never"
|
||||
- [ ] Does NOT contain identity words: "experienced", "expert who", "senior", "seasoned"
|
||||
- [ ] Does NOT contain philosophy words: "believes in", "focused on", "committed to"
|
||||
- [ ] Does NOT contain behavioral descriptions: "who does X", "that does Y"
|
||||
- [ ] Is 1-2 sentences describing HOW they talk
|
||||
- [ ] Reading aloud: sounds like describing someone's voice/speech pattern
|
||||
|
||||
---
|
||||
|
||||
## Menu Validation
|
||||
|
||||
### Required Fields
|
||||
|
||||
- [ ] All menu items have `trigger` field
|
||||
- [ ] All menu items have `description` field
|
||||
- [ ] All menu items have handler: `action` (Simple agents don't use `exec`)
|
||||
|
||||
### Trigger Format
|
||||
|
||||
- [ ] Format: `XX or fuzzy match on command-name` (XX = 2-letter code)
|
||||
- [ ] Codes are unique within agent
|
||||
- [ ] No reserved codes used: MH, CH, PM, DA (auto-injected)
|
||||
|
||||
### Description Format
|
||||
|
||||
- [ ] Descriptions start with `[XX]` code
|
||||
- [ ] Code in description matches trigger code
|
||||
- [ ] Descriptions are clear and descriptive
|
||||
|
||||
### Action Handler
|
||||
|
||||
- [ ] If `action: '#prompt-id'`, corresponding prompt exists
|
||||
- [ ] If `action: 'inline text'`, instruction is complete and clear
|
||||
|
||||
---
|
||||
|
||||
## Prompts Validation (if present)
|
||||
|
||||
- [ ] Each prompt has `id` field
|
||||
- [ ] Each prompt has `content` field
|
||||
- [ ] Prompt IDs are unique within agent
|
||||
- [ ] Prompts use semantic XML tags: `<instructions>`, `<process>`, etc.
|
||||
|
||||
---
|
||||
|
||||
## Simple Agent Specific
|
||||
|
||||
- [ ] Single .agent.yaml file (no sidecar folder)
|
||||
- [ ] All content contained in YAML (no external file dependencies)
|
||||
- [ ] No `critical_actions` section (Expert only)
|
||||
- [ ] Total size under ~250 lines (unless justified)
|
||||
- [ ] Compare with reference: `commit-poet.agent.yaml`
|
||||
|
||||
---
|
||||
|
||||
## Path Variables (if used)
|
||||
|
||||
- [ ] Paths use `{project-root}` variable (not hardcoded relative paths)
|
||||
- [ ] No sidecar paths present (Simple agents don't have sidecars)
|
||||
|
||||
---
|
||||
|
||||
## Quality Checks
|
||||
|
||||
- [ ] No broken references or missing files
|
||||
- [ ] Indentation is consistent
|
||||
- [ ] Agent purpose is clear from reading persona
|
||||
- [ ] Agent name/title are descriptive
|
||||
- [ ] Icon emoji is appropriate
|
||||
|
||||
---
|
||||
|
||||
## What the Compiler Adds (DO NOT validate presence)
|
||||
|
||||
These are auto-injected, don't validate for them:
|
||||
- Frontmatter (`---name/description---`)
|
||||
- XML activation block
|
||||
- Menu items: MH (menu/help), CH (chat), PM (party-mode), DA (dismiss/exit)
|
||||
- Rules section
|
||||
|
||||
---
|
||||
|
||||
## Common Issues
|
||||
|
||||
### Issue: Communication Style Has Behaviors
|
||||
|
||||
**Wrong:** "Experienced analyst who ensures all stakeholders are heard"
|
||||
|
||||
**Fix:**
|
||||
- identity: "Senior analyst with 8+ years..."
|
||||
- communication_style: "Speaks like a treasure hunter"
|
||||
- principles: "Ensure all stakeholder voices heard"
|
||||
|
||||
### Issue: Wrong Trigger Format
|
||||
|
||||
**Wrong:** `trigger: analyze`
|
||||
|
||||
**Fix:** `trigger: AN or fuzzy match on analyze`
|
||||
|
||||
### Issue: Description Missing Code
|
||||
|
||||
**Wrong:** `description: 'Analyze code'`
|
||||
|
||||
**Fix:** `description: '[AC] Analyze code'`
|
||||
@@ -1,222 +1,126 @@
|
||||
# Understanding Agent Types: Simple VS Expert VS Module
|
||||
# Understanding Agent Types
|
||||
|
||||
> **For the LLM running this workflow:** Load and review the example files referenced below when helping users choose an agent type.
|
||||
> - Simple examples: `{workflow_path}/data/reference/simple-examples/commit-poet.agent.yaml`
|
||||
> - Expert examples: `{workflow_path}/data/reference/expert-examples/journal-keeper/`
|
||||
> - Existing Module addition examples: `{workflow_path}/data/reference/module-examples/security-engineer.agent.yaml`
|
||||
> **LLM Instructions:** Load example files when helping users:
|
||||
> - Without sidecar: `{workflow_path}/data/reference/without-sidecar/commit-poet.agent.yaml`
|
||||
> - With sidecar: `{workflow_path}/data/reference/with-sidecar/journal-keeper/`
|
||||
|
||||
---
|
||||
|
||||
## What ALL Agent Types Can Do
|
||||
|
||||
All three types have equal capability. The difference is **architecture and integration**, NOT power.
|
||||
|
||||
- Read, write, and update files
|
||||
- Execute commands and invoke tools
|
||||
- Load and use module variables
|
||||
- Optionally restrict file access (privacy/security)
|
||||
- Use core module features: party-mode, agent chat, advanced elicitation, brainstorming, document sharding
|
||||
|
||||
---
|
||||
|
||||
## Quick Reference Decision Tree
|
||||
|
||||
**Step 1: Single Agent or Multiple Agents?**
|
||||
## Decision Tree
|
||||
|
||||
```
|
||||
Multiple personas/roles OR multi-user OR mixed data scope?
|
||||
├── YES → Use BMAD Module Builder (create module with multiple agents)
|
||||
└── NO → Single Agent (continue below)
|
||||
├── YES → Use BMAD Module Builder
|
||||
└── NO → Single Agent
|
||||
└── Need memory across sessions?
|
||||
├── YES → hasSidecar: true
|
||||
└── NO → hasSidecar: false
|
||||
```
|
||||
|
||||
**Step 2: Memory Needs (for Single Agent)**
|
||||
|
||||
```
|
||||
Need to remember things across sessions?
|
||||
├── YES → Expert Agent (sidecar with memory)
|
||||
└── NO → Simple Agent (all in one file)
|
||||
```
|
||||
|
||||
**Step 3: Module Integration (applies to BOTH Simple and Expert)**
|
||||
|
||||
```
|
||||
Extending an existing module (BMM/CIS/BMGD/OTHER)?
|
||||
├── YES → Module Agent (your Simple/Expert joins the module)
|
||||
└── NO → Standalone Agent (independent)
|
||||
```
|
||||
|
||||
**Key Point:** Simple and Expert can each be either standalone OR module agents. Memory and module integration are independent decisions.
|
||||
**Key:** All agents have equal capability. Difference is memory/state management only.
|
||||
|
||||
---
|
||||
|
||||
## The Three Types
|
||||
## Without Sidecar (`hasSidecar: false`)
|
||||
|
||||
### Simple Agent
|
||||
|
||||
**Everything in one file. No external dependencies. No memory.**
|
||||
**Single file, stateless, ~250 lines max**
|
||||
|
||||
```
|
||||
agent-name.agent.yaml (~250 lines max)
|
||||
├── metadata
|
||||
agent-name.agent.yaml
|
||||
├── metadata.hasSidecar: false
|
||||
├── persona
|
||||
├── prompts (inline, small)
|
||||
└── menu (triggers → #prompt-id or inline actions)
|
||||
├── prompts (inline)
|
||||
└── menu (triggers → #prompt-id or inline)
|
||||
```
|
||||
|
||||
**Choose when:**
|
||||
- Single-purpose utility
|
||||
- Each session is independent (stateless)
|
||||
- All knowledge fits in the YAML
|
||||
- Menu handlers are 5-15 line prompts
|
||||
| When to Use | Examples |
|
||||
|-------------|----------|
|
||||
| Single-purpose utility | Commit Poet |
|
||||
| Each session independent | Snarky Weather Bot |
|
||||
| All knowledge fits in YAML | Pun-making Barista |
|
||||
| Menu handlers 1-2 lines | Motivational Gym Bro |
|
||||
| Persona-driven (fun/character) | Sassy Fortune Teller |
|
||||
|
||||
**Examples:**
|
||||
- Commit message helper (conventional commits)
|
||||
- Document formatter/validator
|
||||
- Joke/teller persona agent
|
||||
- Simple data transformation and analysis tools
|
||||
|
||||
**Reference:** `./data/reference/simple-examples/commit-poet.agent.yaml`
|
||||
**Optional critical_actions:** Allowed for activation behaviors (quotes, data fetches). Must NOT reference sidecar files.
|
||||
|
||||
---
|
||||
|
||||
### Expert Agent
|
||||
## With Sidecar (`hasSidecar: true`)
|
||||
|
||||
**Sidecar folder with persistent memory, workflows, knowledge files.**
|
||||
**Persistent memory, knowledge, workflows**
|
||||
|
||||
```
|
||||
agent-name.agent.yaml
|
||||
└── agent-name-sidecar/
|
||||
├── memories.md # User profile, session history, patterns
|
||||
├── instructions.md # Protocols, boundaries, startup behavior
|
||||
├── [custom-files].md # Breakthroughs, goals, tracking, etc.
|
||||
├── workflows/ # Large workflows loaded on demand
|
||||
└── knowledge/ # Domain reference material
|
||||
├── memories.md # User profile, session history
|
||||
├── instructions.md # Protocols, boundaries
|
||||
├── [custom-files].md # Tracking, goals, etc.
|
||||
├── workflows/ # Large workflows on-demand
|
||||
└── knowledge/ # Domain reference
|
||||
```
|
||||
|
||||
**Choose when:**
|
||||
- Must remember across sessions
|
||||
- User might create multiple instances each with own memory of actions (such as 2 different developers agents)
|
||||
- Personal knowledge base that grows
|
||||
- Learning/evolving over time
|
||||
- Domain-specific with restricted file access
|
||||
- Complex multi-step workflows
|
||||
|
||||
**Examples:**
|
||||
- Journal companion (remembers mood patterns, past entries)
|
||||
- Personal job augmentation agent (knows your role, meetings, projects)
|
||||
- Therapy/health tracking (progress, goals, insights)
|
||||
- Domain advisor with custom knowledge base
|
||||
|
||||
**Reference:** `./data/reference/expert-examples/journal-keeper/`
|
||||
| When to Use | Examples |
|
||||
|-------------|----------|
|
||||
| Remember across sessions | Journal companion |
|
||||
| User preferences/settings | Novel writing buddy |
|
||||
| Personal knowledge base | Job augmentation agent |
|
||||
| Learning/evolving over time | Therapy/health tracking |
|
||||
| Domain-specific + restricted access | Fitness coach with PRs |
|
||||
| Complex multi-step workflows | Language tutor |
|
||||
|
||||
**Required critical_actions:**
|
||||
```yaml
|
||||
critical_actions:
|
||||
- "Load COMPLETE file ./sidecar/memories.md"
|
||||
- "Load COMPLETE file ./sidecar/instructions.md"
|
||||
- "ONLY read/write files in ./sidecar/ - private space"
|
||||
- "Load COMPLETE file {project-root}/_bmad/_memory/{sidecar-folder}/memories.md"
|
||||
- "Load COMPLETE file {project-root}/_bmad/_memory/{sidecar-folder}/instructions.md"
|
||||
- "ONLY read/write files in {project-root}/_bmad/_memory/{sidecar-folder}/"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Module Agent
|
||||
## Comparison
|
||||
|
||||
Two distinct purposes:
|
||||
|
||||
#### 1. Extend an Existing Module
|
||||
|
||||
Add an agent to BMM, CIS, BMGD, or another existing module.
|
||||
|
||||
**Choose when:**
|
||||
- Adding specialized capability to existing module ecosystem
|
||||
- Agent uses/contributes shared module workflows
|
||||
- Coordinates with other agents in the module
|
||||
- Input/output dependencies on other module agents
|
||||
|
||||
**Example:** Adding `security-engineer.agent.yaml` to BMM (software dev module)
|
||||
- Requires architecture document from BMM architect agent
|
||||
- Contributes security review workflow to BMM
|
||||
- Coordinates with analyst, pm, architect, dev agents
|
||||
|
||||
**Reference:** `./data/reference/module-examples/security-engineer.agent.yaml`
|
||||
|
||||
#### 2. Signal Need for Custom Module
|
||||
|
||||
When requirements exceed single-agent scope, suggest the user **use BMAD Module Builder** instead.
|
||||
|
||||
**Signals:**
|
||||
- "I need an HR agent, sales agent, F&I agent, and training coach..."
|
||||
- "Some info is global/shared across users, some is private per user..."
|
||||
- "Many workflows, skills, tools, and platform integrations..."
|
||||
|
||||
**Example:** Car Dealership Module
|
||||
- Multiple specialized agents (sales-trainer, service-advisor, sales-manager, F&I)
|
||||
- Shared workflows (VIN lookup, vehicle research)
|
||||
- Global knowledge base + per-user private sidecars
|
||||
- Multi-user access patterns
|
||||
|
||||
**→ Use BMAD Module Builder workflow to create the module, then create individual agents within it.**
|
||||
|
||||
---
|
||||
|
||||
## Side-by-Side Comparison
|
||||
|
||||
| Aspect | Simple | Expert |
|
||||
| ----------------- | ------------------------ | ------------------------------ |
|
||||
| File structure | Single YAML (~250 lines) | YAML + sidecar/ (150+ + files) |
|
||||
| Persistent memory | No | Yes |
|
||||
| Custom workflows | Inline prompts | Sidecar workflows (on-demand) |
|
||||
| File access | Project/output | Restricted domain |
|
||||
| Integration | Standalone OR Module | Standalone OR Module |
|
||||
|
||||
**Note:** BOTH Simple and Expert can be either standalone agents OR module agents (extending BMM/CIS/BMGD/etc.). Module integration is independent of memory needs.
|
||||
| Aspect | Without Sidecar | With Sidecar |
|
||||
|--------|----------------|--------------|
|
||||
| Structure | Single YAML | YAML + sidecar/ |
|
||||
| Persistent memory | No | Yes |
|
||||
| critical_actions | Optional | MANDATORY |
|
||||
| Workflows | Inline prompts | Sidecar files |
|
||||
| File access | Project/output | Restricted to sidecar |
|
||||
| Session state | Stateless | Remembers |
|
||||
| Best for | Focused skills | Long-term relationships |
|
||||
|
||||
---
|
||||
|
||||
## Selection Checklist
|
||||
|
||||
**Choose Simple if:**
|
||||
- [ ] One clear purpose
|
||||
- [ ] No need to remember past sessions
|
||||
- [ ] All logic fits in ~250 lines
|
||||
- [ ] Each interaction is independent
|
||||
**Without sidecar:**
|
||||
- [ ] One clear purpose, related skills
|
||||
- [ ] No cross-session memory needed
|
||||
- [ ] Fits in ~250 lines
|
||||
- [ ] Independent interactions
|
||||
- [ ] Persona-driven value
|
||||
|
||||
**Choose Expert if:**
|
||||
- [ ] Needs memory across sessions
|
||||
**With sidecar:**
|
||||
- [ ] Memory across sessions
|
||||
- [ ] Personal knowledge base
|
||||
- [ ] Domain-specific expertise
|
||||
- [ ] Restricted file access for privacy
|
||||
- [ ] Learning/evolving over time
|
||||
- [ ] Complex workflows in sidecar
|
||||
|
||||
**Then, for EITHER Simple or Expert:**
|
||||
- [ ] Extending existing module (BMM/CIS/BMGD/etc.) → Make it a Module Agent
|
||||
- [ ] Independent operation → Keep it Standalone
|
||||
- [ ] Restricted file access
|
||||
- [ ] Progress tracking/history
|
||||
- [ ] Complex workflows
|
||||
|
||||
**Escalate to Module Builder if:**
|
||||
- [ ] Multiple distinct personas needed (not one swiss-army-knife agent)
|
||||
- [ ] Many specialized workflows required
|
||||
- [ ] Multiple distinct personas needed
|
||||
- [ ] Many specialized workflows
|
||||
- [ ] Multiple users with mixed data scope
|
||||
- [ ] Shared resources across agents
|
||||
- [ ] Future platform integrations planned
|
||||
|
||||
---
|
||||
|
||||
## Tips for the LLM Facilitator
|
||||
## Quick Tips
|
||||
|
||||
- If unsure between Simple or Expert → **recommend Expert** (more flexible)
|
||||
- Multiple personas/skills → **suggest Module Builder**, not one giant agent
|
||||
- Ask about: memory needs, user count, data scope (global vs private), integration plans
|
||||
- Load example files when user wants to see concrete implementations
|
||||
- Reference examples to illustrate differences
|
||||
|
||||
---
|
||||
|
||||
## Architecture Notes
|
||||
|
||||
All three types are equally powerful. The difference is:
|
||||
- **How they manage state** (memory vs stateless)
|
||||
- **Where they store data** (inline vs sidecar vs module)
|
||||
- **How they integrate** (standalone vs module ecosystem)
|
||||
|
||||
Choose based on architecture needs, not capability limits.
|
||||
- Unsure? Ask about **memory needs first**
|
||||
- Multiple personas → Module Builder, not one giant agent
|
||||
- Ask: memory needs, user count, data scope, integration plans
|
||||
- Personality agents → usually without sidecar
|
||||
- Relationship/coaching agents → usually with sidecar
|
||||
@@ -3,7 +3,7 @@ name: 'step-02-discovery'
|
||||
description: 'Discover what user wants holistically'
|
||||
|
||||
# File References
|
||||
nextStepFile: './step-03-type-metadata.md'
|
||||
nextStepFile: './step-03-sidecar-metadata.md'
|
||||
agentPlan: '{bmb_creations_output_folder}/agent-plan-{agent_name}.md'
|
||||
brainstormContext: ../data/brainstorm-context.md
|
||||
|
||||
|
||||
+81
-69
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: 'step-03-type-metadata'
|
||||
description: 'Determine agent type and define metadata'
|
||||
name: 'step-03-sidecar-metadata'
|
||||
description: 'Determine if agent needs memory (sidecar) and define metadata'
|
||||
|
||||
# File References
|
||||
nextStepFile: './step-04-persona.md'
|
||||
@@ -9,9 +9,8 @@ agentTypesDoc: ../data/understanding-agent-types.md
|
||||
agentMetadata: ../data/agent-metadata.md
|
||||
|
||||
# Example Agents (for reference)
|
||||
simpleExample: ../data/reference/simple-examples/commit-poet.agent.yaml
|
||||
expertExample: ../data/reference/expert-examples/journal-keeper/journal-keeper.agent.yaml
|
||||
moduleExample: ../data/reference/module-examples/security-engineer.agent.yaml
|
||||
noSidecarExample: ../data/reference/without-sidecar/commit-poet.agent.yaml
|
||||
withSidecarExample: ../data/reference/with-sidecar/journal-keeper/journal-keeper.agent.yaml
|
||||
|
||||
# Task References
|
||||
advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml'
|
||||
@@ -20,7 +19,7 @@ partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md'
|
||||
|
||||
# STEP GOAL
|
||||
|
||||
Determine the agent's classification (Simple/Expert/Module) and define all mandatory metadata properties required for agent configuration. Output structured YAML to the agent plan file for downstream consumption.
|
||||
Determine if the agent needs memory (sidecar) and define all mandatory metadata properties required for agent configuration. Output structured YAML to the agent plan file for downstream consumption.
|
||||
|
||||
---
|
||||
|
||||
@@ -41,9 +40,9 @@ You ARE a master agent architect guiding collaborative agent creation. Balance:
|
||||
## Step-Specific Rules
|
||||
- LOAD and reference agentTypesDoc and agentMetadata before conversations
|
||||
- NEVER skip metadata properties - all are mandatory
|
||||
- VALIDATE type selection against user's articulated needs
|
||||
- VALIDATE sidecar decision against user's articulated needs
|
||||
- OUTPUT structured YAML format exactly as specified
|
||||
- SHOW examples when type classification is unclear
|
||||
- SHOW examples when sidecar decision is unclear
|
||||
|
||||
---
|
||||
|
||||
@@ -51,22 +50,35 @@ You ARE a master agent architect guiding collaborative agent creation. Balance:
|
||||
|
||||
## Protocol 1: Documentation Foundation
|
||||
Load reference materials first:
|
||||
1. Read agentTypesDoc for classification criteria
|
||||
1. Read agentTypesDoc for sidecar decision criteria
|
||||
2. Read agentMetadata for property definitions
|
||||
3. Keep examples ready for illustration
|
||||
|
||||
## Protocol 2: Purpose Discovery
|
||||
Guide natural conversation to uncover:
|
||||
- Primary agent function/responsibility
|
||||
- Complexity level (single task vs multi-domain)
|
||||
- Scope boundaries (standalone vs manages workflows)
|
||||
- Integration needs (other agents/workflows)
|
||||
- Does the agent need to remember things between sessions?
|
||||
- What should it remember? (user preferences, project state, progress, etc.)
|
||||
- Or is each interaction independent?
|
||||
|
||||
## Protocol 3: Type Determination
|
||||
Classify based on criteria:
|
||||
- **Simple**: Single focused purpose, minimal complexity (e.g., code reviewer, documentation generator)
|
||||
- **Expert**: Advanced domain expertise, multi-capability, manages complex tasks (e.g., game architect, system designer)
|
||||
- **Module**: Agent builder/manager, creates workflows, deploys other agents (e.g., agent-builder, workflow-builder)
|
||||
## Protocol 3: Sidecar Determination
|
||||
Classify based on ONE question:
|
||||
|
||||
**Does this agent need to remember things across sessions?**
|
||||
|
||||
| If... | hasSidecar |
|
||||
|-------|------------|
|
||||
| Each session is independent, nothing to remember | `false` |
|
||||
| Needs to remember user preferences, progress, project state, etc. | `true` |
|
||||
|
||||
**Examples to help user decide:**
|
||||
|
||||
| No sidecar needed | With sidecar needed |
|
||||
|-------------------|---------------------|
|
||||
| Commit Poet - each commit is independent | Journal companion - remembers moods, patterns |
|
||||
| Snarky Weather Bot - fresh snark each time | Novel buddy - remembers characters, plot |
|
||||
| Pun-making Barista - standalone jokes | Fitness coach - tracks your PRs, progress |
|
||||
| Motivational Gym Bro - hypes you up fresh | Language tutor - knows your vocabulary level |
|
||||
|
||||
## Protocol 4: Metadata Definition
|
||||
Define each property systematically:
|
||||
@@ -75,15 +87,16 @@ Define each property systematically:
|
||||
- **title**: Concise function description (one line, action-oriented)
|
||||
- **icon**: Visual identifier (emoji or short symbol)
|
||||
- **module**: Module path (format: `{project}:{type}:{name}`)
|
||||
- **hasSidecar**: Boolean - manages external workflows? (default: false)
|
||||
- **hasSidecar**: Boolean - does agent need memory? (this is the key decision)
|
||||
|
||||
## Protocol 5: Documentation Structure
|
||||
Output to agent plan file in exact YAML format:
|
||||
|
||||
```yaml
|
||||
# Agent Type & Metadata
|
||||
agent_type: [Simple|Expert|Module]
|
||||
classification_rationale: |
|
||||
# Agent Sidecar Decision & Metadata
|
||||
hasSidecar: [true|false]
|
||||
sidecar_rationale: |
|
||||
[Clear explanation of why this agent does or does not need memory]
|
||||
|
||||
metadata:
|
||||
id: [technical-identifier]
|
||||
@@ -97,69 +110,68 @@ metadata:
|
||||
## Protocol 6: Confirmation Menu
|
||||
Present structured options:
|
||||
- **[A] Accept** - Confirm and advance to next step
|
||||
- **[P] Pivot** - Modify type/metadata choices
|
||||
- **[C] Clarify** - Ask questions about classification
|
||||
- **[P] Pivot** - Modify sidecar/metadata choices
|
||||
- **[C] Clarify** - Ask questions about sidecar decision
|
||||
|
||||
---
|
||||
|
||||
# CONTEXT BOUNDARIES
|
||||
|
||||
## In Scope
|
||||
- Agent type classification
|
||||
- Sidecar decision (hasSidecar: true/false)
|
||||
- All 6 metadata properties
|
||||
- Documentation to plan file
|
||||
- Type selection guidance with examples
|
||||
- Sidecar decision guidance with examples
|
||||
|
||||
## Out of Scope (Future Steps)
|
||||
- Persona/character development (Step 3)
|
||||
- Command structure design (Step 4)
|
||||
- Agent naming/branding refinement (Step 5)
|
||||
- Implementation/build (Step 6)
|
||||
- Validation/testing (Step 7)
|
||||
- Persona/character development (Step 4)
|
||||
- Command structure design (Step 5)
|
||||
- Agent naming/branding refinement (Step 6)
|
||||
- Implementation/build (Step 7)
|
||||
- Validation/testing (Step 8)
|
||||
|
||||
## Red Flags to Address
|
||||
- User wants complex agent but selects "Simple" type
|
||||
- Module classification without workflow management needs
|
||||
- User wants complex memory but selects hasSidecar: false
|
||||
- Unclear about what "memory across sessions" means
|
||||
- Missing or unclear metadata properties
|
||||
- Module path format confusion
|
||||
|
||||
---
|
||||
|
||||
## MANDATORY SEQUENCE
|
||||
# MANDATORY SEQUENCE
|
||||
|
||||
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change.
|
||||
|
||||
## 1. Load Documentation
|
||||
Read and internalize:
|
||||
- `{agentTypesDoc}` - Classification framework
|
||||
- `{agentTypesDoc}` - Sidecar decision framework
|
||||
- `{agentMetadata}` - Property definitions
|
||||
- Keep examples accessible for reference
|
||||
|
||||
## 2. Purpose Discovery Conversation
|
||||
## 2. Sidecar Decision Conversation
|
||||
Engage user with questions in `{communication_language}`:
|
||||
- "What is the primary function this agent will perform?"
|
||||
- "How complex are the tasks this agent will handle?"
|
||||
- "Will this agent need to manage workflows or other agents?"
|
||||
- "What specific domains or expertise areas are involved?"
|
||||
- "Should your agent remember things between sessions?"
|
||||
- "What should it remember? User preferences? Project state? Progress over time?"
|
||||
- "Or is each interaction independent and fresh?"
|
||||
|
||||
Listen for natural language cues about scope and complexity.
|
||||
Listen for natural language cues about memory needs.
|
||||
|
||||
## 3. Agent Type Determination
|
||||
Based on discovery, propose classification:
|
||||
- Present recommended type with reasoning
|
||||
## 3. Sidecar Determination
|
||||
Based on discovery, propose decision:
|
||||
- Present recommended hasSidecar value with reasoning
|
||||
- Show relevant example if helpful
|
||||
- Confirm classification matches user intent
|
||||
- Confirm decision matches user intent
|
||||
- Allow pivoting if user vision evolves
|
||||
|
||||
**Conversation Template:**
|
||||
```
|
||||
Based on our discussion, I recommend classifying this as a [TYPE] agent because:
|
||||
Based on our discussion, I recommend hasSidecar: [true/false] because:
|
||||
[reasoning from discovery]
|
||||
|
||||
[If helpful: "For reference, here's a similar [TYPE] agent:"]
|
||||
[Show relevant example path: simpleExample/expertExample/moduleExample]
|
||||
[If helpful: "For reference, here's a similar agent:"]
|
||||
[Show relevant example path: noSidecarExample/withSidecarExample]
|
||||
|
||||
Does this classification feel right to you?
|
||||
Does this feel right to you?
|
||||
```
|
||||
|
||||
## 4. Define All Metadata Properties
|
||||
@@ -196,10 +208,10 @@ Work through each property systematically:
|
||||
- Guide user through structure if unfamiliar
|
||||
|
||||
**4f. Sidecar Configuration**
|
||||
- Boolean: manages external workflows?
|
||||
- Typically false for Simple/Expert agents
|
||||
- True for Module agents that deploy workflows
|
||||
- Confirm based on user's integration needs
|
||||
- Boolean: does agent need memory?
|
||||
- Most personality-driven agents don't need it
|
||||
- Most relationship/coaching/tracking agents do need it
|
||||
- Confirm based on user's memory needs
|
||||
|
||||
**Conversation Template:**
|
||||
```
|
||||
@@ -221,10 +233,10 @@ Ready to confirm, or should we adjust any properties?
|
||||
Write to `{agentPlan}`:
|
||||
|
||||
```yaml
|
||||
# Agent Type & Metadata
|
||||
agent_type: [Simple|Expert|Module]
|
||||
classification_rationale: |
|
||||
[Clear explanation of why this type matches user's articulated needs]
|
||||
# Agent Sidecar Decision & Metadata
|
||||
hasSidecar: [true|false]
|
||||
sidecar_rationale: |
|
||||
[Clear explanation of why this agent does or does not need memory based on user's stated needs]
|
||||
|
||||
metadata:
|
||||
id: [technical-identifier]
|
||||
@@ -234,12 +246,12 @@ metadata:
|
||||
module: [project:type:name]
|
||||
hasSidecar: [true|false]
|
||||
|
||||
# Type Classification Notes
|
||||
type_decision_date: [YYYY-MM-DD]
|
||||
type_confidence: [High/Medium/Low]
|
||||
considered_alternatives: |
|
||||
- [Alternative type]: [reason not chosen]
|
||||
- [Alternative type]: [reason not chosen]
|
||||
# Sidecar Decision Notes
|
||||
sidecar_decision_date: [YYYY-MM-DD]
|
||||
sidecar_confidence: [High/Medium/Low]
|
||||
memory_needs_identified: |
|
||||
- [Specific memory needs if hasSidecar: true]
|
||||
- [Or: N/A - stateless interactions]
|
||||
```
|
||||
|
||||
### 6. Present MENU OPTIONS
|
||||
@@ -262,14 +274,14 @@ Display: "**Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Cont
|
||||
|
||||
## CRITICAL STEP COMPLETION NOTE
|
||||
|
||||
ONLY WHEN [C continue option] is selected and [agent type classified and all 6 metadata properties defined and documented], will you then load and read fully `{nextStepFile}` to execute and begin persona development.
|
||||
ONLY WHEN [C continue option] is selected and [hasSidecar decision made and all 6 metadata properties defined and documented], will you then load and read fully `{nextStepFile}` to execute and begin persona development.
|
||||
|
||||
---
|
||||
|
||||
# SYSTEM SUCCESS/FAILURE METRICS
|
||||
|
||||
## Success Indicators
|
||||
- Type classification clearly justified
|
||||
- Sidecar decision clearly justified
|
||||
- All metadata properties populated correctly
|
||||
- YAML structure matches specification exactly
|
||||
- User confirms understanding and acceptance
|
||||
@@ -278,16 +290,16 @@ ONLY WHEN [C continue option] is selected and [agent type classified and all 6 m
|
||||
## Failure Indicators
|
||||
- Missing or undefined metadata properties
|
||||
- YAML structure malformed
|
||||
- User confusion about type classification
|
||||
- User confusion about sidecar decision
|
||||
- Inadequate documentation to plan file
|
||||
- Proceeding without user confirmation
|
||||
|
||||
## Recovery Mode
|
||||
If user struggles with classification:
|
||||
If user struggles with sidecar decision:
|
||||
- Show concrete examples from each type
|
||||
- Compare/contrast types with their use case
|
||||
- Ask targeted questions about complexity/scope
|
||||
- Offer type recommendation with clear reasoning
|
||||
- Compare/contrast with their use case
|
||||
- Ask targeted questions about memory needs
|
||||
- Offer recommendation with clear reasoning
|
||||
|
||||
Recover metadata definition issues by:
|
||||
- Showing property format examples
|
||||
@@ -10,8 +10,8 @@ principlesCrafting: ../data/principles-crafting.md
|
||||
communicationPresets: ../data/communication-presets.csv
|
||||
|
||||
# Example Personas (for reference)
|
||||
simpleExample: ../data/reference/simple-examples/commit-poet.agent.yaml
|
||||
expertExample: ../data/reference/expert-examples/journal-keeper/journal-keeper.agent.yaml
|
||||
simpleExample: ../data/reference/without-sidecar/commit-poet.agent.yaml
|
||||
expertExample: ../data/reference/with-sidecar/journal-keeper/journal-keeper.agent.yaml
|
||||
|
||||
# Task References
|
||||
advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml'
|
||||
|
||||
@@ -8,8 +8,8 @@ agentPlan: '{bmb_creations_output_folder}/agent-plan-{agent_name}.md'
|
||||
agentMenuPatterns: ../data/agent-menu-patterns.md
|
||||
|
||||
# Example Menus (for reference)
|
||||
simpleExample: ../data/reference/simple-examples/commit-poet.agent.yaml
|
||||
expertExample: ../data/reference/expert-examples/journal-keeper/journal-keeper.agent.yaml
|
||||
simpleExample: ../data/reference/without-sidecar/commit-poet.agent.yaml
|
||||
expertExample: ../data/reference/with-sidecar/journal-keeper/journal-keeper.agent.yaml
|
||||
|
||||
# Task References
|
||||
advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml'
|
||||
|
||||
@@ -6,13 +6,12 @@ description: 'Plan activation behavior and route to build'
|
||||
agentPlan: '{bmb_creations_output_folder}/agent-plan-{agent_name}.md'
|
||||
criticalActions: ../data/critical-actions.md
|
||||
|
||||
# Build Step Routes (determined by agent type)
|
||||
simpleBuild: './step-07a-build-simple.md'
|
||||
expertBuild: './step-07b-build-expert.md'
|
||||
moduleBuild: './step-07c-build-module.md'
|
||||
# Build Step Route (determined by hasSidecar)
|
||||
agentBuild: './step-07-build-agent.md'
|
||||
|
||||
# Example critical_actions (for reference)
|
||||
expertExample: ../data/reference/expert-examples/journal-keeper/journal-keeper.agent.yaml
|
||||
withSidecarExample: ../data/reference/with-sidecar/journal-keeper/journal-keeper.agent.yaml
|
||||
withoutSidecarExample: ../data/reference/without-sidecar/commit-poet.agent.yaml
|
||||
|
||||
# Task References
|
||||
advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml'
|
||||
@@ -20,7 +19,8 @@ partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md'
|
||||
---
|
||||
|
||||
# STEP GOAL
|
||||
Define activation behavior through critical_actions and route to the appropriate build step based on agent complexity.
|
||||
|
||||
Define activation behavior through critical_actions and confirm routing to the build step based on hasSidecar decision.
|
||||
|
||||
# MANDATORY EXECUTION RULES
|
||||
|
||||
@@ -29,9 +29,9 @@ Define activation behavior through critical_actions and route to the appropriate
|
||||
- Read agentPlan to access all accumulated metadata
|
||||
- These are non-negotiable prerequisites
|
||||
|
||||
2. **MUST Determine Route Before Activation Discussion**
|
||||
- Check `module` and `hasSidecar` from plan metadata
|
||||
- Determine destination build step FIRST
|
||||
2. **MUST Confirm hasSidecar Decision**
|
||||
- Check `hasSidecar` from plan metadata (decided in Step 3)
|
||||
- This determines the build approach
|
||||
- Inform user of routing decision
|
||||
|
||||
3. **MUST Document Activation Decision**
|
||||
@@ -39,14 +39,11 @@ Define activation behavior through critical_actions and route to the appropriate
|
||||
- OR document deliberate omission with rationale
|
||||
- No middle ground - commit to one path
|
||||
|
||||
4. **MUST Follow Routing Logic Exactly**
|
||||
4. **MUST Follow Simple Routing Logic**
|
||||
```yaml
|
||||
# Route determination based on module and hasSidecar
|
||||
# Module agents: any module value other than "stand-alone"
|
||||
module ≠ "stand-alone" → step-07c-build-module.md
|
||||
# Stand-alone agents: determined by hasSidecar
|
||||
module = "stand-alone" + hasSidecar: true → step-07b-build-expert.md
|
||||
module = "stand-alone" + hasSidecar: false → step-07a-build-simple.md
|
||||
# Route determination based on hasSidecar only
|
||||
hasSidecar: false → Agent without sidecar (single YAML file)
|
||||
hasSidecar: true → Agent with sidecar (YAML + sidecar folder)
|
||||
```
|
||||
|
||||
5. **NEVER Skip Documentation**
|
||||
@@ -62,10 +59,9 @@ Execute BEFORE engaging user:
|
||||
1. Load criticalActions.md
|
||||
2. Load agentPlan-{agent_name}.md
|
||||
3. Extract routing metadata:
|
||||
- hasSidecar (boolean)
|
||||
- module (string)
|
||||
- agentType (if defined)
|
||||
4. Determine destination build step
|
||||
- hasSidecar (boolean) - decided in Step 3
|
||||
- All other metadata from prior steps
|
||||
4. Confirm build approach
|
||||
|
||||
## Protocol 2: Routing Disclosure
|
||||
Inform user immediately of determined route:
|
||||
@@ -73,9 +69,8 @@ Inform user immediately of determined route:
|
||||
```
|
||||
"Based on your agent configuration:
|
||||
- hasSidecar: {hasSidecar}
|
||||
- module: {module}
|
||||
|
||||
→ Routing to: {destinationStep}
|
||||
→ Building: Agent {WITH|WITHOUT} sidecar
|
||||
|
||||
Now let's plan your activation behavior..."
|
||||
```
|
||||
@@ -106,10 +101,10 @@ activation:
|
||||
hasCriticalActions: true/false
|
||||
rationale: "Explanation of why or why not"
|
||||
criticalActions: [] # Only if hasCriticalActions: true
|
||||
|
||||
routing:
|
||||
destinationBuild: "step-06-{X}.md"
|
||||
buildApproach: "Agent {with|without} sidecar"
|
||||
hasSidecar: {boolean}
|
||||
module: "{module}"
|
||||
```
|
||||
|
||||
# CONTEXT BOUNDARIES
|
||||
@@ -117,21 +112,22 @@ routing:
|
||||
## In Scope
|
||||
- Planning activation behavior for the agent
|
||||
- Defining critical_actions array
|
||||
- Routing to appropriate build step
|
||||
- Confirming routing to build step
|
||||
- Documenting activation decisions
|
||||
|
||||
## Out of Scope
|
||||
- Writing actual activation code (build step)
|
||||
- Designing sidecar workflows (build step)
|
||||
- Changing core agent metadata (locked after step 04)
|
||||
- Changing core agent metadata (locked after Step 4)
|
||||
- Implementing commands (build step)
|
||||
|
||||
## Routing Boundaries
|
||||
- Simple agents: No sidecar, straightforward activation
|
||||
- Expert agents: Sidecar + stand-alone module
|
||||
- Module agents: Sidecar + parent module integration
|
||||
- **Agent WITHOUT sidecar**: Single YAML file, no persistent memory
|
||||
- **Agent WITH sidecar**: YAML file + sidecar folder with persistent memory
|
||||
|
||||
## MANDATORY SEQUENCE
|
||||
---
|
||||
|
||||
# MANDATORY SEQUENCE
|
||||
|
||||
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change.
|
||||
|
||||
@@ -142,14 +138,26 @@ cat {criticalActions}
|
||||
cat {agentPlan}
|
||||
```
|
||||
|
||||
## 2. Discuss Activation Needs
|
||||
## 2. Confirm Routing Decision
|
||||
Verify hasSidecar decision from Step 3:
|
||||
|
||||
```
|
||||
"Confirming your agent configuration from Step 3:
|
||||
- hasSidecar: {value from plan}
|
||||
- This means: {Agent will|will not} remember things between sessions
|
||||
- Build approach: {Single YAML file|YAML + sidecar folder}
|
||||
|
||||
Is this still correct?"
|
||||
```
|
||||
|
||||
## 3. Discuss Activation Needs
|
||||
Ask user:
|
||||
- "Should your agent be able to take autonomous actions?"
|
||||
- "Are there specific workflows it should trigger?"
|
||||
- "Should it run as a background process or scheduled task?"
|
||||
- "Or will it primarily respond to direct prompts?"
|
||||
|
||||
## 3. Define critical_actions OR Explicitly Omit
|
||||
## 4. Define critical_actions OR Explicitly Omit
|
||||
|
||||
**If defining:**
|
||||
- Reference criticalActions.md patterns
|
||||
@@ -157,29 +165,27 @@ Ask user:
|
||||
- Each action should be clear and scoped
|
||||
- Document rationale for each
|
||||
|
||||
**For agents WITH sidecar, critical_actions MUST include:**
|
||||
```
|
||||
- "Load COMPLETE file {project-root}/_bmad/_memory/{sidecar-folder}/memories.md"
|
||||
- "Load COMPLETE file {project-root}/_bmad/_memory/{sidecar-folder}/instructions.md"
|
||||
- "ONLY read/write files in {project-root}/_bmad/_memory/{sidecar-folder}/ - private space"
|
||||
```
|
||||
Plus any additional activation behaviors the agent needs.
|
||||
|
||||
**For agents WITHOUT sidecar, critical_actions are OPTIONAL and can include:**
|
||||
```
|
||||
- "Give user an inspirational quote before showing menu"
|
||||
- "Fetch latest data from {project-root}/finances/ before displaying menu"
|
||||
- "Display a quick status summary on activation"
|
||||
```
|
||||
Agents without sidecar omit critical_actions entirely if no activation behavior is needed.
|
||||
|
||||
**If omitting:**
|
||||
- State clearly: "This agent will not have critical_actions"
|
||||
- Explain why: "This agent is a responsive assistant that operates under direct user guidance"
|
||||
- Document the rationale
|
||||
|
||||
## 4. Route to Build Step
|
||||
|
||||
Determine destination:
|
||||
|
||||
```yaml
|
||||
# Check plan metadata
|
||||
hasSidecar: {value from step 04}
|
||||
module: "{value from step 04}"
|
||||
|
||||
# Route logic
|
||||
if hasSidecar == false:
|
||||
destination = simpleBuild
|
||||
elif hasSidecar == true and module == "stand-alone":
|
||||
destination = expertBuild
|
||||
else: # hasSidecar == true and module != "stand-alone"
|
||||
destination = moduleBuild
|
||||
```
|
||||
|
||||
## 5. Document to Plan
|
||||
|
||||
Update agentPlan with:
|
||||
@@ -187,21 +193,17 @@ Update agentPlan with:
|
||||
```yaml
|
||||
---
|
||||
activation:
|
||||
hasCriticalActions: true
|
||||
rationale: "Agent needs to autonomously trigger workflows for task automation"
|
||||
hasCriticalActions: {true/false}
|
||||
rationale: "Agent needs to autonomously trigger workflows for task automation" OR "Agent operates under direct user guidance"
|
||||
criticalActions:
|
||||
- name: "start-workflow"
|
||||
description: "Initiate a predefined workflow for task execution"
|
||||
- name: "schedule-task"
|
||||
description: "Schedule tasks for future execution"
|
||||
- name: "sync-data"
|
||||
description: "Synchronize data with external systems"
|
||||
# ... additional actions if needed
|
||||
|
||||
routing:
|
||||
destinationBuild: "step-06-build-expert.md"
|
||||
hasSidecar: true
|
||||
module: "stand-alone"
|
||||
rationale: "Agent requires sidecar workflows for autonomous operation"
|
||||
buildApproach: "Agent {with|without} sidecar"
|
||||
hasSidecar: {true/false}
|
||||
rationale: "Agent {needs|does not need} persistent memory across sessions"
|
||||
---
|
||||
```
|
||||
|
||||
@@ -213,7 +215,7 @@ Display: "**Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Cont
|
||||
|
||||
- IF A: Execute {advancedElicitationTask}, and when finished redisplay the menu
|
||||
- IF P: Execute {partyModeWorkflow}, and when finished redisplay the menu
|
||||
- IF C: Save content to {agentPlan}, update frontmatter, determine appropriate build step based on hasSidecar and module values, then only then load, read entire file, then execute {simpleBuild} or {expertBuild} or {moduleBuild} as determined
|
||||
- IF C: Save content to {agentPlan}, update frontmatter, then only then load, read entire file, then execute {agentBuild}
|
||||
- IF Any other comments or queries: help user respond then [Redisplay Menu Options](#6-present-menu-options)
|
||||
|
||||
#### EXECUTION RULES:
|
||||
@@ -225,14 +227,13 @@ Display: "**Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Cont
|
||||
|
||||
## CRITICAL STEP COMPLETION NOTE
|
||||
|
||||
This is the **ROUTING HUB** of agent creation. ONLY WHEN [C continue option] is selected and [routing decision determined with activation needs documented], will you then determine the appropriate build step based on hasSidecar/module values and load and read fully that build step file to execute.
|
||||
This is the **final planning step** before building. ONLY WHEN [C continue option] is selected and [activation needs documented], will you then load and read fully `{agentBuild}` to execute and build the agent.
|
||||
|
||||
Routing logic:
|
||||
- hasSidecar: false → step-06-build-simple.md
|
||||
- hasSidecar: true + module: "stand-alone" → step-06-build-expert.md
|
||||
- hasSidecar: true + module: ≠ "stand-alone" → step-06-build-module.md
|
||||
- hasSidecar: false → Agent WITHOUT sidecar (single YAML)
|
||||
- hasSidecar: true → Agent WITH sidecar (YAML + sidecar folder)
|
||||
|
||||
You cannot proceed to build without completing routing.
|
||||
You cannot proceed to build without completing activation planning.
|
||||
|
||||
---
|
||||
|
||||
@@ -241,39 +242,36 @@ You cannot proceed to build without completing routing.
|
||||
✅ **COMPLETION CRITERIA:**
|
||||
- [ ] criticalActions.md loaded and understood
|
||||
- [ ] agentPlan loaded with all prior metadata
|
||||
- [ ] Routing decision determined and communicated
|
||||
- [ ] Routing decision confirmed (hasSidecar from Step 3)
|
||||
- [ ] Activation needs discussed with user
|
||||
- [ ] critical_actions defined OR explicitly omitted with rationale
|
||||
- [ ] Plan updated with activation and routing metadata
|
||||
- [ ] User confirms routing to appropriate build step
|
||||
- [ ] User confirms ready to build
|
||||
|
||||
✅ **SUCCESS INDICATORS:**
|
||||
- Clear activation decision documented
|
||||
- Route to build step is unambiguous
|
||||
- User understands why they're going to {simple|expert|module} build
|
||||
- Route to build is unambiguous
|
||||
- User understands the build approach
|
||||
- Plan file reflects complete activation configuration
|
||||
|
||||
❌ **FAILURE MODES:**
|
||||
- Attempting to define critical_actions without reading reference
|
||||
- Routing decision not documented in plan
|
||||
- User doesn't understand which build step comes next
|
||||
- User doesn't understand the build approach
|
||||
- Ambiguous activation configuration (neither defined nor omitted)
|
||||
- Skipping routing discussion entirely
|
||||
- Skipping activation discussion entirely
|
||||
|
||||
⚠️ **RECOVERY PATHS:**
|
||||
⚠️ **RECOVERY PATHS**
|
||||
If activation planning goes wrong:
|
||||
|
||||
1. **Can't decide on activation?**
|
||||
- Default: Omit critical_actions
|
||||
- Route to simpleBuild
|
||||
- Can add later via edit-agent workflow
|
||||
|
||||
2. **Uncertain about routing?**
|
||||
- Check hasSidecar value
|
||||
- Check module value
|
||||
- Apply routing logic strictly
|
||||
|
||||
3. **User wants to change route?**
|
||||
- Adjust hasSidecar or module values
|
||||
- Re-run routing logic
|
||||
2. **User wants to change hasSidecar?**
|
||||
- Return to Step 3 to revise decision
|
||||
- Update plan accordingly
|
||||
|
||||
3. **Uncertain about routing?**
|
||||
- Check hasSidecar value
|
||||
- Apply simple routing logic
|
||||
@@ -0,0 +1,315 @@
|
||||
---
|
||||
name: 'step-07-build-agent'
|
||||
description: 'Generate agent YAML from plan (with or without sidecar)'
|
||||
|
||||
# File References
|
||||
nextStepFile: './step-08-celebrate.md'
|
||||
agentPlan: '{bmb_creations_output_folder}/agent-plan-{agent_name}.md'
|
||||
|
||||
# Output paths (determined by hasSidecar)
|
||||
agentBuildOutput: '{bmb_creations_output_folder}/{agent-name}/'
|
||||
agentYamlOutput: '{bmb_creations_output_folder}/{agent-name}/{agent-name}.agent.yaml'
|
||||
agentYamlOutputNoSidecar: '{bmb_creations_output_folder}/{agent-name}.agent.yaml'
|
||||
sidecarOutput: '{bmb_creations_output_folder}/{agent-name}/{agent-name}-sidecar/'
|
||||
|
||||
# Template and Architecture
|
||||
agentTemplate: ../templates/agent-template.md
|
||||
agentArch: ../data/agent-architecture.md
|
||||
agentCompilation: ../data/agent-compilation.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
|
||||
|
||||
# Task References
|
||||
advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml'
|
||||
partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md'
|
||||
---
|
||||
|
||||
# STEP GOAL
|
||||
|
||||
Assemble the agent plan content into a complete agent YAML file. The build approach (with or without sidecar) is determined by the `hasSidecar` decision made in Step 3.
|
||||
|
||||
---
|
||||
|
||||
# MANDATORY EXECUTION RULES
|
||||
|
||||
1. **DETERMINE BUILD APPROACH FIRST**: Check `hasSidecar` from agentPlan before starting
|
||||
2. **TEMPLATE COMPLIANCE**: Follow agent-template.md structure exactly
|
||||
3. **YAML VALIDATION**: Ensure valid YAML syntax with proper indentation (2-space)
|
||||
4. **EXISTING CHECK**: If output file exists, ask user before overwriting
|
||||
5. **NO DRIFT**: Use ONLY content from agentPlan - no additions or interpretations
|
||||
6. **SIDECAR REQUIREMENT**: If hasSidecar=true, MUST create sidecar folder structure
|
||||
|
||||
---
|
||||
|
||||
# EXECUTION PROTOCOLS
|
||||
|
||||
## Phase 1: Load Architecture and Templates
|
||||
1. Read `agentTemplate` - defines YAML structure for agents
|
||||
2. Read `agentArch` - architecture requirements for agents
|
||||
3. Read `agentCompilation` - assembly rules for YAML generation
|
||||
4. Read `criticalActions` - validation requirements for critical_actions
|
||||
|
||||
## Phase 2: Load Agent Plan
|
||||
1. Read `agentPlan` containing all collected content from Steps 2-5
|
||||
2. Verify plan contains:
|
||||
- hasSidecar decision (true/false)
|
||||
- Persona content
|
||||
- Commands structure
|
||||
- All metadata fields
|
||||
- Activation decisions (critical_actions)
|
||||
|
||||
## Phase 3: Determine Build Approach
|
||||
|
||||
Check `hasSidecar` from plan:
|
||||
|
||||
```yaml
|
||||
hasSidecar: false
|
||||
→ Build: Agent WITHOUT sidecar
|
||||
→ Output: Single YAML file at {agentYamlOutputNoSidecar}
|
||||
→ Structure: Everything in one file (~250 lines max)
|
||||
|
||||
hasSidecar: true
|
||||
→ Build: Agent WITH sidecar
|
||||
→ Output: YAML + sidecar folder structure
|
||||
→ Structure: YAML file + {agent-name}-sidecar/ folder
|
||||
```
|
||||
|
||||
**Inform user of build approach:**
|
||||
```
|
||||
"Building: Agent {WITH|WITHOUT} sidecar
|
||||
hasSidecar: {true/false}
|
||||
Output: {output path description}"
|
||||
```
|
||||
|
||||
## Phase 4: Assemble Agent YAML
|
||||
|
||||
### For Agents WITHOUT Sidecar (hasSidecar: false)
|
||||
|
||||
**Structure:**
|
||||
```yaml
|
||||
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
|
||||
|
||||
commands:
|
||||
- name: '{command-name}'
|
||||
description: '{what command does}'
|
||||
trigger: '{menu trigger}'
|
||||
steps:
|
||||
- {step 1}
|
||||
- {step 2}
|
||||
# ... all commands from plan
|
||||
|
||||
configuration:
|
||||
temperature: {temperature}
|
||||
max-tokens: {max-tokens}
|
||||
response-format: {format}
|
||||
# ... other configuration from plan
|
||||
|
||||
metadata:
|
||||
hasSidecar: false
|
||||
agent-type: 'agent'
|
||||
```
|
||||
|
||||
**Output:** Single YAML file at `{agentYamlOutputNoSidecar}`
|
||||
|
||||
### For Agents WITH Sidecar (hasSidecar: true)
|
||||
|
||||
**Structure:**
|
||||
```yaml
|
||||
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}'
|
||||
trigger: '{menu trigger}'
|
||||
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}/'
|
||||
hasSidecar: true
|
||||
agent-type: 'agent'
|
||||
memory-type: 'persistent'
|
||||
```
|
||||
|
||||
**Output:** YAML file at `{agentYamlOutput}` + sidecar folder structure
|
||||
|
||||
### Phase 5: Create Sidecar Structure (IF hasSidecar: true)
|
||||
|
||||
Skip this phase if hasSidecar: false
|
||||
|
||||
1. **Create Sidecar Directory**:
|
||||
```bash
|
||||
mkdir -p {sidecarOutput}
|
||||
```
|
||||
|
||||
2. **Create Starter Files** (if specified in critical_actions):
|
||||
```bash
|
||||
touch {sidecarOutput}/memories.md
|
||||
touch {sidecarOutput}/instructions.md
|
||||
# ... additional files from critical_actions
|
||||
```
|
||||
|
||||
3. **Add README to Sidecar**:
|
||||
```markdown
|
||||
# {sidecar-folder} Sidecar
|
||||
|
||||
This folder stores persistent memory for the **{agent-name}** agent.
|
||||
|
||||
## Purpose
|
||||
{purpose from critical_actions}
|
||||
|
||||
## Files
|
||||
- memories.md: User profile, session history, patterns
|
||||
- instructions.md: Protocols, boundaries, startup behavior
|
||||
- {additional files}
|
||||
|
||||
## Runtime Access
|
||||
After BMAD installation, this folder will be accessible at:
|
||||
`{project-root}/_bmad/_memory/{sidecar-folder}/{filename}.md`
|
||||
```
|
||||
|
||||
### Phase 6: Write Agent YAML
|
||||
|
||||
**If hasSidecar: false:**
|
||||
1. Write YAML to `{agentYamlOutputNoSidecar}`
|
||||
2. Confirm write success
|
||||
3. Display file location to user
|
||||
|
||||
**If hasSidecar: true:**
|
||||
1. Create directory: `mkdir -p {agentBuildOutput}`
|
||||
2. Write YAML to `{agentYamlOutput}`
|
||||
3. Confirm write success
|
||||
4. Display file location to user
|
||||
|
||||
## Phase 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: Write agent YAML to appropriate output path (with or without sidecar), 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](#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
|
||||
- User can chat or ask questions - always respond and then end with display again of the menu options
|
||||
|
||||
---
|
||||
|
||||
# CONTEXT BOUNDARIES
|
||||
|
||||
**INCLUDE:**
|
||||
- Template structure exactly as provided
|
||||
- All agent metadata from agentPlan
|
||||
- Persona, commands, and rules from plan
|
||||
- Configuration options specified
|
||||
- Sidecar structure if hasSidecar: true
|
||||
|
||||
**EXCLUDE:**
|
||||
- Any content not in agentPlan
|
||||
- Sidecar references if hasSidecar: false
|
||||
- Template placeholders (replace with actual content)
|
||||
- Comments or notes in final YAML
|
||||
|
||||
---
|
||||
|
||||
# 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:**
|
||||
- **If hasSidecar: false**: Single agent YAML file
|
||||
- **If hasSidecar: true**: Agent YAML file + sidecar folder structure
|
||||
|
||||
Both must exist (if applicable) before proceeding to validation.
|
||||
|
||||
---
|
||||
|
||||
# SUCCESS METRICS
|
||||
|
||||
✅ **SUCCESS looks like:**
|
||||
- Agent YAML file exists at specified output path
|
||||
- YAML is syntactically valid and well-formed
|
||||
- All template fields populated with plan content
|
||||
- Structure matches agent architecture
|
||||
- If hasSidecar: true, sidecar folder created with starter files
|
||||
- User has selected continue to proceed
|
||||
|
||||
❌ **FAILURE looks like:**
|
||||
- Template or architecture files not found
|
||||
- Agent plan missing required sections
|
||||
- YAML syntax errors in output
|
||||
- Content not properly mapped to template
|
||||
- File write operation fails
|
||||
- hasSidecar: true but sidecar folder not created
|
||||
|
||||
---
|
||||
|
||||
# TRANSITION CRITERIA
|
||||
|
||||
**Ready for Step 8 when:**
|
||||
- Agent YAML successfully created (with or without sidecar as specified)
|
||||
- User selects continue
|
||||
- All build artifacts confirmed written
|
||||
@@ -1,187 +0,0 @@
|
||||
---
|
||||
name: 'step-07a-build-simple'
|
||||
description: 'Generate Simple agent YAML from plan'
|
||||
|
||||
# File References
|
||||
nextStepFile: './step-08-celebrate.md'
|
||||
agentPlan: '{bmb_creations_output_folder}/agent-plan-{agent_name}.md'
|
||||
agentBuildOutput: '{bmb_creations_output_folder}/{agent-name}.agent.yaml'
|
||||
|
||||
# Template and Architecture
|
||||
simpleTemplate: ../templates/simple-agent.template.md
|
||||
simpleArch: ../data/simple-agent-architecture.md
|
||||
agentCompilation: ../data/agent-compilation.md
|
||||
|
||||
# Task References
|
||||
advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml'
|
||||
partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md'
|
||||
---
|
||||
|
||||
# STEP GOAL
|
||||
|
||||
Assemble the agent plan content into a Simple agent YAML configuration using the template, producing a complete agent definition ready for validation.
|
||||
|
||||
## MANDATORY EXECUTION RULES
|
||||
|
||||
- **MUST** read all referenced files before beginning assembly
|
||||
- **MUST** use exact YAML structure from template
|
||||
- **MUST** preserve all plan content without modification
|
||||
- **MUST** maintain proper YAML indentation and formatting
|
||||
- **MUST NOT** deviate from template structure
|
||||
- **MUST** write output before asking validation question
|
||||
- **MUST** present validation choice clearly
|
||||
|
||||
## EXECUTION PROTOCOLS
|
||||
|
||||
### File Loading Sequence
|
||||
1. Read `simpleTemplate` - provides the YAML structure
|
||||
2. Read `simpleArch` - defines Simple agent architecture rules
|
||||
3. Read `agentCompilation` - provides assembly guidelines
|
||||
4. Read `agentPlan` - contains structured content from steps 2-5
|
||||
|
||||
### YAML Assembly Process
|
||||
1. Parse template structure
|
||||
2. Extract content sections from agentPlan YAML
|
||||
3. Map plan content to template fields
|
||||
4. Validate YAML syntax before writing
|
||||
5. Write complete agent YAML to output path
|
||||
|
||||
## CONTEXT BOUNDARIES
|
||||
|
||||
**INCLUDE:**
|
||||
- Template structure exactly as provided
|
||||
- All agent metadata from agentPlan
|
||||
- Persona, commands, and rules from plan
|
||||
- Configuration options specified
|
||||
|
||||
**EXCLUDE:**
|
||||
- Any content not in agentPlan
|
||||
- Sidecar file references (Simple agents don't use them)
|
||||
- Template placeholders (replace with actual content)
|
||||
- Comments or notes in final YAML
|
||||
|
||||
## MANDATORY SEQUENCE
|
||||
|
||||
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change.
|
||||
|
||||
### 1. Load Template and Architecture Files
|
||||
|
||||
Read the following files in order:
|
||||
- `simpleTemplate` - YAML structure template
|
||||
- `simpleArch` - Simple agent architecture definition
|
||||
- `agentCompilation` - Assembly instructions
|
||||
|
||||
**Verify:** All files loaded successfully.
|
||||
|
||||
### 2. Load Agent Plan
|
||||
|
||||
Read `agentPlan` which contains structured YAML from steps 2-5:
|
||||
- Step 2: Discovery findings
|
||||
- Step 3: Persona development
|
||||
- Step 4: Command structure
|
||||
- Step 5: Agent naming
|
||||
|
||||
**Verify:** Plan contains all required sections.
|
||||
|
||||
### 3. Assemble YAML Using Template
|
||||
|
||||
Execute the following assembly process:
|
||||
|
||||
1. **Parse Template Structure**
|
||||
- Identify all YAML fields
|
||||
- Note required vs optional fields
|
||||
- Map field types and formats
|
||||
|
||||
2. **Extract Plan Content**
|
||||
- Read agent metadata
|
||||
- Extract persona definition
|
||||
- Retrieve command specifications
|
||||
- Gather rules and constraints
|
||||
|
||||
3. **Map Content to Template**
|
||||
- Replace template placeholders with plan content
|
||||
- Maintain exact YAML structure
|
||||
- Preserve indentation and formatting
|
||||
- Validate field types and values
|
||||
|
||||
4. **Validate YAML Syntax**
|
||||
- Check proper indentation
|
||||
- Verify quote usage
|
||||
- Ensure list formatting
|
||||
- Confirm no syntax errors
|
||||
|
||||
**Verify:** YAML is valid, complete, and follows template structure.
|
||||
|
||||
### 4. Write Agent Build Output
|
||||
|
||||
Write the assembled YAML to `agentBuildOutput`:
|
||||
- Use exact output path from variable
|
||||
- Include all content without truncation
|
||||
- Maintain YAML formatting
|
||||
- Confirm write operation succeeded
|
||||
|
||||
**Verify:** File written successfully and contains complete YAML.
|
||||
|
||||
### 5. 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.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](#5-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
|
||||
- User can chat or ask questions - always respond and then end with display again of the menu options
|
||||
|
||||
### 6. Route Based on User Choice
|
||||
|
||||
**If user chooses "one-at-a-time":**
|
||||
- Proceed to `nextStepFile` (step-08-celebrate.md)
|
||||
- Continue through each validation step sequentially
|
||||
- Allow review between each validation
|
||||
|
||||
**If user chooses "YOLO":**
|
||||
- Run all validation steps (7A through 7F) consecutively
|
||||
- Do not pause between validations
|
||||
- After all validations complete, proceed to Step 8
|
||||
- Present summary of all validation results
|
||||
|
||||
## 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.
|
||||
|
||||
## SUCCESS METRICS
|
||||
|
||||
**SUCCESS looks like:**
|
||||
- Agent YAML file exists at specified output path
|
||||
- YAML is syntactically valid and well-formed
|
||||
- All template fields populated with plan content
|
||||
- Structure matches Simple agent architecture
|
||||
- User has selected validation approach
|
||||
- Clear next step identified
|
||||
|
||||
**FAILURE looks like:**
|
||||
- Template or architecture files not found
|
||||
- Agent plan missing required sections
|
||||
- YAML syntax errors in output
|
||||
- Content not properly mapped to template
|
||||
- File write operation fails
|
||||
- User selection unclear
|
||||
|
||||
## TRANSITION CRITERIA
|
||||
|
||||
**Ready for Step 7A when:**
|
||||
- Simple agent YAML successfully created
|
||||
- User chooses "one-at-a-time" validation
|
||||
|
||||
**Ready for Step 8 when:**
|
||||
- Simple agent YAML successfully created
|
||||
- User chooses "YOLO" validation
|
||||
- All validations (7A-7F) completed consecutively
|
||||
@@ -1,201 +0,0 @@
|
||||
---
|
||||
name: 'step-06-build-expert'
|
||||
description: 'Generate Expert agent YAML with sidecar from plan'
|
||||
|
||||
# File References
|
||||
nextStepFile: './step-08-celebrate.md'
|
||||
agentPlan: '{bmb_creations_output_folder}/agent-plan-{agent_name}.md'
|
||||
agentBuildOutput: '{bmb_creations_output_folder}/{agent-name}/'
|
||||
agentYamlOutput: '{bmb_creations_output_folder}/{agent-name}/{agent-name}.agent.yaml'
|
||||
|
||||
# Template and Architecture
|
||||
expertTemplate: ../templates/expert-agent-template/expert-agent.template.md
|
||||
expertArch: ../data/expert-agent-architecture.md
|
||||
agentCompilation: ../data/agent-compilation.md
|
||||
criticalActions: ../data/critical-actions.md
|
||||
|
||||
# Task References
|
||||
advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml'
|
||||
partyModeWorkflow: '{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
|
||||
|
||||
1. **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
|
||||
2. **CRITICAL_ACTIONS FORMAT**: All critical_actions MUST use `{project-root}/_bmad/_memory/{sidecar-folder}/` for file operations (runtime path)
|
||||
3. **TEMPLATE COMPLIANCE**: Follow expert-agent-template.md structure exactly
|
||||
4. **YAML VALIDATION**: Ensure valid YAML syntax with proper indentation (2-space)
|
||||
5. **EXISTING CHECK**: If agentYamlOutput exists, ask user before overwriting
|
||||
6. **NO DRIFT**: Use ONLY content from agentPlan - no additions or interpretations
|
||||
|
||||
## EXECUTION PROTOCOLS
|
||||
|
||||
### Phase 1: Load Architecture and Templates
|
||||
1. Read `expertTemplate` - defines YAML structure for Expert agents
|
||||
2. Read `expertArch` - architecture requirements for Expert-level agents
|
||||
3. Read `agentCompilation` - assembly rules for YAML generation
|
||||
4. Read `criticalActions` - validation requirements for critical_actions
|
||||
|
||||
### Phase 2: Load Agent Plan
|
||||
1. Read `agentPlan` containing all collected content from Steps 1-5
|
||||
2. 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:
|
||||
|
||||
```yaml
|
||||
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
|
||||
|
||||
1. **Create Sidecar Directory** (NEXT TO agent.yaml):
|
||||
- Path: `{agentBuildOutput}/{agent-name}-sidecar/`
|
||||
- Use `mkdir -p` to create full path
|
||||
- Note: This folder gets installed to `_bmad/_memory/` during BMAD installation
|
||||
|
||||
2. **Create Starter Files** (if specified in critical_actions):
|
||||
```bash
|
||||
touch {agentBuildOutput}/{agent-name}-sidecar/{file1}.md
|
||||
touch {agentBuildOutput}/{agent-name}-sidecar/{file2}.md
|
||||
```
|
||||
|
||||
3. **Add README to Sidecar**:
|
||||
```markdown
|
||||
# {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
|
||||
|
||||
1. Create `agentBuildOutput` directory: `mkdir -p {agentBuildOutput}`
|
||||
2. Write YAML to `agentYamlOutput`
|
||||
3. Confirm write success
|
||||
4. 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](#phase-6-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
|
||||
- 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:
|
||||
1. **Agent YAML**: Complete expert agent definition at `{agentYamlOutput}`
|
||||
2. **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
|
||||
@@ -1,258 +0,0 @@
|
||||
---
|
||||
name: 'step-06-build-module'
|
||||
description: 'Generate Module agent YAML from plan'
|
||||
|
||||
# File References
|
||||
nextStepFile: './step-08-celebrate.md'
|
||||
agentPlan: '{bmb_creations_output_folder}/agent-plan-{agent_name}.md'
|
||||
agentBuildOutput: '{bmb_creations_output_folder}/{agent-name}/'
|
||||
agentYamlOutput: '{bmb_creations_output_folder}/{agent-name}/{agent-name}.agent.yaml'
|
||||
|
||||
# Template and Architecture (use expert as baseline)
|
||||
expertTemplate: ../templates/expert-agent-template/expert-agent.template.md
|
||||
expertArch: ../data/expert-agent-architecture.md
|
||||
agentCompilation: ../data/agent-compilation.md
|
||||
criticalActions: ../data/critical-actions.md
|
||||
|
||||
# Task References
|
||||
advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml'
|
||||
partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md'
|
||||
---
|
||||
|
||||
# STEP GOAL
|
||||
Assemble the Module agent YAML file from the approved plan, using the expert agent template as the baseline architecture and adding module-specific workflow integration paths and sidecar configuration.
|
||||
|
||||
# MANDATORY EXECUTION RULES
|
||||
|
||||
1. **TEMPLATE BASELINE**: Module agents MUST use the expert agent template as their structural foundation - do not create custom templates
|
||||
|
||||
2. **PLAN ADHERENCE**: Extract content from agentPlan exactly as written - no enhancement, interpretation, or extrapolation
|
||||
|
||||
3. **MODULE SPECIFICITY**: Module agents require workflow integration paths and may need sidecar configuration for multi-workflow modules
|
||||
|
||||
4. **OUTPUT VALIDATION**: YAML must be valid, complete, and ready for immediate deployment
|
||||
|
||||
5. **LANGUAGE PRESERVATION**: Maintain any language choice configured in the plan throughout the YAML
|
||||
|
||||
# EXECUTION PROTOCOLS
|
||||
|
||||
## PREPARATION PHASE
|
||||
|
||||
### 1. Load Expert Template Baseline
|
||||
```
|
||||
Read: expertTemplate
|
||||
Read: expertArch
|
||||
Read: agentCompilation
|
||||
Read: criticalActions
|
||||
```
|
||||
|
||||
**Purpose**: Understand the expert agent structure that serves as the Module agent baseline
|
||||
|
||||
**Validation**: Confirm expert template has all required sections (name, description, persona, instructions, tools, skills, etc.)
|
||||
|
||||
### 2. Load Agent Plan
|
||||
```
|
||||
Read: agentPlan (using dynamic path)
|
||||
```
|
||||
|
||||
**Validation**: Plan contains all mandatory sections:
|
||||
- Agent identity (name, description)
|
||||
- Persona profile
|
||||
- Command structure
|
||||
- Critical actions
|
||||
- Workflow integrations (module-specific)
|
||||
- Language choice (if configured)
|
||||
|
||||
### 3. Verify Output Directory
|
||||
```
|
||||
Bash: mkdir -p {agentBuildOutput}
|
||||
```
|
||||
|
||||
**Purpose**: Ensure output directory exists for the module agent
|
||||
|
||||
## ASSEMBLY PHASE
|
||||
|
||||
### 4. Assemble Module Agent YAML
|
||||
|
||||
**FROM PLAN TO YAML MAPPING:**
|
||||
|
||||
| Plan Section | YAML Field | Notes |
|
||||
|--------------|------------|-------|
|
||||
| Agent Name | `name` | Plan → YAML |
|
||||
| Description | `description` | Plan → YAML |
|
||||
| Persona | `persona` | Plan → YAML |
|
||||
| Instructions | `instructions` | Plan → YAML (verbatim) |
|
||||
| Commands | `commands` | Plan → YAML (with handlers) |
|
||||
| Critical Actions | `criticalActions` | Plan → YAML (mandatory) |
|
||||
| Workflow Paths | `skills` | Module-specific |
|
||||
| Sidecar Need | `sidecar` | If multi-workflow |
|
||||
|
||||
**MODULE-SPECIAL ENHANCEMENTS:**
|
||||
|
||||
```yaml
|
||||
# Module agents include workflow integration
|
||||
skills:
|
||||
- workflow: "{project-root}/_bmad/{module-id}/workflows/{workflow-name}/workflow.md"
|
||||
description: "From plan workflow list"
|
||||
- workflow: "{project-root}/_bmad/{module-id}/workflows/{another-workflow}/workflow.md"
|
||||
description: "From plan workflow list"
|
||||
|
||||
# Optional: Sidecar for complex modules
|
||||
sidecar:
|
||||
enabled: true
|
||||
workflows:
|
||||
- ref: "primary-workflow"
|
||||
type: "primary"
|
||||
- ref: "secondary-workflow"
|
||||
type: "support"
|
||||
```
|
||||
|
||||
**CRITICAL ACTIONS MAPPING:**
|
||||
```
|
||||
For each critical action in plan:
|
||||
1. Identify matching command in YAML
|
||||
2. Add `critical: true` flag
|
||||
3. Ensure handler references agent function
|
||||
```
|
||||
|
||||
### 5. Create Sidecar (If Needed)
|
||||
|
||||
**SIDEAR REQUIRED IF:**
|
||||
- Module has 3+ workflows
|
||||
- Workflows have complex interdependencies
|
||||
- Module needs initialization workflow
|
||||
|
||||
**SIDECAR STRUCTURE:**
|
||||
```yaml
|
||||
# {agent-name}.sidecar.yaml
|
||||
sidecar:
|
||||
module: "{module-id}"
|
||||
initialization:
|
||||
workflow: "workflow-init"
|
||||
required: true
|
||||
workflows:
|
||||
- name: "workflow-name"
|
||||
path: "workflows/{workflow-name}/workflow.md"
|
||||
type: "primary|support|utility"
|
||||
dependencies: []
|
||||
agent:
|
||||
path: "{agent-name}.agent.yaml"
|
||||
```
|
||||
|
||||
**IF SIDEAR NOT NEEDED**: Skip this step
|
||||
|
||||
### 6. Write Module Agent YAML
|
||||
```
|
||||
Write: agentYamlOutput (using dynamic path)
|
||||
Content: Assembled YAML from step 4
|
||||
```
|
||||
|
||||
**Validation Checklist:**
|
||||
- [ ] All plan fields present in YAML
|
||||
- [ ] Workflow paths are valid and correct
|
||||
- [ ] Critical actions flagged
|
||||
- [ ] Sidecar created (if needed) or skipped (if not)
|
||||
- [ ] YAML syntax is valid
|
||||
- [ ] Language choice preserved throughout
|
||||
|
||||
## COMPLETION PHASE
|
||||
|
||||
### 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: 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](#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
|
||||
- User can chat or ask questions - always respond and then end with display again of the menu options
|
||||
|
||||
**USER RESPONSE HANDLING:**
|
||||
- **Option 1**: Proceed to step-07a-plan-traceability.md with sequential mode
|
||||
- **Option 2**: Proceed to step-07a-plan-traceability.md with yolo mode
|
||||
- **Invalid input**: Re-ask with options
|
||||
|
||||
# CONTEXT BOUNDARIES
|
||||
|
||||
**IN SCOPE:**
|
||||
- Reading expert template and architecture
|
||||
- Loading agent plan
|
||||
- Assembling Module agent YAML
|
||||
- Creating sidecar (if needed)
|
||||
- Writing valid YAML output
|
||||
|
||||
**OUT OF SCOPE:**
|
||||
- Modifying plan content
|
||||
- Creating new template structures
|
||||
- Implementing agent code
|
||||
- Writing workflow files
|
||||
- Testing agent functionality
|
||||
|
||||
**DO NOT:**
|
||||
- Add commands not in plan
|
||||
- Modify persona from plan
|
||||
- Create custom template structures
|
||||
- Skip critical actions mapping
|
||||
- Assume sidecar need - evaluate based on workflow count
|
||||
|
||||
# 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 IS COMPLETE WHEN:**
|
||||
1. Module agent YAML file exists at agentYamlOutput path
|
||||
2. YAML contains all plan content correctly mapped
|
||||
3. Module-specific workflow paths are configured
|
||||
4. Sidecar is created (if needed) or correctly skipped (if not)
|
||||
5. User has chosen review mode (one-at-a-time or YOLO)
|
||||
6. Ready to proceed to step-07a-plan-traceability.md
|
||||
|
||||
**STOP BEFORE:**
|
||||
- Writing workflow implementations
|
||||
- Creating agent code files
|
||||
- Testing agent functionality
|
||||
- Deploying to active system
|
||||
|
||||
# SUCCESS METRICS
|
||||
|
||||
**COMPLETION:**
|
||||
- [ ] Module agent YAML exists with all required fields
|
||||
- [ ] All plan content accurately mapped to YAML
|
||||
- [ ] Workflow integration paths configured correctly
|
||||
- [ ] Critical actions properly flagged
|
||||
- [ ] Sidecar created or correctly skipped
|
||||
- [ ] YAML syntax is valid
|
||||
- [ ] User confirms review mode choice
|
||||
- [ ] Transitions to step-07a-plan-traceability.md
|
||||
|
||||
**VALIDATION:**
|
||||
- Plan-to-YAML mapping: 100% accuracy
|
||||
- Workflow paths: All valid and correct
|
||||
- Critical actions: All present and flagged
|
||||
- Sidecar decision: Correctly evaluated
|
||||
- Language choice: Preserved throughout
|
||||
|
||||
# FAILURE MODES
|
||||
|
||||
**IF PLAN MISSING CONTENT:**
|
||||
→ Return to step-02-discover.md to complete plan
|
||||
|
||||
**IF EXPERT TEMPLATE MISSING:**
|
||||
→ Raise error - template is mandatory baseline
|
||||
|
||||
**IF YAML SYNTAX ERROR:**
|
||||
→ Fix and retry write operation
|
||||
|
||||
**IF WORKFLOW PATHS INVALID:**
|
||||
→ Flag for review in traceability step
|
||||
|
||||
**IF USER ASKS FOR MODIFICATIONS:**
|
||||
→ Return to appropriate planning step (03-persona, 04-commands, or 05-name)
|
||||
@@ -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}
|
||||
|
||||
+18
-17
@@ -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...
|
||||
@@ -41,26 +41,27 @@ Load the existing agent file and initialize a validation report to track all fin
|
||||
### 1. Load Agent File
|
||||
|
||||
Read the complete YAML from the agent file path provided by the user.
|
||||
If the module property of the agent metadata is stand-alone, it is not a module agent.
|
||||
If the module property of the agent is a module code (like bmm, bmb, etc...) it is a module agent.
|
||||
If the property hasSidecar: true exists in the metadata, then it is an expert agent.
|
||||
Else it is a simple agent.
|
||||
|
||||
If a module agent also hasSidecar: true - this means it is a modules expert agent, thus it can have sidecar.
|
||||
Check the metadata to determine agent configuration:
|
||||
- **module**: `stand-alone` or module code (bmm, cis, bmgd, etc.)
|
||||
- **hasSidecar**: `true` or `false`
|
||||
|
||||
### 2. Display Agent Summary
|
||||
|
||||
```markdown
|
||||
## Agent to Validate: {agent-name}
|
||||
|
||||
**Type:** {simple|expert|module}
|
||||
**Configuration:** Agent {WITH|WITHOUT} sidecar
|
||||
**hasSidecar:** {true|false}
|
||||
**module:** {module-value}
|
||||
**File:** {agent-file-path}
|
||||
|
||||
### Current Structure:
|
||||
|
||||
**Persona:** {character count} characters
|
||||
**Commands:** {count} commands
|
||||
**Critical Actions:** {count} actions
|
||||
**Critical Actions:** {count} actions (if hasSidecar: true)
|
||||
**Sidecar:** {present|not present}
|
||||
```
|
||||
|
||||
### 3. Create Validation Report
|
||||
@@ -70,7 +71,8 @@ Initialize the validation report:
|
||||
```markdown
|
||||
---
|
||||
agentName: '{agent-name}'
|
||||
agentType: '{simple|expert|module}' # Derived from module + hasSidecar
|
||||
hasSidecar: {true|false}
|
||||
module: '{module-value}'
|
||||
agentFile: '{agent-file-path}'
|
||||
validationDate: '{YYYY-MM-DD}'
|
||||
stepsCompleted:
|
||||
@@ -82,9 +84,8 @@ stepsCompleted:
|
||||
## Agent Overview
|
||||
|
||||
**Name:** {agent-name}
|
||||
**Type:** {simple|expert|module} # Derived from: module + hasSidecar
|
||||
**module:** {module-value}
|
||||
**hasSidecar:** {true|false}
|
||||
**module:** {module-value}
|
||||
**File:** {agent-file-path}
|
||||
|
||||
---
|
||||
@@ -98,7 +99,7 @@ Write to `{validationReport}`.
|
||||
|
||||
### 4. Present MENU OPTIONS
|
||||
|
||||
Display: "**Is this the correct agent to validate and is it identified as the proper type?** [A] Advanced Elicitation [P] Party Mode [C] Yes, Begin Validation"
|
||||
Display: "**Is this the correct agent to validate and is it identified as the proper configuration?** [A] Advanced Elicitation [P] Party Mode [C] Yes, Begin Validation"
|
||||
|
||||
#### Menu Handling Logic:
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ Perform these checks systematically - validate EVERY rule specified in personaPr
|
||||
- [ ] Principles are consistent with role
|
||||
- [ ] 3-7 principles recommended (not overwhelming)
|
||||
- [ ] Each principle is clear and specific
|
||||
- [ ] First principle activates expert knowledge domain
|
||||
- [ ] First principle activates domain knowledge
|
||||
|
||||
6. **Consistency Checks**
|
||||
- [ ] Role, identity, communication_style, principles all align
|
||||
@@ -101,7 +101,7 @@ Append to `{validationReport}`:
|
||||
- [ ] role: specific, not generic
|
||||
- [ ] identity: defines who agent is
|
||||
- [ ] communication_style: speech patterns only
|
||||
- [ ] principles: first principle activates expert knowledge
|
||||
- [ ] principles: first principle activates domain knowledge
|
||||
|
||||
**Detailed Findings:**
|
||||
|
||||
|
||||
@@ -52,61 +52,41 @@ Perform these checks systematically - validate EVERY rule specified in agentMenu
|
||||
- [ ] Menu section exists and is properly formatted
|
||||
- [ ] At least one menu item defined (unless intentionally tool-less)
|
||||
- [ ] Menu items follow proper YAML structure
|
||||
- [ ] Each item has required fields (name, description, pattern)
|
||||
- [ ] Each item has required fields (trigger, description, action)
|
||||
|
||||
2. **Menu Item Requirements**
|
||||
For each menu item:
|
||||
- [ ] name: Present, unique, uses kebab-case
|
||||
- [ ] description: Clear and concise
|
||||
- [ ] pattern: Valid regex pattern or tool reference
|
||||
- [ ] scope: Appropriate scope defined (if applicable)
|
||||
- [ ] trigger: Present, follows `XX or fuzzy match on command` format
|
||||
- [ ] description: Clear and concise, starts with `[XX]` code
|
||||
- [ ] action: Prompt reference (#id) or inline instruction
|
||||
|
||||
3. **Pattern Quality**
|
||||
- [ ] Patterns are valid and testable
|
||||
- [ ] Patterns are specific enough to match intended inputs
|
||||
- [ ] Patterns are not overly restrictive
|
||||
- [ ] Patterns use appropriate regex syntax
|
||||
3. **Trigger Format Validation**
|
||||
- [ ] Format: `XX or fuzzy match on command-name` (XX = 2-letter code)
|
||||
- [ ] Codes are unique within agent
|
||||
- [ ] No reserved codes used: MH, CH, PM, DA
|
||||
|
||||
4. **Description Quality**
|
||||
- [ ] Each item has clear description
|
||||
- [ ] Descriptions explain what the item does
|
||||
- [ ] Descriptions are consistent in style
|
||||
- [ ] Descriptions help users understand when to use
|
||||
4. **Description Format Validation**
|
||||
- [ ] Descriptions start with `[XX]` code
|
||||
- [ ] Code in description matches trigger code
|
||||
- [ ] Descriptions are clear and descriptive
|
||||
|
||||
5. **Alignment Checks**
|
||||
5. **Action Handler Validation**
|
||||
- [ ] If `action: '#prompt-id'`, corresponding prompt exists
|
||||
- [ ] If `action: 'inline text'`, instruction is complete and clear
|
||||
|
||||
6. **Alignment Checks**
|
||||
- [ ] Menu items align with agent's role/purpose
|
||||
- [ ] Menu items are supported by agent's expertise
|
||||
- [ ] Menu items fit within agent's constraints
|
||||
- [ ] Menu items are appropriate for target users
|
||||
|
||||
6. **Completeness**
|
||||
- [ ] Core capabilities for this role are covered
|
||||
- [ ] No obvious missing functionality
|
||||
- [ ] Menu scope is appropriate (not too sparse/overloaded)
|
||||
- [ ] Related functionality is grouped logically
|
||||
|
||||
7. **Standards Compliance**
|
||||
- [ ] No prohibited patterns or commands
|
||||
- [ ] No security vulnerabilities in patterns
|
||||
- [ ] No ambiguous or conflicting items
|
||||
- [ ] Consistent naming conventions
|
||||
|
||||
8. **Menu Link Validation (Agent Type Specific)**
|
||||
- [ ] Determine agent type from metadata:
|
||||
- Simple: module property is 'stand-alone' AND hasSidecar is false/absent
|
||||
- Expert: hasSidecar is true
|
||||
- Module: module property is a module code (e.g., 'bmm', 'bmb', 'bmgd', 'bmad')
|
||||
- [ ] For Expert agents (hasSidecar: true):
|
||||
- Menu handlers SHOULD reference external sidecar files (e.g., `./{agent-name}-sidecar/...`)
|
||||
- OR have inline prompts defined directly in the handler
|
||||
- [ ] For Module agents (module property is a module code):
|
||||
- Menu handlers SHOULD reference external module files under the module path
|
||||
- Exec paths must start with `{project-root}/_bmad/{module}/...`
|
||||
- Verify referenced files exist under the module directory
|
||||
- [ ] For Simple agents (stand-alone, no sidecar):
|
||||
- Menu handlers MUST NOT have external file links
|
||||
- Menu handlers SHOULD only use relative links within the same file (e.g., `#section-name`)
|
||||
- OR have inline prompts defined directly in the handler
|
||||
7. **Configuration Specific Menu Handler Validation**
|
||||
- [ ] Determine hasSidecar from metadata
|
||||
- [ ] For hasSidecar: true:
|
||||
- [ ] Menu handlers MAY reference sidecar files using correct path format
|
||||
- [ ] Sidecar references use: `{project-root}/_bmad/_memory/{sidecar-folder}/...`
|
||||
- [ ] For hasSidecar: false:
|
||||
- [ ] Menu handlers MUST NOT have sidecar file links
|
||||
- [ ] Menu handlers use only internal references (#) or inline prompts
|
||||
|
||||
### 3. Append Findings to Report
|
||||
|
||||
@@ -117,12 +97,14 @@ Append to `{validationReport}`:
|
||||
|
||||
**Status:** {✅ PASS / ⚠️ WARNING / ❌ FAIL}
|
||||
|
||||
**hasSidecar:** {true|false}
|
||||
|
||||
**Checks:**
|
||||
- [ ] A/P/C convention followed
|
||||
- [ ] Command names clear and descriptive
|
||||
- [ ] Command descriptions specific and actionable
|
||||
- [ ] Menu handling logic properly specified
|
||||
- [ ] Agent type appropriate menu links verified
|
||||
- [ ] Triggers follow `XX or fuzzy match on command` format
|
||||
- [ ] Descriptions start with `[XX]` code
|
||||
- [ ] No reserved codes (MH, CH, PM, DA)
|
||||
- [ ] Action handlers valid (#prompt-id or inline)
|
||||
- [ ] Configuration appropriate menu links
|
||||
|
||||
**Detailed Findings:**
|
||||
|
||||
|
||||
@@ -4,8 +4,7 @@ description: 'Validate YAML structure and append to report'
|
||||
|
||||
nextStepFile: './v-02e-validate-sidecar.md'
|
||||
validationReport: '{bmb_creations_output_folder}/validation-report-{agent-name}.md'
|
||||
simpleValidation: ../data/simple-agent-validation.md
|
||||
expertValidation: ../data/expert-agent-validation.md
|
||||
agentValidation: ../data/agent-validation.md
|
||||
agentCompilation: ../data/agent-compilation.md
|
||||
agentFile: '{agent-file-path}'
|
||||
---
|
||||
@@ -44,7 +43,7 @@ Validate the agent's YAML structure and completeness against BMAD standards as d
|
||||
|
||||
### 1. Load References
|
||||
|
||||
Read `{agentCompilation}`, `{simpleValidation}`, `{expertValidation}`, `{validationReport}`, and `{agentFile}`.
|
||||
Read `{agentCompilation}`, `{agentValidation}`, `{validationReport}`, and `{agentFile}`.
|
||||
|
||||
### 2. Validate Structure
|
||||
|
||||
@@ -64,7 +63,7 @@ Perform these checks systematically - validate EVERY rule specified in agentComp
|
||||
- [ ] Boolean fields are actual booleans (not strings)
|
||||
|
||||
#### C. Section Completeness
|
||||
- [ ] All required sections present based on agent type
|
||||
- [ ] All required sections present based on hasSidecar value
|
||||
- [ ] Sections not empty unless explicitly optional
|
||||
- [ ] Proper markdown heading hierarchy (##, ###)
|
||||
- [ ] No orphaned content without section headers
|
||||
@@ -75,27 +74,24 @@ Perform these checks systematically - validate EVERY rule specified in agentComp
|
||||
- [ ] No malformed YAML structures
|
||||
- [ ] File references use correct path format
|
||||
|
||||
#### E. Agent Type Specific Checks
|
||||
#### E. Agent Configuration Specific Checks
|
||||
|
||||
**For Simple Agents (hasSidecar is false/absent, module is 'stand-alone'):**
|
||||
**For Agents WITHOUT Sidecar (hasSidecar is false):**
|
||||
- [ ] No sidecar requirements
|
||||
- [ ] No sidecar-folder path in metadata
|
||||
- [ ] Basic fields complete
|
||||
- [ ] No expert-only configuration present
|
||||
- [ ] If critical_actions present, no sidecar file references
|
||||
- [ ] Menu handlers use only internal references (#) or inline prompts
|
||||
- [ ] Total size under ~250 lines (unless justified)
|
||||
|
||||
**For Expert Agents (hasSidecar is true):**
|
||||
- [ ] Sidecar flag set correctly in metadata
|
||||
**For Agents WITH Sidecar (hasSidecar is true):**
|
||||
- [ ] hasSidecar flag set correctly in metadata
|
||||
- [ ] Sidecar folder path specified in metadata
|
||||
- [ ] All expert fields present
|
||||
- [ ] Advanced features properly configured
|
||||
- [ ] Menu handlers reference sidecar files or have inline prompts
|
||||
|
||||
**For Module Agents (module is a module code like 'bmm', 'bmb', etc.):**
|
||||
- [ ] Module property is valid module code
|
||||
- [ ] Exec paths for menu handlers start with `{project-root}/_bmad/{module}/...`
|
||||
- [ ] Referenced files exist under the module directory
|
||||
- [ ] If also hasSidecar: true, sidecar configuration is valid
|
||||
- [ ] critical_actions section present with minimum requirements:
|
||||
- [ ] Loads sidecar memories
|
||||
- [ ] Loads sidecar instructions
|
||||
- [ ] Restricts file access to sidecar folder
|
||||
- [ ] All critical_actions reference correct `{project-root}/_bmad/_memory/` paths
|
||||
- [ ] Menu handlers that update sidecar use correct path format
|
||||
|
||||
### 3. Append Findings to Report
|
||||
|
||||
@@ -106,14 +102,16 @@ Append to `{validationReport}`:
|
||||
|
||||
**Status:** {✅ PASS / ⚠️ WARNING / ❌ FAIL}
|
||||
|
||||
**Agent Type:** {simple|expert|module}
|
||||
**Configuration:** Agent {WITH|WITHOUT} sidecar
|
||||
|
||||
**hasSidecar:** {true|false}
|
||||
|
||||
**Checks:**
|
||||
- [ ] Valid YAML syntax
|
||||
- [ ] Required fields present (name, description, type, persona)
|
||||
- [ ] Field types correct (arrays, strings)
|
||||
- [ ] Required fields present (name, description, persona, menu)
|
||||
- [ ] Field types correct (arrays, strings, booleans)
|
||||
- [ ] Consistent 2-space indentation
|
||||
- [ ] Agent type appropriate structure
|
||||
- [ ] Configuration appropriate structure
|
||||
|
||||
**Detailed Findings:**
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ description: 'Validate sidecar structure and append to report'
|
||||
|
||||
nextStepFile: './v-03-summary.md'
|
||||
validationReport: '{bmb_creations_output_folder}/validation-report-{agent-name}.md'
|
||||
expertValidation: ../data/expert-agent-validation.md
|
||||
agentValidation: ../data/agent-validation.md
|
||||
criticalActions: ../data/critical-actions.md
|
||||
agentFile: '{agent-file-path}'
|
||||
sidecarFolder: '{agent-sidecar-folder}'
|
||||
@@ -14,27 +14,27 @@ sidecarFolder: '{agent-sidecar-folder}'
|
||||
|
||||
## STEP GOAL
|
||||
|
||||
Validate the agent's sidecar structure (if Expert type) against BMAD standards as defined in expertValidation.md. Append findings to validation report and auto-advance.
|
||||
Validate the agent's sidecar structure (if hasSidecar: true) against BMAD standards as defined in agentValidation.md. Append findings to validation report and auto-advance.
|
||||
|
||||
## MANDATORY EXECUTION RULES
|
||||
|
||||
- 📖 CRITICAL: Read the complete step file before taking any action
|
||||
- 🔄 CRITICAL: Read validationReport and expertValidation first
|
||||
- 🔄 CRITICAL: Read validationReport and agentValidation first
|
||||
- 🔄 CRITICAL: Load the actual agent file to check for sidecar
|
||||
- 🚫 NO MENU - append findings and auto-advance
|
||||
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
|
||||
|
||||
### Step-Specific Rules:
|
||||
|
||||
- 🎯 Validate sidecar against expertValidation.md rules (for Expert agents)
|
||||
- 🎯 Validate sidecar against agentValidation.md rules (for agents with sidecar)
|
||||
- 📊 Append findings to validation report
|
||||
- 🚫 FORBIDDEN to present menu
|
||||
|
||||
## EXECUTION PROTOCOLS
|
||||
|
||||
- 🎯 Load expertValidation.md reference
|
||||
- 🎯 Load agentValidation.md reference
|
||||
- 🎯 Load the actual agent file for validation
|
||||
- 📊 Validate sidecar if Expert type, skip for Simple/Module
|
||||
- 📊 Validate sidecar if hasSidecar: true, skip for hasSidecar: false
|
||||
- 💾 Append findings to validation report
|
||||
- ➡️ Auto-advance to summary step
|
||||
|
||||
@@ -44,12 +44,12 @@ Validate the agent's sidecar structure (if Expert type) against BMAD standards a
|
||||
|
||||
### 1. Load References
|
||||
|
||||
Read `{expertValidation}`, `{criticalActions}`, `{validationReport}`, and `{agentFile}`.
|
||||
Read `{agentValidation}`, `{criticalActions}`, `{validationReport}`, and `{agentFile}`.
|
||||
|
||||
### 2. Conditional Validation
|
||||
|
||||
**IF (module = "stand-alone" AND hasSidecar = true) OR (module ≠ "stand-alone" AND hasSidecar = true):**
|
||||
Perform these checks systematically - validate EVERY rule specified in expertValidation.md:
|
||||
**IF hasSidecar = true:**
|
||||
Perform these checks systematically - validate EVERY rule specified in agentValidation.md:
|
||||
|
||||
#### A. Sidecar Folder Validation
|
||||
- [ ] Sidecar folder exists at specified path
|
||||
@@ -59,39 +59,37 @@ Perform these checks systematically - validate EVERY rule specified in expertVal
|
||||
|
||||
#### B. Sidecar File Inventory
|
||||
- [ ] List all files in sidecar folder
|
||||
- [ ] Verify expected files are present
|
||||
- [ ] Verify expected files are present (memories.md, instructions.md recommended)
|
||||
- [ ] Check for unexpected files
|
||||
- [ ] Validate file names follow conventions
|
||||
|
||||
#### C. Path Reference Validation
|
||||
For each sidecar path reference in agent YAML:
|
||||
- [ ] Extract path from YAML reference
|
||||
- [ ] Verify file exists at referenced path
|
||||
- [ ] Check path format is correct (relative/absolute as expected)
|
||||
- [ ] Verify path format is correct: `{project-root}/_bmad/_memory/{sidecar-folder}/...`
|
||||
- [ ] `{project-root}` is literal
|
||||
- [ ] `{sidecar-folder}` is actual folder name
|
||||
- [ ] Validate no broken path references
|
||||
|
||||
#### D. Critical Actions File Validation (if present)
|
||||
- [ ] critical-actions.md file exists
|
||||
- [ ] File has proper frontmatter
|
||||
- [ ] Actions section is present and not empty
|
||||
- [ ] No critical sections missing
|
||||
- [ ] File content is complete (not just placeholder)
|
||||
#### D. Critical Actions Validation (MANDATORY for hasSidecar: true)
|
||||
- [ ] critical_actions section exists in agent YAML
|
||||
- [ ] Contains at minimum 3 actions
|
||||
- [ ] Loads sidecar memories: `{project-root}/_bmad/_memory/{sidecar-folder}/memories.md`
|
||||
- [ ] Loads sidecar instructions: `{project-root}/_bmad/_memory/{sidecar-folder}/instructions.md`
|
||||
- [ ] Restricts file access: `ONLY read/write files in {project-root}/_bmad/_memory/{sidecar-folder}/`
|
||||
- [ ] No placeholder text in critical_actions
|
||||
- [ ] No compiler-injected steps
|
||||
|
||||
#### E. Module Files Validation (if present)
|
||||
- [ ] Module files exist at referenced paths
|
||||
- [ ] Each module file has proper frontmatter
|
||||
- [ ] Module file content is complete
|
||||
- [ ] No empty or placeholder module files
|
||||
|
||||
#### F. Sidecar Structure Completeness
|
||||
#### E. Sidecar Structure Completeness
|
||||
- [ ] All referenced sidecar files present
|
||||
- [ ] No orphaned references (files referenced but not present)
|
||||
- [ ] No unreferenced files (files present but not referenced)
|
||||
- [ ] File structure matches expert agent requirements
|
||||
- [ ] File structure matches agent requirements
|
||||
|
||||
**IF (module = "stand-alone" AND hasSidecar = false):**
|
||||
**IF hasSidecar = false:**
|
||||
- [ ] Mark sidecar validation as N/A
|
||||
- [ ] Confirm no sidecar-folder path in metadata
|
||||
- [ ] Confirm no sidecar references in critical_actions (if present)
|
||||
- [ ] Confirm no sidecar references in menu handlers
|
||||
|
||||
### 3. Append Findings to Report
|
||||
@@ -103,18 +101,18 @@ Append to `{validationReport}`:
|
||||
|
||||
**Status:** {✅ PASS / ⚠️ WARNING / ❌ FAIL / N/A}
|
||||
|
||||
**Agent Type:** {simple|expert|module with sidecar}
|
||||
**hasSidecar:** {true|false}
|
||||
|
||||
**Checks:**
|
||||
- [ ] metadata.sidecar-folder present (Expert only)
|
||||
- [ ] sidecar-path format correct
|
||||
- [ ] Sidecar files exist at specified path
|
||||
- [ ] metadata.sidecar-folder present (if hasSidecar: true)
|
||||
- [ ] Sidecar path format correct: `{project-root}/_bmad/_memory/{sidecar-folder}/...`
|
||||
- [ ] Sidecar files exist at specified path (if hasSidecar: true)
|
||||
- [ ] All referenced files present
|
||||
- [ ] No broken path references
|
||||
|
||||
**Detailed Findings:**
|
||||
|
||||
*PASSING (for Expert agents):*
|
||||
*PASSING (for agents WITH sidecar):*
|
||||
{List of passing checks}
|
||||
|
||||
*WARNINGS:*
|
||||
@@ -123,8 +121,8 @@ Append to `{validationReport}`:
|
||||
*FAILURES:*
|
||||
{List of blocking issues that must be fixed}
|
||||
|
||||
*N/A (for Simple agents):*
|
||||
N/A - Agent is Simple type (module = "stand-alone" + hasSidecar: false, no sidecar required)
|
||||
*N/A (for agents WITHOUT sidecar):*
|
||||
N/A - Agent has hasSidecar: false, no sidecar required
|
||||
```
|
||||
|
||||
### 4. Auto-Advance
|
||||
|
||||
+17
-5
@@ -1,8 +1,8 @@
|
||||
{{#if comment}}
|
||||
------------------------------------------------------------------------------
|
||||
Expert Agent Handlebars Template
|
||||
Used by: step-06-build.md to generate final agent YAML
|
||||
Documentation: ../../data/expert-agent-architecture.md
|
||||
Agent Handlebars Template (Unified)
|
||||
Used by: step-07-build-agent.md to generate final agent YAML
|
||||
Documentation: ../data/agent-architecture.md
|
||||
------------------------------------------------------------------------------
|
||||
{{/if}}
|
||||
agent:
|
||||
@@ -13,11 +13,15 @@ agent:
|
||||
icon: {{agent_icon}}
|
||||
module: {{agent_module}}{{#if agent_module_comment}} {{!-- stand-alone, bmm, cis, bmgd, or other module --}}{{/if}}
|
||||
hasSidecar: {{has_sidecar}}{{#if has_sidecar_comment}} {{!-- true if agent has a sidecar folder, false otherwise --}}{{/if}}
|
||||
{{#if has_sidecar}}
|
||||
sidecar-folder: {{sidecar_folder}}
|
||||
sidecar-path: '{project-root}/_bmad/_memory/{{sidecar_folder}}/'
|
||||
{{/if}}
|
||||
|
||||
persona:
|
||||
role: |
|
||||
{{persona_role}}{{#if persona_role_note}}
|
||||
{{!-- 1-2 sentences, first person --}}{{/if}}
|
||||
{{!-- 1-2 sentences, first person, what the agent does --}}{{/if}}
|
||||
|
||||
identity: |
|
||||
{{persona_identity}}{{#if persona_identity_note}}
|
||||
@@ -25,17 +29,23 @@ agent:
|
||||
|
||||
communication_style: |
|
||||
{{communication_style}}{{#if communication_style_note}}
|
||||
{{!-- How the agent speaks, include memory reference patterns --}}{{/if}}
|
||||
{{!-- How the agent speaks: tone, voice, mannerisms --}}
|
||||
{{#if has_sidecar}}
|
||||
{{!-- Include memory reference patterns: "Last time you mentioned..." or "I've noticed patterns..." --}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
principles:
|
||||
{{#each principles}}
|
||||
- {{this}}
|
||||
{{/each}}
|
||||
|
||||
{{#if has_critical_actions}}
|
||||
critical_actions:
|
||||
{{#each critical_actions}}
|
||||
- '{{{this}}}'
|
||||
{{/each}}
|
||||
{{/if}}
|
||||
|
||||
{{#if has_prompts}}
|
||||
prompts:
|
||||
@@ -51,6 +61,8 @@ agent:
|
||||
- trigger: {{trigger_code}} or fuzzy match on {{trigger_command}}
|
||||
{{#if action_is_prompt}}
|
||||
action: '#{{action_id}}'
|
||||
{{else if action_updates_sidecar}}
|
||||
action: {{{action_inline}}}
|
||||
{{else}}
|
||||
action: {{{action_inline}}}
|
||||
{{/if}}
|
||||
@@ -1,72 +0,0 @@
|
||||
{{#if comment}}
|
||||
------------------------------------------------------------------------------
|
||||
Simple Agent Handlebars Template
|
||||
Used by: step-06-build.md to generate final agent YAML
|
||||
Documentation: ../data/simple-agent-architecture.md
|
||||
------------------------------------------------------------------------------
|
||||
{{/if}}
|
||||
agent:
|
||||
metadata:
|
||||
id: {{agent_id}}
|
||||
name: {{agent_name}}
|
||||
title: {{agent_title}}
|
||||
icon: {{agent_icon}}
|
||||
module: {{agent_module}}{{#if agent_module_comment}} {{!-- stand-alone, bmm, cis, bmgd, or other module --}}{{/if}}
|
||||
hasSidecar: {{has_sidecar}}{{#if has_sidecar_comment}} {{!-- true if agent has a sidecar folder, false otherwise --}}{{/if}}
|
||||
|
||||
persona:
|
||||
role: |
|
||||
{{persona_role}}{{#if persona_role_note}}
|
||||
{{!-- 1-2 sentences, first person --}}{{/if}}
|
||||
|
||||
identity: |
|
||||
{{persona_identity}}{{#if persona_identity_note}}
|
||||
{{!-- 2-5 sentences, first person, background/specializations --}}{{/if}}
|
||||
|
||||
communication_style: |
|
||||
{{communication_style}}{{#if communication_style_note}}
|
||||
{{!-- How the agent speaks: tone, voice, mannerisms --}}{{/if}}
|
||||
|
||||
principles:
|
||||
{{#each principles}}
|
||||
- {{this}}
|
||||
{{/each}}
|
||||
|
||||
{{#if has_prompts}}
|
||||
prompts:
|
||||
{{#each prompts}}
|
||||
- id: {{id}}
|
||||
content: |
|
||||
{{{content}}}
|
||||
{{/each}}
|
||||
{{/if}}
|
||||
|
||||
menu:
|
||||
{{#each menu_items}}
|
||||
- trigger: {{trigger_code}} or fuzzy match on {{trigger_command}}
|
||||
{{#if action_is_prompt}}
|
||||
action: '#{{action_id}}'
|
||||
{{else}}
|
||||
action: {{{action_inline}}}
|
||||
{{/if}}
|
||||
description: '[{{trigger_code}}] {{{description}}}'
|
||||
{{/each}}
|
||||
|
||||
{{#if has_install_config}}
|
||||
install_config:
|
||||
compile_time_only: true
|
||||
description: '{{install_description}}'
|
||||
questions:
|
||||
{{#each install_questions}}
|
||||
- var: {{var_name}}
|
||||
prompt: '{{prompt}}'
|
||||
type: {{question_type}}{{#if question_options}}
|
||||
options:
|
||||
{{#each question_options}}
|
||||
- label: '{{label}}'
|
||||
value: '{{value}}'
|
||||
{{/each}}
|
||||
{{/if}}
|
||||
default: {{{default_value}}}
|
||||
{{/each}}
|
||||
{{/if}}
|
||||
@@ -0,0 +1,72 @@
|
||||
---
|
||||
name: create-agent
|
||||
description: Create a new BMAD agent with best practices and compliance
|
||||
web_bundle: true
|
||||
createWorkflow: './steps-c/step-01-brainstorm.md'
|
||||
---
|
||||
|
||||
# Create Agent
|
||||
|
||||
**Goal:** Collaboratively create BMAD Core compliant agents through guided discovery and systematic execution.
|
||||
|
||||
**Your Role:** In addition to your name, communication_style, and persona, you are also an expert agent architect specializing in BMAD Core agent creation. You guide users through creating new agents with best practices and full compliance.
|
||||
|
||||
---
|
||||
|
||||
## WORKFLOW ARCHITECTURE
|
||||
|
||||
This uses **step-file architecture** for disciplined execution:
|
||||
|
||||
### Core Principles
|
||||
|
||||
- **Micro-file Design**: Each step is a self-contained instruction file
|
||||
- **Just-In-Time Loading**: Only the current step file is in memory
|
||||
- **Sequential Enforcement**: Steps completed in order
|
||||
- **State Tracking**: Document progress in tracking files (agentPlan)
|
||||
- **Mode-Aware Routing**: Create-specific step flow
|
||||
|
||||
### Step Processing Rules
|
||||
|
||||
1. **READ COMPLETELY**: Always read the entire step file before taking any action
|
||||
2. **FOLLOW SEQUENCE**: Execute numbered sections in order
|
||||
3. **WAIT FOR INPUT**: Halt at menus and wait for user selection
|
||||
4. **CHECK CONTINUATION**: Only proceed when user selects appropriate option
|
||||
5. **SAVE STATE**: Update progress before loading next step
|
||||
6. **LOAD NEXT**: When directed, load and execute the next step file
|
||||
|
||||
### Critical Rules
|
||||
|
||||
- 🛑 **NEVER** load multiple step files simultaneously
|
||||
- 📖 **ALWAYS** read entire step file before execution
|
||||
- 🚫 **NEVER** skip steps unless explicitly optional
|
||||
- 💾 **ALWAYS** save progress and outputs
|
||||
- 🎯 **ALWAYS** follow exact instructions in step files
|
||||
- ⏸️ **ALWAYS** halt at menus and wait for input
|
||||
- 📋 **NEVER** pre-load future steps
|
||||
|
||||
---
|
||||
|
||||
## INITIALIZATION SEQUENCE
|
||||
|
||||
### 1. Configuration Loading
|
||||
|
||||
Load and read full config from `{project-root}/_bmad/bmb/config.yaml`:
|
||||
|
||||
- `project_name`, `user_name`, `communication_language`, `document_output_language`, `bmb_creations_output_folder`
|
||||
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
|
||||
|
||||
### 2. Route to Create Workflow
|
||||
|
||||
"**Create Mode: Building a new BMAD Core compliant agent from scratch.**"
|
||||
|
||||
Load, read completely, then execute `{createWorkflow}` (steps-c/step-01-brainstorm.md)
|
||||
|
||||
---
|
||||
|
||||
## CREATE MODE NOTES
|
||||
|
||||
- Starts with optional brainstorming
|
||||
- Progresses through discovery, metadata, persona, commands, activation
|
||||
- Builds agent based on type (Simple/Expert/Module)
|
||||
- Validates built agent
|
||||
- Celebrates completion with installation guidance
|
||||
@@ -0,0 +1,75 @@
|
||||
---
|
||||
name: edit-agent
|
||||
description: Edit existing BMAD agents while maintaining compliance
|
||||
web_bundle: true
|
||||
editWorkflow: './steps-e/e-01-load-existing.md'
|
||||
---
|
||||
|
||||
# Edit Agent
|
||||
|
||||
**Goal:** Modify existing BMAD Core compliant agents while maintaining their integrity and compliance.
|
||||
|
||||
**Your Role:** In addition to your name, communication_style, and persona, you are also an expert agent architect specializing in BMAD Core agent lifecycle management. You guide users through editing existing agents while preserving their core functionality and compliance.
|
||||
|
||||
---
|
||||
|
||||
## WORKFLOW ARCHITECTURE
|
||||
|
||||
This uses **step-file architecture** for disciplined execution:
|
||||
|
||||
### Core Principles
|
||||
|
||||
- **Micro-file Design**: Each step is a self-contained instruction file
|
||||
- **Just-In-Time Loading**: Only the current step file is in memory
|
||||
- **Sequential Enforcement**: Steps completed in order
|
||||
- **State Tracking**: Document progress in tracking files (editPlan)
|
||||
- **Mode-Aware Routing**: Edit-specific step flow
|
||||
|
||||
### Step Processing Rules
|
||||
|
||||
1. **READ COMPLETELY**: Always read the entire step file before taking any action
|
||||
2. **FOLLOW SEQUENCE**: Execute numbered sections in order
|
||||
3. **WAIT FOR INPUT**: Halt at menus and wait for user selection
|
||||
4. **CHECK CONTINUATION**: Only proceed when user selects appropriate option
|
||||
5. **SAVE STATE**: Update progress before loading next step
|
||||
6. **LOAD NEXT**: When directed, load and execute the next step file
|
||||
|
||||
### Critical Rules
|
||||
|
||||
- 🛑 **NEVER** load multiple step files simultaneously
|
||||
- 📖 **ALWAYS** read entire step file before execution
|
||||
- 🚫 **NEVER** skip steps unless explicitly optional
|
||||
- 💾 **ALWAYS** save progress and outputs
|
||||
- 🎯 **ALWAYS** follow exact instructions in step files
|
||||
- ⏸️ **ALWAYS** halt at menus and wait for input
|
||||
- 📋 **NEVER** pre-load future steps
|
||||
|
||||
---
|
||||
|
||||
## INITIALIZATION SEQUENCE
|
||||
|
||||
### 1. Configuration Loading
|
||||
|
||||
Load and read full config from `{project-root}/_bmad/bmb/config.yaml`:
|
||||
|
||||
- `project_name`, `user_name`, `communication_language`, `document_output_language`, `bmb_creations_output_folder`
|
||||
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
|
||||
|
||||
### 2. Route to Edit Workflow
|
||||
|
||||
"**Edit Mode: Modifying an existing BMAD Core compliant agent.**"
|
||||
|
||||
Prompt for agent file path: "Which agent would you like to edit? Please provide the path to the `.agent.yaml` file."
|
||||
|
||||
Then load, read completely, and execute `{editWorkflow}` (steps-e/e-01-load-existing.md)
|
||||
|
||||
---
|
||||
|
||||
## EDIT MODE NOTES
|
||||
|
||||
- Loads existing agent first
|
||||
- Discovers what user wants to change
|
||||
- Validates current agent before editing
|
||||
- Creates structured edit plan
|
||||
- Applies changes with validation
|
||||
- Celebrates successful edit
|
||||
@@ -0,0 +1,73 @@
|
||||
---
|
||||
name: validate-agent
|
||||
description: Validate existing BMAD agents and offer to improve deficiencies
|
||||
web_bundle: true
|
||||
validateWorkflow: './steps-v/v-01-load-review.md'
|
||||
---
|
||||
|
||||
# Validate Agent
|
||||
|
||||
**Goal:** Review existing BMAD Core compliant agents through systematic validation and generate comprehensive reports.
|
||||
|
||||
**Your Role:** In addition to your name, communication_style, and persona, you are also a validation specialist and quality assurance expert for BMAD Core agents. You conduct systematic reviews and provide actionable improvement recommendations.
|
||||
|
||||
---
|
||||
|
||||
## WORKFLOW ARCHITECTURE
|
||||
|
||||
This uses **step-file architecture** for disciplined execution:
|
||||
|
||||
### Core Principles
|
||||
|
||||
- **Micro-file Design**: Each step is a self-contained instruction file
|
||||
- **Just-In-Time Loading**: Only the current step file is in memory
|
||||
- **Sequential Enforcement**: Steps completed in order
|
||||
- **State Tracking**: Document progress in tracking files (validationReport)
|
||||
- **Mode-Aware Routing**: Validate-specific step flow
|
||||
|
||||
### Step Processing Rules
|
||||
|
||||
1. **READ COMPLETELY**: Always read the entire step file before taking any action
|
||||
2. **FOLLOW SEQUENCE**: Execute numbered sections in order
|
||||
3. **WAIT FOR INPUT**: Halt at menus and wait for user selection
|
||||
4. **CHECK CONTINUATION**: Only proceed when user selects appropriate option
|
||||
5. **SAVE STATE**: Update progress before loading next step
|
||||
6. **LOAD NEXT**: When directed, load and execute the next step file
|
||||
|
||||
### Critical Rules
|
||||
|
||||
- 🛑 **NEVER** load multiple step files simultaneously
|
||||
- 📖 **ALWAYS** read entire step file before execution
|
||||
- 🚫 **NEVER** skip steps unless explicitly optional
|
||||
- 💾 **ALWAYS** save progress and outputs
|
||||
- 🎯 **ALWAYS** follow exact instructions in step files
|
||||
- ⏸️ **ALWAYS** halt at menus and wait for input
|
||||
- 📋 **NEVER** pre-load future steps
|
||||
|
||||
---
|
||||
|
||||
## INITIALIZATION SEQUENCE
|
||||
|
||||
### 1. Configuration Loading
|
||||
|
||||
Load and read full config from `{project-root}/_bmad/bmb/config.yaml`:
|
||||
|
||||
- `project_name`, `user_name`, `communication_language`, `document_output_language`, `bmb_creations_output_folder`
|
||||
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
|
||||
|
||||
### 2. Route to Validate Workflow
|
||||
|
||||
"**Validate Mode: Reviewing an existing BMAD Core compliant agent.**"
|
||||
|
||||
Prompt for agent file path: "Which agent would you like to validate? Please provide the path to the `.agent.yaml` file."
|
||||
|
||||
Then load, read completely, and execute `{validateWorkflow}` (steps-v/v-01-load-review.md)
|
||||
|
||||
---
|
||||
|
||||
## VALIDATE MODE NOTES
|
||||
|
||||
- Loads existing agent
|
||||
- Runs systematic validation (metadata, persona, menu, structure, sidecar)
|
||||
- Generates comprehensive validation report
|
||||
- Offers option to apply fixes if user desires
|
||||
@@ -1,123 +0,0 @@
|
||||
---
|
||||
name: agent
|
||||
description: Tri-modal workflow for creating, editing, and validating BMAD Core compliant agents
|
||||
web_bundle: true
|
||||
---
|
||||
|
||||
# Agent Workflow
|
||||
|
||||
**Goal:** Collaboratively create, edit, or validate BMAD Core compliant agents through guided discovery and systematic execution.
|
||||
|
||||
**Your Role:** In addition to your name, communication_style, and persona, you are also an expert agent architect specializing in BMAD Core agent lifecycle management. You guide users through creating new agents, editing existing ones, or validating agent configurations.
|
||||
|
||||
---
|
||||
|
||||
## WORKFLOW ARCHITECTURE
|
||||
|
||||
This uses **step-file architecture** for disciplined execution:
|
||||
|
||||
### Core Principles
|
||||
|
||||
- **Micro-file Design**: Each step is a self-contained instruction file
|
||||
- **Just-In-Time Loading**: Only the current step file is in memory
|
||||
- **Sequential Enforcement**: Steps completed in order, conditional based on mode
|
||||
- **State Tracking**: Document progress in tracking files (agentPlan, editPlan, validationReport)
|
||||
- **Mode-Aware Routing**: Separate step flows for Create/Edit/Validate
|
||||
|
||||
### Step Processing Rules
|
||||
|
||||
1. **READ COMPLETELY**: Always read the entire step file before taking any action
|
||||
2. **FOLLOW SEQUENCE**: Execute numbered sections in order
|
||||
3. **WAIT FOR INPUT**: Halt at menus and wait for user selection
|
||||
4. **CHECK CONTINUATION**: Only proceed when user selects appropriate option
|
||||
5. **SAVE STATE**: Update progress before loading next step
|
||||
6. **LOAD NEXT**: When directed, load and execute the next step file
|
||||
|
||||
### Critical Rules
|
||||
|
||||
- 🛑 **NEVER** load multiple step files simultaneously
|
||||
- 📖 **ALWAYS** read entire step file before execution
|
||||
- 🚫 **NEVER** skip steps unless explicitly optional
|
||||
- 💾 **ALWAYS** save progress and outputs
|
||||
- 🎯 **ALWAYS** follow exact instructions in step files
|
||||
- ⏸️ **ALWAYS** halt at menus and wait for input
|
||||
- 📋 **NEVER** pre-load future steps
|
||||
|
||||
---
|
||||
|
||||
## MODE OVERVIEW
|
||||
|
||||
This workflow supports three modes:
|
||||
|
||||
| Mode | Purpose | Entry Point | Output |
|
||||
|------|---------|-------------|--------|
|
||||
| **Create** | Build new agent from scratch | `steps-c/step-01-brainstorm.md` | New `.agent.yaml` file |
|
||||
| **Edit** | Modify existing agent | `steps-e/e-01-load-existing.md` | Updated `.agent.yaml` file |
|
||||
| **Validate** | Review existing agent | `steps-v/v-01-load-review.md` | Validation report |
|
||||
|
||||
---
|
||||
|
||||
## INITIALIZATION SEQUENCE
|
||||
|
||||
### 1. Configuration Loading
|
||||
|
||||
Load and read full config from `{project-root}/_bmad/bmb/config.yaml`:
|
||||
|
||||
- `project_name`, `user_name`, `communication_language`, `document_output_language`, `bmb_creations_output_folder`
|
||||
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
|
||||
|
||||
### 2. Mode Determination
|
||||
|
||||
**Check if mode was specified in the command invocation:**
|
||||
|
||||
- If user invoked with "create agent" or "new agent" → Set mode to **create**
|
||||
- If user invoked with "edit agent" or "modify agent" → Set mode to **edit**
|
||||
- If user invoked with "validate agent" or "review agent" → Set mode to **validate**
|
||||
|
||||
**If mode is unclear from command, ask user:**
|
||||
|
||||
"Welcome to the BMAD Agent Workflow! What would you like to do?
|
||||
|
||||
**[C]reate** - Build a new agent from scratch
|
||||
**[E]dit** - Modify an existing agent
|
||||
**[V]alidate** - Review an existing agent and generate report
|
||||
|
||||
Please select: [C]reate / [E]dit / [V]alidate"
|
||||
|
||||
### 3. Route to First Step
|
||||
|
||||
**IF mode == create:**
|
||||
Load, read completely, then execute `steps-c/step-01-brainstorm.md`
|
||||
|
||||
**IF mode == edit:**
|
||||
Prompt for agent file path: "Which agent would you like to edit? Please provide the path to the `.agent.yaml` file."
|
||||
Then load, read completely, and execute `steps-e/e-01-load-existing.md`
|
||||
|
||||
**IF mode == validate:**
|
||||
Prompt for agent file path: "Which agent would you like to validate? Please provide the path to the `.agent.yaml` file."
|
||||
Then load, read completely, and execute `steps-v/v-01-load-review.md`
|
||||
|
||||
---
|
||||
|
||||
## MODE-SPECIFIC NOTES
|
||||
|
||||
### Create Mode
|
||||
- Starts with optional brainstorming
|
||||
- Progresses through discovery, metadata, persona, commands, activation
|
||||
- Builds agent based on type (Simple/Expert/Module)
|
||||
- Validates built agent
|
||||
- Celebrates completion with installation guidance
|
||||
|
||||
### Edit Mode
|
||||
- Loads existing agent first
|
||||
- Discovers what user wants to change
|
||||
- Validates current agent before editing
|
||||
- Creates structured edit plan
|
||||
- Applies changes with validation
|
||||
- Celebrates successful edit
|
||||
|
||||
### Validate Mode
|
||||
- Loads existing agent
|
||||
- Runs systematic validation (metadata, persona, menu, structure, sidecar)
|
||||
- Generates comprehensive validation report
|
||||
- Offers option to apply fixes if user desires
|
||||
Reference in new issue
Block a user