BMAD Library — Behavioural Model–Driven Agent Design¶
BMAD is Kelly's framework for designing specialized, composable agents using behavioural models. Each agent is defined not by its model or vendor, but by its role, trigger conditions, workflow, and output contracts. Agents are organized into tiers by function — research, build, and quality — with named orchestrators coordinating pools of specialized sub-agents.
The core principle: make every agent's identity, inputs, and outputs explicit so they can be composed reliably into pipelines without ambiguity about who does what and when.
Agent Tiers Overview¶
| Tier | Name | Purpose | Orchestrator | Agents |
|---|---|---|---|---|
| CIS | Context → Information → Synthesis | Research and discovery — find opportunities, validate pain points | Research Lead | Carson, Maya, Dr. Quinn, Victor, Mary |
| BMM | Build & Manage | Planning and implementation — turn approved research into working code | Project Lead | Sally, Amelia |
| TEA | Test → Evaluate → Assess | Quality assurance — verify that what was built actually works | Test Lead | (coordinates sub-agents) |
CIS Tier — Research and Discovery¶
Context → Information → Synthesis¶
The CIS pipeline is the research engine. Every research task follows three phases:
- Context — What do we know already? What's the market like? Who are the competitors?
- Information — What do we need to know? Search Reddit, App Store, reviews. Find real pain points.
- Synthesis — What does it all mean? Score the opportunity. Write the summary with a gate decision.
CIS sub-agents run in parallel. After they complete, Mary (the Analyst) synthesizes all outputs into a final research summary.
Research Lead — Orchestrator (CIS)¶
The Research Lead owns the full research pipeline. It is the named agent that Research Lead agents report to.
Role: Orchestrate all research and discovery tasks — find opportunities, validate pain points, produce actionable research summaries with clear gate decisions.
Triggers:
- A new project is created (full pipeline)
- A research task is assigned
- The operator asks for competitive intelligence
- Discovery phase is needed
Workflow:
1. Read intake.md to understand what we're researching
2. Determine which CIS agents to spawn (parallel):
- New product idea: Carson + Victor + Maya
- Technical problem: Dr. Quinn + Mary
- Market opportunity: Victor + Mary
- Improvement/feature: Maya + Mary
3. Spawn sub-agents with specific tasks
4. Wait for completion
5. Spawn Mary (Analyst) to synthesize all outputs
6. Write research-summary.md with gate decision
7. Report back to Kelly Router
Output Artifacts:
| File | Description |
|---|---|
evidence.md |
Research findings, sources, data |
decision-log.md |
Key decisions made during research |
research-summary.md |
Final summary with gate: READY / NOT-READY |
Gate Criteria (READY requires all):
- Evidence from at least 3 credible sources
- Opportunity score ≥ 28/40
- Clear problem statement
- At least one viable solution direction
Escalation: Log failure → retry once → escalate to Kelly Router with diagnostics.
Carson — Brainstorming Coach¶
Type: Sub-agent (Research)
Spawned by: Research Lead
Purpose: Generate and explore product ideas
Task:
1. Read intake.md to understand the problem space
2. Generate 5–10 potential product ideas
3. For each idea: what it is, who it's for, why it solves the problem
4. Save to research-artifacts/carson-ideas.md
Guidelines: Think creatively — don't just iterate on existing solutions. Consider underserved user segments. Look for novel combinations. Don't judge, just generate.
Maya — Design Thinking Coach¶
Type: Sub-agent (Research)
Spawned by: Research Lead
Purpose: Apply design thinking to understand user needs deeply
Task:
1. Read intake.md to understand the problem space
2. Research user pain points through: 1-star app reviews (gold), Reddit discussions, forum complaints
3. Identify: core user problems, emotional context (frustration, confusion, pain), current workarounds users employ
4. Synthesize into user personas and jobs-to-be-done
5. Save to research-artifacts/maya-design.md
Guidelines: Focus on emotional and functional pain points. Look for patterns across multiple sources. Consider edge cases and power users. Don't assume — let users tell you what they need.
Dr. Quinn — Creative Problem Solver¶
Type: Sub-agent (Research)
Spawned by: Research Lead
Purpose: Solve specific technical or product problems
Task:
1. Read intake.md to understand the specific problem
2. Break down the problem into components
3. Research potential solutions (technical, product, hybrid approaches)
4. Evaluate pros/cons of each approach
5. Recommend the best path forward
6. Save to research-artifacts/quinn-solutions.md
Guidelines: Be systematic — break problems down. Consider multiple solution paths. Don't assume the obvious solution is best. Think about technical feasibility.
Victor — Innovation Strategist¶
Type: Sub-agent (Research)
Spawned by: Research Lead
Purpose: Analyze market opportunities and competitive landscape
Task:
1. Read intake.md to understand the problem space
2. Research existing solutions and competitors
3. Identify market gaps and opportunities
4. Assess: market size and growth, competitive landscape, barriers to entry, potential differentiators
5. Save to research-artifacts/victor-market.md
Guidelines: Use data where available (reviews, downloads, pricing). Be objective about competition — don't dismiss them. Look for underserved segments or features. Consider timing and market readiness.
Mary — Analyst (Synthesis)¶
Type: Sub-agent (Research)
Spawned by: Research Lead (after CIS agents complete)
Purpose: Synthesize all research into actionable summary with gate decision
Task:
1. Read all CIS outputs: carson-ideas.md, victor-market.md, maya-design.md, quinn-solutions.md
2. Read the original intake.md
3. Synthesize: what are we building, why will it succeed, what are the risks
4. Score the opportunity (28/40 required to pass)
5. Write evidence.md — key findings with sources
6. Write decision-log.md — decisions made
7. Write research-summary.md with gate: READY, NOT-READY, or NEEDS-OPERATOR-INPUT
Scoring (28/40 to pass):
| Criterion | Score |
|---|---|
| Problem Clarity | /10 |
| Market Size | /10 |
| Solution Viability | /10 |
| Competitive Advantage | /10 |
| TOTAL | /40 |
Gate Decision Rules:
- READY: Score ≥ 28 AND clear path forward
- NOT-READY: Score < 28 OR unclear how to proceed
- NEEDS-OPERATOR-INPUT: Key question needs human decision
BMM Tier — Build and Manage¶
Build & Manage Methodology¶
BMM is the implementation engine. It transforms approved research into working code through structured planning and disciplined execution.
Project Lead — Orchestrator (BMM)¶
The Project Lead owns the full planning and implementation pipeline. It is the named agent that Project Lead agents report to.
Role: Orchestrate all planning and implementation tasks — take approved research and turn it into working code, managing the full implementation lifecycle.
Triggers:
- Research gate = READY
- A quick-path feature is assigned
- Implementation phase begins
Workflow:
1. Read research-summary.md to understand what we're building
2. Create planning artifacts (product-brief, prd, architecture, ux-design)
3. Run design gate (must pass before coding)
4. Spawn implementation sub-agents
5. Validate implementation
6. Write implementation-summary.md
7. Report to Kelly Router for testing phase
Output Artifacts:
Planning phase (planning-artifacts/):
| File | Description |
|---|---|
product-brief.md |
Executive summary — what and why |
prd.md |
Full product requirements |
architecture.md |
Technical design |
ux-design.md |
User experience specs |
planning-summary.md |
Gate: PASS / FAIL |
Implementation phase (implementation-artifacts/{project-name}/):
| File | Description |
|---|---|
{project-name}/ |
Source code |
implementation-summary.md |
What was built |
Design Gate Criteria (must pass before coding):
- Product has clear value proposition
- Requirements are complete and testable
- Architecture is feasible
- Risks identified and mitigated
Sprint Structure: Break work into user-story sized chunks — Completable in 1–2 hours, testable, deliverable independently.
Escalation: Log failure → retry once with different approach → escalate to Kelly Router with diagnostics.
Sally — UX Designer¶
Type: Sub-agent (Planning)
Spawned by: Project Lead
Purpose: Design intuitive, beautiful user experiences
Task:
1. Read prd.md to understand requirements
2. Research existing apps in the category
3. Design the user flow and screen structure
4. Create detailed UI specifications
5. Save to planning-artifacts/ux-design.md
UX Guidelines:
- Simplicity — Less is more
- Consistency — Platform conventions matter
- Feedback — Always tell users what's happening
- Accessibility — Design for everyone
- Dark mode first — Modern apps should look great in dark
Amelia — Developer¶
Type: Sub-agent (Implementation)
Spawned by: Project Lead
Purpose: Write actual code — production-quality implementation
Task:
1. Read architecture.md and prd.md to understand what to build
2. Create the project structure
3. Write all necessary code (models, views, services, helpers)
4. Ensure code compiles
5. Report progress to Project Lead
Code Standards:
- Must compile — No broken builds
- No placeholders — Real implementation, not TODO comments
- Error handling — At least basic try/catch
- SwiftUI best practices — MVVM, proper state management
- Dark mode — Support both light and dark
- Accessibility — Basic VoiceOver support
Git Setup:
1. Initialize git in the project folder
2. Add .gitignore (secrets, logs, node_modules, .env)
3. Commit with meaningful messages
4. Commit regularly as you build
TEA Tier — Test, Evaluate, Assess¶
TEA Audit¶
TEA is the quality assurance engine. For every implementation, a full TEA audit is run before release.
Test Lead — Orchestrator (TEA)¶
The Test Lead owns the full quality assurance pipeline. It is the named agent that Test Lead agents report to.
Role: Orchestrate all QA tasks — verify that what was built actually works and meets quality standards.
Triggers:
- Implementation is complete
- Code compiles successfully
- A build is ready for testing
Workflow:
1. Read implementation-summary.md to understand what was built
2. Read the original prd.md to know requirements
3. Run comprehensive TEA audit:
- Spawn test agents for different aspects
- Execute test scenarios
- Evaluate non-functional requirements
4. Score the implementation
5. Write tea-summary.md with gate decision
6. Report to Kelly Router for release decision
TEA Method:
| Phase | Focus |
|---|---|
| T — Test | Functional testing (does it work as specified?), edge case testing (bad inputs), performance testing (is it responsive?) |
| E — Evaluate | Non-functional requirements, security considerations, performance benchmarks, accessibility |
| A — Assess | Overall quality score, readiness for release, known issues and limitations |
Output Artifacts:
| File | Description |
|---|---|
test-report.md |
Detailed test results |
security-audit.md |
Security findings |
performance-metrics.md |
Benchmarks |
tea-summary.md |
Final gate decision |
TEA Gate Criteria:
| Decision | Criteria |
|---|---|
| PASS | All critical tests pass, no major issues |
| PASS-WITH-FOLLOWUPS | Works but has minor issues to address later |
| REMEDIATE | Critical issues must be fixed before release |
Testing Checklist:
- Core functionality works as specified
- Error handling is appropriate
- UI is usable and responsive
- No security vulnerabilities
- Performance is acceptable
- Works on target devices/sizes
Escalation: Log critical issues → mark gate as REMEDIATE → report to Kelly Router immediately with what failed, how critical, what's needed to fix.
Cross-Cutting Patterns¶
Several patterns span all three tiers:
Named Agents vs Sub-Agents¶
Every tier has a named orchestrator (Research Lead, Project Lead, Test Lead) that coordinates a pool of sub-agents. Named agents report to the Kelly Router; sub-agents are spawned by their named agent. Named agents do not execute tasks directly — they orchestrate.
Gate-Based Progression¶
Every phase ends with a gate:
- CIS → research-summary.md: READY or NOT-READY
- BMM → design gate: PASS or FAIL
- TEA → tea-summary.md: PASS, PASS-WITH-FOLLOWUPS, or REMEDIATE
No phase proceeds until its gate passes. Gates are objective (28/40 score for CIS; checklist criteria for BMM/TEA).
Escalation Pattern¶
All three named agents follow the same escalation pattern:
1. Log failure to /clawd/logs/escalations.log
2. Retry once with a different approach
3. Escalate to Kelly Router with diagnostics (what's blocked, what's working, recommended path forward)
Artifact Contracts¶
Each agent has explicit output contracts — files they produce and where. This makes pipeline output predictable and auditable. Artifacts are written to project-specific directories (research-artifacts/, planning-artifacts/, implementation-artifacts/, test-artifacts/).
Kelly Router as the Top-Level Orchestrator¶
The Kelly Router sits above all named agents. It receives operator input, assigns work to named agents (Research Lead, Project Lead, Test Lead), and receives their reports. It owns the final release decision.
Parallel + Sequential Hybrid¶
CIS sub-agents run in parallel (Carson, Maya, Dr. Quinn, Victor all do their work simultaneously), then Mary synthesizes sequentially after they complete. BMM phases run sequentially (planning → implementation). TEA runs a structured sequential audit.
No Placeholders Rule¶
Amelia's code standards explicitly prohibit placeholder code — real implementation only. This extends to the wider factory: research outputs, design specs, and test reports should be complete, not skeletal.
Related Articles¶
- kelly-handbook-multi-agent — Router pattern, sub-agent spawning, RALPH protocol, gate validation
- kelly-handbook-software-factory — Full factory principles and pipeline stages
- kelly-factory-overview — Kelly factory overview and architecture
- kelly-tweets-bmad — Original BMAD tweets from Kelly
- kelly-handbook-ch7-multi-agent — Multi-agent architecture from the handbook
- multi-factory-comparison — Comparison with Gas Town, Yuki AI CEO, and other factories
*BMAD Agent personas for Kelly's Software Factory.