schema standardization and bmad ide orchesatrtor can do anything

This commit is contained in:
Brian Madison
2025-06-10 07:17:19 -05:00
parent 810a39658a
commit 0d59c686dd
74 changed files with 2087 additions and 58486 deletions

View File

@@ -1,137 +1,196 @@
# Create Agent Task
This task helps you create a new BMAD agent for web platforms (Gemini, ChatGPT, etc.).
This task guides you through creating a new BMAD agent that conforms to the agent schema and integrates with existing teams and workflows.
**Note for User-Created Agents**: If you're creating a custom agent for your own use (not part of the core BMAD system), prefix the agent ID with a period (e.g., `.data-analyst`) to ensure it's gitignored and won't conflict with repository updates.
**Note for User-Created Agents**: If creating a custom agent for your own use (not part of the core BMAD system), prefix the agent ID with a period (e.g., `.data-analyst`) to ensure it's gitignored and won't conflict with repository updates.
## Prerequisites
1. Load and understand the agent schema: `/bmad-core/schemas/agent-schema.yml`
2. Review existing agents in `/agents/` to understand naming patterns
3. Check existing teams in `/bmad-core/agent-teams/` for integration opportunities
4. Review workflows in `/bmad-core/workflows/` to understand where the agent might fit
## Process
Follow these steps to create a new agent:
### 1. Gather Core Agent Information
### 1. Gather Basic Information
Based on the agent schema's required fields, collect:
Ask the user for:
- **Agent ID**: A short, lowercase identifier (e.g., `data-analyst`, `security-expert`)
- **Agent Name**: The character name (e.g., "Elena", "Marcus")
- **Title**: Professional title (e.g., "Data Analyst", "Security Expert")
- **Description**: A brief description of the agent's role and primary focus
- **Agent ID**: Following the schema pattern `^[a-z][a-z0-9-]*$` (e.g., `data-analyst`, `security-expert`)
- For user agents: prefix with period (`.data-analyst`)
- **Character Name**: Following pattern `^[A-Z][a-z]+$` (e.g., "Elena", "Marcus")
- **Professional Title**: 5-50 characters (e.g., "Data Analyst", "Security Expert")
- **Description**: 20-300 characters describing the agent's main goal and purpose
### 2. Define Personality and Expertise
Ask about:
Create a comprehensive persona by exploring:
- **Personality traits**: How should this agent behave? (professional, friendly, detail-oriented, etc.)
- **Communication style**: How do they speak? (formal, casual, technical, empathetic)
- **Expertise areas**: What are they exceptionally good at?
- **Years of experience**: How senior are they in their role?
- **Motivations**: What drives them to excel?
- **Identity**: Extended description of specialization (20+ characters)
- **Focus**: Primary objectives and responsibilities (20+ characters)
- **Style**: Communication and approach characteristics (20+ characters)
- **Core Principles**: At least 3 principles including the required "Numbered Options Protocol"
- **Experience Level**: Years in field and depth of expertise
- **Working Approach**: How they solve problems and deliver value
### 3. Identify Capabilities
### 3. Identify Dependencies
Determine what the agent can do:
Analyze what resources the agent needs:
- **Existing tasks**: Which existing tasks from `/bmad-core/tasks/` should this agent know?
- **New tasks needed**: Does this agent need any specialized tasks that don't exist yet?
- **Templates used**: Which document templates will this agent work with?
- **Checklists**: Which quality checklists apply to this agent's work?
#### Tasks (from `/bmad-core/tasks/`)
- Review available tasks and identify which apply
- Common tasks most agents need:
- `advanced-elicitation` (for conversational depth)
- `create-doc-from-template` (if they create documents)
- `execute-checklist` (if they validate work)
- Identify any new specialized tasks needed
#### Templates (from `/bmad-core/templates/`)
- Which document templates will this agent create/use?
- Match template pattern: `^[a-z][a-z0-9-]*-tmpl$`
#### Checklists (from `/bmad-core/checklists/`)
- Which quality checklists apply to their work?
- Match checklist pattern: `^[a-z][a-z0-9-]*-checklist$`
#### Data Files (from `/bmad-core/data/`)
- `bmad-kb` (if they need BMAD methodology knowledge)
- `technical-preferences` (if they make technical decisions)
- Other specialized data files
### 4. Create the Persona File
Create `/bmad-core/personas/{agent-id}.md` with this structure:
(For user-created agents, use `/bmad-core/personas/.{agent-id}.md`)
Create `/bmad-core/personas/{agent-id}.md` following the schema-required structure:
(For user agents: `/bmad-core/personas/.{agent-id}.md`)
```markdown
# {Agent Name} - {Title}
# Role: {Title} Agent
## Character Profile
## Persona
**Name:** {Agent Name}
**Title:** {Title}
**Experience:** {Years} years in {field}
- Role: {Descriptive Role Statement}
- Style: {Communication style and approach}
## Personality
## Core {Title} Principles (Always Active)
{Describe personality traits, communication style, and approach to work}
- **{Principle Name}:** {Detailed explanation}
- **{Principle Name}:** {Detailed explanation}
- **Numbered Options Protocol:** When presenting multiple options, always use numbered lists for easy selection
[Add more principles as needed]
## Core Expertise
## Critical Start Up Operating Instructions
{List main areas of expertise and specialization}
- Let the User Know what Tasks you can perform in a numbered list for user selection.
- Execute the Full Tasks as Selected. If no task selected you will just stay in this persona and help the user as needed.
- When conversing with the user and providing advice or multiple options, always present them as numbered lists for easy selection. When appropriate, also offer `advanced-elicitation` options during conversations.
## Responsibilities
{List key responsibilities in bullet points}
## Working Style
{Describe how they approach problems, collaborate, and deliver results}
## Motivations
{What drives them to excel in their role}
## Catchphrases
{Optional: Any signature phrases or ways of speaking}
[Add any agent-specific sections like Expertise, Workflow, etc.]
```
### 5. Create the Agent Configuration
Create `/agents/{agent-id}.yml` with this structure:
(For user-created agents, use `/agents/.{agent-id}.yml`)
Create `/agents/{agent-id}.yml` conforming to the schema:
(For user agents: `/agents/.{agent-id}.yml`)
```yaml
agent:
id: { agent-id }
name: { Agent Name }
title: { Title }
description: >-
{Full description of the agent's role and value}
persona: { agent-id }
customize: >-
{Any specific behavioral customizations}
name: {Character Name}
id: {agent-id}
title: {Professional Title}
description: {20-300 character description}
persona: bmad-core/personas/{agent-id}.md
customize: "" # or specific customizations
dependencies:
tasks:
- { list of task IDs }
- {task-id} # from identified tasks
templates:
- { list of template IDs }
- {template-id} # from identified templates
checklists:
- { list of checklist IDs }
- {checklist-id} # from identified checklists
data:
- { list of data file IDs }
- {data-id} # from identified data files
utils:
- template-format
- {util-id} # typically empty or specific utils
```
### 6. Create Any New Tasks
### 6. Team Integration Analysis
If new tasks were identified, create them in `/bmad-core/tasks/{task-name}.md`
(For user-created tasks, use `/bmad-core/tasks/.{task-name}.md`)
Review existing teams and suggest integration:
### 7. Test and Validate
1. **Load team configurations** from `/bmad-core/agent-teams/`
2. **Analyze fit** based on:
- Agent's role and expertise
- Team's description and purpose
- Existing agents in the team
- Workflows the team supports
1. Run `npm run validate` to check configuration
2. Run `npm run build:agent -a {agent-id}` to build the agent
3. Review the generated output in `/dist/agents/{agent-id}.txt`
3. **Suggest teams** where this agent would add value:
- For technical agents → suggest technical teams
- For UX/design agents → suggest teams with UI workflows
- For planning agents → suggest all teams
## Example Questions to Ask
4. **Offer to update** team configurations:
```yaml
agents:
- bmad
- {existing-agents}
- {new-agent-id} # Add here
```
1. "What will this agent be called? (ID like 'data-analyst')"
2. "What's their character name? (like 'Elena')"
3. "What's their professional title?"
4. "Describe their main role in 2-3 sentences."
5. "What personality traits should they have?"
6. "How many years of experience do they have?"
7. "What existing tasks should they know? (e.g., create-doc-from-template, execute-checklist)"
8. "Do they need any specialized tasks that don't exist yet?"
9. "Which document templates will they use?"
10. "What motivates them in their work?"
### 7. Workflow Integration Analysis
## Important Notes
Review workflows and suggest where the agent fits:
- Keep personas engaging but professional
- Ensure all referenced tasks, templates, and checklists exist
- Web agents can be more detailed than IDE agents (no size constraints)
- Consider how this agent will collaborate with existing team members
- Run validation after creating to catch any issues
1. **Load workflow definitions** from `/bmad-core/workflows/`
2. **Analyze workflow stages** to identify where this agent would contribute
3. **Suggest integration points**:
- Planning phases → analysts, PMs
- Design phases → UX experts, architects
- Implementation phases → developers
- Validation phases → QA, PO
4. **Document recommendations** for workflow updates if needed
### 8. Create IDE Agent (Optional)
If the agent should also work in IDE environments:
1. Create `/bmad-core/ide-agents/{agent-id}.ide.md`
2. Follow the IDE agent schema from `/bmad-core/schemas/ide-agent-schema.yml`
3. Include required commands (*help, *chat-mode) and startup instructions
### 9. Validation and Testing
1. **Validate against schema**: Ensure configuration matches agent-schema.yml
2. **Run build validation**: `npm run validate`
3. **Build the agent**: `npm run build:agent -a {agent-id}`
4. **Test in teams**: Build teams that include this agent
5. **Review output**: Check `/dist/agents/{agent-id}.txt`
## Integration Checklist
After creating the agent, verify:
- [ ] Agent configuration validates against schema
- [ ] Persona file includes all required sections
- [ ] All referenced dependencies exist
- [ ] Team integration suggestions documented
- [ ] Workflow integration points identified
- [ ] Build completes without errors
- [ ] Agent output is under size limits (if applicable)
## Example Integration Analysis
When creating a "Security Expert" agent:
**Team Integration:**
- `team-fullstack`: Add for security reviews in full-stack projects
- `team-no-ui`: Add for backend service security assessments
**Workflow Integration:**
- `greenfield-*`: Security review after architecture phase
- `brownfield-*`: Security assessment before implementation
This ensures the new agent enhances existing capabilities rather than working in isolation.