Compare commits
6 Commits
6ff6e231bf
...
811d981d32
| Author | SHA1 | Date |
|---|---|---|
|
|
811d981d32 | |
|
|
dd8c54cc9f | |
|
|
4ded43d707 | |
|
|
181aeac04a | |
|
|
f7466c2530 | |
|
|
f2a942b2db |
|
|
@ -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.
|
||||||
|
:::
|
||||||
|
|
@ -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.
|
||||||
|
|
@ -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
|
||||||
|
|
@ -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.*
|
||||||
|
|
@ -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.*
|
||||||
|
|
@ -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'
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
unitary: true
|
||||||
|
|
@ -4,7 +4,7 @@ description: 'Discovery & Understanding - Understand what user wants to edit and
|
||||||
|
|
||||||
# File references (ONLY variables used in this step)
|
# File references (ONLY variables used in this step)
|
||||||
altStepFile: './step-e-01b-legacy-conversion.md'
|
altStepFile: './step-e-01b-legacy-conversion.md'
|
||||||
prdPurpose: '{project-root}/src/bmm/workflows/2-plan-workflows/create-prd/data/prd-purpose.md'
|
prdPurpose: '{project-root}/_bmad/bmm/workflows/2-plan-workflows/create-prd/data/prd-purpose.md'
|
||||||
advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml'
|
advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml'
|
||||||
partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md'
|
partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md'
|
||||||
---
|
---
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ description: 'Legacy PRD Conversion Assessment - Analyze legacy PRD and propose
|
||||||
# File references (ONLY variables used in this step)
|
# File references (ONLY variables used in this step)
|
||||||
nextStepFile: './step-e-02-review.md'
|
nextStepFile: './step-e-02-review.md'
|
||||||
prdFile: '{prd_file_path}'
|
prdFile: '{prd_file_path}'
|
||||||
prdPurpose: '{project-root}/src/bmm/workflows/2-plan-workflows/create-prd/data/prd-purpose.md'
|
prdPurpose: '{project-root}/_bmad/bmm/workflows/2-plan-workflows/create-prd/data/prd-purpose.md'
|
||||||
---
|
---
|
||||||
|
|
||||||
# Step E-1B: Legacy PRD Conversion Assessment
|
# Step E-1B: Legacy PRD Conversion Assessment
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ description: 'Deep Review & Analysis - Thoroughly review existing PRD and prepar
|
||||||
nextStepFile: './step-e-03-edit.md'
|
nextStepFile: './step-e-03-edit.md'
|
||||||
prdFile: '{prd_file_path}'
|
prdFile: '{prd_file_path}'
|
||||||
validationReport: '{validation_report_path}' # If provided
|
validationReport: '{validation_report_path}' # If provided
|
||||||
prdPurpose: '{project-root}/src/bmm/workflows/2-plan-workflows/create-prd/data/prd-purpose.md'
|
prdPurpose: '{project-root}/_bmad/bmm/workflows/2-plan-workflows/create-prd/data/prd-purpose.md'
|
||||||
advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml'
|
advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml'
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ description: 'Edit & Update - Apply changes to PRD following approved change pla
|
||||||
# File references (ONLY variables used in this step)
|
# File references (ONLY variables used in this step)
|
||||||
nextStepFile: './step-e-04-complete.md'
|
nextStepFile: './step-e-04-complete.md'
|
||||||
prdFile: '{prd_file_path}'
|
prdFile: '{prd_file_path}'
|
||||||
prdPurpose: '{project-root}/src/bmm/workflows/2-plan-workflows/create-prd/data/prd-purpose.md'
|
prdPurpose: '{project-root}/_bmad/bmm/workflows/2-plan-workflows/create-prd/data/prd-purpose.md'
|
||||||
---
|
---
|
||||||
|
|
||||||
# Step E-3: Edit & Update
|
# Step E-3: Edit & Update
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,16 @@ modules:
|
||||||
type: bmad-org
|
type: bmad-org
|
||||||
npmPackage: bmad-game-dev-studio
|
npmPackage: bmad-game-dev-studio
|
||||||
|
|
||||||
|
bmad-method-test-architecture-enterprise:
|
||||||
|
url: https://github.com/bmad-code-org/bmad-method-test-architecture-enterprise
|
||||||
|
module-definition: src/module.yaml
|
||||||
|
code: tea
|
||||||
|
name: "Test Architect"
|
||||||
|
description: "Master Test Architect for quality strategy, test automation, and release gates"
|
||||||
|
defaultSelected: false
|
||||||
|
type: bmad-org
|
||||||
|
npmPackage: bmad-method-test-architecture-enterprise
|
||||||
|
|
||||||
# TODO: Enable once fixes applied:
|
# TODO: Enable once fixes applied:
|
||||||
|
|
||||||
# whiteport-design-system:
|
# whiteport-design-system:
|
||||||
|
|
|
||||||
|
|
@ -132,12 +132,12 @@ class ConfigDrivenIdeSetup extends BaseIdeSetup {
|
||||||
*/
|
*/
|
||||||
async writeAgentArtifacts(targetPath, artifacts, templateType, config = {}) {
|
async writeAgentArtifacts(targetPath, artifacts, templateType, config = {}) {
|
||||||
// Try to load platform-specific template, fall back to default-agent
|
// Try to load platform-specific template, fall back to default-agent
|
||||||
const template = await this.loadTemplate(templateType, 'agent', config, 'default-agent');
|
const { content: template, extension } = await this.loadTemplate(templateType, 'agent', config, 'default-agent');
|
||||||
let count = 0;
|
let count = 0;
|
||||||
|
|
||||||
for (const artifact of artifacts) {
|
for (const artifact of artifacts) {
|
||||||
const content = this.renderTemplate(template, artifact);
|
const content = this.renderTemplate(template, artifact);
|
||||||
const filename = this.generateFilename(artifact, 'agent');
|
const filename = this.generateFilename(artifact, 'agent', extension);
|
||||||
const filePath = path.join(targetPath, filename);
|
const filePath = path.join(targetPath, filename);
|
||||||
await this.writeFile(filePath, content);
|
await this.writeFile(filePath, content);
|
||||||
count++;
|
count++;
|
||||||
|
|
@ -167,9 +167,10 @@ class ConfigDrivenIdeSetup extends BaseIdeSetup {
|
||||||
|
|
||||||
// Fall back to default templates if specific ones don't exist
|
// Fall back to default templates if specific ones don't exist
|
||||||
const finalTemplateType = artifact.isYamlWorkflow ? 'default-workflow-yaml' : 'default-workflow';
|
const finalTemplateType = artifact.isYamlWorkflow ? 'default-workflow-yaml' : 'default-workflow';
|
||||||
const template = await this.loadTemplate(workflowTemplateType, 'workflow', config, finalTemplateType);
|
// workflowTemplateType already contains full name (e.g., 'gemini-workflow-yaml'), so pass empty artifactType
|
||||||
|
const { content: template, extension } = await this.loadTemplate(workflowTemplateType, '', config, finalTemplateType);
|
||||||
const content = this.renderTemplate(template, artifact);
|
const content = this.renderTemplate(template, artifact);
|
||||||
const filename = this.generateFilename(artifact, 'workflow');
|
const filename = this.generateFilename(artifact, 'workflow', extension);
|
||||||
const filePath = path.join(targetPath, filename);
|
const filePath = path.join(targetPath, filename);
|
||||||
await this.writeFile(filePath, content);
|
await this.writeFile(filePath, content);
|
||||||
count++;
|
count++;
|
||||||
|
|
@ -185,34 +186,47 @@ class ConfigDrivenIdeSetup extends BaseIdeSetup {
|
||||||
* @param {string} artifactType - Artifact type (agent, workflow, task, tool)
|
* @param {string} artifactType - Artifact type (agent, workflow, task, tool)
|
||||||
* @param {Object} config - Installation configuration
|
* @param {Object} config - Installation configuration
|
||||||
* @param {string} fallbackTemplateType - Fallback template type if requested template not found
|
* @param {string} fallbackTemplateType - Fallback template type if requested template not found
|
||||||
* @returns {Promise<string>} Template content
|
* @returns {Promise<{content: string, extension: string}>} Template content and extension
|
||||||
*/
|
*/
|
||||||
async loadTemplate(templateType, artifactType, config = {}, fallbackTemplateType = null) {
|
async loadTemplate(templateType, artifactType, config = {}, fallbackTemplateType = null) {
|
||||||
const { header_template, body_template } = config;
|
const { header_template, body_template } = config;
|
||||||
|
|
||||||
// Check for separate header/body templates
|
// Check for separate header/body templates
|
||||||
if (header_template || body_template) {
|
if (header_template || body_template) {
|
||||||
return await this.loadSplitTemplates(templateType, artifactType, header_template, body_template);
|
const content = await this.loadSplitTemplates(templateType, artifactType, header_template, body_template);
|
||||||
|
// Allow config to override extension, default to .md
|
||||||
|
const ext = config.extension || '.md';
|
||||||
|
const normalizedExt = ext.startsWith('.') ? ext : `.${ext}`;
|
||||||
|
return { content, extension: normalizedExt };
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load combined template
|
// Load combined template - try multiple extensions
|
||||||
const templateName = `${templateType}-${artifactType}.md`;
|
// If artifactType is empty, templateType already contains full name (e.g., 'gemini-workflow-yaml')
|
||||||
const templatePath = path.join(__dirname, 'templates', 'combined', templateName);
|
const templateBaseName = artifactType ? `${templateType}-${artifactType}` : templateType;
|
||||||
|
const templateDir = path.join(__dirname, 'templates', 'combined');
|
||||||
|
const extensions = ['.md', '.toml', '.yaml', '.yml'];
|
||||||
|
|
||||||
if (await fs.pathExists(templatePath)) {
|
for (const ext of extensions) {
|
||||||
return await fs.readFile(templatePath, 'utf8');
|
const templatePath = path.join(templateDir, templateBaseName + ext);
|
||||||
|
if (await fs.pathExists(templatePath)) {
|
||||||
|
const content = await fs.readFile(templatePath, 'utf8');
|
||||||
|
return { content, extension: ext };
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fall back to default template (if provided)
|
// Fall back to default template (if provided)
|
||||||
if (fallbackTemplateType) {
|
if (fallbackTemplateType) {
|
||||||
const fallbackPath = path.join(__dirname, 'templates', 'combined', `${fallbackTemplateType}.md`);
|
for (const ext of extensions) {
|
||||||
if (await fs.pathExists(fallbackPath)) {
|
const fallbackPath = path.join(templateDir, `${fallbackTemplateType}${ext}`);
|
||||||
return await fs.readFile(fallbackPath, 'utf8');
|
if (await fs.pathExists(fallbackPath)) {
|
||||||
|
const content = await fs.readFile(fallbackPath, 'utf8');
|
||||||
|
return { content, extension: ext };
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ultimate fallback - minimal template
|
// Ultimate fallback - minimal template
|
||||||
return this.getDefaultTemplate(artifactType);
|
return { content: this.getDefaultTemplate(artifactType), extension: '.md' };
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -326,13 +340,26 @@ LOAD and execute from: {project-root}/{{bmadFolderName}}/{{path}}
|
||||||
* Generate filename for artifact
|
* Generate filename for artifact
|
||||||
* @param {Object} artifact - Artifact data
|
* @param {Object} artifact - Artifact data
|
||||||
* @param {string} artifactType - Artifact type (agent, workflow, task, tool)
|
* @param {string} artifactType - Artifact type (agent, workflow, task, tool)
|
||||||
|
* @param {string} extension - File extension to use (e.g., '.md', '.toml')
|
||||||
* @returns {string} Generated filename
|
* @returns {string} Generated filename
|
||||||
*/
|
*/
|
||||||
generateFilename(artifact, artifactType) {
|
generateFilename(artifact, artifactType, extension = '.md') {
|
||||||
const { toDashPath } = require('./shared/path-utils');
|
const { toDashPath } = require('./shared/path-utils');
|
||||||
// toDashPath already handles the .agent.md suffix for agents correctly
|
|
||||||
// No need to add it again here
|
// Reuse central logic to ensure consistent naming conventions
|
||||||
return toDashPath(artifact.relativePath);
|
const standardName = toDashPath(artifact.relativePath);
|
||||||
|
|
||||||
|
// Clean up potential double extensions from source files (e.g. .yaml.md -> .md)
|
||||||
|
const baseName = standardName.replace(/\.(yaml|yml)\.md$/, '.md');
|
||||||
|
|
||||||
|
// If using default markdown, preserve the bmad-agent- prefix for agents
|
||||||
|
if (extension === '.md') {
|
||||||
|
return baseName;
|
||||||
|
}
|
||||||
|
|
||||||
|
// For other extensions (e.g., .toml), replace .md extension
|
||||||
|
// Note: agent prefix is preserved even with non-markdown extensions
|
||||||
|
return baseName.replace(/\.md$/, extension);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -14,18 +14,14 @@
|
||||||
# installer: Installation configuration (optional - omit for custom installers)
|
# installer: Installation configuration (optional - omit for custom installers)
|
||||||
|
|
||||||
platforms:
|
platforms:
|
||||||
# ============================================================================
|
antigravity:
|
||||||
# CLI Tools
|
name: "Google Antigravity"
|
||||||
# ============================================================================
|
preferred: false
|
||||||
|
category: ide
|
||||||
claude-code:
|
description: "Google's AI development environment"
|
||||||
name: "Claude Code"
|
|
||||||
preferred: true
|
|
||||||
category: cli
|
|
||||||
description: "Anthropic's official CLI for Claude"
|
|
||||||
installer:
|
installer:
|
||||||
target_dir: .claude/commands
|
target_dir: .agent/workflows
|
||||||
template_type: default
|
template_type: antigravity
|
||||||
|
|
||||||
auggie:
|
auggie:
|
||||||
name: "Auggie"
|
name: "Auggie"
|
||||||
|
|
@ -36,37 +32,15 @@ platforms:
|
||||||
target_dir: .augment/commands
|
target_dir: .augment/commands
|
||||||
template_type: default
|
template_type: default
|
||||||
|
|
||||||
gemini:
|
claude-code:
|
||||||
name: "Gemini CLI"
|
name: "Claude Code"
|
||||||
preferred: false
|
preferred: true
|
||||||
category: cli
|
category: cli
|
||||||
description: "Google's CLI for Gemini"
|
description: "Anthropic's official CLI for Claude"
|
||||||
installer:
|
installer:
|
||||||
target_dir: .gemini/commands
|
target_dir: .claude/commands
|
||||||
template_type: gemini
|
|
||||||
|
|
||||||
# ============================================================================
|
|
||||||
# IDEs
|
|
||||||
# ============================================================================
|
|
||||||
|
|
||||||
cursor:
|
|
||||||
name: "Cursor"
|
|
||||||
preferred: true
|
|
||||||
category: ide
|
|
||||||
description: "AI-first code editor"
|
|
||||||
installer:
|
|
||||||
target_dir: .cursor/commands
|
|
||||||
template_type: default
|
template_type: default
|
||||||
|
|
||||||
windsurf:
|
|
||||||
name: "Windsurf"
|
|
||||||
preferred: true
|
|
||||||
category: ide
|
|
||||||
description: "AI-powered IDE with cascade flows"
|
|
||||||
installer:
|
|
||||||
target_dir: .windsurf/workflows
|
|
||||||
template_type: windsurf
|
|
||||||
|
|
||||||
cline:
|
cline:
|
||||||
name: "Cline"
|
name: "Cline"
|
||||||
preferred: false
|
preferred: false
|
||||||
|
|
@ -76,15 +50,40 @@ platforms:
|
||||||
target_dir: .clinerules/workflows
|
target_dir: .clinerules/workflows
|
||||||
template_type: windsurf
|
template_type: windsurf
|
||||||
|
|
||||||
roo:
|
codex:
|
||||||
name: "Roo Cline"
|
name: "Codex"
|
||||||
|
preferred: false
|
||||||
|
category: cli
|
||||||
|
description: "OpenAI Codex integration"
|
||||||
|
# No installer config - uses custom codex.js
|
||||||
|
|
||||||
|
crush:
|
||||||
|
name: "Crush"
|
||||||
preferred: false
|
preferred: false
|
||||||
category: ide
|
category: ide
|
||||||
description: "Enhanced Cline fork"
|
description: "AI development assistant"
|
||||||
installer:
|
installer:
|
||||||
target_dir: .roo/commands
|
target_dir: .crush/commands
|
||||||
template_type: default
|
template_type: default
|
||||||
|
|
||||||
|
cursor:
|
||||||
|
name: "Cursor"
|
||||||
|
preferred: true
|
||||||
|
category: ide
|
||||||
|
description: "AI-first code editor"
|
||||||
|
installer:
|
||||||
|
target_dir: .cursor/commands
|
||||||
|
template_type: default
|
||||||
|
|
||||||
|
gemini:
|
||||||
|
name: "Gemini CLI"
|
||||||
|
preferred: false
|
||||||
|
category: cli
|
||||||
|
description: "Google's CLI for Gemini"
|
||||||
|
installer:
|
||||||
|
target_dir: .gemini/commands
|
||||||
|
template_type: gemini
|
||||||
|
|
||||||
github-copilot:
|
github-copilot:
|
||||||
name: "GitHub Copilot"
|
name: "GitHub Copilot"
|
||||||
preferred: false
|
preferred: false
|
||||||
|
|
@ -99,24 +98,6 @@ platforms:
|
||||||
template_type: vscode_settings
|
template_type: vscode_settings
|
||||||
artifact_types: []
|
artifact_types: []
|
||||||
|
|
||||||
opencode:
|
|
||||||
name: "OpenCode"
|
|
||||||
preferred: false
|
|
||||||
category: ide
|
|
||||||
description: "OpenCode terminal coding assistant"
|
|
||||||
installer:
|
|
||||||
target_dir: .opencode/command
|
|
||||||
template_type: opencode
|
|
||||||
|
|
||||||
crush:
|
|
||||||
name: "Crush"
|
|
||||||
preferred: false
|
|
||||||
category: ide
|
|
||||||
description: "AI development assistant"
|
|
||||||
installer:
|
|
||||||
target_dir: .crush/commands
|
|
||||||
template_type: default
|
|
||||||
|
|
||||||
iflow:
|
iflow:
|
||||||
name: "iFlow"
|
name: "iFlow"
|
||||||
preferred: false
|
preferred: false
|
||||||
|
|
@ -126,6 +107,29 @@ platforms:
|
||||||
target_dir: .iflow/commands
|
target_dir: .iflow/commands
|
||||||
template_type: default
|
template_type: default
|
||||||
|
|
||||||
|
kilo:
|
||||||
|
name: "KiloCoder"
|
||||||
|
preferred: false
|
||||||
|
category: ide
|
||||||
|
description: "AI coding platform"
|
||||||
|
# No installer config - uses custom kilo.js (creates .kilocodemodes file)
|
||||||
|
|
||||||
|
kiro-cli:
|
||||||
|
name: "Kiro CLI"
|
||||||
|
preferred: false
|
||||||
|
category: cli
|
||||||
|
description: "Kiro command-line interface"
|
||||||
|
# No installer config - uses custom kiro-cli.js (YAML→JSON conversion)
|
||||||
|
|
||||||
|
opencode:
|
||||||
|
name: "OpenCode"
|
||||||
|
preferred: false
|
||||||
|
category: ide
|
||||||
|
description: "OpenCode terminal coding assistant"
|
||||||
|
installer:
|
||||||
|
target_dir: .opencode/command
|
||||||
|
template_type: opencode
|
||||||
|
|
||||||
qwen:
|
qwen:
|
||||||
name: "QwenCoder"
|
name: "QwenCoder"
|
||||||
preferred: false
|
preferred: false
|
||||||
|
|
@ -135,6 +139,15 @@ platforms:
|
||||||
target_dir: .qwen/commands
|
target_dir: .qwen/commands
|
||||||
template_type: default
|
template_type: default
|
||||||
|
|
||||||
|
roo:
|
||||||
|
name: "Roo Cline"
|
||||||
|
preferred: false
|
||||||
|
category: ide
|
||||||
|
description: "Enhanced Cline fork"
|
||||||
|
installer:
|
||||||
|
target_dir: .roo/commands
|
||||||
|
template_type: default
|
||||||
|
|
||||||
rovo-dev:
|
rovo-dev:
|
||||||
name: "Rovo Dev"
|
name: "Rovo Dev"
|
||||||
preferred: false
|
preferred: false
|
||||||
|
|
@ -153,41 +166,14 @@ platforms:
|
||||||
target_dir: .trae/rules
|
target_dir: .trae/rules
|
||||||
template_type: trae
|
template_type: trae
|
||||||
|
|
||||||
antigravity:
|
windsurf:
|
||||||
name: "Google Antigravity"
|
name: "Windsurf"
|
||||||
preferred: false
|
preferred: true
|
||||||
category: ide
|
category: ide
|
||||||
description: "Google's AI development environment"
|
description: "AI-powered IDE with cascade flows"
|
||||||
installer:
|
installer:
|
||||||
target_dir: .agent/workflows
|
target_dir: .windsurf/workflows
|
||||||
template_type: antigravity
|
template_type: windsurf
|
||||||
# Note: Antigravity uses .agent/workflows/ directory (not .antigravity/)
|
|
||||||
|
|
||||||
# ============================================================================
|
|
||||||
# Custom Installers (no installer config - use custom file)
|
|
||||||
# These have unique installation logic that doesn't fit the config-driven model
|
|
||||||
# ============================================================================
|
|
||||||
|
|
||||||
codex:
|
|
||||||
name: "Codex"
|
|
||||||
preferred: false
|
|
||||||
category: cli
|
|
||||||
description: "OpenAI Codex integration"
|
|
||||||
# No installer config - uses custom codex.js
|
|
||||||
|
|
||||||
kilo:
|
|
||||||
name: "KiloCoder"
|
|
||||||
preferred: false
|
|
||||||
category: ide
|
|
||||||
description: "AI coding platform"
|
|
||||||
# No installer config - uses custom kilo.js (creates .kilocodemodes file)
|
|
||||||
|
|
||||||
kiro-cli:
|
|
||||||
name: "Kiro CLI"
|
|
||||||
preferred: false
|
|
||||||
category: cli
|
|
||||||
description: "Kiro command-line interface"
|
|
||||||
# No installer config - uses custom kiro-cli.js (YAML→JSON conversion)
|
|
||||||
|
|
||||||
# ============================================================================
|
# ============================================================================
|
||||||
# Installer Config Schema
|
# Installer Config Schema
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,9 @@ class AgentCommandGenerator {
|
||||||
// Use relativePath if available (for nested agents), otherwise just name with .md
|
// Use relativePath if available (for nested agents), otherwise just name with .md
|
||||||
const agentPathInModule = agent.relativePath || `${agent.name}.md`;
|
const agentPathInModule = agent.relativePath || `${agent.name}.md`;
|
||||||
// Calculate the relative agent path (e.g., bmm/agents/pm.md)
|
// Calculate the relative agent path (e.g., bmm/agents/pm.md)
|
||||||
let agentRelPath = agent.path;
|
let agentRelPath = agent.path || '';
|
||||||
|
// Normalize path separators for cross-platform compatibility
|
||||||
|
agentRelPath = agentRelPath.replaceAll('\\', '/');
|
||||||
// Remove _bmad/ prefix if present to get relative path from project root
|
// Remove _bmad/ prefix if present to get relative path from project root
|
||||||
// Handle both absolute paths (/path/to/_bmad/...) and relative paths (_bmad/...)
|
// Handle both absolute paths (/path/to/_bmad/...) and relative paths (_bmad/...)
|
||||||
if (agentRelPath.includes('_bmad/')) {
|
if (agentRelPath.includes('_bmad/')) {
|
||||||
|
|
@ -132,9 +134,9 @@ class AgentCommandGenerator {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Write agent launcher artifacts using dash format (NEW STANDARD)
|
* Write agent launcher artifacts using dash format (NEW STANDARD)
|
||||||
* Creates flat files like: bmad-bmm-pm.agent.md
|
* Creates flat files like: bmad-agent-bmm-pm.md
|
||||||
*
|
*
|
||||||
* The .agent.md suffix distinguishes agents from workflows/tasks/tools.
|
* The bmad-agent- prefix distinguishes agents from workflows/tasks/tools.
|
||||||
*
|
*
|
||||||
* @param {string} baseCommandsDir - Base commands directory for the IDE
|
* @param {string} baseCommandsDir - Base commands directory for the IDE
|
||||||
* @param {Array} artifacts - Agent launcher artifacts
|
* @param {Array} artifacts - Agent launcher artifacts
|
||||||
|
|
@ -145,7 +147,7 @@ class AgentCommandGenerator {
|
||||||
|
|
||||||
for (const artifact of artifacts) {
|
for (const artifact of artifacts) {
|
||||||
if (artifact.type === 'agent-launcher') {
|
if (artifact.type === 'agent-launcher') {
|
||||||
// Convert relativePath to dash format: bmm/agents/pm.md → bmad-bmm-pm.agent.md
|
// Convert relativePath to dash format: bmm/agents/pm.md → bmad-agent-bmm-pm.md
|
||||||
const flatName = toDashPath(artifact.relativePath);
|
const flatName = toDashPath(artifact.relativePath);
|
||||||
const launcherPath = path.join(baseCommandsDir, flatName);
|
const launcherPath = path.join(baseCommandsDir, flatName);
|
||||||
await fs.ensureDir(path.dirname(launcherPath));
|
await fs.ensureDir(path.dirname(launcherPath));
|
||||||
|
|
|
||||||
|
|
@ -4,14 +4,14 @@
|
||||||
* Provides utilities to convert hierarchical paths to flat naming conventions.
|
* Provides utilities to convert hierarchical paths to flat naming conventions.
|
||||||
*
|
*
|
||||||
* DASH-BASED NAMING (new standard):
|
* DASH-BASED NAMING (new standard):
|
||||||
* - Agents: bmad-module-name.agent.md (with .agent.md suffix)
|
* - Agents: bmad-agent-module-name.md (with bmad-agent- prefix)
|
||||||
* - Workflows/Tasks/Tools: bmad-module-name.md
|
* - Workflows/Tasks/Tools: bmad-module-name.md
|
||||||
*
|
*
|
||||||
* Example outputs:
|
* Example outputs:
|
||||||
* - cis/agents/storymaster.md → bmad-cis-storymaster.agent.md
|
* - cis/agents/storymaster.md → bmad-agent-cis-storymaster.md
|
||||||
* - bmm/workflows/plan-project.md → bmad-bmm-plan-project.md
|
* - bmm/workflows/plan-project.md → bmad-bmm-plan-project.md
|
||||||
* - bmm/tasks/create-story.md → bmad-bmm-create-story.md
|
* - bmm/tasks/create-story.md → bmad-bmm-create-story.md
|
||||||
* - core/agents/brainstorming.md → bmad-brainstorming.agent.md
|
* - core/agents/brainstorming.md → bmad-agent-brainstorming.md (core agents skip module name)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Type segments - agents are included in naming, others are filtered out
|
// Type segments - agents are included in naming, others are filtered out
|
||||||
|
|
@ -20,37 +20,38 @@ const AGENT_SEGMENT = 'agents';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert hierarchical path to flat dash-separated name (NEW STANDARD)
|
* Convert hierarchical path to flat dash-separated name (NEW STANDARD)
|
||||||
* Converts: 'bmm', 'agents', 'pm' → 'bmad-bmm-pm.agent.md'
|
* Converts: 'bmm', 'agents', 'pm' → 'bmad-agent-bmm-pm.md'
|
||||||
* Converts: 'bmm', 'workflows', 'correct-course' → 'bmad-bmm-correct-course.md'
|
* Converts: 'bmm', 'workflows', 'correct-course' → 'bmad-bmm-correct-course.md'
|
||||||
* Converts: 'core', 'agents', 'brainstorming' → 'bmad-brainstorming.agent.md' (core items skip module prefix)
|
* Converts: 'core', 'agents', 'brainstorming' → 'bmad-agent-brainstorming.md' (core agents skip module name)
|
||||||
*
|
*
|
||||||
* @param {string} module - Module name (e.g., 'bmm', 'core')
|
* @param {string} module - Module name (e.g., 'bmm', 'core')
|
||||||
* @param {string} type - Artifact type ('agents', 'workflows', 'tasks', 'tools')
|
* @param {string} type - Artifact type ('agents', 'workflows', 'tasks', 'tools')
|
||||||
* @param {string} name - Artifact name (e.g., 'pm', 'brainstorming')
|
* @param {string} name - Artifact name (e.g., 'pm', 'brainstorming')
|
||||||
* @returns {string} Flat filename like 'bmad-bmm-pm.agent.md' or 'bmad-bmm-correct-course.md'
|
* @returns {string} Flat filename like 'bmad-agent-bmm-pm.md' or 'bmad-bmm-correct-course.md'
|
||||||
*/
|
*/
|
||||||
function toDashName(module, type, name) {
|
function toDashName(module, type, name) {
|
||||||
const isAgent = type === AGENT_SEGMENT;
|
const isAgent = type === AGENT_SEGMENT;
|
||||||
|
|
||||||
// For core module, skip the module prefix: use 'bmad-name.md' instead of 'bmad-core-name.md'
|
// For core module, skip the module name: use 'bmad-agent-name.md' instead of 'bmad-agent-core-name.md'
|
||||||
if (module === 'core') {
|
if (module === 'core') {
|
||||||
return isAgent ? `bmad-${name}.agent.md` : `bmad-${name}.md`;
|
return isAgent ? `bmad-agent-${name}.md` : `bmad-${name}.md`;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Module artifacts: bmad-module-name.md or bmad-module-name.agent.md
|
// Module artifacts: bmad-module-name.md or bmad-agent-module-name.md
|
||||||
// eslint-disable-next-line unicorn/prefer-string-replace-all -- regex replace is intentional here
|
// eslint-disable-next-line unicorn/prefer-string-replace-all -- regex replace is intentional here
|
||||||
const dashName = name.replace(/\//g, '-'); // Flatten nested paths
|
const dashName = name.replace(/\//g, '-'); // Flatten nested paths
|
||||||
return isAgent ? `bmad-${module}-${dashName}.agent.md` : `bmad-${module}-${dashName}.md`;
|
return isAgent ? `bmad-agent-${module}-${dashName}.md` : `bmad-${module}-${dashName}.md`;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert relative path to flat dash-separated name
|
* Convert relative path to flat dash-separated name
|
||||||
* Converts: 'bmm/agents/pm.md' → 'bmad-bmm-pm.agent.md'
|
* Converts: 'bmm/agents/pm.md' → 'bmad-agent-bmm-pm.md'
|
||||||
|
* Converts: 'bmm/agents/tech-writer/tech-writer.md' → 'bmad-agent-bmm-tech-writer.md' (uses folder name)
|
||||||
* Converts: 'bmm/workflows/correct-course.md' → 'bmad-bmm-correct-course.md'
|
* Converts: 'bmm/workflows/correct-course.md' → 'bmad-bmm-correct-course.md'
|
||||||
* Converts: 'core/agents/brainstorming.md' → 'bmad-brainstorming.agent.md' (core items skip module prefix)
|
* Converts: 'core/agents/brainstorming.md' → 'bmad-agent-brainstorming.md' (core agents skip module name)
|
||||||
*
|
*
|
||||||
* @param {string} relativePath - Path like 'bmm/agents/pm.md'
|
* @param {string} relativePath - Path like 'bmm/agents/pm.md'
|
||||||
* @returns {string} Flat filename like 'bmad-bmm-pm.agent.md' or 'bmad-brainstorming.md'
|
* @returns {string} Flat filename like 'bmad-agent-bmm-pm.md' or 'bmad-brainstorming.md'
|
||||||
*/
|
*/
|
||||||
function toDashPath(relativePath) {
|
function toDashPath(relativePath) {
|
||||||
if (!relativePath || typeof relativePath !== 'string') {
|
if (!relativePath || typeof relativePath !== 'string') {
|
||||||
|
|
@ -63,20 +64,30 @@ function toDashPath(relativePath) {
|
||||||
|
|
||||||
const module = parts[0];
|
const module = parts[0];
|
||||||
const type = parts[1];
|
const type = parts[1];
|
||||||
const name = parts.slice(2).join('-');
|
let name;
|
||||||
|
|
||||||
|
// For agents, if nested in a folder (more than 3 parts), use the folder name only
|
||||||
|
// e.g., 'bmm/agents/tech-writer/tech-writer' → 'tech-writer' (not 'tech-writer-tech-writer')
|
||||||
|
if (type === 'agents' && parts.length > 3) {
|
||||||
|
// Use the folder name (parts[2]) as the name, ignore the file name
|
||||||
|
name = parts[2];
|
||||||
|
} else {
|
||||||
|
// For non-nested or non-agents, join all parts after type
|
||||||
|
name = parts.slice(2).join('-');
|
||||||
|
}
|
||||||
|
|
||||||
return toDashName(module, type, name);
|
return toDashName(module, type, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create custom agent dash name
|
* Create custom agent dash name
|
||||||
* Creates: 'bmad-custom-fred-commit-poet.agent.md'
|
* Creates: 'bmad-custom-agent-fred-commit-poet.md'
|
||||||
*
|
*
|
||||||
* @param {string} agentName - Custom agent name
|
* @param {string} agentName - Custom agent name
|
||||||
* @returns {string} Flat filename like 'bmad-custom-fred-commit-poet.agent.md'
|
* @returns {string} Flat filename like 'bmad-custom-agent-fred-commit-poet.md'
|
||||||
*/
|
*/
|
||||||
function customAgentDashName(agentName) {
|
function customAgentDashName(agentName) {
|
||||||
return `bmad-custom-${agentName}.agent.md`;
|
return `bmad-custom-agent-${agentName}.md`;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -90,9 +101,9 @@ function isDashFormat(filename) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Extract parts from a dash-formatted filename
|
* Extract parts from a dash-formatted filename
|
||||||
* Parses: 'bmad-bmm-pm.agent.md' → { prefix: 'bmad', module: 'bmm', type: 'agents', name: 'pm' }
|
* Parses: 'bmad-agent-bmm-pm.md' → { prefix: 'bmad', module: 'bmm', type: 'agents', name: 'pm' }
|
||||||
* Parses: 'bmad-bmm-correct-course.md' → { prefix: 'bmad', module: 'bmm', type: 'workflows', name: 'correct-course' }
|
* Parses: 'bmad-bmm-correct-course.md' → { prefix: 'bmad', module: 'bmm', type: 'workflows', name: 'correct-course' }
|
||||||
* Parses: 'bmad-brainstorming.agent.md' → { prefix: 'bmad', module: 'core', type: 'agents', name: 'brainstorming' } (core agents)
|
* Parses: 'bmad-agent-brainstorming.md' → { prefix: 'bmad', module: 'core', type: 'agents', name: 'brainstorming' } (core agents)
|
||||||
* Parses: 'bmad-brainstorming.md' → { prefix: 'bmad', module: 'core', type: 'workflows', name: 'brainstorming' } (core workflows)
|
* Parses: 'bmad-brainstorming.md' → { prefix: 'bmad', module: 'core', type: 'workflows', name: 'brainstorming' } (core workflows)
|
||||||
*
|
*
|
||||||
* @param {string} filename - Dash-formatted filename
|
* @param {string} filename - Dash-formatted filename
|
||||||
|
|
@ -106,27 +117,27 @@ function parseDashName(filename) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if this is an agent file (has .agent suffix)
|
// Check if this is an agent file (has 'agent' as second part)
|
||||||
const isAgent = withoutExt.endsWith('.agent');
|
const isAgent = parts[1] === 'agent';
|
||||||
|
|
||||||
if (isAgent) {
|
if (isAgent) {
|
||||||
// This is an agent file
|
// This is an agent file
|
||||||
// Format: bmad-name.agent (core) or bmad-module-name.agent
|
// Format: bmad-agent-name (core) or bmad-agent-module-name
|
||||||
if (parts.length === 3) {
|
if (parts.length === 3) {
|
||||||
// Core agent: bmad-name.agent
|
// Core agent: bmad-agent-name
|
||||||
return {
|
return {
|
||||||
prefix: parts[0],
|
prefix: parts[0],
|
||||||
module: 'core',
|
module: 'core',
|
||||||
type: 'agents',
|
type: 'agents',
|
||||||
name: parts[1],
|
name: parts[2],
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
// Module agent: bmad-module-name.agent
|
// Module agent: bmad-agent-module-name
|
||||||
return {
|
return {
|
||||||
prefix: parts[0],
|
prefix: parts[0],
|
||||||
module: parts[1],
|
module: parts[2],
|
||||||
type: 'agents',
|
type: 'agents',
|
||||||
name: parts.slice(2).join('-'),
|
name: parts.slice(3).join('-'),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -242,7 +242,7 @@ Follow all instructions in the ${type} file exactly as written.
|
||||||
* Write task/tool artifacts using dash format (NEW STANDARD)
|
* Write task/tool artifacts using dash format (NEW STANDARD)
|
||||||
* Creates flat files like: bmad-bmm-bmad-help.md
|
* Creates flat files like: bmad-bmm-bmad-help.md
|
||||||
*
|
*
|
||||||
* Note: Tasks/tools do NOT have .agent.md suffix - only agents do.
|
* Note: Tasks/tools do NOT have bmad-agent- prefix - only agents do.
|
||||||
*
|
*
|
||||||
* @param {string} baseCommandsDir - Base commands directory for the IDE
|
* @param {string} baseCommandsDir - Base commands directory for the IDE
|
||||||
* @param {Array} artifacts - Task/tool artifacts with relativePath
|
* @param {Array} artifacts - Task/tool artifacts with relativePath
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,9 @@ class WorkflowCommandGenerator {
|
||||||
for (const workflow of allWorkflows) {
|
for (const workflow of allWorkflows) {
|
||||||
const commandContent = await this.generateCommandContent(workflow, bmadDir);
|
const commandContent = await this.generateCommandContent(workflow, bmadDir);
|
||||||
// Calculate the relative workflow path (e.g., bmm/workflows/4-implementation/sprint-planning/workflow.yaml)
|
// Calculate the relative workflow path (e.g., bmm/workflows/4-implementation/sprint-planning/workflow.yaml)
|
||||||
let workflowRelPath = workflow.path;
|
let workflowRelPath = workflow.path || '';
|
||||||
|
// Normalize path separators for cross-platform compatibility
|
||||||
|
workflowRelPath = workflowRelPath.replaceAll('\\', '/');
|
||||||
// Remove _bmad/ prefix if present to get relative path from project root
|
// Remove _bmad/ prefix if present to get relative path from project root
|
||||||
// Handle both absolute paths (/path/to/_bmad/...) and relative paths (_bmad/...)
|
// Handle both absolute paths (/path/to/_bmad/...) and relative paths (_bmad/...)
|
||||||
if (workflowRelPath.includes('_bmad/')) {
|
if (workflowRelPath.includes('_bmad/')) {
|
||||||
|
|
@ -76,9 +78,15 @@ class WorkflowCommandGenerator {
|
||||||
if (parts.length > 1) {
|
if (parts.length > 1) {
|
||||||
workflowRelPath = parts.slice(1).join('/');
|
workflowRelPath = parts.slice(1).join('/');
|
||||||
}
|
}
|
||||||
|
} else if (workflowRelPath.includes('/src/')) {
|
||||||
|
// Normalize source paths (e.g. .../src/bmm/...) to relative module path (e.g. bmm/...)
|
||||||
|
const match = workflowRelPath.match(/\/src\/([^/]+)\/(.+)/);
|
||||||
|
if (match) {
|
||||||
|
workflowRelPath = `${match[1]}/${match[2]}`;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// Determine if this is a YAML workflow
|
// Determine if this is a YAML workflow (use normalized path which is guaranteed to be a string)
|
||||||
const isYamlWorkflow = workflow.path.endsWith('.yaml') || workflow.path.endsWith('.yml');
|
const isYamlWorkflow = workflowRelPath.endsWith('.yaml') || workflowRelPath.endsWith('.yml');
|
||||||
artifacts.push({
|
artifacts.push({
|
||||||
type: 'workflow-command',
|
type: 'workflow-command',
|
||||||
isYamlWorkflow: isYamlWorkflow, // For template selection
|
isYamlWorkflow: isYamlWorkflow, // For template selection
|
||||||
|
|
@ -284,7 +292,7 @@ When running any workflow:
|
||||||
* Write workflow command artifacts using dash format (NEW STANDARD)
|
* Write workflow command artifacts using dash format (NEW STANDARD)
|
||||||
* Creates flat files like: bmad-bmm-correct-course.md
|
* Creates flat files like: bmad-bmm-correct-course.md
|
||||||
*
|
*
|
||||||
* Note: Workflows do NOT have .agent.md suffix - only agents do.
|
* Note: Workflows do NOT have bmad-agent- prefix - only agents do.
|
||||||
*
|
*
|
||||||
* @param {string} baseCommandsDir - Base commands directory for the IDE
|
* @param {string} baseCommandsDir - Base commands directory for the IDE
|
||||||
* @param {Array} artifacts - Workflow artifacts
|
* @param {Array} artifacts - Workflow artifacts
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
description = "Activates the {{name}} agent from the BMad Method."
|
||||||
|
prompt = """
|
||||||
|
CRITICAL: You are now the BMad '{{name}}' agent.
|
||||||
|
|
||||||
|
PRE-FLIGHT CHECKLIST:
|
||||||
|
1. [ ] IMMEDIATE ACTION: Load and parse {project-root}/{{bmadFolderName}}/{{module}}/config.yaml - store ALL config values in memory for use throughout the session.
|
||||||
|
2. [ ] IMMEDIATE ACTION: Read and internalize the full agent definition at {project-root}/{{bmadFolderName}}/{{path}}.
|
||||||
|
3. [ ] CONFIRM: The user's name from config is {user_name}.
|
||||||
|
|
||||||
|
Only after all checks are complete, greet the user by name and display the menu.
|
||||||
|
Acknowledge this checklist is complete in your first response.
|
||||||
|
|
||||||
|
AGENT DEFINITION: {project-root}/{{bmadFolderName}}/{{path}}
|
||||||
|
"""
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
description = """{{description}}"""
|
||||||
|
prompt = """
|
||||||
|
Execute the BMAD '{{name}}' workflow.
|
||||||
|
|
||||||
|
CRITICAL: This is a structured YAML workflow. Follow these steps precisely:
|
||||||
|
|
||||||
|
1. LOAD the workflow definition from {project-root}/{{bmadFolderName}}/{{workflow_path}}
|
||||||
|
2. PARSE the YAML structure to understand:
|
||||||
|
- Workflow phases and steps
|
||||||
|
- Required inputs and outputs
|
||||||
|
- Dependencies between steps
|
||||||
|
3. EXECUTE each step in order
|
||||||
|
4. VALIDATE outputs before proceeding to next step
|
||||||
|
|
||||||
|
WORKFLOW FILE: {project-root}/{{bmadFolderName}}/{{workflow_path}}
|
||||||
|
"""
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
description = """{{description}}"""
|
||||||
|
prompt = """
|
||||||
|
Execute the BMAD '{{name}}' workflow.
|
||||||
|
|
||||||
|
CRITICAL: You must load and follow the workflow definition exactly.
|
||||||
|
|
||||||
|
WORKFLOW INSTRUCTIONS:
|
||||||
|
1. LOAD the workflow file from {project-root}/{{bmadFolderName}}/{{workflow_path}}
|
||||||
|
2. READ its entire contents
|
||||||
|
3. FOLLOW every step precisely as specified
|
||||||
|
4. DO NOT skip or modify any steps
|
||||||
|
|
||||||
|
WORKFLOW FILE: {project-root}/{{bmadFolderName}}/{{workflow_path}}
|
||||||
|
"""
|
||||||
|
|
@ -1,14 +0,0 @@
|
||||||
description = "Activates the {{title}} agent from the BMad Method."
|
|
||||||
prompt = """
|
|
||||||
CRITICAL: You are now the BMad '{{title}}' agent.
|
|
||||||
|
|
||||||
PRE-FLIGHT CHECKLIST:
|
|
||||||
1. [ ] IMMEDIATE ACTION: Load and parse @{_bmad}/{{module}}/config.yaml - store ALL config values in memory for use throughout the session.
|
|
||||||
2. [ ] IMMEDIATE ACTION: Read and internalize the full agent definition at @{_bmad}/{{module}}/agents/{{name}}.md.
|
|
||||||
3. [ ] CONFIRM: The user's name from config is {user_name}.
|
|
||||||
|
|
||||||
Only after all checks are complete, greet the user by name and display the menu.
|
|
||||||
Acknowledge this checklist is complete in your first response.
|
|
||||||
|
|
||||||
AGENT DEFINITION: @{_bmad}/{{module}}/agents/{{name}}.md
|
|
||||||
"""
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
description = "Executes the {{taskName}} task from the BMad Method."
|
|
||||||
prompt = """
|
|
||||||
Execute the following BMad Method task workflow:
|
|
||||||
|
|
||||||
PRE-FLIGHT CHECKLIST:
|
|
||||||
1. [ ] IMMEDIATE ACTION: Load and parse @{_bmad}/{{module}}/config.yaml.
|
|
||||||
2. [ ] IMMEDIATE ACTION: Read and load the task definition at @{_bmad}/{{module}}/tasks/{{filename}}.
|
|
||||||
|
|
||||||
Follow all instructions and complete the task as defined.
|
|
||||||
|
|
||||||
TASK DEFINITION: @{_bmad}/{{module}}/tasks/{{filename}}
|
|
||||||
"""
|
|
||||||
|
|
@ -1,10 +0,0 @@
|
||||||
You must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command.
|
|
||||||
|
|
||||||
<agent-activation CRITICAL="TRUE">
|
|
||||||
1. LOAD the FULL agent file from {project-root}/_bmad/{{path}}
|
|
||||||
2. READ its entire contents - this contains the complete agent persona, menu, and instructions
|
|
||||||
3. FOLLOW every step in the <activation> section precisely
|
|
||||||
4. DISPLAY the welcome/greeting as instructed
|
|
||||||
5. PRESENT the numbered menu
|
|
||||||
6. WAIT for user input before proceeding
|
|
||||||
</agent-activation>
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
name = "{{name}}"
|
|
||||||
description = "{{description}}"
|
|
||||||
Loading…
Reference in New Issue