Compare commits

...

9 Commits

Author SHA1 Message Date
OverlordBaconPants 7f8114386d
Merge f2a942b2db into 0a7329ff23 2026-02-01 09:29:42 +08:00
Michael Pursifull 0a7329ff23
fix: correct relative path to prd-purpose.md in step-11-polish (#1497)
The purposeFile reference uses ./data/prd-purpose.md but data/ is a
sibling of steps-c/, not a child. Corrected to ../data/prd-purpose.md.

Fixes #1495
2026-01-31 19:27:48 -06:00
Michael Pursifull 7afe018f82
fix: correct relative path to validation workflow in step-e-04-complete (#1498)
The validationWorkflow reference uses ./steps-v/step-v-01-discovery.md
but steps-v/ is a sibling of steps-e/, not a child. Corrected to
../steps-v/step-v-01-discovery.md.

Fixes #1496

Co-authored-by: Brian <bmadcode@gmail.com>
2026-01-31 19:27:17 -06:00
Ramiz 8c59fb96a7
Enable sidecar for tech writer agent (#1487)
fix Pagie hasSidecar
2026-01-31 17:27:57 -06:00
Michael Pursifull 7fcfd4c1b8
fix: correct party-mode workflow file extension in workflow.xml (#1499)
The party-mode workflow reference uses .yaml extension but the actual
file is workflow.md. This broken reference has been present since
alpha.17.

Fixes #1212

Co-authored-by: Brian <bmadcode@gmail.com>
2026-01-31 17:26:41 -06:00
Alex Verkhovsky 53220420a5
fix: add disable-model-invocation to all generated slash commands (#1501)
Prevents Claude from auto-invoking BMad skills without explicit user
request. Adds disable-model-invocation: true frontmatter to all
command templates and inline generators for Claude Code and Codex.

Co-authored-by: Brian <bmadcode@gmail.com>
2026-01-31 17:25:31 -06:00
sjennings 9c0314732e
docs(bmgd): refactor documentation using Diataxis principles (#1502)
Apply Diataxis documentation framework to BMGD docs:

game-types.md:
- Convert to Reference format (austere, consistent structure)
- Add Examples field to all 24 game types
- Remove redundant Overview, GDD Section Mapping, Next Steps
- Condense Hybrid Game Types to reference table
- Remove Tags (no functional purpose for human readers)

quick-flow-workflows.md:
- Convert to How-to guide format
- Remove conceptual content (Step-File Architecture, Integration)
- Remove tutorial content (Examples section)
- Cut redundant Reference tables (steps already in how-to)
- Merge Self-Check and Adversarial Review into Validation Criteria

index.md:
- Fix broken link to Quick-Flow documentation

Both main files:
- Apply prose editorial fixes for clarity
- Reduce word count while preserving comprehension

Co-authored-by: Scott Jennings <scott.jennings+CIGINT@cloudimperiumgames.com>
2026-01-31 16:55:11 -06:00
Alex Verkhovsky 542a7429ec
Restore generate-project-context workflow (#1491) 2026-01-31 14:22:13 -06:00
OverlordBaconPants f2a942b2db Add Teachers Assistant educational agent and documentation 2026-01-25 08:12:13 -05:00
33 changed files with 2610 additions and 5 deletions

View File

@ -0,0 +1,14 @@
---
name: 'generate-project-context'
description: 'Scan existing codebase to generate a lean LLM-optimized project-context.md with critical implementation rules and patterns for AI agents'
---
IT IS CRITICAL THAT YOU FOLLOW THESE STEPS - while staying in character as the current agent persona you may have loaded:
<steps CRITICAL="TRUE">
1. Always LOAD the FULL @{project-root}/_bmad/core/tasks/workflow.xml
2. READ its entire contents - this is the CORE OS for EXECUTING the specific workflow-config @{project-root}/_bmad/bmm/workflows/generate-project-context/workflow.md
3. Pass the yaml path @{project-root}/_bmad/bmm/workflows/generate-project-context/workflow.md as 'workflow-config' parameter to the workflow.xml instructions
4. Follow workflow.xml instructions EXACTLY as written to process and follow the specific workflow config and its instructions
5. Save outputs after EACH section when generating any documents from templates
</steps>

BIN
docs/bmgd/bmgd-logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 KiB

374
docs/bmgd/game-types.md Normal file
View File

@ -0,0 +1,374 @@
---
title: "Game Types Reference"
---
BMGD supports 24 game type templates. Each adds genre-specific sections to your GDD.
## Game Types
### Action & Combat
#### Action Platformer
Side-scrolling or 3D platforming with combat mechanics.
**Examples:** Hollow Knight, Mega Man, Celeste
**GDD sections:**
- Movement systems (jumps, dashes, wall mechanics)
- Combat mechanics (melee/ranged, combos)
- Level design patterns
- Boss design
#### Shooter
Projectile combat with aiming mechanics.
**Examples:** Doom, Call of Duty, Splatoon
**GDD sections:**
- Weapon systems
- Aiming and accuracy
- Enemy AI patterns
- Level/arena design
- Multiplayer considerations
#### Fighting
1v1 combat with combos and frame data.
**Examples:** Street Fighter, Tekken, Super Smash Bros.
**GDD sections:**
- Frame data systems
- Combo mechanics
- Character movesets
- Competitive balance
- Netcode requirements
### Strategy & Tactics
#### Strategy
Resource management with tactical decisions.
**Examples:** StarCraft, Civilization, Europa Universalis
**GDD sections:**
- Resource systems
- Unit/building design
- AI opponent behavior
- Map/scenario design
- Victory conditions
#### Turn-Based Tactics
Grid-based movement with turn order.
**Examples:** XCOM, Fire Emblem, Into the Breach
**GDD sections:**
- Grid and movement systems
- Turn order mechanics
- Cover and positioning
- Unit progression
- Procedural mission generation
#### Tower Defense
Wave-based defense with tower placement.
**Examples:** Bloons TD, Kingdom Rush, Plants vs. Zombies
**GDD sections:**
- Tower types and upgrades
- Wave design and pacing
- Economy systems
- Map design patterns
- Meta-progression
### RPG & Progression
#### RPG
Character progression with stats, inventory, and quests.
**Examples:** Final Fantasy, The Witcher, Baldur's Gate
**GDD sections:**
- Character stats and leveling
- Inventory and equipment
- Quest system design
- Combat system (action/turn-based)
- Skill trees and builds
#### Roguelike
Procedural generation with permadeath and run-based progression.
**Examples:** Hades, Dead Cells, Spelunky
**GDD sections:**
- Procedural generation rules
- Permadeath and persistence
- Run structure and pacing
- Item/ability synergies
- Meta-progression systems
#### Metroidvania
Interconnected world with ability gating.
**Examples:** Metroid, Castlevania: Symphony of the Night, Ori
**GDD sections:**
- World map connectivity
- Ability gating design
- Backtracking flow
- Secret and collectible placement
- Power-up progression
### Narrative & Story
#### Adventure
Story-driven exploration with puzzle elements.
**Examples:** Monkey Island, Myst, Life is Strange
**GDD sections:**
- Puzzle design
- Narrative delivery
- Exploration mechanics
- Dialogue systems
- Story branching
#### Visual Novel
Narrative choices with branching story.
**Examples:** Doki Doki Literature Club, Phoenix Wright, Steins;Gate
**GDD sections:**
- Branching narrative structure
- Choice and consequence
- Character routes
- UI/presentation
- Save/load states
#### Text-Based
Text input/output games with parser or choice mechanics.
**Examples:** Zork, 80 Days, Dwarf Fortress (adventure mode)
**GDD sections:**
- Parser or choice systems
- World model
- Narrative structure
- Text presentation
- Save state management
### Simulation & Management
#### Simulation
Realistic systems with management and building.
**Examples:** SimCity, RollerCoaster Tycoon, The Sims
**GDD sections:**
- Core simulation loops
- Economy modeling
- AI agents/citizens
- Building/construction
- Failure states
#### Sandbox
Creative freedom with building and minimal objectives.
**Examples:** Minecraft, Terraria, Garry's Mod
**GDD sections:**
- Creation tools
- Physics/interaction systems
- Persistence and saving
- Sharing/community features
- Optional objectives
### Sports & Racing
#### Racing
Vehicle control with tracks and lap times.
**Examples:** Mario Kart, Forza, Need for Speed
**GDD sections:**
- Vehicle physics model
- Track design
- AI opponents
- Progression/career mode
- Multiplayer racing
#### Sports
Team-based or individual sports simulation.
**Examples:** FIFA, NBA 2K, Tony Hawk's Pro Skater
**GDD sections:**
- Sport-specific rules
- Player/team management
- AI opponent behavior
- Season/career modes
- Multiplayer modes
### Multiplayer
#### MOBA
Multiplayer team battles with hero selection.
**Examples:** League of Legends, Dota 2, Smite
**GDD sections:**
- Hero/champion design
- Lane and map design
- Team composition
- Matchmaking
- Economy (gold/items)
#### Party Game
Local multiplayer with minigames.
**Examples:** Mario Party, Jackbox, Overcooked
**GDD sections:**
- Minigame design patterns
- Controller support
- Round/game structure
- Scoring systems
- Player count flexibility
### Horror & Survival
#### Survival
Resource gathering with crafting and persistent threats.
**Examples:** Don't Starve, Subnautica, The Forest
**GDD sections:**
- Resource gathering
- Crafting systems
- Hunger/health/needs
- Threat systems
- Base building
#### Horror
Atmosphere and tension with limited resources.
**Examples:** Resident Evil, Silent Hill, Amnesia
**GDD sections:**
- Fear mechanics
- Resource scarcity
- Sound design
- Lighting and visibility
- Enemy/threat design
### Casual & Progression
#### Puzzle
Logic-based challenges and problem-solving.
**Examples:** Tetris, Portal, The Witness
**GDD sections:**
- Puzzle mechanics
- Difficulty progression
- Hint systems
- Level structure
- Scoring/rating
#### Idle/Incremental
Passive progression with upgrades and automation.
**Examples:** Cookie Clicker, Adventure Capitalist, Clicker Heroes
**GDD sections:**
- Core loop design
- Prestige systems
- Automation unlocks
- Number scaling
- Offline progress
#### Card Game
Deck building with card mechanics.
**Examples:** Slay the Spire, Hearthstone, Magic: The Gathering Arena
**GDD sections:**
- Card design framework
- Deck building rules
- Mana/resource systems
- Rarity and collection
- Competitive balance
### Rhythm
#### Rhythm
Music synchronization with timing-based gameplay.
**Examples:** Guitar Hero, Beat Saber, Crypt of the NecroDancer
**GDD sections:**
- Note/beat mapping
- Scoring systems
- Difficulty levels
- Music licensing
- Input methods
## Hybrid Types
Multiple game types can be combined. GDD sections from all selected types are included.
| Hybrid | Components | Combined Sections |
|--------|------------|-------------------|
| Action RPG | Action Platformer + RPG | Movement, combat, stats, inventory |
| Survival Horror | Survival + Horror | Resources, crafting, atmosphere, fear |
| Roguelike Deckbuilder | Roguelike + Card Game | Run structure, procedural gen, cards |
| Tactical RPG | Turn-Based Tactics + RPG | Grid movement, stats, progression |
| Open World Survival | Sandbox + Survival | Building, crafting, exploration |

113
docs/bmgd/index.md Normal file
View File

@ -0,0 +1,113 @@
---
title: "BMGD Quick Guide"
description: Quick reference for BMad Game Dev Studio
---
![BMGD Logo](bmgd-logo.png)
# BMGD Quick Guide
BMad Game Dev Studio (BMGD) extends BMM with game-specific capabilities. Developed by game industry veterans, it guides you through product research, technical design, narrative design, and a full epic-driven production cycle.
## Under Construction
Documentation is under heavy construction catching up with the new beta release. We'll have complete documentation up as soon as possible. For now, please ask in the BMGD section of the Discord if you have any questions.
![BMGD Workflow](workflow.jpg)
## Quick Start
**Install → Game Brief → GDD → (Narrative) → Architecture → Build**
BMGD is an optional module installed via BMAD Method: `npx bmad-method install`
See [How-To Reference](#how-to-reference) for commands.
## Development Phases
| Phase | Name | Key Activities |
|-------|------|----------------|
| 1 | **Preproduction** | Brainstorm Game, Game Brief, market research |
| 2 | **Design** | GDD creation, Narrative Design (for story-driven games) |
| 3 | **Technical** | Game Architecture (engine, systems, patterns) |
| 4 | **Production** | Sprint planning, story development, code review, testing |
## BMGD Agents
| Agent | Purpose |
|-------|---------|
| Game Designer | Game mechanics, balance, player psychology |
| Game Developer | Implementation with engine-specific patterns |
| Game Architect | Engine selection, systems design, technical structure |
| Game Scrum Master | Sprint planning and epic management |
| Game QA | Playtesting, engine-specific testing, performance profiling |
| Game Solo Dev | Full-stack game development for solo projects |
## Key Documents
| Document | Purpose |
|----------|---------|
| **Game Brief** | Vision, market positioning, fundamentals |
| **GDD** | Core loop, mechanics, progression, art/audio direction |
| **Narrative Design** | Story structure, characters, world-building, dialogue |
| **Architecture** | Engine, systems, patterns, project structure |
## Game Type Templates
BMGD includes 24 game type templates that auto-configure GDD sections:
Action, Adventure, Puzzle, RPG, Strategy, Simulation, Sports, Racing, Fighting, Horror, Platformer, Shooter, and more.
Each template provides genre-specific GDD sections, mechanics patterns, testing considerations, and common pitfalls to avoid.
## Explanation: BMGD vs BMM
### When to Use Each
| Use BMGD for | Use BMM for |
|--------------|-------------|
| Video games | Web applications |
| Interactive experiences | APIs and services |
| Game prototyping | Mobile apps (non-game) |
| Game jams | General software projects |
### Phase Mapping
| BMM Phase | BMGD Phase | Key Difference |
|-----------|------------|----------------|
| Analysis | Preproduction | Game concepts, Game Brief instead of Product Brief |
| Planning | Design | GDD instead of PRD; optional Narrative Design |
| Solutioning | Technical | Focus on engine selection, game-specific patterns |
| Implementation | Production | Game QA replaces TEA; engine-specific testing |
### Document Differences
| BMM | BMGD | Notes |
|-----|------|-------|
| Product Brief | Game Brief | Captures vision, market, fundamentals |
| PRD | GDD | Includes mechanics, balance, player experience |
| N/A | Narrative Design | Story, characters, world (story-driven games) |
| Architecture | Architecture | BMGD version includes engine-specific patterns and considerations |
### Testing Differences
**BMM (TEA):** Web-focused testing with Playwright, Cypress, API testing, E2E for web apps.
**BMGD (Game QA):** Engine-specific frameworks (Unity, Unreal, Godot), gameplay testing, performance profiling, playtest planning, balance validation.
## How-To Reference
| I need to... | Action |
|--------------|--------------------------------------------------------------------------------------------------------|
| Install BMGD | Run `npx bmad-method install` and select BMGD during module installation |
| Start a new game | Run `/bmad-gds-brainstorm-game`, then `/bmad:gds:create-game-brief` |
| Design my game | Run `/bmad-gds-create-gdd`; add `/bmad:gds:narrative` if story-heavy |
| Plan architecture | Run `/bmad-gds-game-architecture` with Game Architect |
| Build my game | Use Phase 4 production workflows - Run `/bmad-help` to see what's next |
| Test an idea quickly | Use [Quick-Flow](quick-flow-workflows.md) for rapid prototyping |
## Further Reading
- [Game Types Guide](game-types.md)
- [Quick-Flow Guide](quick-flow-workflows.md)

View File

@ -0,0 +1,160 @@
---
title: "Quick Flow Workflows"
---
How to create tech specs and execute implementations with Quick Flow.
## Choosing a Workflow
| Situation | Workflow | Command |
|-----------|----------|---------|
| Need to document before implementing | Quick-Spec | `/bmad-gds-quick-spec` |
| Multiple approaches to evaluate | Quick-Spec | `/bmad-gds-quick-spec` |
| Have a completed tech-spec | Quick-Dev | `/bmad-gds-quick-dev path/to/spec.md` |
| Have clear, direct instructions | Quick-Dev | `/bmad-gds-quick-dev` |
| Building complete game system | Full GDS | `/bmad-gds-workflow-init` |
| Epic-level features | Full GDS | `/bmad-gds-workflow-init` |
---
## How to Create a Tech Spec (Quick-Spec)
### Step 1: Start the workflow
```bash
/bmad-gds-quick-spec
```
### Step 2: Describe your requirement
Provide your feature request. The agent scans the codebase and asks clarifying questions.
**Checkpoint options:**
- `[a]` Advanced Elicitation - explore requirements deeper
- `[c]` Continue to investigation
- `[p]` Party Mode - consult expert agents
### Step 3: Review investigation findings
The agent analyzes the codebase for patterns, constraints, and similar implementations. Review the findings.
**Checkpoint options:**
- `[c]` Continue to spec generation
- `[p]` Party Mode - get technical review
### Step 4: Review generated spec
The agent creates an ordered task list with file paths and acceptance criteria. Verify completeness.
**Checkpoint options:**
- `[c]` Continue to final review
- `[p]` Party Mode - technical review
### Step 5: Finalize
Confirm the spec meets these standards:
- Every task has a file path and specific action
- Tasks ordered by dependency
- Acceptance criteria in Given/When/Then format
- No placeholders or TBD sections
**Options:**
- `[d]` Start Quick-Dev immediately
- `[done]` Save spec and exit
**Output:** `{planning_artifacts}/tech-spec-{slug}.md`
---
## How to Execute Implementation (Quick-Dev)
### With a Tech-Spec
```bash
/bmad-gds-quick-dev path/to/tech-spec-feature.md
```
The agent:
1. Captures baseline git commit
2. Loads and validates the spec
3. Executes tasks in order
4. Runs self-check
5. Performs adversarial review
6. Resolves findings
7. Validates against acceptance criteria
### With Direct Instructions
```bash
/bmad-gds-quick-dev
```
Then describe what you want implemented:
1. Captures baseline git commit
2. Evaluates complexity (may suggest planning)
3. Gathers context from codebase
4. Executes implementation
5. Runs self-check and adversarial review
6. Resolves findings
**Escalation:** If the agent detects complexity (multiple components, system-level scope, uncertainty), it offers:
- `[t]` Create tech-spec first
- `[w]` Use full GDS workflow
- `[e]` Execute anyway
---
## Troubleshooting
### Spec has placeholders or TBD sections
Return to investigation step. Complete missing research, inline all findings, re-run review.
### Workflow lost context mid-step
Check frontmatter for `stepsCompleted`. Resume from last completed step.
### Agent suggested planning but you want to execute
You can override with `[e]`, but document your assumptions. Escalation heuristics exist because planning saves time on complex tasks.
### Tests failing after implementation
Return to the resolve-findings step. Review failures, fix issues, ensure test expectations are correct, re-run full suite.
### Need help
```bash
/bmad-help
```
---
## Reference
### File Locations
| File | Location |
|------|----------|
| Work in progress | `{implementation_artifacts}/tech-spec-wip.md` |
| Completed specs | `{planning_artifacts}/tech-spec-{slug}.md` |
| Archived specs | `{implementation_artifacts}/tech-spec-{slug}-archived-{date}.md` |
| Workflow files | `_bmad/gds/workflows/gds-quick-flow/` |
### Validation Criteria
**Self-check (before adversarial review):**
- All tasks/instructions completed
- Tests written and passing
- Follows existing patterns
- No obvious bugs
- Acceptance criteria met
- Code is readable
**Adversarial review:**
- Correctness
- Security
- Performance
- Maintainability
- Test coverage
- Error handling

BIN
docs/bmgd/workflow.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

View File

@ -0,0 +1,371 @@
---
title: "Build a Complete Web App Using BMAD Method Workflows"
---
Use the BMAD Method workflows to build a complete web application from initial idea to deployed code with comprehensive planning and testing. This guide follows the development of a simple Habit Tracker app to illustrate the concepts, but these same workflows apply to any web application project.
## When to Use This
- You have an idea for an app and want proper planning before coding
- You're new to the BMAD Method and want to see all workflows in action
- You want to build something substantial (10+ user stories) with full architecture
- You prefer comprehensive planning over jumping straight to code
- You need documentation and testing as part of your deliverables
## When to Skip This
- Simple features or bug fixes (use Quick Flow instead)
- Rapid prototyping where planning overhead isn't justified
- You already have detailed requirements and architecture (you can skip some but not all of this)
:::note[Prerequisites]
- BMAD Core Platform installed with BMM module
- Basic understanding of web development concepts
- Willingness to invest time in planning before implementation
:::
## Steps
### 1. Initialize Your Project Structure
Start by setting up your BMAD workflow tracking and determining your project path.
**Load the BMad Master agent:**
```
/bmad:core:agents:bmad-master
```
**Run workflow initialization:**
```
5. [LW] → workflow-init
```
**Example inputs (using our Habit Tracker):**
- **Project name:** "Habit Tracker"
- **Project type:** "1. New project (greenfield)" *(or brownfield for existing codebases)*
- **Planning approach:** "1. BMad Method" *(full planning for substantial apps)*
- **Discovery workflows:** "1,2,3" *(brainstorm, research, product brief)*
**What you provide for any project:**
- Clear project vision *(e.g., "solve my productivity problem", "showcase my work", "help local businesses")*
- Technology constraints *(e.g., "React/Node", "vanilla JS", "WordPress theme", though the workflow will guide you to a tech stack if you'd like)*
- Success criteria *(e.g., "increase daily consistency", "get freelance clients", "reduce manual work")*
### 2. Brainstorm Creative Solutions
Explore different approaches to your problem before committing to specific features.
**Load Analyst agent and run:**
```
/bmad:bmm:workflows:brainstorming
```
**Example developer inputs (Habit Tracker):**
- **Problem:** "I start habit streaks but lose motivation after 2-3 weeks"
- **Constraints:** "Must work offline, no user accounts needed"
- **Inspiration:** "Simple, visual progress tracking like GitHub contribution graph"
**Your inputs for any project:**
- **Problem:** *What specific pain point are you solving?*
- **Constraints:** *Technical, budget, timeline, or user limitations*
- **Inspiration:** *Existing solutions, design patterns, or approaches you admire*
**Typical brainstorming results for any app:**
- Core feature variations and alternatives
- User experience approaches
- Technical implementation options
- Unique differentiators and value propositions
### 3. Research Market and Technical Approaches
Understand what works in existing solutions and validate your technical decisions.
**Continue with Analyst agent:**
```
/bmad:bmm:workflows:research
```
**Example research focus areas (Habit Tracker):**
- **Market research:** "What makes habit tracking apps successful vs abandoned?"
- **Technical research:** "Best practices for vanilla JS local storage and data persistence"
- **UX research:** "Psychology of habit formation and visual feedback"
**Research areas for any project:**
- **Market research:** *Who are your competitors? What do users actually need?*
- **Technical research:** *Best practices, libraries, patterns for your tech stack*
- **UX research:** *User psychology, accessibility, design patterns*
**Typical research insights:**
- User behavior patterns that inform feature prioritization
- Technical approaches that prevent common pitfalls
- Competitive landscape gaps your app can fill
### 4. Create Strategic Product Brief
Transform your ideas and research into a focused product strategy.
**Continue with Analyst agent:**
```
/bmad:bmm:workflows:create-product-brief
```
**Example responses (Habit Tracker):**
- **Target user:** "Developers and knowledge workers who struggle with consistency"
- **Core value proposition:** "Dead-simple habit tracking that works offline"
- **Key differentiator:** "No accounts, no sync, just local progress tracking"
**Your responses for any project:**
- **Target user:** *Who specifically will use this? What are their pain points?*
- **Core value proposition:** *What's the main benefit you're delivering?*
- **Key differentiator:** *How is your approach unique or better?*
**Product brief output for any app:**
- Clear user personas and primary use cases
- Prioritized feature list based on user value
- Success metrics and project constraints
- Technical approach rationale and trade-offs
### 5. Define Requirements with PRD
Convert your strategic vision into detailed technical requirements.
**Load PM agent:**
```
/bmad:bmm:agents:pm → /bmad:bmm:workflows:create-prd
```
**Example functional requirements (Habit Tracker):**
- **FR1:** Users can add/remove habit definitions
- **FR2:** Users can mark habits complete for today
- **FR3:** System shows current streak count per habit
- **FR4:** Calendar view displays completion history
**Your functional requirements (any app):**
- **FR1-N:** *What specific actions must users be able to perform?*
- **FR1-N:** *What data must the system track and display?*
- **FR1-N:** *What business logic must the system implement?*
**Example non-functional requirements:**
- **NFR1:** Performance targets *(load times, response times)*
- **NFR2:** Platform support *(browsers, devices, operating systems)*
- **NFR3:** Scalability requirements *(concurrent users, data volume)*
- **NFR4:** Security and privacy constraints
### 6. Design User Experience
Plan the visual and interaction design that supports your users' goals and workflows.
**Load UX Designer agent:**
```
/bmad:bmm:agents:ux-designer → /bmad:bmm:workflows:create-ux-design
```
**Example UX decisions (Habit Tracker):**
- **Layout:** Single-page app with habit list + calendar view
- **Visual feedback:** Green streaks, gentle animations for completions
- **Interaction patterns:** One-click habit completion, easy habit management
- **Mobile approach:** Touch-friendly buttons, responsive grid
**UX considerations for any app:**
- **Information architecture:** *How do you organize features and content?*
- **Visual hierarchy:** *What gets user attention first, second, third?*
- **Interaction patterns:** *How do users accomplish their primary tasks?*
- **Responsive design:** *How does the experience adapt across devices?*
### 7. Create System Architecture
Define technical decisions that guide consistent implementation.
**Load Architect agent:**
```
/bmad:bmm:agents:architect → /bmad:bmm:workflows:create-architecture
```
**Example architecture decisions (Habit Tracker):**
- **Data layer:** Browser localStorage with JSON serialization
- **State management:** Vanilla JS with simple object models
- **UI pattern:** MVC-style separation with modules
- **File structure:** Modular JS files, single HTML entry point
**Architecture decisions for any app:**
- **Data layer:** *Database choice, data modeling, persistence strategy*
- **Application structure:** *Framework selection, design patterns, code organization*
- **Integration points:** *APIs, third-party services, external dependencies*
- **Deployment model:** *Hosting, build process, environment configuration*
**Architecture output for any project:**
- Technology stack rationale with trade-off analysis
- Data flow and system interaction diagrams
- File organization and module structure
- Development and deployment guidelines
### 8. Break Down Into Stories
Transform requirements into implementation-ready development tasks.
**Return to PM agent:**
```
/bmad:bmm:workflows:create-epics-and-stories
```
**Example epic breakdown (Habit Tracker):**
- **Epic 1:** Core Habit Management (add, edit, delete habits)
- **Epic 2:** Daily Completion Tracking (mark complete, streak calculation)
- **Epic 3:** Visual Progress Display (calendar view, statistics)
- **Epic 4:** Data Persistence (localStorage integration, data recovery)
**Epic organization for any app:**
- **Epic 1-N:** *Group related features by user journey or technical domain*
- **Epic 1-N:** *Organize by value delivery - what users accomplish together*
- **Epic 1-N:** *Consider technical dependencies - foundational features first*
**Story examples (any project):**
- **Story X.Y:** As a [user type], I can [action] so that [benefit]
- **Story X.Y:** As a [user type], I can [action] so that [benefit]
- **Story X.Y:** As a [user type], I can [action] so that [benefit]
### 9. Validate Implementation Readiness
Ensure all planning artifacts align before starting development.
**Continue with Architect agent:**
```
/bmad:bmm:workflows:implementation-readiness
```
**Validation checklist:**
- PRD functional requirements map to stories ✓
- Architecture supports all technical requirements ✓
- UX design covers all user journeys ✓
- Stories have clear acceptance criteria ✓
### 10. Plan Development Sprint
Organize your stories into implementation phases with clear tracking.
**Load Scrum Master agent:**
```
/bmad:bmm:agents:sm → /bmad:bmm:workflows:sprint-planning
```
**Example sprint organization (Habit Tracker):**
- **Sprint 1:** Core habit CRUD + basic UI
- **Sprint 2:** Completion tracking + streak logic
- **Sprint 3:** Calendar visualization + data persistence
- **Sprint 4:** Polish, testing, and edge cases
**Sprint organization principles (any app):**
- **Sprint 1:** *Foundational features that other features depend on*
- **Sprint 2-N:** *User-facing features in order of value delivery*
- **Final sprints:** *Polish, edge cases, performance optimization*
### 11. Implement Stories with Testing
Execute each story with proper implementation and validation.
**For each story, use SM agent:**
```
/bmad:bmm:workflows:dev-story
```
**Development process per story:**
- Write failing tests first (TDD approach)
- Implement minimal code to pass tests
- Refactor for code quality
- Validate against acceptance criteria
### 12. Review Code Quality
Get adversarial feedback to catch issues before they compound.
**After each story, use SM agent:**
```
/bmad:bmm:workflows:code-review
```
**Review focuses:**
- Code quality and maintainability
- Test coverage and edge cases
- Architecture compliance
- Security and performance considerations
### 13. Automate Testing Coverage
Ensure comprehensive test coverage for long-term maintainability.
**Load Test Automation Engineer:**
```
/bmad:bmm:agents:tea → /bmad:bmm:workflows:testarch-automate
```
**Testing layers:**
- Unit tests for data models and utilities
- Integration tests for localStorage interactions
- End-to-end tests for user workflows
- Browser compatibility validation
## What You Get
After completing this workflow sequence, you'll have:
**Planning Artifacts:**
- `_bmad-output/product-brief.md` - Strategic product vision
- `_bmad-output/PRD.md` - Detailed requirements document
- `_bmad-output/ux-design.md` - Visual and interaction design
- `_bmad-output/architecture.md` - Technical architecture decisions
**Implementation Artifacts:**
- `_bmad-output/epics/` - Organized user stories with acceptance criteria
- `_bmad-output/implementation-artifacts/sprint-status.yaml` - Development tracking
- Working web application with full test coverage
- Comprehensive documentation
**Project Structure:**
```
your-web-app/ # (example: habit-tracker, portfolio-site, task-manager)
├── _bmad-output/ # All planning documents
├── src/
│ ├── index.html # Main application entry
│ ├── js/
│ │ ├── app.js # Main application logic
│ │ ├── [feature]-manager.js # Core business logic modules
│ │ ├── [component].js # UI components
│ │ └── [utility].js # Helper utilities
│ ├── css/
│ │ └── styles.css # Application styles
│ └── tests/
│ ├── unit/ # Unit test files
│ └── integration/ # Integration tests
└── README.md # Project documentation
```
## Tips
:::tip[Start Small]
If this feels overwhelming, try the Quick Flow approach first with a smaller feature to get familiar with BMAD workflows.
:::
:::tip[Document Decisions]
Each workflow creates artifacts that inform subsequent workflows. Don't skip documentation - it prevents rework later.
:::
:::tip[Iterate on Planning]
Use the `correct-course` workflow if you discover new requirements during implementation.
:::
## Next Steps
- **Deploy your app:** Use the `testarch-ci` workflow to set up deployment automation
- **Add features:** Create new epics using the `create-epics-and-stories` workflow
- **Maintain quality:** Regular code reviews and test automation expansion
- **Scale complexity:** Graduate to Enterprise Method for larger applications
## Getting Help
- **BMad Community:** [Discord community](https://discord.gg/bmad-method)
- **Documentation:** [Complete workflow reference](https://docs.bmad-method.org/)
- **Issues:** [GitHub repository](https://github.com/bmad-method/core)
:::tip[Key Takeaways]
The BMAD Method's strength is comprehensive planning that prevents common development pitfalls. Whether building a simple habit tracker or complex enterprise application, the same workflows scale to provide the right level of planning for your project. While it requires upfront investment, you'll avoid architecture refactoring, scope creep, and incomplete features that plague many projects. The workflow artifacts serve as living documentation that keeps your development focused and consistent.
:::

View File

@ -0,0 +1,532 @@
---
title: "Create a Custom Agent Using BMAD Method Workflows"
---
Use the BMAD Method workflows to design, build, and deploy a custom AI agent from initial concept to a delightful interactive persona that users love engaging with. This guide follows the development of a Teacher's Assistant agent to illustrate the concepts, but these same workflows apply to any custom agent project.
## When to Use This
- You want to create a specialized AI persona for specific domain expertise
- You need an agent that guides users through multi-step processes in your field
- You want to design custom interactive workflows beyond standard BMAD agents
- You need an agent that embodies specific communication styles and knowledge areas
- You're building agents for educational, professional, or specialized use cases
## When to Skip This
- Simple modifications to existing agents (use agent customization instead)
- One-off custom prompts or simple AI interactions
- Complex AI systems requiring custom training (this focuses on persona and workflow design)
:::note[Prerequisites]
- BMAD Core Platform installed with BMM module
- Understanding of your target domain and user needs
- Familiarity with BMAD agent interaction patterns
- Access to Brainstorm Agent and Custom Agent Builder workflows
:::
:::tip[Quick Path]
Initialize project → Brainstorm agent concepts → Define agent persona and capabilities → Build agent structure → Create workflows and menus → Test and refine → Deploy and document. The entire process typically takes 2-4 focused work sessions to go from idea to working custom agent.
:::
## Understanding Custom Agent Creation
The BMAD Method approaches custom agent creation through systematic design and implementation workflows that ensure your agent delivers real value and delightful user experiences.
| Phase | Name | What Happens |
|-------|------|--------------|
| 1 | Ideation | Brainstorm agent purpose, capabilities, personality *(collaborative)* |
| 2 | Design | Define agent persona, communication style, knowledge domains *(structured)* |
| 3 | Architecture | Plan agent workflows, menu systems, interaction patterns *(technical)* |
| 4 | Implementation | Build agent files, configure activation sequences *(systematic)* |
| 5 | Testing | Validate agent behavior, refine personality, test workflows *(iterative)* |
| 6 | Deployment | Integrate agent into BMAD ecosystem, create documentation *(production)* |
## Single Agent Method
**All steps accomplished through one agent:**
```
/bmad:bmb:agents:agent-builder
```
The Agent Builder is a comprehensive Expert Agent that guides you through all phases of agent creation in a single workflow session. It handles brainstorming, discovery, type classification, persona development, menu structure, activation planning, and agent compilation without needing multiple specialized agents.
## Steps
### Step 1: Initialize Your Agent Creation Session
**General Process:**
Start the Agent Builder to begin comprehensive agent development using its step-file architecture.
```
/bmad:bmb:agents:agent-builder
3. [CA] Create a new BMAD agent with best practices and compliance
```
**Teacher's Assistant Example:**
When prompted for initial agent concept:
- **Agent name:** "Teacher's Assistant"
- **Primary domain:** "Education and learning facilitation"
- **Target users:** "Students seeking homework help and concept understanding"
- **Agent scope:** "Socratic questioning, scaffolding techniques, progress tracking"
**Your Application:**
Provide these key elements for any agent:
- Clear agent purpose *(e.g., "help therapists with session planning", "guide developers through code reviews", "assist writers with story development")*
- Target user definition *(e.g., "healthcare professionals", "marketing teams", "creative professionals")*
- Domain expertise scope *(e.g., "financial planning", "project management", "technical documentation")*
### Step 2: Brainstorm Agent Concepts and Capabilities
**General Process:**
The Agent Builder includes optional brainstorming in Step 1. When you choose to brainstorm, select from 4 specialized technique approaches:
1. **User-Selected Techniques** - Browse the complete technique library
2. **AI-Recommended Techniques** - Customized suggestions based on your goals *(includes web research)*
3. **Random Technique Selection** - Discover unexpected creative methods
4. **Progressive Technique Flow** - Start broad, then systematically narrow focus
Each approach helps you discover your agent's essence - the living personality AND the utility it provides.
**Teacher's Assistant Example:**
Using AI-Recommended Techniques approach, we discovered:
- **Core purpose:** "Guide students through understanding using educational best practices without providing direct answers"
- **Key capabilities:** "Socratic questioning, scaffolding techniques, progress tracking, adaptive teaching methods"
- **Personality traits:** "Patient mentor, educationally rigorous, never gives up on student learning"
**Your Application:**
Define these elements for any agent:
- **Core purpose:** What main problem does your agent solve for users?
- **Key capabilities:** What specific tasks should your agent excel at?
- **Personality traits:** How should your agent communicate and behave?
### Step 2a: Discovery Conversation Phase
**General Process:**
After brainstorming, the workflow includes a comprehensive discovery conversation that establishes your agent's scope, context, target users, and special features. This prevents re-asking questions in later development phases and generates a comprehensive agent plan document.
**Teacher's Assistant Example:**
Discovery conversation explored:
- **Target Scope:** All educational interactions across grade levels and subjects
- **Primary Context:** Home tutoring and independent study environments
- **Communication Strategy:** Age-appropriate language complexity while maintaining concept integrity
- **Persistence Philosophy:** "No giving up allowed" - always find alternative approaches
- **Progress Tracking:** Subject-specific learning profiles with technique effectiveness monitoring
- **Validation Approaches:** Student explanation + pop-quiz verification of understanding
**Your Application:**
The discovery phase will explore for any agent:
- **Target Scope:** Who specifically will use your agent and in what contexts?
- **Primary Context:** Where and how will your agent be used most frequently?
- **Communication Strategy:** How should your agent adapt its communication style?
- **Core Philosophy:** What principles guide your agent's decision-making?
- **Special Features:** What unique capabilities set your agent apart?
### Step 3: Determine Agent Type and Define Metadata
**General Process:**
The workflow systematically classifies your agent and defines all required metadata properties:
- **Simple Agent:** Single-purpose, stateless, all-in-one file (~250 lines max)
- **Expert Agent:** Persistent memory, sidecar folder, domain-specific expertise
- **Module Agent:** Extends existing BMAD modules or requires multiple interconnected agents
**Teacher's Assistant Example:**
- **Classification:** Expert Agent (requires persistent memory for learning profiles)
- **Rationale:** Student progress tracking, technique effectiveness monitoring, evolving teaching strategies
- **Metadata Properties:**
- **ID:** `teachers-assistant`
- **Name:** `Sophia Chen`
- **Title:** `Educational Learning Facilitator`
- **Icon:** `🎓`
- **Module:** `stand-alone`
- **Has Sidecar:** `true`
**Your Application:**
For any agent, the system will determine:
- **Agent Type:** Based on memory requirements and complexity needs
- **Technical Properties:** ID (kebab-case), persona name, professional title
- **Visual Identity:** Appropriate emoji icon for your domain
- **Ecosystem Placement:** Stand-alone vs integration with existing modules
### Step 4: Develop Four-Field Persona System
**General Process:**
The workflow uses a sophisticated four-field persona system that creates distinct, non-overlapping personality dimensions:
- **Role:** WHAT they do (capabilities, expertise, knowledge areas)
- **Identity:** WHO they are (background, experience, character)
- **Communication Style:** HOW they speak (tone, patterns, voice)
- **Principles:** WHY they act (decision framework, values, constraints)
**Teacher's Assistant Example:**
```yaml
persona:
role: >
Educational learning facilitator specializing in Socratic questioning, scaffolding techniques,
and progress-based teaching that guides students to discover answers rather than providing direct instruction.
identity: >
Master educator with deep knowledge of educational psychology, constructivist learning theory,
and adaptive teaching methods. Passionate advocate for authentic learning through struggle and self-discovery.
communication_style: >
Speaks like a patient mentor using strategic questioning, encouraging language, and age-appropriate
complexity while maintaining conceptual integrity.
principles:
- Channel expert educational psychology wisdom: draw upon Zone of Proximal Development, scaffolding techniques, metacognitive strategies, and research-backed methods that facilitate genuine understanding
- Never provide direct answers - guide students to discover solutions through strategic questioning and multiple explanation pathways
- Authentic learning requires productive struggle - frustration signals growth, not failure
- Track what works for each student and adapt techniques accordingly - analogies for some, examples for others
- Academic boundaries are sacred - redirect non-educational conversations back to learning focus
```
**Your Application:**
For any agent, you'll develop:
- **Role:** Professional capabilities and expertise your agent provides
- **Identity:** Background, experience, and character that makes them credible
- **Communication Style:** How your agent speaks and interacts with users
- **Principles:** Decision framework and values that guide behavior
The first principle serves as an "expert activator" that tells the AI to access domain-specific knowledge and frameworks.
### Step 5: Commands & Menu Structure Design
**General Process:**
Transform discovered capabilities into structured menu commands following BMAD patterns:
- **Capability Review:** Analyze all capabilities from the discovery phase
- **Command Grouping:** Organize related capabilities under logical command areas
- **Menu Pattern Application:** Follow BMAD Expert Agent menu structure requirements
- **Trigger Design:** Create intuitive 2-letter codes and fuzzy match patterns
- **Handler Definition:** Map commands to specific prompts or actions
**Teacher's Assistant Example:**
Created 9 educational commands with Expert Agent architecture:
```yaml
critical_actions:
- 'Load COMPLETE file {project-root}/_bmad/_memory/teachers-assistant-sidecar/learning-profiles.md'
- 'Load COMPLETE file {project-root}/_bmad/_memory/teachers-assistant-sidecar/technique-tracking.md'
- 'ONLY read/write files in {project-root}/_bmad/_memory/teachers-assistant-sidecar/'
prompts:
- id: socratic-guidance
content: |
<instructions>Guide student through learning using Socratic questioning without giving direct answers</instructions>
<process>1. Ask strategic questions 2. Use student interests for analogies 3. Encourage discovery 4. Validate understanding</process>
menu:
- trigger: LG or fuzzy match on learn-guide
action: '#socratic-guidance'
description: '[LG] Learning guidance through Socratic questioning'
- trigger: QM or fuzzy match on quiz-me
action: 'Generate pop-quiz on recent or struggling concepts from learning profile'
description: '[QM] Quiz me on challenging concepts'
- trigger: SA or fuzzy match on study-aids
action: '#study-aids-generator'
description: '[SA] Generate study aids (flashcards, practice problems, guides)'
```
**Your Application:**
For any agent, you'll create commands organized by:
- **Primary Functions:** Core capabilities users access most frequently
- **Utility Commands:** Support functions like help, settings, progress tracking
- **Advanced Features:** Specialized tools for power users
- **Memory Management:** For Expert agents with persistent data needs
Design principles include 2-letter triggers, fuzzy matching, action handlers, and proper sidecar integration for Expert agents.
### Step 6: Activation Planning
**General Process:**
Define how your agent behaves when it starts up through critical actions and startup sequences:
- **Reference Loading:** Understanding critical action patterns
- **Routing Decision:** Determining build path (Simple/Expert/Module) based on architecture
- **Activation Needs Discussion:** Deciding autonomous vs responsive behavior patterns
- **Critical Actions Definition:** Specifying startup commands for memory loading and boundaries
**Teacher's Assistant Example:**
```yaml
activation:
hasCriticalActions: true
rationale: "Agent needs to auto-load student learning context to provide personalized educational guidance"
criticalActions:
- 'Load COMPLETE file {project-root}/_bmad/_memory/teachers-assistant-sidecar/learning-profiles.md'
- 'Load COMPLETE file {project-root}/_bmad/_memory/teachers-assistant-sidecar/technique-tracking.md'
- 'ONLY read/write files in {project-root}/_bmad/_memory/teachers-assistant-sidecar/'
routing:
destinationBuild: "step-07b-build-expert.md"
rationale: "Expert agent requires sidecar memory for persistent learning profiles"
```
**Your Application:**
For any agent, consider:
- **Startup Needs:** What must your agent load or initialize when it starts?
- **Memory Requirements:** Does your agent need persistent data between sessions?
- **Security Boundaries:** What file access restrictions should be enforced?
- **Operational Philosophy:** Responsive to prompts vs autonomous background tasks?
Routing logic determines the build path based on your agent's architecture needs.
### Step 7: Expert Agent Build and Compilation
**General Process:**
The Agent Builder automatically compiles all phases into the final .agent.yaml file:
1. **Generates Agent YAML:** Combines persona, menu, activation, and metadata
2. **Creates Sidecar Structure:** Sets up memory folders for Expert agents
3. **Validates Configuration:** Ensures BMAD compliance and proper structure
4. **Provides Installation:** Generates installation guidance
**Teacher's Assistant Example:**
Generated complete Expert agent with this structure:
```
agents/
└── teachers-assistant/
├── teachers-assistant.agent.yaml # Complete agent definition
└── teachers-assistant-sidecar/ # Expert agent memory (build location)
├── learning-profiles.md # Student progress and preferences
├── technique-tracking.md # Teaching method effectiveness data
└── README.md # Sidecar documentation
```
Critical actions use proper path variables: `{project-root}/_bmad/_memory/{sidecar-folder}/` for runtime operation.
**Your Application:**
For any agent, this step produces:
- **Agent YAML:** Complete agent definition with proper BMAD compliance
- **Sidecar Structure:** Memory folders and files for Expert agents
- **Path Configuration:** Proper variable usage for portability
- **Documentation:** README files and installation guidance
### Step 8: Celebration and Installation Guidance
**General Process:**
The Agent Builder provides comprehensive installation instructions and celebrates completion. To make any agent installable, create a standalone BMAD content module with:
- Module directory with `module.yaml` containing `unitary: true`
- Agent files in `agents/agent-name/` structure
- Sidecar folder in `_memory/` for Expert agents
**Teacher's Assistant Example:**
Created this installable module structure:
```
my-educational-agents/
├── module.yaml # Contains: unitary: true
├── agents/
│ └── teachers-assistant/
│ ├── teachers-assistant.agent.yaml # Main agent definition
│ └── _memory/ # Expert agent memory
│ └── teachers-assistant-sidecar/
│ ├── learning-profiles.md
│ ├── technique-tracking.md
│ └── README.md
```
Installation methods include new project setup or adding to existing BMAD installations.
**Your Application:**
For any agent, follow these installation principles:
- **Module Structure:** Use `unitary: true` for standalone agent modules
- **File Organization:** Place agent files in proper directory hierarchy
- **Memory Management:** Include `_memory/` structure for Expert agents
- **Distribution:** Package entire module directory for sharing
## Installing and Using Your Custom Agent
After completing agent creation, follow these steps to install and start using your new agent:
### Step 1: Create Module Directory Structure
**General Process:**
Transform your agent output into a BMAD-installable module:
```bash
# Navigate to your project root
cd /your/project/root
# Create module directory
mkdir -p my-custom-agents
# Create module configuration
echo "unitary: true" > my-custom-agents/module.yaml
# Create agents directory structure
mkdir -p my-custom-agents/agents
```
### Step 2: Organize Agent Files
**General Process:**
Move your completed agent files into the proper module structure:
```bash
# Copy agent directory from bmb-creations output
cp -r /path/to/_bmad-output/bmb-creations/your-agent my-custom-agents/agents/
# For Expert agents, organize sidecar structure
mkdir -p my-custom-agents/agents/your-agent/_memory
mv my-custom-agents/agents/your-agent/your-agent-sidecar my-custom-agents/agents/your-agent/_memory/
```
**Teacher's Assistant Example:**
```
my-educational-agents/
├── module.yaml # Contains: unitary: true
├── agents/
│ └── teachers-assistant/
│ ├── teachers-assistant.agent.yaml # Main agent definition
│ └── _memory/ # Expert agent memory
│ └── teachers-assistant-sidecar/
│ ├── learning-profiles.md
│ ├── technique-tracking.md
│ └── README.md
```
### Step 3: Install Module in BMAD
**General Process:**
Add your custom module to an existing or new BMAD project:
**For New Projects:**
1. Run BMAD installer: `npx @bmad-method/cli init`
2. When prompted for local modules, provide the path to your module
3. Installer will automatically integrate your agent
**For Existing Projects:**
1. Run: `npx @bmad-method/cli modify`
2. Select "Add local custom module"
3. Provide path to your module directory
4. Confirm installation
### Step 4: Activate Your Agent
**General Process:**
Once installed, your agent becomes available through BMAD's command system:
```bash
# List available agents (verify your agent appears)
/agents
# Activate your agent using its module path
/bmad:your-module:agents:your-agent
```
**Teacher's Assistant Example:**
```bash
/bmad:my-educational-agents:agents:teachers-assistant
```
### Step 5: Test Agent Functionality
**General Process:**
Start with basic interactions to verify your agent works correctly:
**Initial Activation Test:**
```
/bmad:your-module:agents:your-agent
```
**Basic Conversation Examples:**
- "Hi [Agent Name], what can you help me with?"
- "Show me your available commands"
- "Tell me about your capabilities"
**Teacher's Assistant Example:**
Specific conversation starters that test educational capabilities:
- "Help me understand fractions without giving me the answer"
- "LG" (Learning Guidance command)
- "QM" (Quiz Me command)
- "SA" (Study Aids command)
### Step 6: Verify Expert Agent Memory (If Applicable)
**General Process:**
For Expert agents with sidecar folders, confirm memory persistence:
1. **Start agent and interact with memory commands**
2. **Update profiles or tracking data**
3. **Restart agent and verify data persists**
**Teacher's Assistant Example:**
```
UP (Update Profile command)
LP (Learning Progress command)
```
### Troubleshooting Common Installation Issues
**Agent Not Found:**
- Verify `module.yaml` exists with `unitary: true`
- Check agent file is in `agents/agent-name/agent-name.agent.yaml`
- Confirm BMAD installation included your module
**Sidecar Memory Issues (Expert Agents):**
- Ensure `_memory/agent-sidecar/` structure exists
- Verify critical_actions reference correct file paths
- Check file permissions for read/write access
**Command Not Working:**
- Test basic interaction first before specialized commands
- Verify agent activation completed successfully
- Check for any startup errors in agent logs
### Sharing Your Agent
To share your agent with others:
1. **Package entire module directory:** `my-custom-agents/`
2. **Include installation instructions:** Reference this guide
3. **Provide example interactions:** Show how to use key features
4. **Document dependencies:** Any special requirements or modules
**Distribution Options:**
- **Git Repository:** Push module directory to version control
- **Archive File:** Zip module directory for direct sharing
- **BMAD Community:** Submit to community agent library (if available)
Your custom agent is now ready for production use and can be shared across BMAD installations!
## Summary
The BMAD Agent Builder provides a comprehensive, single-agent solution for creating production-ready BMAD agents. Through its step-file architecture, it guides you through the complete end-to-end process:
1. **Brainstorming** (optional) - Creative exploration using 4 specialized technique approaches
2. **Discovery** - Comprehensive capability and context definition with agent-plan documentation
3. **Type Classification** - Automatic Simple/Expert/Module architecture determination
4. **Four-Field Persona** - Role, identity, communication style, and principles development
5. **Commands & Menu** - Structured command interface with BMAD compliance
6. **Activation Planning** - Critical actions definition and routing determination
7. **Agent Build** - Complete YAML file generation with sidecar structure
8. **Installation Guidance** - Module packaging instructions and testing recommendations
**Complete Agent Creation in One Session:**
```
/bmad:bmb:agents:agent-builder → [CA] Create a new BMAD agent → Continue through all steps
```
**Process Results:**
- **Production-Ready Files:** Complete `.agent.yaml` with proper BMAD compliance
- **Expert Architecture:** Sidecar folder structure with memory files and security boundaries
- **Installation Package:** Module structure with `module.yaml` for BMAD integration
- **Testing Guidelines:** Conversation starters and command validation approaches
- **Documentation:** Comprehensive agent plan and sidecar README for maintenance
**Key Advantages:**
- **Single Agent Workflow:** Complete process without switching between multiple agents
- **BMAD Compliance:** Automatic adherence to all standards, patterns, and architectural requirements
- **Expert Memory Management:** Proper sidecar setup with runtime path variables and file boundaries
- **Specialized Domain Integration:** Research-backed methodology incorporation
- **Production Installation:** Ready-to-install module structure with proper configuration
**Teacher's Assistant Case Study Achievement:**
- **Expert Agent:** 9 educational commands with persistent memory architecture
- **Educational Psychology Integration:** Socratic method, scaffolding techniques, ZPD assessment
- **Complete Workflow:** From concept to installable module in single session
- **Memory Architecture:** Student learning profiles and technique effectiveness tracking
- **BMAD Compliance:** Full validation and proper sidecar configuration
**Time Investment:**
Typically 2-4 focused work sessions to go from initial idea to production-ready, installable custom agent with comprehensive capabilities and professional-quality implementation.
The BMAD Agent Creation Method transforms agent concepts into production-ready implementations efficiently and systematically, handling all technical complexity while maintaining focus on agent personality and user value delivery.

View File

@ -0,0 +1,26 @@
# Teachers-Assistant-Sidecar
This folder stores persistent memory for the **Teachers Assistant** Expert agent.
## Purpose
Maintains individual student learning profiles and tracks teaching technique effectiveness to provide personalized educational guidance that adapts to each student's learning style and progress.
## Files
- **learning-profiles.md**: Student interests, grade level, subject progress tracking, and learning preferences
- **technique-tracking.md**: Record of teaching methods and their effectiveness per student for continuous improvement
## Runtime Access
After BMAD installation, this folder will be accessible at:
`{project-root}/_bmad/_memory/teachers-assistant-sidecar/`
## Educational Philosophy
This agent implements research-backed educational psychology principles:
- **Zone of Proximal Development**: Scaffolding within student's learning capability
- **Socratic Method**: Strategic questioning to guide discovery rather than provide answers
- **Constructivist Learning**: Student-centered knowledge building through active engagement
- **Metacognitive Strategies**: Building student awareness of their own learning processes
## Security & Privacy
- Agent file access is restricted to this sidecar folder only
- Student learning data remains private and is not shared beyond educational interactions
- Progress tracking serves to improve teaching effectiveness, not for external assessment

View File

@ -0,0 +1,27 @@
# Learning Profiles
## Student Information
- **Name**: [To be filled during first interaction]
- **Grade Level**: [To be determined]
- **Primary Subjects**: [To be identified]
## Learning Preferences
- **Communication Style**: [Age-appropriate complexity level]
- **Preferred Analogies**: [Student interests for concept explanations]
- **Learning Modalities**: [Visual, verbal, kinesthetic preferences]
- **Study Aid Formats**: [Flashcards, concept maps, practice problems, guides]
## Subject Progress Tracking
### [Subject Name]
- **Mastered Concepts**: [List concepts student has demonstrated understanding]
- **Struggling Areas**: [Concepts requiring additional focus and practice]
- **Effective Techniques**: [Methods that work well for this student in this subject]
- **Recent Sessions**: [Brief notes on last few learning interactions]
## Progress Notes
- **Overall Learning Patterns**: [What consistently helps this student learn]
- **Motivation Strategies**: [What keeps student engaged]
- **Challenge Areas**: [Topics or approaches that consistently cause difficulty]
*This file is updated automatically during learning sessions and can be manually edited through the [UP] command.*

View File

@ -0,0 +1,43 @@
# Technique Effectiveness Tracking
## Teaching Method Analysis
### Socratic Questioning
- **Success Rate**: [Percentage of times this leads to understanding]
- **Best Used For**: [Types of concepts where this works well]
- **Student Response**: [How student typically responds to questioning approach]
- **Notes**: [Specific questioning patterns that work for this student]
### Analogies & Examples
- **Preferred Analogy Types**: [Student interests that make good analogies]
- **Successful Analogies**: [Record of analogies that clicked]
- **Failed Analogies**: [Analogies that confused rather than clarified]
- **Interest Areas**: [Student hobbies/interests available for analogies]
### Study Aid Generation
- **Most Effective Formats**: [Flashcards, concept maps, practice problems, guides]
- **Usage Patterns**: [How student uses generated materials]
- **Revision Frequency**: [How often student reviews generated aids]
- **Success Metrics**: [Improvement after using specific aid types]
### Alternative Explanation Methods
- **Visual Methods**: [Diagrams, charts, illustrations effectiveness]
- **Narrative Methods**: [Story-based learning success rate]
- **Step-by-Step Guides**: [Procedural learning effectiveness]
- **Peer Explanation**: [Student teaching back concepts success]
## Session Effectiveness Tracking
- **Date**: [Session date]
- **Subject**: [Topic covered]
- **Methods Used**: [Teaching techniques employed]
- **Student Engagement**: [High/Medium/Low and why]
- **Understanding Achieved**: [Yes/Partial/No and next steps]
- **Follow-up Needed**: [Additional practice or review required]
## Adaptation Insights
- **Learning Style Preferences**: [What consistently works]
- **Avoidance Patterns**: [Methods that consistently fail]
- **Optimal Session Length**: [How long before fatigue sets in]
- **Best Time Patterns**: [When student is most receptive to learning]
*This file tracks which educational techniques work best for individual students and is updated after each learning session.*

View File

@ -0,0 +1,84 @@
agent:
metadata:
id: teachers-assistant
name: Sophia Chen
title: Educational Learning Facilitator
icon: 🎓
module: stand-alone
hasSidecar: true
persona:
role: |
Educational learning facilitator specializing in Socratic questioning, scaffolding techniques, and progress-based teaching that guides students to discover answers rather than providing direct instruction.
identity: |
Master educator with deep knowledge of educational psychology, constructivist learning theory, and adaptive teaching methods. Passionate advocate for authentic learning through struggle and self-discovery.
communication_style: |
Speaks like a patient mentor using strategic questioning, encouraging language, and age-appropriate complexity while maintaining conceptual integrity.
principles:
- Channel expert educational psychology wisdom: draw upon Zone of Proximal Development, scaffolding techniques, metacognitive strategies, and research-backed methods that facilitate genuine understanding
- Never provide direct answers - guide students to discover solutions through strategic questioning and multiple explanation pathways
- Authentic learning requires productive struggle - frustration signals growth, not failure
- Track what works for each student and adapt techniques accordingly - analogies for some, examples for others
- Academic boundaries are sacred - redirect non-educational conversations back to learning focus
critical_actions:
- 'Load COMPLETE file {project-root}/_bmad/_memory/teachers-assistant-sidecar/learning-profiles.md'
- 'Load COMPLETE file {project-root}/_bmad/_memory/teachers-assistant-sidecar/technique-tracking.md'
- 'ONLY read/write files in {project-root}/_bmad/_memory/teachers-assistant-sidecar/'
prompts:
- id: socratic-guidance
content: |
<instructions>Guide student through learning using Socratic questioning without giving direct answers</instructions>
<process>1. Ask strategic questions 2. Use student interests for analogies 3. Encourage discovery 4. Validate understanding</process>
- id: alternative-explanation
content: |
<instructions>Try different teaching approach when student struggles with current method</instructions>
<process>1. Assess why current approach failed 2. Select alternative method 3. Use different modality or analogy 4. Check for understanding</process>
- id: study-aids-generator
content: |
<instructions>Generate study materials based on student needs and preferences</instructions>
<options>Flashcards | Practice Problems | Concept Maps | Step-by-step Guides</options>
<process>1. Assess learning gaps 2. Choose appropriate format 3. Create targeted materials 4. Save to learning profile</process>
menu:
- trigger: LG or fuzzy match on learn-guide
action: '#socratic-guidance'
description: '[LG] Learning guidance through Socratic questioning'
- trigger: QM or fuzzy match on quiz-me
action: 'Generate pop-quiz on recent or struggling concepts from learning profile'
description: '[QM] Quiz me on challenging concepts'
- trigger: VC or fuzzy match on validate-concepts
action: 'Test retention of previously learned material to ensure long-term understanding'
description: '[VC] Validate concept retention'
- trigger: SA or fuzzy match on study-aids
action: '#study-aids-generator'
description: '[SA] Generate study aids (flashcards, practice problems, guides)'
- trigger: ED or fuzzy match on explain-differently
action: '#alternative-explanation'
description: '[ED] Try different explanation method'
- trigger: ST or fuzzy match on story-time
action: 'Tell engaging stories that exemplify concepts being learned'
description: '[ST] Story time - learn through narratives'
- trigger: UP or fuzzy match on update-profile
action: 'Update {project-root}/_bmad/_memory/teachers-assistant-sidecar/learning-profiles.md with interests and preferences'
description: '[UP] Update learning profile and interests'
- trigger: LP or fuzzy match on learning-progress
action: 'Review progress from {project-root}/_bmad/_memory/teachers-assistant-sidecar/technique-tracking.md and provide insights'
description: '[LP] View learning progress and technique effectiveness'
- trigger: HC or fuzzy match on help-commands
action: 'Display all available educational commands and their usage with examples'
description: '[HC] Help - show all available commands'

View File

@ -0,0 +1 @@
unitary: true

View File

@ -16,7 +16,6 @@ agent:
principles: | principles: |
- Planning and execution are two sides of the same coin. - Planning and execution are two sides of the same coin.
- Specs are for building, not bureaucracy. Code that ships is better than perfect code that doesn't. - Specs are for building, not bureaucracy. Code that ships is better than perfect code that doesn't.
- If `**/project-context.md` exists, follow it. If absent, proceed without.
menu: menu:
- trigger: TS or fuzzy match on tech-spec - trigger: TS or fuzzy match on tech-spec

View File

@ -7,7 +7,7 @@ agent:
title: Technical Writer title: Technical Writer
icon: 📚 icon: 📚
module: bmm module: bmm
hasSidecar: false hasSidecar: true
persona: persona:
role: Technical Documentation Specialist + Knowledge Curator role: Technical Documentation Specialist + Knowledge Curator

View File

@ -1,5 +1,6 @@
module,phase,name,code,sequence,workflow-file,command,required,agent,options,description,output-location,outputs, module,phase,name,code,sequence,workflow-file,command,required,agent,options,description,output-location,outputs,
bmm,anytime,Document Project,DP,10,_bmad/bmm/workflows/document-project/workflow.yaml,bmad-bmm-document-project,false,analyst,Create Mode,"Analyze an existing project to produce useful documentation",project-knowledge,*, bmm,anytime,Document Project,DP,10,_bmad/bmm/workflows/document-project/workflow.yaml,bmad-bmm-document-project,false,analyst,Create Mode,"Analyze an existing project to produce useful documentation",project-knowledge,*,
bmm,anytime,Generate Project Context,GPC,15,_bmad/bmm/workflows/generate-project-context/workflow.md,bmad-bmm-generate-project-context,false,analyst,Create Mode,"Scan existing codebase to generate a lean LLM-optimized project-context.md containing critical implementation rules patterns and conventions for AI agents. Essential for brownfield projects and quick-flow.",output_folder,"project context",
bmm,anytime,Quick Spec,TS,20,_bmad/bmm/workflows/bmad-quick-flow/quick-spec/workflow.md,bmad-bmm-quick-spec,false,quick-flow-solo-dev,Create Mode,"Do not suggest for potentially very complex things unless requested or if the user complains that they do not want to follow the extensive planning of the bmad method. Quick one-off tasks small changes simple apps utilities without extensive planning",planning_artifacts,"tech spec", bmm,anytime,Quick Spec,TS,20,_bmad/bmm/workflows/bmad-quick-flow/quick-spec/workflow.md,bmad-bmm-quick-spec,false,quick-flow-solo-dev,Create Mode,"Do not suggest for potentially very complex things unless requested or if the user complains that they do not want to follow the extensive planning of the bmad method. Quick one-off tasks small changes simple apps utilities without extensive planning",planning_artifacts,"tech spec",
bmm,anytime,Quick Dev,QD,30,_bmad/bmm/workflows/bmad-quick-flow/quick-dev/workflow.md,bmad-bmm-quick-dev,false,quick-flow-solo-dev,Create Mode,"Quick one-off tasks small changes simple apps utilities without extensive planning - Do not suggest for potentially very complex things unless requested or if the user complains that they do not want to follow the extensive planning of the bmad method, unless the user is already working through the implementation phase and just requests a 1 off things not already in the plan",,, bmm,anytime,Quick Dev,QD,30,_bmad/bmm/workflows/bmad-quick-flow/quick-dev/workflow.md,bmad-bmm-quick-dev,false,quick-flow-solo-dev,Create Mode,"Quick one-off tasks small changes simple apps utilities without extensive planning - Do not suggest for potentially very complex things unless requested or if the user complains that they do not want to follow the extensive planning of the bmad method, unless the user is already working through the implementation phase and just requests a 1 off things not already in the plan",,,
bmm,anytime,Correct Course,CC,40,_bmad/bmm/workflows/4-implementation/correct-course/workflow.yaml,bmad-bmm-correct-course,false,sm,Create Mode,"Anytime: Navigate significant changes. May recommend start over update PRD redo architecture sprint planning or correct epics and stories",planning_artifacts,"change proposal", bmm,anytime,Correct Course,CC,40,_bmad/bmm/workflows/4-implementation/correct-course/workflow.yaml,bmad-bmm-correct-course,false,sm,Create Mode,"Anytime: Navigate significant changes. May recommend start over update PRD redo architecture sprint planning or correct epics and stories",planning_artifacts,"change proposal",

Can't render this file because it has a wrong number of fields in line 7.

View File

@ -5,7 +5,7 @@ description: 'Optimize and polish the complete PRD document for flow, coherence,
# File References # File References
nextStepFile: './step-12-complete.md' nextStepFile: './step-12-complete.md'
outputFile: '{planning_artifacts}/prd.md' outputFile: '{planning_artifacts}/prd.md'
purposeFile: './data/prd-purpose.md' purposeFile: '../data/prd-purpose.md'
# Task References # Task References
advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml' advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml'

View File

@ -4,7 +4,7 @@ description: 'Complete & Validate - Present options for next steps including ful
# File references (ONLY variables used in this step) # File references (ONLY variables used in this step)
prdFile: '{prd_file_path}' prdFile: '{prd_file_path}'
validationWorkflow: './steps-v/step-v-01-discovery.md' validationWorkflow: '../steps-v/step-v-01-discovery.md'
--- ---
# Step E-4: Complete & Validate # Step E-4: Complete & Validate

View File

@ -0,0 +1,21 @@
---
project_name: '{{project_name}}'
user_name: '{{user_name}}'
date: '{{date}}'
sections_completed: ['technology_stack']
existing_patterns_found: { { number_of_patterns_discovered } }
---
# Project Context for AI Agents
_This file contains critical rules and patterns that AI agents must follow when implementing code in this project. Focus on unobvious details that agents might otherwise miss._
---
## Technology Stack & Versions
_Documented after discovery phase_
## Critical Implementation Rules
_Documented after discovery phase_

View File

@ -0,0 +1,184 @@
# Step 1: Context Discovery & Initialization
## MANDATORY EXECUTION RULES (READ FIRST):
- 🛑 NEVER generate content without user input
- ✅ ALWAYS treat this as collaborative discovery between technical peers
- 📋 YOU ARE A FACILITATOR, not a content generator
- 💬 FOCUS on discovering existing project context and technology stack
- 🎯 IDENTIFY critical implementation rules that AI agents need
- ⚠️ ABSOLUTELY NO TIME ESTIMATES - AI development speed has fundamentally changed
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
## EXECUTION PROTOCOLS:
- 🎯 Show your analysis before taking any action
- 📖 Read existing project files to understand current context
- 💾 Initialize document and update frontmatter
- 🚫 FORBIDDEN to load next step until discovery is complete
## CONTEXT BOUNDARIES:
- Variables from workflow.md are available in memory
- Focus on existing project files and architecture decisions
- Look for patterns, conventions, and unique requirements
- Prioritize rules that prevent implementation mistakes
## YOUR TASK:
Discover the project's technology stack, existing patterns, and critical implementation rules that AI agents must follow when writing code.
## DISCOVERY SEQUENCE:
### 1. Check for Existing Project Context
First, check if project context already exists:
- Look for file at `{project_knowledge}/project-context.md or {project-root}/**/project-context.md`
- If exists: Read complete file to understand existing rules
- Present to user: "Found existing project context with {number_of_sections} sections. Would you like to update this or create a new one?"
### 2. Discover Project Technology Stack
Load and analyze project files to identify technologies:
**Architecture Document:**
- Look for `{planning_artifacts}/architecture.md`
- Extract technology choices with specific versions
- Note architectural decisions that affect implementation
**Package Files:**
- Check for `package.json`, `requirements.txt`, `Cargo.toml`, etc.
- Extract exact versions of all dependencies
- Note development vs production dependencies
**Configuration Files:**
- Look for project language specific configs ( example: `tsconfig.json`)
- Build tool configs (webpack, vite, next.config.js, etc.)
- Linting and formatting configs (.eslintrc, .prettierrc, etc.)
- Testing configurations (jest.config.js, vitest.config.ts, etc.)
### 3. Identify Existing Code Patterns
Search through existing codebase for patterns:
**Naming Conventions:**
- File naming patterns (PascalCase, kebab-case, etc.)
- Component/function naming conventions
- Variable naming patterns
- Test file naming patterns
**Code Organization:**
- How components are structured
- Where utilities and helpers are placed
- How services are organized
- Test organization patterns
**Documentation Patterns:**
- Comment styles and conventions
- Documentation requirements
- README and API doc patterns
### 4. Extract Critical Implementation Rules
Look for rules that AI agents might miss:
**Language-Specific Rules:**
- TypeScript strict mode requirements
- Import/export conventions
- Async/await vs Promise usage patterns
- Error handling patterns specific to the language
**Framework-Specific Rules:**
- React hooks usage patterns
- API route conventions
- Middleware usage patterns
- State management patterns
**Testing Rules:**
- Test structure requirements
- Mock usage conventions
- Integration vs unit test boundaries
- Coverage requirements
**Development Workflow Rules:**
- Branch naming conventions
- Commit message patterns
- PR review requirements
- Deployment procedures
### 5. Initialize Project Context Document
Based on discovery, create or update the context document:
#### A. Fresh Document Setup (if no existing context)
Copy template from `{installed_path}/project-context-template.md` to `{output_folder}/project-context.md`
Initialize frontmatter fields.
#### B. Existing Document Update
Load existing context and prepare for updates
Set frontmatter `sections_completed` to track what will be updated
### 6. Present Discovery Summary
Report findings to user:
"Welcome {{user_name}}! I've analyzed your project for {{project_name}} to discover the context that AI agents need.
**Technology Stack Discovered:**
{{list_of_technologies_with_versions}}
**Existing Patterns Found:**
- {{number_of_patterns}} implementation patterns
- {{number_of_conventions}} coding conventions
- {{number_of_rules}} critical rules
**Key Areas for Context Rules:**
- {{area_1}} (e.g., TypeScript configuration)
- {{area_2}} (e.g., Testing patterns)
- {{area_3}} (e.g., Code organization)
{if_existing_context}
**Existing Context:** Found {{sections}} sections already defined. We can update or add to these.
{/if_existing_context}
Ready to create/update your project context. This will help AI agents implement code consistently with your project's standards.
[C] Continue to context generation"
## SUCCESS METRICS:
✅ Existing project context properly detected and handled
✅ Technology stack accurately identified with versions
✅ Critical implementation patterns discovered
✅ Project context document properly initialized
✅ Discovery findings clearly presented to user
✅ User ready to proceed with context generation
## FAILURE MODES:
❌ Not checking for existing project context before creating new one
❌ Missing critical technology versions or configurations
❌ Overlooking important coding patterns or conventions
❌ Not initializing frontmatter properly
❌ Not presenting clear discovery summary to user
## NEXT STEP:
After user selects [C] to continue, load `./step-02-generate.md` to collaboratively generate the specific project context rules.
Remember: Do NOT proceed to step-02 until user explicitly selects [C] from the menu and discovery is confirmed and the initial file has been written as directed in this discovery step!

View File

@ -0,0 +1,318 @@
# Step 2: Context Rules Generation
## MANDATORY EXECUTION RULES (READ FIRST):
- 🛑 NEVER generate content without user input
- ✅ ALWAYS treat this as collaborative discovery between technical peers
- 📋 YOU ARE A FACILITATOR, not a content generator
- 💬 FOCUS on unobvious rules that AI agents need to be reminded of
- 🎯 KEEP CONTENT LEAN - optimize for LLM context efficiency
- ⚠️ ABSOLUTELY NO TIME ESTIMATES - AI development speed has fundamentally changed
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
## EXECUTION PROTOCOLS:
- 🎯 Show your analysis before taking any action
- 📝 Focus on specific, actionable rules rather than general advice
- ⚠️ Present A/P/C menu after each major rule category
- 💾 ONLY save when user chooses C (Continue)
- 📖 Update frontmatter with completed sections
- 🚫 FORBIDDEN to load next step until all sections are complete
## COLLABORATION MENUS (A/P/C):
This step will generate content and present choices for each rule category:
- **A (Advanced Elicitation)**: Use discovery protocols to explore nuanced implementation rules
- **P (Party Mode)**: Bring multiple perspectives to identify critical edge cases
- **C (Continue)**: Save the current rules and proceed to next category
## PROTOCOL INTEGRATION:
- When 'A' selected: Execute {project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml
- When 'P' selected: Execute {project-root}/_bmad/core/workflows/party-mode
- PROTOCOLS always return to display this step's A/P/C menu after the A or P have completed
- User accepts/rejects protocol changes before proceeding
## CONTEXT BOUNDARIES:
- Discovery results from step-1 are available
- Technology stack and existing patterns are identified
- Focus on rules that prevent implementation mistakes
- Prioritize unobvious details that AI agents might miss
## YOUR TASK:
Collaboratively generate specific, critical rules that AI agents must follow when implementing code in this project.
## CONTEXT GENERATION SEQUENCE:
### 1. Technology Stack & Versions
Document the exact technology stack from discovery:
**Core Technologies:**
Based on user skill level, present findings:
**Expert Mode:**
"Technology stack from your architecture and package files:
{{exact_technologies_with_versions}}
Any critical version constraints I should document for agents?"
**Intermediate Mode:**
"I found your technology stack:
**Core Technologies:**
{{main_technologies_with_versions}}
**Key Dependencies:**
{{important_dependencies_with_versions}}
Are there any version constraints or compatibility notes agents should know about?"
**Beginner Mode:**
"Here are the technologies you're using:
**Main Technologies:**
{{friendly_description_of_tech_stack}}
**Important Notes:**
{{key_things_agents_need_to_know_about_versions}}
Should I document any special version rules or compatibility requirements?"
### 2. Language-Specific Rules
Focus on unobvious language patterns agents might miss:
**TypeScript/JavaScript Rules:**
"Based on your codebase, I notice some specific patterns:
**Configuration Requirements:**
{{typescript_config_rules}}
**Import/Export Patterns:**
{{import_export_conventions}}
**Error Handling Patterns:**
{{error_handling_requirements}}
Are these patterns correct? Any other language-specific rules agents should follow?"
**Python/Ruby/Other Language Rules:**
Adapt to the actual language in use with similar focused questions.
### 3. Framework-Specific Rules
Document framework-specific patterns:
**React Rules (if applicable):**
"For React development, I see these patterns:
**Hooks Usage:**
{{hooks_usage_patterns}}
**Component Structure:**
{{component_organization_rules}}
**State Management:**
{{state_management_patterns}}
**Performance Rules:**
{{performance_optimization_requirements}}
Should I add any other React-specific rules?"
**Other Framework Rules:**
Adapt for Vue, Angular, Next.js, Express, etc.
### 4. Testing Rules
Focus on testing patterns that ensure consistency:
**Test Structure Rules:**
"Your testing setup shows these patterns:
**Test Organization:**
{{test_file_organization}}
**Mock Usage:**
{{mock_patterns_and_conventions}}
**Test Coverage Requirements:**
{{coverage_expectations}}
**Integration vs Unit Test Rules:**
{{test_boundary_patterns}}
Are there testing rules agents should always follow?"
### 5. Code Quality & Style Rules
Document critical style and quality rules:
**Linting/Formatting:**
"Your code style configuration requires:
**ESLint/Prettier Rules:**
{{specific_linting_rules}}
**Code Organization:**
{{file_and_folder_structure_rules}}
**Naming Conventions:**
{{naming_patterns_agents_must_follow}}
**Documentation Requirements:**
{{comment_and_documentation_patterns}}
Any additional code quality rules?"
### 6. Development Workflow Rules
Document workflow patterns that affect implementation:
**Git/Repository Rules:**
"Your project uses these patterns:
**Branch Naming:**
{{branch_naming_conventions}}
**Commit Message Format:**
{{commit_message_patterns}}
**PR Requirements:**
{{pull_request_checklist}}
**Deployment Patterns:**
{{deployment_considerations}}
Should I document any other workflow rules?"
### 7. Critical Don't-Miss Rules
Identify rules that prevent common mistakes:
**Anti-Patterns to Avoid:**
"Based on your codebase, here are critical things agents must NOT do:
{{critical_anti_patterns_with_examples}}
**Edge Cases:**
{{specific_edge_cases_agents_should_handle}}
**Security Rules:**
{{security_considerations_agents_must_follow}}
**Performance Gotchas:**
{{performance_patterns_to_avoid}}
Are there other 'gotchas' agents should know about?"
### 8. Generate Context Content
For each category, prepare lean content for the project context file:
#### Content Structure:
```markdown
## Technology Stack & Versions
{{concise_technology_list_with_exact_versions}}
## Critical Implementation Rules
### Language-Specific Rules
{{bullet_points_of_critical_language_rules}}
### Framework-Specific Rules
{{bullet_points_of_framework_patterns}}
### Testing Rules
{{bullet_points_of_testing_requirements}}
### Code Quality & Style Rules
{{bullet_points_of_style_and_quality_rules}}
### Development Workflow Rules
{{bullet_points_of_workflow_patterns}}
### Critical Don't-Miss Rules
{{bullet_points_of_anti_patterns_and_edge_cases}}
```
### 9. Present Content and Menu
After each category, show the generated rules and present choices:
"I've drafted the {{category_name}} rules for your project context.
**Here's what I'll add:**
[Show the complete markdown content for this category]
**What would you like to do?**
[A] Advanced Elicitation - Explore nuanced rules for this category
[P] Party Mode - Review from different implementation perspectives
[C] Continue - Save these rules and move to next category"
### 10. Handle Menu Selection
#### If 'A' (Advanced Elicitation):
- Execute advanced-elicitation.xml with current category rules
- Process enhanced rules that come back
- Ask user: "Accept these enhanced rules for {{category}}? (y/n)"
- If yes: Update content, then return to A/P/C menu
- If no: Keep original content, then return to A/P/C menu
#### If 'P' (Party Mode):
- Execute party-mode workflow with category rules context
- Process collaborative insights on implementation patterns
- Ask user: "Accept these changes to {{category}} rules? (y/n)"
- If yes: Update content, then return to A/P/C menu
- If no: Keep original content, then return to A/P/C menu
#### If 'C' (Continue):
- Save the current category content to project context file
- Update frontmatter: `sections_completed: [...]`
- Proceed to next category or step-03 if complete
## APPEND TO PROJECT CONTEXT:
When user selects 'C' for a category, append the content directly to `{output_folder}/project-context.md` using the structure from step 8.
## SUCCESS METRICS:
✅ All critical technology versions accurately documented
✅ Language-specific rules cover unobvious patterns
✅ Framework rules capture project-specific conventions
✅ Testing rules ensure consistent test quality
✅ Code quality rules maintain project standards
✅ Workflow rules prevent implementation conflicts
✅ Content is lean and optimized for LLM context
✅ A/P/C menu presented and handled correctly for each category
## FAILURE MODES:
❌ Including obvious rules that agents already know
❌ Making content too verbose for LLM context efficiency
❌ Missing critical anti-patterns or edge cases
❌ Not getting user validation for each rule category
❌ Not documenting exact versions and configurations
❌ Not presenting A/P/C menu after content generation
## NEXT STEP:
After completing all rule categories and user selects 'C' for the final category, load `./step-03-complete.md` to finalize the project context file.
Remember: Do NOT proceed to step-03 until all categories are complete and user explicitly selects 'C' for each!

View File

@ -0,0 +1,278 @@
# Step 3: Context Completion & Finalization
## MANDATORY EXECUTION RULES (READ FIRST):
- 🛑 NEVER generate content without user input
- ✅ ALWAYS treat this as collaborative completion between technical peers
- 📋 YOU ARE A FACILITATOR, not a content generator
- 💬 FOCUS on finalizing a lean, LLM-optimized project context
- 🎯 ENSURE all critical rules are captured and actionable
- ⚠️ ABSOLUTELY NO TIME ESTIMATES - AI development speed has fundamentally changed
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
## EXECUTION PROTOCOLS:
- 🎯 Show your analysis before taking any action
- 📝 Review and optimize content for LLM context efficiency
- 📖 Update frontmatter with completion status
- 🚫 NO MORE STEPS - this is the final step
## CONTEXT BOUNDARIES:
- All rule categories from step-2 are complete
- Technology stack and versions are documented
- Focus on final review, optimization, and completion
- Ensure the context file is ready for AI agent consumption
## YOUR TASK:
Complete the project context file, optimize it for LLM efficiency, and provide guidance for usage and maintenance.
## COMPLETION SEQUENCE:
### 1. Review Complete Context File
Read the entire project context file and analyze:
**Content Analysis:**
- Total length and readability for LLMs
- Clarity and specificity of rules
- Coverage of all critical areas
- Actionability of each rule
**Structure Analysis:**
- Logical organization of sections
- Consistency of formatting
- Absence of redundant or obvious information
- Optimization for quick scanning
### 2. Optimize for LLM Context
Ensure the file is lean and efficient:
**Content Optimization:**
- Remove any redundant rules or obvious information
- Combine related rules into concise bullet points
- Use specific, actionable language
- Ensure each rule provides unique value
**Formatting Optimization:**
- Use consistent markdown formatting
- Implement clear section hierarchy
- Ensure scannability with strategic use of bolding
- Maintain readability while maximizing information density
### 3. Final Content Structure
Ensure the final structure follows this optimized format:
```markdown
# Project Context for AI Agents
_This file contains critical rules and patterns that AI agents must follow when implementing code in this project. Focus on unobvious details that agents might otherwise miss._
---
## Technology Stack & Versions
{{concise_technology_list}}
## Critical Implementation Rules
### Language-Specific Rules
{{specific_language_rules}}
### Framework-Specific Rules
{{framework_patterns}}
### Testing Rules
{{testing_requirements}}
### Code Quality & Style Rules
{{style_and_quality_patterns}}
### Development Workflow Rules
{{workflow_patterns}}
### Critical Don't-Miss Rules
{{anti_patterns_and_edge_cases}}
---
## Usage Guidelines
**For AI Agents:**
- Read this file before implementing any code
- Follow ALL rules exactly as documented
- When in doubt, prefer the more restrictive option
- Update this file if new patterns emerge
**For Humans:**
- Keep this file lean and focused on agent needs
- Update when technology stack changes
- Review quarterly for outdated rules
- Remove rules that become obvious over time
Last Updated: {{date}}
```
### 4. Present Completion Summary
Based on user skill level, present the completion:
**Expert Mode:**
"Project context complete. Optimized for LLM consumption with {{rule_count}} critical rules across {{section_count}} sections.
File saved to: `{output_folder}/project-context.md`
Ready for AI agent integration."
**Intermediate Mode:**
"Your project context is complete and optimized for AI agents!
**What we created:**
- {{rule_count}} critical implementation rules
- Technology stack with exact versions
- Framework-specific patterns and conventions
- Testing and quality guidelines
- Workflow and anti-pattern rules
**Key benefits:**
- AI agents will implement consistently with your standards
- Reduced context switching and implementation errors
- Clear guidance for unobvious project requirements
**Next steps:**
- AI agents should read this file before implementing
- Update as your project evolves
- Review periodically for optimization"
**Beginner Mode:**
"Excellent! Your project context guide is ready! 🎉
**What this does:**
Think of this as a 'rules of the road' guide for AI agents working on your project. It ensures they all follow the same patterns and avoid common mistakes.
**What's included:**
- Exact technology versions to use
- Critical coding rules they might miss
- Testing and quality standards
- Workflow patterns to follow
**How AI agents use it:**
They read this file before writing any code, ensuring everything they create follows your project's standards perfectly.
Your project context is saved and ready to help agents implement consistently!"
### 5. Final File Updates
Update the project context file with completion information:
**Frontmatter Update:**
```yaml
---
project_name: '{{project_name}}'
user_name: '{{user_name}}'
date: '{{date}}'
sections_completed:
['technology_stack', 'language_rules', 'framework_rules', 'testing_rules', 'quality_rules', 'workflow_rules', 'anti_patterns']
status: 'complete'
rule_count: { { total_rules } }
optimized_for_llm: true
---
```
**Add Usage Section:**
Append the usage guidelines from step 3 to complete the document.
### 6. Completion Validation
Final checks before completion:
**Content Validation:**
✅ All critical technology versions documented
✅ Language-specific rules are specific and actionable
✅ Framework rules cover project conventions
✅ Testing rules ensure consistency
✅ Code quality rules maintain standards
✅ Workflow rules prevent conflicts
✅ Anti-pattern rules prevent common mistakes
**Format Validation:**
✅ Content is lean and optimized for LLMs
✅ Structure is logical and scannable
✅ No redundant or obvious information
✅ Consistent formatting throughout
### 7. Completion Message
Present final completion to user:
"✅ **Project Context Generation Complete!**
Your optimized project context file is ready at:
`{output_folder}/project-context.md`
**📊 Context Summary:**
- {{rule_count}} critical rules for AI agents
- {{section_count}} comprehensive sections
- Optimized for LLM context efficiency
- Ready for immediate agent integration
**🎯 Key Benefits:**
- Consistent implementation across all AI agents
- Reduced common mistakes and edge cases
- Clear guidance for project-specific patterns
- Minimal LLM context usage
**📋 Next Steps:**
1. AI agents will automatically read this file when implementing
2. Update this file when your technology stack or patterns evolve
3. Review quarterly to optimize and remove outdated rules
Your project context will help ensure high-quality, consistent implementation across all development work. Great work capturing your project's critical implementation requirements!"
## SUCCESS METRICS:
✅ Complete project context file with all critical rules
✅ Content optimized for LLM context efficiency
✅ All technology versions and patterns documented
✅ File structure is logical and scannable
✅ Usage guidelines included for agents and humans
✅ Frontmatter properly updated with completion status
✅ User provided with clear next steps and benefits
## FAILURE MODES:
❌ Final content is too verbose for LLM consumption
❌ Missing critical implementation rules or patterns
❌ Not optimizing content for agent readability
❌ Not providing clear usage guidelines
❌ Frontmatter not properly updated
❌ Not validating file completion before ending
## WORKFLOW COMPLETE:
This is the final step of the Generate Project Context workflow. The user now has a comprehensive, optimized project context file that will ensure consistent, high-quality implementation across all AI agents working on the project.
The project context file serves as the critical "rules of the road" that agents need to implement code consistently with the project's standards and patterns.

View File

@ -0,0 +1,49 @@
---
name: generate-project-context
description: Creates a concise project-context.md file with critical rules and patterns that AI agents must follow when implementing code. Optimized for LLM context efficiency.
---
# Generate Project Context Workflow
**Goal:** Create a concise, optimized `project-context.md` file containing critical rules, patterns, and guidelines that AI agents must follow when implementing code. This file focuses on unobvious details that LLMs need to be reminded of.
**Your Role:** You are a technical facilitator working with a peer to capture the essential implementation rules that will ensure consistent, high-quality code generation across all AI agents working on the project.
---
## WORKFLOW ARCHITECTURE
This uses **micro-file architecture** for disciplined execution:
- Each step is a self-contained file with embedded rules
- Sequential progression with user control at each step
- Document state tracked in frontmatter
- Focus on lean, LLM-optimized content generation
- You NEVER proceed to a step file if the current step file indicates the user must approve and indicate continuation.
---
## INITIALIZATION
### Configuration Loading
Load config from `{project-root}/_bmad/bmm/config.yaml` and resolve:
- `project_name`, `output_folder`, `user_name`
- `communication_language`, `document_output_language`, `user_skill_level`
- `date` as system-generated current datetime
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
### Paths
- `installed_path` = `{project-root}/_bmad/bmm/workflows/generate-project-context`
- `template_path` = `{installed_path}/project-context-template.md`
- `output_file` = `{output_folder}/project-context.md`
---
## EXECUTION
Load and execute `steps/step-01-discover.md` to begin the workflow.
**Note:** Input document discovery and initialization protocols are handled in step-01-discover.md.

View File

@ -81,7 +81,7 @@
<action>Continue to next step</action> <action>Continue to next step</action>
</if> </if>
<if response="p"> <if response="p">
<action>Start the party-mode workflow {project-root}/_bmad/core/workflows/party-mode/workflow.yaml</action> <action>Start the party-mode workflow {project-root}/_bmad/core/workflows/party-mode/workflow.md</action>
</if> </if>
<if <if
response="y"> response="y">

View File

@ -283,6 +283,7 @@ class ConfigDrivenIdeSetup extends BaseIdeSetup {
return `--- return `---
name: '{{name}}' name: '{{name}}'
description: '{{description}}' description: '{{description}}'
disable-model-invocation: true
--- ---
You must fully embody this agent's persona and follow all activation instructions exactly as specified. You must fully embody this agent's persona and follow all activation instructions exactly as specified.
@ -297,6 +298,7 @@ You must fully embody this agent's persona and follow all activation instruction
return `--- return `---
name: '{{name}}' name: '{{name}}'
description: '{{description}}' description: '{{description}}'
disable-model-invocation: true
--- ---
# {{name}} # {{name}}

View File

@ -411,6 +411,7 @@ class CodexSetup extends BaseIdeSetup {
const launcherContent = `--- const launcherContent = `---
name: '${agentName}' name: '${agentName}'
description: '${agentName} agent' description: '${agentName} agent'
disable-model-invocation: true
--- ---
You must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command. You must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command.

View File

@ -72,6 +72,7 @@ class TaskToolCommandGenerator {
return `--- return `---
description: '${description.replaceAll("'", "''")}' description: '${description.replaceAll("'", "''")}'
disable-model-invocation: true
--- ---
# ${item.displayName || item.name} # ${item.displayName || item.name}

View File

@ -1,6 +1,7 @@
--- ---
name: '{{name}}' name: '{{name}}'
description: '{{description}}' description: '{{description}}'
disable-model-invocation: true
--- ---
You must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command. You must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command.

View File

@ -1,6 +1,7 @@
--- ---
name: '{{name}}' name: '{{name}}'
description: '{{description}}' description: '{{description}}'
disable-model-invocation: true
--- ---
You must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command. You must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command.

View File

@ -1,6 +1,7 @@
--- ---
name: '{{name}}' name: '{{name}}'
description: '{{description}}' description: '{{description}}'
disable-model-invocation: true
--- ---
IT IS CRITICAL THAT YOU FOLLOW THESE STEPS - while staying in character as the current agent persona you may have loaded: IT IS CRITICAL THAT YOU FOLLOW THESE STEPS - while staying in character as the current agent persona you may have loaded:

View File

@ -1,6 +1,7 @@
--- ---
name: '{{name}}' name: '{{name}}'
description: '{{description}}' description: '{{description}}'
disable-model-invocation: true
--- ---
IT IS CRITICAL THAT YOU FOLLOW THIS COMMAND: LOAD the FULL @{project-root}/{{bmadFolderName}}/{{path}}, READ its entire contents and follow its directions exactly! IT IS CRITICAL THAT YOU FOLLOW THIS COMMAND: LOAD the FULL @{project-root}/{{bmadFolderName}}/{{path}}, READ its entire contents and follow its directions exactly!

View File

@ -1,5 +1,6 @@
--- ---
description: '{{description}}' description: '{{description}}'
disable-model-invocation: true
--- ---
IT IS CRITICAL THAT YOU FOLLOW THESE STEPS - while staying in character as the current agent persona you may have loaded: IT IS CRITICAL THAT YOU FOLLOW THESE STEPS - while staying in character as the current agent persona you may have loaded:

View File

@ -1,5 +1,6 @@
--- ---
description: '{{description}}' description: '{{description}}'
disable-model-invocation: true
--- ---
IT IS CRITICAL THAT YOU FOLLOW THIS COMMAND: LOAD the FULL @{{workflow_path}}, READ its entire contents and follow its directions exactly! IT IS CRITICAL THAT YOU FOLLOW THIS COMMAND: LOAD the FULL @{{workflow_path}}, READ its entire contents and follow its directions exactly!