Compare commits

...

43 Commits

Author SHA1 Message Date
semantic-release-bot
b2f8525bbf chore(release): 4.23.0 [skip ci]
# [4.23.0](https://github.com/bmadcode/BMAD-METHOD/compare/v4.22.1...v4.23.0) (2025-07-01)

### Features

* VS Code Copilot integration ([#284](https://github.com/bmadcode/BMAD-METHOD/issues/284)) ([1a4ca4f](1a4ca4ffa6))
2025-07-01 12:54:38 +00:00
David Elisma
1a4ca4ffa6 feat: VS Code Copilot integration (#284) 2025-07-01 07:54:13 -05:00
semantic-release-bot
3e2e43dd88 chore(release): 4.22.1 [skip ci]
## [4.22.1](https://github.com/bmadcode/BMAD-METHOD/compare/v4.22.0...v4.22.1) (2025-06-30)

### Bug Fixes

* update expansion versions ([6905fe7](6905fe72f6))
2025-06-30 05:14:32 +00:00
Brian Madison
6905fe72f6 fix: update expansion versions 2025-06-30 00:14:04 -05:00
semantic-release-bot
95ab8bbd9c chore(release): 4.22.0 [skip ci]
# [4.22.0](https://github.com/bmadcode/BMAD-METHOD/compare/v4.21.2...v4.22.0) (2025-06-30)

### Features

* create doc more explicit and readme improvement ([a1b30d9](a1b30d9341))
2025-06-30 05:11:29 +00:00
Brian Madison
a1b30d9341 feat: create doc more explicit and readme improvement 2025-06-30 00:11:03 -05:00
semantic-release-bot
6e094c8359 chore(release): 4.21.2 [skip ci]
## [4.21.2](https://github.com/bmadcode/BMAD-METHOD/compare/v4.21.1...v4.21.2) (2025-06-30)

### Bug Fixes

* improve create-doc task clarity for template execution ([86d5139](86d5139aea))
2025-06-30 05:08:08 +00:00
Brian Madison
86d5139aea fix: improve create-doc task clarity for template execution
- Add critical execution rules upfront
- Clarify STOP signals for task execution
- Include key execution patterns with examples
- Restore missing functionality (agent context, template locations, validation)
- Maintain concise format while ensuring proper template instruction handling
2025-06-30 00:07:37 -05:00
semantic-release-bot
62ccb640e6 chore(release): 4.21.1 [skip ci]
## [4.21.1](https://github.com/bmadcode/BMAD-METHOD/compare/v4.21.0...v4.21.1) (2025-06-30)

### Bug Fixes

* readme clarifies that the installer handles installs upgrades and expansion installation ([9371a57](9371a5784f))
2025-06-30 02:09:46 +00:00
Brian Madison
9371a5784f fix: readme clarifies that the installer handles installs upgrades and expansion installation 2025-06-29 21:09:13 -05:00
semantic-release-bot
62c5d92089 chore(release): 4.21.0 [skip ci]
# [4.21.0](https://github.com/bmadcode/BMAD-METHOD/compare/v4.20.0...v4.21.0) (2025-06-30)

### Bug Fixes

* remove unneeded files ([c48f200](c48f200727))

### Features

* massive installer improvement update ([c151bda](c151bda938))
2025-06-30 01:53:38 +00:00
Brian Madison
c48f200727 fix: remove unneeded files 2025-06-29 20:53:09 -05:00
Brian Madison
c151bda938 feat: massive installer improvement update 2025-06-29 20:52:23 -05:00
Brian Madison
ab70b8dc73 contribution updates 2025-06-29 11:30:15 -05:00
semantic-release-bot
0ec4ad26c2 chore(release): 4.20.0 [skip ci]
# [4.20.0](https://github.com/bmadcode/BMAD-METHOD/compare/v4.19.2...v4.20.0) (2025-06-29)

### Features

* Massive documentation refactor, added explanation of the new expanded role of the QA agent that will make your code quality MUCH better. 2 new diagram clearly explain the role of the pre dev ideation cycle (prd and architecture) and the details of how the dev cycle works. ([c881dcc](c881dcc48f))
2025-06-29 14:06:11 +00:00
Brian Madison
c881dcc48f feat: Massive documentation refactor, added explanation of the new expanded role of the QA agent that will make your code quality MUCH better. 2 new diagram clearly explain the role of the pre dev ideation cycle (prd and architecture) and the details of how the dev cycle works. 2025-06-29 09:05:41 -05:00
Brian Madison
5aed8f7603 cleanup 2025-06-28 22:26:37 -05:00
Brian
929461a2fe Create FUNDING.yml 2025-06-28 17:11:51 -05:00
Brian Madison
f5fa2559f0 doc: readme fixes 2025-06-28 16:12:01 -05:00
Brian
ead2c04b5b Update issue templates 2025-06-28 16:05:26 -05:00
Brian
b9970c9d73 Update issue templates 2025-06-28 15:57:17 -05:00
semantic-release-bot
8182a3f4bc chore(release): 4.19.2 [skip ci]
## [4.19.2](https://github.com/bmadcode/BMAD-METHOD/compare/v4.19.1...v4.19.2) (2025-06-28)

### Bug Fixes

* docs update and correction ([2408068](2408068884))
2025-06-28 20:49:22 +00:00
Brian Madison
2408068884 fix: docs update and correction 2025-06-28 15:46:52 -05:00
Miguel Tomas
9cafbe7014 Align Brownfield workflow descriptions and artifact naming (#277)
* chore: Update brownfield-fullstack.yml

- Update descriptions, status messages, and artifact names in brownfield-fullstack

* chore: Update brownfield-service.yml

- Update descriptions, status messages, and artifact names in brownfield-service

* chore: Update brownfield-ui.yml

- Update descriptions, status messages, and artifact names in brownfield-ui workflows
2025-06-28 15:25:40 -05:00
semantic-release-bot
466bef4398 chore(release): 4.19.1 [skip ci]
## [4.19.1](https://github.com/bmadcode/BMAD-METHOD/compare/v4.19.0...v4.19.1) (2025-06-28)

### Bug Fixes

* discord link ([2ea806b](2ea806b3af))
2025-06-28 13:36:44 +00:00
Brian Madison
2ea806b3af fix: discord link 2025-06-28 08:36:12 -05:00
semantic-release-bot
60c147aa75 chore(release): 4.19.0 [skip ci]
# [4.19.0](https://github.com/bmadcode/BMAD-METHOD/compare/v4.18.0...v4.19.0) (2025-06-28)

### Bug Fixes

* expansion install config ([50d17ed](50d17ed65d))

### Features

* install for ide now sets up rules also for expansion agents! ([b82978f](b82978fd38))
2025-06-28 07:23:35 +00:00
Brian Madison
ba91cb17cf Merge branch 'main' of github.com:bmadcode/BMAD-METHOD 2025-06-28 02:23:06 -05:00
Brian Madison
b82978fd38 feat: install for ide now sets up rules also for expansion agents! 2025-06-28 02:22:57 -05:00
Brian Madison
50d17ed65d fix: expansion install config 2025-06-28 01:57:02 -05:00
semantic-release-bot
aa15b7a2ca chore(release): 4.18.0 [skip ci]
# [4.18.0](https://github.com/bmadcode/BMAD-METHOD/compare/v4.17.0...v4.18.0) (2025-06-28)

### Features

* expansion teams can now include core agents and include their assets automatically ([c70f1a0](c70f1a056b))
* remove hardcoding from installer for agents, improve expansion pack installation to its own locations, common files moved to common folder ([95e833b](95e833beeb))
2025-06-28 06:12:41 +00:00
Brian Madison
c70f1a056b feat: expansion teams can now include core agents and include their assets automatically 2025-06-28 01:12:16 -05:00
Brian Madison
95e833beeb feat: remove hardcoding from installer for agents, improve expansion pack installation to its own locations, common files moved to common folder 2025-06-28 01:01:26 -05:00
Brian Madison
1ea367619a installer updates part 1 2025-06-27 23:38:34 -05:00
Brian Madison
6cdecec61f fix minor lint issue 2025-06-27 20:33:07 -05:00
semantic-release-bot
a5915934fd chore(release): 4.17.0 [skip ci]
# [4.17.0](https://github.com/bmadcode/BMAD-METHOD/compare/v4.16.1...v4.17.0) (2025-06-27)

### Features

* add GEMINI.md to agent context files ([#272](https://github.com/bmadcode/BMAD-METHOD/issues/272)) ([b557570](b557570081))
2025-06-27 23:26:51 +00:00
Davor Racic
b557570081 feat: add GEMINI.md to agent context files (#272)
thanks Davor
2025-06-27 18:26:28 -05:00
semantic-release-bot
4bbb251730 chore(release): 4.16.1 [skip ci]
## [4.16.1](https://github.com/bmadcode/BMAD-METHOD/compare/v4.16.0...v4.16.1) (2025-06-26)

### Bug Fixes

* remove accidental folder add ([b1c2de1](b1c2de1fb5))
2025-06-26 03:13:31 +00:00
Brian Madison
3cb8c02747 Merge branch 'main' of github.com:bmadcode/BMAD-METHOD 2025-06-25 22:13:01 -05:00
Brian Madison
b1c2de1fb5 fix: remove accidental folder add 2025-06-25 22:12:51 -05:00
semantic-release-bot
263d9c7618 chore(release): 4.16.0 [skip ci]
# [4.16.0](https://github.com/bmadcode/BMAD-METHOD/compare/v4.15.0...v4.16.0) (2025-06-26)

### Features

* repo builds all rules sets for supported ides for easy copy if desired ([ea945bb](ea945bb43f))
2025-06-26 02:42:17 +00:00
Brian Madison
08f541195d Merge branch 'main' of github.com:bmadcode/BMAD-METHOD 2025-06-25 21:41:41 -05:00
Brian Madison
ea945bb43f feat: repo builds all rules sets for supported ides for easy copy if desired 2025-06-25 21:41:32 -05:00
98 changed files with 4257 additions and 4776 deletions

15
.github/FUNDING.yml vendored Normal file
View File

@@ -0,0 +1,15 @@
# These are supported funding model platforms
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
polar: # Replace with a single Polar username
buy_me_a_coffee: bmad
thanks_dev: # Replace with a single thanks.dev username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']

32
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@@ -0,0 +1,32 @@
---
name: Bug report
about: Create a report to help us improve
title: ""
labels: ""
assignees: ""
---
**Describe the bug**
A clear and concise description of what the bug is.
**Steps to Reproduce**
What lead to the bug and can it be reliable recreated - if so with what steps.
**PR**
If you have an idea to fix and would like to contribute, please indicate here you are working on a fix, or link to a proposed PR to fix the issue. Please review the contribution.md - contributions are always welcome!
**Expected behavior**
A clear and concise description of what you expected to happen.
**Please be Specific if relevant**
Model(s) Used:
Agentic IDE Used:
WebSite Used:
Project Language:
BMad Method version:
**Screenshots or Links**
If applicable, add screenshots or links (if web sharable record) to help explain your problem.
**Additional context**
Add any other context about the problem here. The more information you can provide, the easier it will be to suggest a fix or resolve

View File

@@ -0,0 +1,22 @@
---
name: Feature request
about: Suggest an idea for this project
title: ""
labels: ""
assignees: ""
---
**Did you discuss the idea first in Discord Server (#general-dev)**
Yes/No - Link to thread. If no, please after posting request also share the link in the channel so it can be easily discussed.
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

7
.gitignore vendored
View File

@@ -19,4 +19,9 @@ Thumbs.db
CLAUDE.md CLAUDE.md
.ai/* .ai/*
test-project-install/* test-project-install/*
sample-project/* sample-project/*
.claude
.bmad-core
.bmad-creator-tools
.gemini
.bmad*/

View File

@@ -1,6 +0,0 @@
{
"recommendations": [
"davidanson.vscode-markdownlint",
"streetsidesoftware.code-spell-checker"
]
}

82
.vscode/settings.json vendored
View File

@@ -1,77 +1,7 @@
{ {
"cSpell.words": [ "cSpell.words": [
"agentic", "Agentic",
"Axios", "elicitations",
"biomimicry", "Shardable"
"BMAD", ]
"Brainwriting", }
"Centricity",
"cicd",
"dataclass",
"docstrings",
"emergently",
"explorative",
"fintech",
"firmographic",
"firmographics",
"frontends",
"gamedev",
"golint",
"Goroutines",
"hotspots",
"HSTS",
"httpx",
"Immer",
"implementability",
"Inclusivity",
"kayvan",
"Luxon",
"MERN",
"mgmt",
"nodir",
"Nuxt",
"overcommitting",
"pasteable",
"pentest",
"PESTEL",
"Pino",
"Polyrepo",
"psychographics",
"Pydantic",
"pyproject",
"reqs",
"rescope",
"roadmaps",
"roleplay",
"roomodes",
"runbooks",
"Serilog",
"shadcn",
"structlog",
"subfolders",
"Supabase",
"Systemization",
"taskroot",
"Testcontainers",
"tmpl",
"tmplv",
"touchpoints",
"trpc",
"Turborepo",
"Underserved",
"unredacted",
"upgrader",
"upgraders",
"VARCHAR",
"venv",
"vercel",
"Vite",
"WCAG",
"wireframes"
],
"markdownlint.config": {
"MD033": {
"allowed_elements": ["br", "div", "img", "rule", "sub"]
}
}
}

View File

@@ -1,3 +1,112 @@
# [4.23.0](https://github.com/bmadcode/BMAD-METHOD/compare/v4.22.1...v4.23.0) (2025-07-01)
### Features
* VS Code Copilot integration ([#284](https://github.com/bmadcode/BMAD-METHOD/issues/284)) ([1a4ca4f](https://github.com/bmadcode/BMAD-METHOD/commit/1a4ca4ffa630c2d4156bdd7a040d4c2274801757))
## [4.22.1](https://github.com/bmadcode/BMAD-METHOD/compare/v4.22.0...v4.22.1) (2025-06-30)
### Bug Fixes
* update expansion versions ([6905fe7](https://github.com/bmadcode/BMAD-METHOD/commit/6905fe72f6c2abefbfd65729d1be85752130a1d2))
# [4.22.0](https://github.com/bmadcode/BMAD-METHOD/compare/v4.21.2...v4.22.0) (2025-06-30)
### Features
* create doc more explicit and readme improvement ([a1b30d9](https://github.com/bmadcode/BMAD-METHOD/commit/a1b30d9341d2ceff79db2c7e178860c5ef0d99e5))
## [4.21.2](https://github.com/bmadcode/BMAD-METHOD/compare/v4.21.1...v4.21.2) (2025-06-30)
### Bug Fixes
* improve create-doc task clarity for template execution ([86d5139](https://github.com/bmadcode/BMAD-METHOD/commit/86d5139aea7097cc5d4ee9da0f7d3e395ce0835e))
## [4.21.1](https://github.com/bmadcode/BMAD-METHOD/compare/v4.21.0...v4.21.1) (2025-06-30)
### Bug Fixes
* readme clarifies that the installer handles installs upgrades and expansion installation ([9371a57](https://github.com/bmadcode/BMAD-METHOD/commit/9371a5784f6a6f2ad358a72ea0cde9c980357167))
# [4.21.0](https://github.com/bmadcode/BMAD-METHOD/compare/v4.20.0...v4.21.0) (2025-06-30)
### Bug Fixes
* remove unneeded files ([c48f200](https://github.com/bmadcode/BMAD-METHOD/commit/c48f200727384f37a42f4c6b1a946cb90f2445fe))
### Features
* massive installer improvement update ([c151bda](https://github.com/bmadcode/BMAD-METHOD/commit/c151bda93833aa310ccc7c0eabcf483376f9e82a))
# [4.20.0](https://github.com/bmadcode/BMAD-METHOD/compare/v4.19.2...v4.20.0) (2025-06-29)
### Features
* Massive documentation refactor, added explanation of the new expanded role of the QA agent that will make your code quality MUCH better. 2 new diagram clearly explain the role of the pre dev ideation cycle (prd and architecture) and the details of how the dev cycle works. ([c881dcc](https://github.com/bmadcode/BMAD-METHOD/commit/c881dcc48ff827ddfe8653aa364a021a66ce66eb))
## [4.19.2](https://github.com/bmadcode/BMAD-METHOD/compare/v4.19.1...v4.19.2) (2025-06-28)
### Bug Fixes
* docs update and correction ([2408068](https://github.com/bmadcode/BMAD-METHOD/commit/240806888448bb3a42acfd2f209976d489157e21))
## [4.19.1](https://github.com/bmadcode/BMAD-METHOD/compare/v4.19.0...v4.19.1) (2025-06-28)
### Bug Fixes
* discord link ([2ea806b](https://github.com/bmadcode/BMAD-METHOD/commit/2ea806b3af58ad37fcb695146883a9cd3003363d))
# [4.19.0](https://github.com/bmadcode/BMAD-METHOD/compare/v4.18.0...v4.19.0) (2025-06-28)
### Bug Fixes
* expansion install config ([50d17ed](https://github.com/bmadcode/BMAD-METHOD/commit/50d17ed65d40f6688f3b6e62732fb2280b6b116e))
### Features
* install for ide now sets up rules also for expansion agents! ([b82978f](https://github.com/bmadcode/BMAD-METHOD/commit/b82978fd38ea789a799ccc1373cfb61a2001c1e0))
# [4.18.0](https://github.com/bmadcode/BMAD-METHOD/compare/v4.17.0...v4.18.0) (2025-06-28)
### Features
* expansion teams can now include core agents and include their assets automatically ([c70f1a0](https://github.com/bmadcode/BMAD-METHOD/commit/c70f1a056b0f6e3c805096ee5d27f0a3640fb00c))
* remove hardcoding from installer for agents, improve expansion pack installation to its own locations, common files moved to common folder ([95e833b](https://github.com/bmadcode/BMAD-METHOD/commit/95e833beebc3a60f73a7a1c67d534c8eb6bf48fd))
# [4.17.0](https://github.com/bmadcode/BMAD-METHOD/compare/v4.16.1...v4.17.0) (2025-06-27)
### Features
* add GEMINI.md to agent context files ([#272](https://github.com/bmadcode/BMAD-METHOD/issues/272)) ([b557570](https://github.com/bmadcode/BMAD-METHOD/commit/b557570081149352e4efbef8046935650f6ecea1))
## [4.16.1](https://github.com/bmadcode/BMAD-METHOD/compare/v4.16.0...v4.16.1) (2025-06-26)
### Bug Fixes
* remove accidental folder add ([b1c2de1](https://github.com/bmadcode/BMAD-METHOD/commit/b1c2de1fb58029f68e021faa90cd5d5faf345198))
# [4.16.0](https://github.com/bmadcode/BMAD-METHOD/compare/v4.15.0...v4.16.0) (2025-06-26)
### Features
* repo builds all rules sets for supported ides for easy copy if desired ([ea945bb](https://github.com/bmadcode/BMAD-METHOD/commit/ea945bb43f6ea50594910b954c72e79f96a8504c))
# [4.15.0](https://github.com/bmadcode/BMAD-METHOD/compare/v4.14.1...v4.15.0) (2025-06-26) # [4.15.0](https://github.com/bmadcode/BMAD-METHOD/compare/v4.14.1...v4.15.0) (2025-06-26)

View File

@@ -4,10 +4,15 @@ Thank you for considering contributing to this project! This document outlines t
🆕 **New to GitHub or pull requests?** Check out our [beginner-friendly Pull Request Guide](docs/how-to-contribute-with-pull-requests.md) first! 🆕 **New to GitHub or pull requests?** Check out our [beginner-friendly Pull Request Guide](docs/how-to-contribute-with-pull-requests.md) first!
📋 **Before contributing**, please read our [Guiding Principles](GUIDING-PRINCIPLES.md) to understand the BMAD Method's core philosophy and architectural decisions. 📋 **Before contributing**, please read our [Guiding Principles](GUIDING-PRINCIPLES.md) to understand the BMad Method's core philosophy and architectural decisions.
Also note, we use the discussions feature in GitHub to have a community to discuss potential ideas, uses, additions and enhancements. Also note, we use the discussions feature in GitHub to have a community to discuss potential ideas, uses, additions and enhancements.
💬 **Discord Community**: Join our [Discord server](https://discord.gg/g6ypHytrCB) for real-time discussions:
- **#general-dev** - Technical discussions, feature ideas, and development questions
- **#bugs-issues** - Bug reports and issue discussions
## Code of Conduct ## Code of Conduct
By participating in this project, you agree to abide by our Code of Conduct. Please read it before participating. By participating in this project, you agree to abide by our Code of Conduct. Please read it before participating.
@@ -16,16 +21,35 @@ By participating in this project, you agree to abide by our Code of Conduct. Ple
### Reporting Bugs ### Reporting Bugs
- Check if the bug has already been reported in the Issues section 1. **Check existing issues** first to avoid duplicates
- Include detailed steps to reproduce the bug 2. **Use the bug report template** when creating a new issue - it will guide you through providing:
- Include any relevant logs or screenshots - Clear bug description
- Steps to reproduce
- Expected vs actual behavior
- Model/IDE/BMad version details
- Screenshots or links if applicable
3. **Consider discussing in Discord** (#bugs-issues channel) for quick help
4. **Indicate if you're working on a fix** to avoid duplicate efforts
### Suggesting Features ### Suggesting Features
- Check if the feature has already been suggested in the Issues section, and consider using the discussions tab in GitHub also. Explain the feature in detail and why it would be valuable. 1. **Discuss first in Discord** (#general-dev channel) - the feature request template asks if you've done this
2. **Check existing issues and discussions** to avoid duplicates
3. **Use the feature request template** when creating an issue - it will guide you through:
- Confirming Discord discussion
- Describing the problem it solves
- Explaining your solution
- Listing alternatives considered
4. **Be specific** about why this feature would benefit the BMad community
### Pull Request Process ### Pull Request Process
⚠️ **Before starting work:**
1. **For bugs**: Check if an issue exists (create one using the bug template if not)
2. **For features**: Ensure you've discussed in Discord (#general-dev) AND created a feature request issue
3. **For large changes**: Always open an issue first to discuss alignment
Please only propose small granular commits! If its large or significant, please discuss in the discussions tab and open up an issue first. I do not want you to waste your time on a potentially very large PR to have it rejected because it is not aligned or deviates from other planned changes. Communicate and lets work together to build and improve this great community project! Please only propose small granular commits! If its large or significant, please discuss in the discussions tab and open up an issue first. I do not want you to waste your time on a potentially very large PR to have it rejected because it is not aligned or deviates from other planned changes. Communicate and lets work together to build and improve this great community project!
**Important**: All contributions must align with our [Guiding Principles](GUIDING-PRINCIPLES.md). Key points: **Important**: All contributions must align with our [Guiding Principles](GUIDING-PRINCIPLES.md). Key points:
@@ -95,6 +119,15 @@ Example breakdown:
6. Push to your branch (`git push origin feature/your-feature-name`) 6. Push to your branch (`git push origin feature/your-feature-name`)
7. Open a Pull Request against the main branch 7. Open a Pull Request against the main branch
## Issue Templates
We use GitHub issue templates to ensure all necessary information is provided:
- **Bug Reports**: Automatically guides you through providing reproduction steps, environment details, and expected behavior
- **Feature Requests**: Requires Discord discussion confirmation and asks for problem/solution descriptions
Using these templates helps maintainers understand and address your contribution faster.
## Pull Request Description Guidelines ## Pull Request Description Guidelines
Keep PR descriptions short and to the point following this template: Keep PR descriptions short and to the point following this template:
@@ -111,6 +144,7 @@ Keep your PR description concise and focused. Use this template:
## Why ## Why
[1-2 sentences explaining WHY this change is needed] [1-2 sentences explaining WHY this change is needed]
Fixes #[issue number] (if applicable)
## How ## How

View File

@@ -1,6 +1,6 @@
# BMAD Method Guiding Principles # BMad Method Guiding Principles
The BMAD Method is a natural language framework for AI-assisted software development. These principles ensure contributions maintain the method's effectiveness. The BMad Method is a natural language framework for AI-assisted software development. These principles ensure contributions maintain the method's effectiveness.
## Core Principles ## Core Principles

View File

@@ -1,6 +1,6 @@
MIT License MIT License
Copyright (c) 2025 Brian AKA BMad AKA Bmad Code Copyright (c) 2025 Brian AKA BMad AKA BMad Code
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

499
README.md
View File

@@ -1,76 +1,141 @@
# BMAD-METHOD # BMad-METHOD: Universal AI Agent Framework
[![Version](https://img.shields.io/npm/v/bmad-method?color=blue&label=version)](https://www.npmjs.com/package/bmad-method) [![Version](https://img.shields.io/npm/v/bmad-method?color=blue&label=version)](https://www.npmjs.com/package/bmad-method)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
[![Node.js Version](https://img.shields.io/badge/node-%3E%3D20.0.0-brightgreen)](https://nodejs.org) [![Node.js Version](https://img.shields.io/badge/node-%3E%3D20.0.0-brightgreen)](https://nodejs.org)
[![Discord](https://img.shields.io/badge/Discord-Join%20Community-7289da?logo=discord&logoColor=white)](https://discord.gg/g6ypHytrCB) [![Discord](https://img.shields.io/badge/Discord-Join%20Community-7289da?logo=discord&logoColor=white)](https://discord.gg/gk8jAdXWmj)
**AI-Powered Agile Development Framework** - Transform your software development with specialized AI agents that work as your complete Agile team. Foundations in Agentic Agile Driven Development, known as the Breakthrough Method of Agile AI-Driven Development, but it is so much more. Transform any domain with specialized AI expertise: software development, entertainment, creative writing, business strategy to personal wellness just to name a few.
📺 **[Subscribe to BMadCode on YouTube](https://www.youtube.com/@BMadCode?sub_confirmation=1)** - V4 walkthrough and comprehensive guide coming soon! **[Subscribe to BMadCode on YouTube](https://www.youtube.com/@BMadCode?sub_confirmation=1)**
**If you find this project helpful or useful, please give it a star!** It helps others discover BMAD-METHOD and you will be notified of updates! **[Join our Discord Community](https://discord.gg/gk8jAdXWmj)** - A growing community for AI enthusiasts! Get help, share ideas, explore AI agents & frameworks, collaborate on tech projects, enjoy hobbies, and help each other succeed. Whether you're stuck on BMad, building your own agents, or just want to chat about the latest in AI - we're here for you!
## 🔄 Important: Keeping Your BMAD Installation Updated **If you find this project helpful or useful, please give it a star in the upper right hand corner!** It helps others discover BMad-METHOD and you will be notified of updates!
**Stay up-to-date effortlessly!** If you already have BMAD-METHOD installed in your project, simply run: ## Quick Navigation
### 🚨 MUST READ: Understanding the BMAD Workflow
**Before diving in, review these critical workflow diagrams that explain how BMAD works:**
1. **[Planning Workflow (Web UI)](docs/user-guide.md#the-planning-workflow-web-ui)** - How to create PRD and Architecture documents
2. **[Core Development Cycle (IDE)](docs/user-guide.md#the-core-development-cycle-ide)** - How SM, Dev, and QA agents collaborate through story files
> ⚠️ **These diagrams explain 90% of BMad Method Agentic Agile flow confusion** - Understanding the PRD+Architecture creation and the SM/Dev/QA workflow and how agents pass notes through story files is essential - and also explains why this is NOT taskmaster or just a simple task runner!
### What would you like to do?
- **[Build software with Full Stack Agile AI Team](#-quick-start)** → Quick Start Instruction
- **[Learn how to use BMAD](docs/user-guide.md)** → Complete user guide and walkthrough
- **[See available AI agents](#available-agents)** → Specialized roles for your team
- **[Explore non-technical uses](#-beyond-software-development---expansion-packs)** → Creative writing, business, wellness, education
- **[Create my own AI agents](#creating-your-own-expansion-pack)** → Build agents for your domain
- **[Browse ready-made expansion packs](expansion-packs/)** → Game dev, DevOps, infrastructure and get inspired with ideas and examples
- **[Understand the architecture](docs/core-architecture.md)** → Technical deep dive
- **[Join the community](https://discord.gg/g6ypHytrCB)** → Get help and share ideas
### Popular Use Cases
- **Software Development** - [Quick Start](#-quick-start) | [User Guide](docs/user-guide.md) | [Workflow Guides](#documentation--guides)
- **Game Development** - [2D Phaser Pack](expansion-packs/bmad-2d-phaser-game-dev/)
- **Business Strategy** - [Full Guide](docs/expansion-packs.md#business-strategy-pack)
- **Creative Writing** - [Full Guide](docs/expansion-packs.md#creative-writing-pack)
- **DevOps/Infrastructure** - [Infrastructure Pack](expansion-packs/bmad-infrastructure-devops/)
### Quick Links
- **[Installation](#installation)** → Get started in minutes
- **[Documentation](#documentation--guides)** → All guides and references
- **[Contributing](#contributing)** → Help improve BMAD
- **[Support](#support)** → Get help and connect
## Important: Keep Your BMad Installation Updated
**Stay up-to-date effortlessly!** If you already have BMad-METHOD installed in your project, simply run:
```bash ```bash
npx bmad-method install npx bmad-method install
# OR
git pull
npm run install:bmad
``` ```
The installer will: This will:
- ✅ Automatically detect your existing v4 installation - ✅ Automatically detect your existing v4 installation
- ✅ Update only the files that have changed - ✅ Update only the files that have changed and add new files
- ✅ Create `.bak` backup files for any custom modifications you've made - ✅ Create `.bak` backup files for any custom modifications you've made
- ✅ Preserve your project-specific configurations - ✅ Preserve your project-specific configurations
This makes it easy to benefit from the latest improvements, bug fixes, and new agents without losing your customizations! This makes it easy to benefit from the latest improvements, bug fixes, and new agents without losing your customizations! If for some reason this fails, you can rename or remove your .bmad-code folder and run the install again. The main thing to look out for is if you have set up custom modes that are not file driven (Cursor is the only one at this time that is not done through project files lagging behind) - you will want to ensure your sm and dev custom modes especially are kept up to date.
## 🚀 Quick Start ## Quick Start
### Fastest Start: Web UI (2 minutes) 🏃‍♂️ ### One Command for Everything (IDE Installation)
**Just run one of these commands:**
```bash
npx bmad-method install
# OR if you already have BMad installed:
git pull
npm run install:bmad
```
This single command handles:
- **New installations** - Sets up BMad in your project
- **Upgrades** - Updates existing installations automatically
- **Expansion packs** - Installs any expansion packs you've added to package.json
> **That's it!** Whether you're installing for the first time, upgrading, or adding expansion packs - these commands do everything.
**Prerequisites**: [Node.js](https://nodejs.org) v20+ required
### Fastest Start: Web UI (2 minutes)
1. **Get the bundle**: Copy `dist/teams/team-fullstack.txt` (from this repository) 1. **Get the bundle**: Copy `dist/teams/team-fullstack.txt` (from this repository)
2. **Create AI agent**: Create a new Gemini Gem or CustomGPT 2. **Create AI agent**: Create a new Gemini Gem or CustomGPT
3. **Upload & configure**: Upload the file and set instructions: "Your critical operating instructions are attached, do not break character as directed" 3. **Upload & configure**: Upload the file and set instructions: "Your critical operating instructions are attached, do not break character as directed"
4. **Start Ideating and Planning**: Start chatting! Type `*help` to see available commands or pick an agent like `*analyst` to start right in on creating a brief. 4. **Start Ideating and Planning**: Start chatting! Type `*help` to see available commands or pick an agent like `*analyst` to start right in on creating a brief.
> 💡 **All pre-built bundles are in the `dist/` folder** - ready to copy and use immediately! > **All pre-built bundles are in the `dist/` folder** - ready to copy and use immediately!
### IDE Quick Start (5 minutes) 💻 ### Alternative: Clone and Build
**Prerequisites**: Install [Node.js](https://nodejs.org) (v20 or higher) ```bash
git clone https://github.com/bmadcode/bmad-method.git
Run `npx bmad-method install` npm run install:bmad # build and install all to a destination folder
```
This installs all agents and configures them for your IDE. If you have an existing v3 installation, it will offer to upgrade it automatically.
## 📋 Table of Contents
- [Overview](#overview)
- [Installation](#installation)
- [Available Agents](#available-agents)
- [Usage](#usage)
- [Project Structure](#project-structure)
- [Contributing](#contributing)
## Overview ## Overview
BMAD-METHOD (Breakthrough Method of Agile AI-Driven Development) revolutionizes software development by providing specialized AI agents for every role in an Agile team. Each agent has deep expertise in their domain and can collaborate to deliver complete software projects. The BMad Method (Breakthrough Method of Agile Agentic-Driven Development) elevates 'Vibe Coding' by providing specialized AI agents for every role in an Agile team. Each agent has deep expertise in their domain helping you really plan and execute on your vision while keeping the agents on the rails even through complex application plans.
### Why BMAD? Unlike systems like Task Master, or inbuilt Task tool, the BMad Methods agile flow does so much more. With most systems, you give your idea in a few sentences at most, and the system churns out a plan, task list, lets you review it and then starts executing. Where the BMad agile flow is different is you can choose to have more upfront planning and architecture specification to ensure the system is built in a sustainable way, not a vibe coded spaghetti mess. When producing the PRD and Architectures (full stack, front end and or backend), the Agents work with you back and forth using advanced proven LLM techniques and techniques also based in psychology to produce beyond the average slop LLMs and Task generators will on their own. This truly is a system of Human in the Loop produces markedly better results.
- **🎯 Specialized Expertise**: Each agent is an expert in their specific role
- **🔄 True Agile Workflow**: Follows real Agile methodologies and best practices
- **📦 Modular Design**: Use one agent or an entire team
- **🛠️ IDE Integration**: Works seamlessly with Cursor, Claude Code, and Windsurf
- **🌐 Platform Agnostic**: Use with ChatGPT, Claude, Gemini, or any AI platform
## Installation ## Installation
### Method 1: Pre-Built Web Bundles (Fastest) 📦 ### Method 1: CLI Installer (For IDEs)
**Just run one command:**
```bash
npx bmad-method install
# OR if you already have BMad installed:
npm run install:bmad
```
**This single command does everything:**
- Installs BMad for the first time
- Updates existing installations
- Adds any expansion packs from your package.json
**Prerequisites**: Install [Node.js](https://nodejs.org) v20+ first
### Method 2: Pre-Built Web Bundles (For Web UI)
For ChatGPT, Claude, or Gemini web interfaces: For ChatGPT, Claude, or Gemini web interfaces:
@@ -81,49 +146,73 @@ For ChatGPT, Claude, or Gemini web interfaces:
3. Set instructions: "Your critical operating instructions are attached, do not break character as directed" 3. Set instructions: "Your critical operating instructions are attached, do not break character as directed"
4. Type `/help` to see available commands 4. Type `/help` to see available commands
### Method 2: CLI Installer (For IDEs) 🎯
**Prerequisites**: Install [Node.js](https://nodejs.org) v20+ first
Install directly into your project: `npx bmad-method install`
**Supported IDEs:** **Supported IDEs:**
The BMad Method works with any IDE, but has built-in integration for: The BMad Method works with any IDE, but has built-in integration for:
- `cursor` - Cursor IDE with @agent commands - `cursor` - Cursor IDE with manual rule @agent commands
- `claude-code` - Claude Code with /agent commands - `claude-code` - Claude Code with /agent commands
- `windsurf` - Windsurf with @agent commands - `cline` - Cline Rules integration
- `gemini-cli` - Gemini with @agent commands
- `windsurf` - Windsurf with manual rule @agent commands
- `roo` - Roo Code with custom modes (see `.roomodes`) - `roo` - Roo Code with custom modes (see `.roomodes`)
- More coming soon - BUT ITS easy to use with ANY IDE - just copy the bmad-code folder to your project, and rename it .bmad-code. - `vs-code-copilot` - VS Code with GitHub Copilot agent mode integration
## Available Agents ## Available Agents
### Core Development Team ### Core Development Team
| Agent | Role | Specialty | | Agent | Role | Specialty |
| ----------- | ------------------ | --------------------------------------------- | | ----------- | ------------------ | -------------------------------------------------------------------------------------------- |
| `analyst` | Business Analyst | market analysis, brainstorming, project brief | | `analyst` | Business Analyst | market analysis, brainstorming, project brief creation |
| `pm` | Product Manager | Product strategy, roadmaps, PRDs | | `pm` | Product Manager | Product strategy, MVP Decisioning, PRD creation with Epics |
| `architect` | Solution Architect | System design, technical architecture | | `architect` | Solution Architect | System design, technical full stack, front end or backend architecture |
| `dev` | Developer | Code implementation across all technologies | | `ux-expert` | UX Designer | User experience, UI design, prompts for V0, Lovable, and others |
| `qa` | QA Specialist | Testing strategies, quality assurance | | `po` | Product Owner | Ensure PRD and Architecture are aligned, and changes from architecture end up in PRD stories |
| `ux-expert` | UX Designer | User experience, UI design, prototypes | | `sm` | Scrum Master | High level epics and stories transformed into detailed dev stories with tasks and subtasks |
| `po` | Product Owner | Backlog management, story validation | | `dev` | Developer | Code implementation across all technologies - follows the detailed SM created story |
| `sm` | Scrum Master | Sprint planning, story creation | | `qa` | QA Specialist | Detailed review of the devs ready for review story, refactor and propose issues and changes |
### Meta Agents ### BMad Agents
| Agent | Role | Specialty | | Agent | Role | Specialty |
| ------------------- | ---------------- | ------------------------------------------------------------------- | | ------------------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------ |
| `bmad-orchestrator` | Team Coordinator | Multi-agent workflows, role switching, is part of every team bundle | | `bmad-orchestrator` | Team Coordinator | Helps guide you and answers your questions with its massive knowledge base, and guides you through Multi-agent workflows |
| `bmad-master` | Universal Expert | All capabilities without switching | | `bmad-master` | Universal Expert | All capabilities without switching (Except Dev) |
## Advanced Features
### Dynamic Dependencies
Each agent only loads the resources it needs, keeping context windows lean.
### Template System
Rich templates for all document types:
- Product Requirements (PRD)
- Architecture Documents
- User Stories
- Test Plans
- And more...
Templates are unique in that they are embedded with the LLM instructions also for further working with you to prompt and elicit the best from you and your agile agent team member - allowing for unique coaching and customization options. While there is a single create-doc task, the possibilities are endless when you expand the templates into more doc types, or customize with your own docs embedded with the templating markup and LLM instruction framework that is core to the BMad Method.
### Slash Star Commands
Ask the agent you are using for help with /help (in the web) or \*help in the ide to see what commands are available!
### Advanced Elicitation
Many of the Agents and Templates for docs, and some tasks, include Advanced Elicitation directives based on the latest in LLM interactions and pro level prompt engineering guidance. With this, you can push the Agents further than ever before. If an agent proposes an idea, or an architecture - you can push it further with optional elicitations where it will have to really expand on, defend, or produce other options and prove its suggestion was better. This is a necessary step if you want the absolute best beyond accepting the generated average responses the LLMs think you want to hear for their first response. Some of this is interactive, and some of this is baked into the core prompting engine that powers the LLM progression through various tasks and template flows.
## Usage ## Usage
### With IDE Integration The BMAD Method follows a structured Agile workflow with specialized AI agents. For complete usage instructions and walkthroughs, see the **[User Guide](docs/user-guide.md)**.
After installation with `--ide` flag: ### Quick Start Examples
#### With IDE Integration
```bash ```bash
# In Cursor # In Cursor
@@ -136,118 +225,29 @@ After installation with `--ide` flag:
@dev Implement story 1.3 @dev Implement story 1.3
``` ```
### With Web UI (ChatGPT/Claude/Gemini) #### With Web UI
After uploading a bundle you can ask /help of the agent to learn what it can do After uploading a bundle, type `/help` to see available commands.
### CLI Commands ### Key Resources
```bash - **[Complete User Guide](docs/user-guide.md)** - Full walkthrough from project inception to completion
# List all available agents - **[CLI Commands](docs/user-guide.md#cli-commands)** - Installation, updates, and management
npx bmad-method list - **[Upgrading from V3](docs/user-guide.md#upgrading-from-v3-to-v4)** - Migration instructions
- **[Core Configuration](docs/user-guide.md#core-configuration-coreconfigyml)** - V4's flexible project structure support
# Install or update (automatically detects existing installations) - **[Teams & Workflows](docs/user-guide.md#team-configurations)** - Pre-configured agent teams
npx bmad-method install
# Check installation status
npx bmad-method status
```
### Upgrading from V3 to V4
If you have an existing BMAD-METHOD V3 project, simply run the installer in your project directory:
```bash
npx bmad-method install
# The installer will automatically detect your V3 installation and offer to upgrade
```
The upgrade process will:
1. Create a backup of your V3 files in `.bmad-v3-backup/`
2. Install the new V4 `.bmad-core/` structure
3. Migrate your documents (PRD, Architecture, Stories, Epics)
4. Set up IDE integration for all V4 agents
5. Create an install manifest for future updates
After upgrading:
1. Review your documents in the `docs/` folder - if you had a PRD or architecture in your old project, copy it from the backup to the docs folder if they are not there.
2. Optionally run the `doc-migration-task` to align your documents with V4 templates - you can do this with your agent my saying something like: 'run {drag in task} against {drag prd or arch file from docs} to align with {drag the template from .bmad-core/templates/full-stack-architecture.md}
3. If you have separate front-end and backend architecture docs you can modify step 2 to merge both into a single full stack architecture or separate Front and Back end.
The reason #2 and 3 are optional is because now BMad V4 makes sharding optional for the SM. See [Core Configuration](#-core-configuration-new-in-v4)
**Note**: The agents in `.bmad-core/` fully replace the items in `bmad-agent/` - you can remove the backup folder versions.
### 🔧 Core Configuration (NEW in V4)
**Critical**: V4 introduces `bmad-core/core-config.yml` - a powerful configuration file that enables BMAD to work seamlessly with any project structure, whether it's V4-optimized or legacy. You can even now use non-standard PRDs and architectures!
#### What is core-config.yml?
This configuration file tells BMAD agents exactly where to find your project documents and how they're structured. It's the key to V4's flexibility and backwards compatibility.
#### Key Features
- **Version Awareness**: Agents understand if your PRD/Architecture follows V4 conventions or earlier versions
- **Flexible Document Locations**: Works whether your epics are embedded in PRD or properly sharded
- **Developer Context**: Define which files the dev agent should always load
- **Debug Support**: Built-in logging for troubleshooting story implementation
#### Why It Matters
- **Use BMAD with ANY project structure** - V3, V4, or custom layouts
- **No forced migrations** - Keep your existing document organization
- **Customize developer workflow** - Specify exactly which files provide context
- **Seamless upgrades** - Start with V3 docs and gradually adopt V4 patterns
See the [detailed core-config.yml guide](docs/user-guide.md#core-configuration-coreconfigyml) for configuration examples and best practices.
## Teams & Workflows
### Pre-Configured Teams
Save context by using specialized teams:
- **Team All**: Complete Agile team with all 10 agents
- **Team Fullstack**: Frontend + Backend development focus
- **Team No-UI**: Backend/API development without UX
### Workflows
Structured approaches for different scenarios:
- **Greenfield**: Starting new projects (fullstack/service/UI)
- **Brownfield**: Enhancing existing projects
- **Simple**: Quick prototypes and MVPs
- **Complex**: Enterprise and large-scale projects
## Project Structure ## Project Structure
```plaintext See the **[Core Architecture](docs/core-architecture.md)** for the complete source tree and detailed explanations of each component.
.bmad-core/
├── agents/ # Individual agent definitions
├── agent-teams/ # Team configurations
├── workflows/ # Development workflows
├── templates/ # Document templates (PRD, Architecture, etc.)
├── tasks/ # Reusable task definitions
├── checklists/ # Quality checklists
├── data/ # Knowledge base
└── web-bundles/ # Optional can be added if you use the install command and select this folder as a destination for the build bundle files
tools/ ### Key Directories
├── cli.js # Build tool
├── installer/ # NPX installer
└── lib/ # Build utilities
expansion-packs/ # Domain-specific add-ons (Technical & Non-Technical) - **`.bmad-core/`** - Heart of the framework (agents, templates, workflows)
- **`dist/`** - Pre-built bundles ready for web UI use
dist/ # 📦 PRE-BUILT BUNDLES (Ready to use!) - **`expansion-packs/`** - Domain-specific extensions
├── agents/ # Individual agent bundles (.txt files) - **`tools/`** - Build and installation utilities
├── teams/ # Team bundles (.txt files) - **`docs/`** - Your project documentation (PRD, architecture, stories)
└── expansion-packs/ # Expansion pack bundles
```
### 📦 Pre-Built Bundles (dist/ folder) ### 📦 Pre-Built Bundles (dist/ folder)
@@ -269,89 +269,6 @@ dist/ # 📦 PRE-BUILT BUNDLES (Ready to use!)
**For Web UI usage**: Simply copy any `.txt` file from `dist/` and upload to your AI platform!` **For Web UI usage**: Simply copy any `.txt` file from `dist/` and upload to your AI platform!`
## Advanced Features
### Dynamic Dependencies
Each agent only loads the resources it needs, keeping context windows lean.
### Template System
Rich templates for all document types:
- Product Requirements (PRD)
- Architecture Documents
- User Stories
- Test Plans
- And more...
### Slash Star Commands
Ask the agent you are using for help with /help (in the web) or \*help in the ide to see what commands are available!
## Expansion Packs - Beyond Software Development
BMAD Method's natural language framework isn't limited to software development. Create specialized agents for ANY domain:
### Technical Expansion Packs
- 🎮 **Game Development** - Game designers, level creators, narrative writers
- 🏗️ **Infrastructure/DevOps** - Cloud architects, security specialists, SRE agents
- 📱 **Mobile Development** - iOS/Android specialists, UX designers
- 🔗 **Blockchain/Web3** - Smart contract developers, DeFi architects
### Non-Technical Expansion Packs
- 💼 **Business Strategy** - Strategic planners, market analysts, business coaches
- 💪 **Health & Wellness** - Fitness coaches, nutrition advisors, meditation guides
- 🎨 **Creative Arts** - Story writers, world builders, character developers
- 📚 **Education** - Curriculum designers, tutors, learning coaches
- 🧠 **Personal Development** - Life coaches, goal setters, habit builders
- 🏢 **Professional Services** - Legal advisors, medical protocols, research assistants
### Creating Your Own Expansion Pack
The BMAD framework can support any domain where structured AI assistance is valuable:
1. Define specialized agents with domain expertise
2. Create task procedures for common workflows
3. Build templates for domain-specific outputs
4. Package as an expansion pack for others to use
📖 **[Read the full Expansion Packs Guide](docs/expansion-packs.md)** for detailed examples and inspiration!
🛠️ **[Use the Expansion Pack Creator](expansion-packs/expansion-creator/README.md)** to build your own!
## Contributing
**We're excited about contributions and welcome your ideas, improvements, and expansion packs!** 🎉
### Before Contributing - MUST READ
To ensure your contribution aligns with the BMAD Method and gets merged smoothly:
1. 📋 **Read [CONTRIBUTING.md](CONTRIBUTING.md)** - Our contribution guidelines, PR requirements, and process
2. 🎯 **Read [GUIDING-PRINCIPLES.md](GUIDING-PRINCIPLES.md)** - Core principles that keep BMAD powerful through simplicity
3. 🆕 **New to GitHub?** Start with our [Pull Request Guide](docs/how-to-contribute-with-pull-requests.md)
### Key Points to Remember
- Keep dev agents lean (save context for coding!)
- Use small, focused files over large branching ones
- Reuse existing tasks (like `create-doc`) instead of creating duplicates
- Consider expansion packs for domain-specific features
- All contributions must follow our natural language, markdown-based approach
We're building something amazing together - let's keep it simple, powerful, and focused! 💪
### Development Setup
```bash
git clone https://github.com/bmadcode/bmad-method.git
cd bmad-method
npm install
```
## Documentation & Guides ## Documentation & Guides
### Architecture & Technical ### Architecture & Technical
@@ -364,10 +281,50 @@ npm install
- 📚 [Universal BMAD Workflow Guide](docs/bmad-workflow-guide.md) - Core workflow that applies to all IDEs - 📚 [Universal BMAD Workflow Guide](docs/bmad-workflow-guide.md) - Core workflow that applies to all IDEs
- 🏗️ [Working in the Brownfield Guide](docs/working-in-the-brownfield.md) - Complete guide for enhancing existing projects - 🏗️ [Working in the Brownfield Guide](docs/working-in-the-brownfield.md) - Complete guide for enhancing existing projects
- 🎯 [Cursor Guide](docs/cursor-guide.md) - Complete workflow for Cursor users
- 🤖 [Claude Code Guide](docs/claude-code-guide.md) - Complete workflow for Claude Code users ### IDE-Specific Guides
- 🌊 [Windsurf Guide](docs/windsurf-guide.md) - Complete workflow for Windsurf users
- 🦘 [Roo Code Guide](docs/roo-code-guide.md) - Complete workflow for Roo Code users - 🎯 [Cursor Guide](docs/agentic-tools/cursor-guide.md) - Setup and usage for Cursor
- 🤖 [Claude Code Guide](docs/agentic-tools/claude-code-guide.md) - Setup and usage for Claude Code
- 🌊 [Windsurf Guide](docs/agentic-tools/windsurf-guide.md) - Setup and usage for Windsurf
- 🦘 [Roo Code Guide](docs/agentic-tools/roo-code-guide.md) - Setup and usage for Roo Code
- 🔧 [Cline Guide](docs/agentic-tools/cline-guide.md) - Setup and usage for Cline (VS Code)
- ✨ [Gemini CLI Guide](docs/agentic-tools/gemini-cli-guide.md) - Setup and usage for Gemini CLI
- 💻 [VS Code Copilot Guide](docs/agentic-tools/vs-code-copilot-guide.md) - Setup and usage for VS Code with GitHub Copilot
## 🌟 Beyond Software Development - Expansion Packs
While BMAD excels at software development, its natural language framework can structure expertise in ANY domain. Expansion packs transform BMAD into a universal AI agent system for creative writing, business strategy, health & wellness, education, and much more.
### Available Expansion Packs
#### Technical Domains
- 🎮 **[Game Development](expansion-packs/bmad-2d-phaser-game-dev/)** - Complete game studio team with designers, developers, and narrative writers
- 🏗️ **[Infrastructure/DevOps](expansion-packs/bmad-infrastructure-devops/)** - Cloud architects, security specialists, SRE experts
- 📱 **Mobile Development** - iOS/Android specialists, mobile UX designers
- 🔗 **Blockchain/Web3** - Smart contract developers, DeFi architects
#### Non-Technical Domains
- 💼 **Business Strategy** - Strategic planners, market analysts, business coaches
- 💪 **Health & Wellness** - Fitness coaches, nutrition advisors, meditation guides
- 🎨 **Creative Arts** - Story writers, world builders, character developers
- 📚 **Education** - Curriculum designers, tutors, learning coaches
- 🧠 **Personal Development** - Life coaches, goal setters, habit builders
- 🏢 **Professional Services** - Legal advisors, content creators, research assistants
### Creating Your Own Expansion Pack
Transform your expertise into AI agents:
1. **Identify your domain** - What knowledge do you want to share?
2. **Design specialized agents** - Each with unique expertise and personality
3. **Create reusable tasks** - Standard procedures in your field
4. **Build professional templates** - Structured outputs for consistency
5. **Share with the community** - Help others benefit from your expertise
📖 **[Read the full Expansion Packs Guide](docs/expansion-packs.md)** - Detailed examples, inspiration, and technical details
## Support ## Support
@@ -394,7 +351,39 @@ See [versions.md](docs/versions.md) for detailed version history and migration g
Created by Brian (BMad) Madison Created by Brian (BMad) Madison
--- ## Contributing
**We're excited about contributions and welcome your ideas, improvements, and expansion packs!** 🎉
### Before Contributing - MUST READ
To ensure your contribution aligns with the BMad Method and gets merged smoothly:
1. 📋 **Read [CONTRIBUTING.md](CONTRIBUTING.md)** - Our contribution guidelines, PR requirements, and process
2. 🎯 **Read [GUIDING-PRINCIPLES.md](GUIDING-PRINCIPLES.md)** - Core principles that keep BMAD powerful through simplicity
3. 🆕 **New to GitHub?** Start with our [Pull Request Guide](docs/how-to-contribute-with-pull-requests.md)
### Key Points to Remember
- Keep dev agents lean (save context for coding!)
- Use small, focused files over large branching ones
- Reuse existing tasks (like `create-doc`) instead of creating duplicates
- Consider expansion packs for domain-specific features and not improvements to the core system (those belong in the core system)
- All contributions must follow our natural language, markdown-based templating approach with template embedded LLM instructions and elicitations
We're building something amazing together - let's keep it simple, powerful, and focused! 💪
### Development Setup
Want to help improve the BMad Method. Fork n' Clone the repo
```bash
git clone https://github.com/bmadcode/bmad-method.git
cd bmad-method
npm run build # rebuild the dist folder
npm run install:bmad # build and install all to a destination folder
```
[![Contributors](https://contrib.rocks/image?repo=bmadcode/bmad-method)](https://github.com/bmadcode/bmad-method/graphs/contributors) [![Contributors](https://contrib.rocks/image?repo=bmadcode/bmad-method)](https://github.com/bmadcode/bmad-method/graphs/contributors)

View File

@@ -50,7 +50,7 @@ task-execution:
updates-ONLY: updates-ONLY:
- "Checkboxes: [ ] not started | [-] in progress | [x] complete" - "Checkboxes: [ ] not started | [-] in progress | [x] complete"
- "Debug Log: | Task | File | Change | Reverted? |" - "Debug Log: | Task | File | Change | Reverted? |"
- "Completion Notes: Deviations only, <50 words" - "Completion Notes: Deviations from AC or tasks during execution only, <50 words"
- "Change Log: Requirement changes only" - "Change Log: Requirement changes only"
- "File List: CRITICAL - Maintain complete list of ALL files created/modified during implementation" - "File List: CRITICAL - Maintain complete list of ALL files created/modified during implementation"
blocking: "Unapproved deps | Ambiguous after story check | 3 failures | Missing config | Failing validations" blocking: "Unapproved deps | Ambiguous after story check | 3 failures | Missing config | Failing validations"

View File

@@ -1,3 +1,4 @@
version: 4.21.1
markdownExploder: true markdownExploder: true
prd: prd:
prdFile: docs/prd.md prdFile: docs/prd.md
@@ -17,4 +18,3 @@ devLoadAlwaysFiles:
- docs/architecture/source-tree.md - docs/architecture/source-tree.md
devDebugLog: .ai/debug-log.md devDebugLog: .ai/debug-log.md
devStoryLocation: docs/stories devStoryLocation: docs/stories
agentCoreDump: .ai/core-dump{n}.md

View File

@@ -78,7 +78,7 @@ BMAD transforms you into a "Vibe CEO" - directing a team of specialized AI agent
5. Type `/help` to see available commands 5. Type `/help` to see available commands
#### Option 2: IDE Integration #### Option 2: IDE Integration
**Best for**: Cursor, Claude Code, Windsurf, Cline, Roo Code users **Best for**: Cursor, Claude Code, Windsurf, Cline, Roo Code, VS Code Copilot users
```bash ```bash
# Interactive installation (recommended) # Interactive installation (recommended)
@@ -93,6 +93,7 @@ npx bmad-method install
- **Windsurf**: Built-in AI capabilities - **Windsurf**: Built-in AI capabilities
- **Cline**: VS Code extension with AI features - **Cline**: VS Code extension with AI features
- **Roo Code**: Web-based IDE with agent support - **Roo Code**: Web-based IDE with agent support
- **VS Code Copilot**: AI-powered coding assistant
**Note for VS Code Users**: BMAD-METHOD assumes when you mention "VS Code" that you're using it with an AI-powered extension like GitHub Copilot, Cline, or Roo. Standard VS Code without AI capabilities cannot run BMAD agents. The installer includes built-in support for Cline and Roo. **Note for VS Code Users**: BMAD-METHOD assumes when you mention "VS Code" that you're using it with an AI-powered extension like GitHub Copilot, Cline, or Roo. Standard VS Code without AI capabilities cannot run BMAD agents. The installer includes built-in support for Cline and Roo.
@@ -278,6 +279,7 @@ You are the "Vibe CEO" - thinking like a CEO with unlimited resources and a sing
- **Cursor**: `@agent-name` (e.g., `@bmad-master`) - **Cursor**: `@agent-name` (e.g., `@bmad-master`)
- **Windsurf**: `@agent-name` (e.g., `@bmad-master`) - **Windsurf**: `@agent-name` (e.g., `@bmad-master`)
- **Roo Code**: Select mode from mode selector (e.g., `bmad-bmad-master`) - **Roo Code**: Select mode from mode selector (e.g., `bmad-bmad-master`)
- **VS Code Copilot**: Open the Chat view (`⌃⌘I` on Mac, `Ctrl+Alt+I` on Windows/Linux) and select **Agent** from the chat mode selector.
**Chat Management Guidelines**: **Chat Management Guidelines**:
- **Claude Code, Cursor, Windsurf**: Start new chats when switching agents - **Claude Code, Cursor, Windsurf**: Start new chats when switching agents
@@ -719,7 +721,7 @@ Expansion packs extend BMAD-METHOD beyond traditional software development into
### Using Expansion Packs ### Using Expansion Packs
1. **Browse Available Packs**: Check `expansion-packs/` directory 1. **Browse Available Packs**: Check `expansion-packs/` directory
2. **Get Inspiration**: See `docs/expansion-pack-ideas.md` for detailed examples 2. **Get Inspiration**: See `docs/expansion-packs.md` for detailed examples and ideas
3. **Install via CLI**: 3. **Install via CLI**:
```bash ```bash
npx bmad-method install npx bmad-method install

View File

@@ -1,74 +0,0 @@
# Core Dump Task
## Purpose
To create a concise memory recording file (`.ai/core-dump-n.md`) that captures the essential context of the current agent session, enabling seamless continuation of work in future agent sessions. This task ensures persistent context across agent conversations while maintaining minimal token usage for efficient context loading.
## Inputs for this Task
- Current session conversation history and accomplishments
- Files created, modified, or deleted during the session
- Key decisions made and procedures followed
- Current project state and next logical steps
- User requests and agent responses that shaped the session
## Task Execution Instructions
### 0. Check Existing Core Dump
Before proceeding, check if `.ai/core-dump.md` already exists:
- If file exists, ask user: "Core dump file exists. Should I: 1. Overwrite, 2. Update, 3. Append or 4. Create new?"
- **Overwrite**: Replace entire file with new content
- **Update**: Merge new session info with existing content, updating relevant sections
- **Append**: Add new session as a separate entry while preserving existing content
- **Create New**: Create a new file, appending the next possible -# to the file, such as core-dump-3.md if 1 and 2 already exist.
- If file doesn't exist, proceed with creation of `core-dump-1.md`
### 1. Analyze Session Context
- Review the entire conversation to identify key accomplishments
- Note any specific tasks, procedures, or workflows that were executed
- Identify important decisions made or problems solved
- Capture the user's working style and preferences observed during the session
### 2. Document What Was Accomplished
- **Primary Actions**: List the main tasks completed concisely
- **Story Progress**: For story work, use format "Tasks Complete: 1-6, 8. Next Task Pending: 7, 9"
- **Problem Solving**: Document any challenges encountered and how they were resolved
- **User Communications**: Summarize key user requests, preferences, and discussion points
### 3. Record File System Changes (Concise Format)
- **Files Created**: `filename.ext` (brief purpose/size)
- **Files Modified**: `filename.ext` (what changed)
- **Files Deleted**: `filename.ext` (why removed)
- Focus on essential details, avoid verbose descriptions
### 4. Capture Current Project State
- **Project Progress**: Where the project stands after this session
- **Current Issues**: Any blockers or problems that need resolution
- **Next Logical Steps**: What would be the natural next actions to take
### 5. Create/Update Core Dump File
Based on user's choice from step 0, handle the file accordingly:
### 6. Optimize for Minimal Context
- Keep descriptions concise but informative
- Use abbreviated formats where possible (file sizes, task numbers)
- Focus on actionable information rather than detailed explanations
- Avoid redundant information that can be found in project documentation
- Prioritize information that would be lost without this recording
- Ensure the file can be quickly scanned and understood
### 7. Validate Completeness
- Verify all significant session activities are captured
- Ensure a future agent could understand the current state
- Check that file changes are accurately recorded
- Confirm next steps are clear and actionable
- Verify user communication style and preferences are noted

View File

@@ -1,74 +0,0 @@
# Create Document from Template Task
## Purpose
- Generate documents from any specified template following embedded instructions from the perspective of the selected agent persona
## Instructions
### 1. Identify Template and Context
- Determine which template to use (user-provided or list available for selection to user)
- Agent-specific templates are listed in the agent's dependencies under `templates`. For each template listed, consider it a document the agent can create. So if an agent has:
@{example}
dependencies:
templates: - prd-tmpl - architecture-tmpl
@{/example}
You would offer to create "PRD" and "Architecture" documents when the user asks what you can help with.
- Gather all relevant inputs, or ask for them, or else rely on user providing necessary details to complete the document
- Understand the document purpose and target audience
### 2. Determine Interaction Mode
Confirm with the user their preferred interaction style:
- **Incremental:** Work through chunks of the document.
- **YOLO Mode:** Draft complete document making reasonable assumptions in one shot. (Can be entered also after starting incremental by just typing /yolo)
### 3. Execute Template
- Load specified template from `templates#*` or the /templates directory
- Follow ALL embedded LLM instructions within the template
- Process template markup according to `utils#template-format` conventions
### 4. Template Processing Rules
#### CRITICAL: Never display template markup, LLM instructions, or examples to users
- Replace all {{placeholders}} with actual content
- Execute all [[LLM: instructions]] internally
- Process `<<REPEAT>>` sections as needed
- Evaluate ^^CONDITION^^ blocks and include only if applicable
- Use @{examples} for guidance but never output them
### 5. Content Generation
- **Incremental Mode**: Present each major section for review before proceeding
- **YOLO Mode**: Generate all sections, then review complete document with user
- Apply any elicitation protocols specified in template
- Incorporate user feedback and iterate as needed
### 6. Validation
If template specifies a checklist:
- Run the appropriate checklist against completed document
- Document completion status for each item
- Address any deficiencies found
- Present validation summary to user
### 7. Final Presentation
- Present clean, formatted content only
- Ensure all sections are complete
- DO NOT truncate or summarize content
- Begin directly with document content (no preamble)
- Include any handoff prompts specified in template
## Important Notes
- Template markup is for AI processing only - never expose to users

View File

@@ -1,97 +0,0 @@
# Checklist Validation Task
This task provides instructions for validating documentation against checklists. The agent MUST follow these instructions to ensure thorough and systematic validation of documents.
## Context
The BMAD Method uses various checklists to ensure quality and completeness of different artifacts. Each checklist contains embedded prompts and instructions to guide the LLM through thorough validation and advanced elicitation. The checklists automatically identify their required artifacts and guide the validation process.
## Available Checklists
If the user asks or does not specify a specific checklist, list the checklists available to the agent persona. If the task is being run not with a specific agent, tell the user to check the bmad-core/checklists folder to select the appropriate one to run.
## Instructions
1. **Initial Assessment**
- If user or the task being run provides a checklist name:
- Try fuzzy matching (e.g. "architecture checklist" -> "architect-checklist")
- If multiple matches found, ask user to clarify
- Load the appropriate checklist from bmad-core/checklists/
- If no checklist specified:
- Ask the user which checklist they want to use
- Present the available options from the files in the checklists folder
- Confirm if they want to work through the checklist:
- Section by section (interactive mode - very time consuming)
- All at once (YOLO mode - recommended for checklists, there will be a summary of sections at the end to discuss)
2. **Document and Artifact Gathering**
- Each checklist will specify its required documents/artifacts at the beginning
- Follow the checklist's specific instructions for what to gather, generally a file can be resolved in the docs folder, if not or unsure, halt and ask or confirm with the user.
3. **Checklist Processing**
If in interactive mode:
- Work through each section of the checklist one at a time
- For each section:
- Review all items in the section following instructions for that section embedded in the checklist
- Check each item against the relevant documentation or artifacts as appropriate
- Present summary of findings for that section, highlighting warnings, errors and non applicable items (rationale for non-applicability).
- Get user confirmation before proceeding to next section or if any thing major do we need to halt and take corrective action
If in YOLO mode:
- Process all sections at once
- Create a comprehensive report of all findings
- Present the complete analysis to the user
4. **Validation Approach**
For each checklist item:
- Read and understand the requirement
- Look for evidence in the documentation that satisfies the requirement
- Consider both explicit mentions and implicit coverage
- Aside from this, follow all checklist llm instructions
- Mark items as:
- ✅ PASS: Requirement clearly met
- ❌ FAIL: Requirement not met or insufficient coverage
- ⚠️ PARTIAL: Some aspects covered but needs improvement
- N/A: Not applicable to this case
5. **Section Analysis**
For each section:
- think step by step to calculate pass rate
- Identify common themes in failed items
- Provide specific recommendations for improvement
- In interactive mode, discuss findings with user
- Document any user decisions or explanations
6. **Final Report**
Prepare a summary that includes:
- Overall checklist completion status
- Pass rates by section
- List of failed items with context
- Specific recommendations for improvement
- Any sections or items marked as N/A with justification
## Checklist Execution Methodology
Each checklist now contains embedded LLM prompts and instructions that will:
1. **Guide thorough thinking** - Prompts ensure deep analysis of each section
2. **Request specific artifacts** - Clear instructions on what documents/access is needed
3. **Provide contextual guidance** - Section-specific prompts for better validation
4. **Generate comprehensive reports** - Final summary with detailed findings
The LLM will:
- Execute the complete checklist validation
- Present a final report with pass/fail rates and key findings
- Offer to provide detailed analysis of any section, especially those with warnings or failures

View File

@@ -1,10 +0,0 @@
# File Resolution Context
Update the installer/upgrader so that when agents are added to a project (under Add these two lines to any agent's `activation-instructions` for ide installation:
```yaml
- IDE-FILE-RESOLUTION: Dependencies map to files as {root}/{type}/{name}.md where root=".bmad-core", type=folder (tasks/templates/checklists/utils), name=dependency name.
- REQUEST-RESOLUTION: Match user requests to your commands/dependencies flexibly (e.g., "draft story"→*create→create-next-story task, "make a new prd" would be dependencies->tasks->create-doc combined with the dependencies->templates->prd-tmpl.md), or ask for clarification if ambiguous.
```
and add `root: .bmad-core` as the first root yml property.

View File

@@ -1,223 +0,0 @@
# Workflow Management
This utility enables the BMAD orchestrator to manage and execute team workflows.
## Important: Dynamic Workflow Loading
The BMAD orchestrator MUST read the available workflows from the current team configuration's `workflows` field. Do not use hardcoded workflow lists. Each team bundle defines its own set of supported workflows based on the agents it includes.
**Critical Distinction**:
- When asked "what workflows are available?", show ONLY the workflows defined in the current team bundle's configuration
- Use `/agent-list` to show agents in the current bundle
- Use `/workflows` to show workflows in the current bundle, NOT any creation tasks
### Workflow Descriptions
When displaying workflows, use these descriptions based on the workflow ID:
- **greenfield-fullstack**: Build a new full-stack application from concept to development
- **brownfield-fullstack**: Enhance an existing full-stack application with new features
- **greenfield-service**: Build a new backend service or API from concept to development
- **brownfield-service**: Enhance an existing backend service or API
- **greenfield-ui**: Build a new frontend/UI application from concept to development
- **brownfield-ui**: Enhance an existing frontend/UI application
## Workflow Commands
### /workflows
Lists all available workflows for the current team. The available workflows are determined by the team configuration and may include workflows such as:
- greenfield-fullstack
- brownfield-fullstack
- greenfield-service
- brownfield-service
- greenfield-ui
- brownfield-ui
The actual list depends on which team bundle is loaded. When responding to this command, display the workflows that are configured in the current team's `workflows` field.
Example response format:
```text
Available workflows for [Team Name]:
1. [workflow-id] - [Brief description based on workflow type]
2. [workflow-id] - [Brief description based on workflow type]
[... etc. ...]
Use /workflow-start {number or id} to begin a workflow.
```
### /workflow-start {workflow-id}
Starts a specific workflow and transitions to the first agent.
Example: `/workflow-start greenfield-fullstack`
### /workflow-status
Shows current workflow progress, completed artifacts, and next steps.
Example response:
```text
Current Workflow: Greenfield Full-Stack Development
Stage: Product Planning (2 of 6)
Completed:
✓ Discovery & Requirements
- project-brief (completed by Mary)
In Progress:
⚡ Product Planning
- Create PRD (John) - awaiting input
Next: Technical Architecture
```
### /workflow-resume
Resumes a workflow from where it left off, useful when starting a new chat.
User can provide completed artifacts:
```text
User: /workflow-resume greenfield-fullstack
I have completed: project-brief, PRD
BMad: I see you've completed Discovery and part of Product Planning.
Based on the greenfield-fullstack workflow, the next step is:
- UX Strategy with Sally (ux-expert)
Would you like me to load Sally to continue?
```
### /workflow-next
Shows the next recommended agent and action in the current workflow.
## Workflow Execution Flow
### 1. Starting a Workflow
When a workflow is started:
1. Load the workflow definition
2. Identify the first stage and step
3. Transition to the required agent
4. Provide context about expected inputs/outputs
5. Guide artifact creation
### 2. Stage Transitions
After each artifact is completed:
1. Mark the step as complete
2. Check transition conditions
3. If stage is complete, move to next stage
4. Load the appropriate agent
5. Pass relevant artifacts as context
### 3. Artifact Tracking
Track all created artifacts:
```yaml
workflow_state:
current_workflow: greenfield-fullstack
current_stage: planning
current_step: 2
artifacts:
project-brief:
status: completed
created_by: analyst
timestamp: 2024-01-15T10:30:00.000Z
prd:
status: in-progress
created_by: pm
started: 2024-01-15T11:00:00.000Z
```
### 4. Workflow Interruption Handling
When user returns after interruption:
1. Ask if continuing previous workflow
2. Request any completed artifacts
3. Analyze provided artifacts
4. Determine workflow position
5. Suggest next appropriate step
Example:
```text
User: I'm working on a new app. Here's my PRD and architecture doc.
BMad: I see you have a PRD and architecture document. Based on these artifacts,
it looks like you're following the greenfield-fullstack workflow and have completed
stages 1-3. The next recommended step would be:
Stage 4: Validation & Refinement
- Load Sarah (Product Owner) to validate all artifacts
Would you like to continue with this workflow?
```
## Workflow Context Passing
When transitioning between agents, pass:
1. Previous artifacts created
2. Current workflow stage
3. Expected outputs
4. Any decisions or constraints identified
Example transition:
```text
BMad: Great! John has completed the PRD. According to the greenfield-fullstack workflow,
the next step is UX Strategy with Sally.
/ux-expert
Sally: I see we're in the Product Planning stage of the greenfield-fullstack workflow.
I have access to:
- Project Brief from Mary
- PRD from John
Let's create the UX strategy and UI specifications. First, let me review
the PRD to understand the features we're designing for...
```
## Multi-Path Workflows
Some workflows may have multiple paths:
```yaml
conditional_paths:
- condition: project_type == 'mobile'
next_stage: mobile-specific-design
- condition: project_type == 'web'
next_stage: web-architecture
- default: fullstack-architecture
```
Handle these by asking clarifying questions when needed.
## Workflow Best Practices
1. **Always show progress** - Users should know where they are
2. **Explain transitions** - Why moving to next agent
3. **Preserve context** - Pass relevant information forward
4. **Allow flexibility** - Users can skip or modify steps
5. **Track everything** - Maintain complete workflow state
## Integration with Agents
Each agent should be workflow-aware:
- Know which workflow is active
- Understand their role in the workflow
- Access previous artifacts
- Know expected outputs
- Guide toward workflow goals
This creates a seamless experience where the entire team works together toward the workflow's objectives.

View File

@@ -19,21 +19,21 @@ workflow:
notes: "Review existing documentation, codebase structure, and identify integration points. Document current system understanding before proceeding." notes: "Review existing documentation, codebase structure, and identify integration points. Document current system understanding before proceeding."
- agent: pm - agent: pm
creates: brownfield-prd.md creates: prd.md
uses: brownfield-prd-tmpl uses: brownfield-prd-tmpl
requires: existing_project_analysis requires: existing_project_analysis
notes: "Creates comprehensive brownfield PRD with existing system analysis and enhancement planning. SAVE OUTPUT: Copy final brownfield-prd.md to your project's docs/ folder." notes: "Creates comprehensive PRD with existing system analysis and enhancement planning. SAVE OUTPUT: Copy final prd.md to your project's docs/ folder."
- agent: architect - agent: architect
creates: brownfield-architecture.md creates: architecture.md
uses: brownfield-architecture-tmpl uses: brownfield-architecture-tmpl
requires: brownfield-prd.md requires: prd.md
notes: "Creates brownfield architecture with integration strategy and existing system constraints. SAVE OUTPUT: Copy final brownfield-architecture.md to your project's docs/ folder." notes: "Creates architecture with integration strategy and existing system constraints. SAVE OUTPUT: Copy final architecture.md to your project's docs/ folder."
- agent: po - agent: po
validates: all_artifacts validates: all_artifacts
uses: po-master-checklist uses: po-master-checklist
notes: "Validates all brownfield documents for integration safety and completeness. May require updates to any document." notes: "Validates all documents for integration safety and completeness. May require updates to any document."
- agent: various - agent: various
updates: any_flagged_documents updates: any_flagged_documents
@@ -83,8 +83,8 @@ workflow:
```mermaid ```mermaid
graph TD graph TD
A[Start: Brownfield Enhancement] --> B[analyst: analyze existing project] A[Start: Brownfield Enhancement] --> B[analyst: analyze existing project]
B --> C[pm: brownfield-prd.md] B --> C[pm: prd.md]
C --> D[architect: brownfield-architecture.md] C --> D[architect: architecture.md]
D --> E[po: validate with po-master-checklist] D --> E[po: validate with po-master-checklist]
E --> F{PO finds issues?} E --> F{PO finds issues?}
F -->|Yes| G[Return to relevant agent for fixes] F -->|Yes| G[Return to relevant agent for fixes]
@@ -105,8 +105,8 @@ workflow:
- Multiple team members will work on related changes - Multiple team members will work on related changes
handoff_prompts: handoff_prompts:
analyst_to_pm: "Existing project analysis complete. Create comprehensive brownfield PRD with integration strategy." analyst_to_pm: "Existing project analysis complete. Create comprehensive PRD with integration strategy."
pm_to_architect: "Brownfield PRD ready. Save it as docs/brownfield-prd.md, then create the integration architecture." pm_to_architect: "PRD ready. Save it as docs/prd.md, then create the integration architecture."
architect_to_po: "Architecture complete. Save it as docs/brownfield-architecture.md. Please validate all artifacts for integration safety." architect_to_po: "Architecture complete. Save it as docs/architecture.md. Please validate all artifacts for integration safety."
po_issues: "PO found issues with [document]. Please return to [agent] to fix and re-save the updated document." po_issues: "PO found issues with [document]. Please return to [agent] to fix and re-save the updated document."
complete: "All brownfield planning artifacts validated and saved in docs/ folder. Move to IDE environment to begin development." complete: "All planning artifacts validated and saved in docs/ folder. Move to IDE environment to begin development."

View File

@@ -20,21 +20,21 @@ workflow:
notes: "Review existing service documentation, codebase, performance metrics, and identify integration dependencies." notes: "Review existing service documentation, codebase, performance metrics, and identify integration dependencies."
- agent: pm - agent: pm
creates: brownfield-prd.md creates: prd.md
uses: brownfield-prd-tmpl uses: brownfield-prd-tmpl
requires: existing_service_analysis requires: existing_service_analysis
notes: "Creates comprehensive brownfield PRD focused on service enhancement with existing system analysis. SAVE OUTPUT: Copy final brownfield-prd.md to your project's docs/ folder." notes: "Creates comprehensive PRD focused on service enhancement with existing system analysis. SAVE OUTPUT: Copy final prd.md to your project's docs/ folder."
- agent: architect - agent: architect
creates: brownfield-architecture.md creates: architecture.md
uses: brownfield-architecture-tmpl uses: brownfield-architecture-tmpl
requires: brownfield-prd.md requires: prd.md
notes: "Creates brownfield architecture with service integration strategy and API evolution planning. SAVE OUTPUT: Copy final brownfield-architecture.md to your project's docs/ folder." notes: "Creates architecture with service integration strategy and API evolution planning. SAVE OUTPUT: Copy final architecture.md to your project's docs/ folder."
- agent: po - agent: po
validates: all_artifacts validates: all_artifacts
uses: po-master-checklist uses: po-master-checklist
notes: "Validates all brownfield documents for service integration safety and API compatibility. May require updates to any document." notes: "Validates all documents for service integration safety and API compatibility. May require updates to any document."
- agent: various - agent: various
updates: any_flagged_documents updates: any_flagged_documents
@@ -84,8 +84,8 @@ workflow:
```mermaid ```mermaid
graph TD graph TD
A[Start: Service Enhancement] --> B[analyst: analyze existing service] A[Start: Service Enhancement] --> B[analyst: analyze existing service]
B --> C[pm: brownfield-prd.md] B --> C[pm: prd.md]
C --> D[architect: brownfield-architecture.md] C --> D[architect: architecture.md]
D --> E[po: validate with po-master-checklist] D --> E[po: validate with po-master-checklist]
E --> F{PO finds issues?} E --> F{PO finds issues?}
F -->|Yes| G[Return to relevant agent for fixes] F -->|Yes| G[Return to relevant agent for fixes]
@@ -106,8 +106,8 @@ workflow:
- Multiple integration points affected - Multiple integration points affected
handoff_prompts: handoff_prompts:
analyst_to_pm: "Service analysis complete. Create comprehensive brownfield PRD with service integration strategy." analyst_to_pm: "Service analysis complete. Create comprehensive PRD with service integration strategy."
pm_to_architect: "Brownfield PRD ready. Save it as docs/brownfield-prd.md, then create the service architecture." pm_to_architect: "PRD ready. Save it as docs/prd.md, then create the service architecture."
architect_to_po: "Architecture complete. Save it as docs/brownfield-architecture.md. Please validate all artifacts for service integration safety." architect_to_po: "Architecture complete. Save it as docs/architecture.md. Please validate all artifacts for service integration safety."
po_issues: "PO found issues with [document]. Please return to [agent] to fix and re-save the updated document." po_issues: "PO found issues with [document]. Please return to [agent] to fix and re-save the updated document."
complete: "All brownfield planning artifacts validated and saved in docs/ folder. Move to IDE environment to begin development." complete: "All planning artifacts validated and saved in docs/ folder. Move to IDE environment to begin development."

View File

@@ -19,29 +19,29 @@ workflow:
notes: "Review existing frontend application, user feedback, analytics data, and identify improvement areas." notes: "Review existing frontend application, user feedback, analytics data, and identify improvement areas."
- agent: pm - agent: pm
creates: brownfield-prd.md creates: prd.md
uses: brownfield-prd-tmpl uses: brownfield-prd-tmpl
requires: existing_ui_analysis requires: existing_ui_analysis
notes: "Creates comprehensive brownfield PRD focused on UI enhancement with existing system analysis. SAVE OUTPUT: Copy final brownfield-prd.md to your project's docs/ folder." notes: "Creates comprehensive PRD focused on UI enhancement with existing system analysis. SAVE OUTPUT: Copy final prd.md to your project's docs/ folder."
- agent: ux-expert - agent: ux-expert
creates: front-end-spec.md creates: front-end-spec.md
uses: front-end-spec-tmpl uses: front-end-spec-tmpl
requires: brownfield-prd.md requires: prd.md
notes: "Creates UI/UX specification for brownfield enhancement that integrates with existing design patterns. SAVE OUTPUT: Copy final front-end-spec.md to your project's docs/ folder." notes: "Creates UI/UX specification that integrates with existing design patterns. SAVE OUTPUT: Copy final front-end-spec.md to your project's docs/ folder."
- agent: architect - agent: architect
creates: brownfield-architecture.md creates: architecture.md
uses: brownfield-architecture-tmpl uses: brownfield-architecture-tmpl
requires: requires:
- brownfield-prd.md - prd.md
- front-end-spec.md - front-end-spec.md
notes: "Creates brownfield frontend architecture with component integration strategy and migration planning. SAVE OUTPUT: Copy final brownfield-architecture.md to your project's docs/ folder." notes: "Creates frontend architecture with component integration strategy and migration planning. SAVE OUTPUT: Copy final architecture.md to your project's docs/ folder."
- agent: po - agent: po
validates: all_artifacts validates: all_artifacts
uses: po-master-checklist uses: po-master-checklist
notes: "Validates all brownfield documents for UI integration safety and design consistency. May require updates to any document." notes: "Validates all documents for UI integration safety and design consistency. May require updates to any document."
- agent: various - agent: various
updates: any_flagged_documents updates: any_flagged_documents
@@ -91,9 +91,9 @@ workflow:
```mermaid ```mermaid
graph TD graph TD
A[Start: UI Enhancement] --> B[analyst: analyze existing UI] A[Start: UI Enhancement] --> B[analyst: analyze existing UI]
B --> C[pm: brownfield-prd.md] B --> C[pm: prd.md]
C --> D[ux-expert: front-end-spec.md] C --> D[ux-expert: front-end-spec.md]
D --> E[architect: brownfield-architecture.md] D --> E[architect: architecture.md]
E --> F[po: validate with po-master-checklist] E --> F[po: validate with po-master-checklist]
F --> G{PO finds issues?} F --> G{PO finds issues?}
G -->|Yes| H[Return to relevant agent for fixes] G -->|Yes| H[Return to relevant agent for fixes]
@@ -115,9 +115,9 @@ workflow:
- Multiple team members will work on related changes - Multiple team members will work on related changes
handoff_prompts: handoff_prompts:
analyst_to_pm: "UI analysis complete. Create comprehensive brownfield PRD with UI integration strategy." analyst_to_pm: "UI analysis complete. Create comprehensive PRD with UI integration strategy."
pm_to_ux: "Brownfield PRD ready. Save it as docs/brownfield-prd.md, then create the UI/UX specification." pm_to_ux: "PRD ready. Save it as docs/prd.md, then create the UI/UX specification."
ux_to_architect: "UI/UX spec complete. Save it as docs/front-end-spec.md, then create the frontend architecture." ux_to_architect: "UI/UX spec complete. Save it as docs/front-end-spec.md, then create the frontend architecture."
architect_to_po: "Architecture complete. Save it as docs/brownfield-architecture.md. Please validate all artifacts for UI integration safety." architect_to_po: "Architecture complete. Save it as docs/architecture.md. Please validate all artifacts for UI integration safety."
po_issues: "PO found issues with [document]. Please return to [agent] to fix and re-save the updated document." po_issues: "PO found issues with [document]. Please return to [agent] to fix and re-save the updated document."
complete: "All brownfield planning artifacts validated and saved in docs/ folder. Move to IDE environment to begin development." complete: "All planning artifacts validated and saved in docs/ folder. Move to IDE environment to begin development."

View File

@@ -0,0 +1,71 @@
# Create Document from Template Task
## Purpose
Generate documents from templates by EXECUTING (not just reading) embedded instructions from the perspective of the selected agent persona.
## CRITICAL RULES
1. **Templates are PROGRAMS** - Execute every [[LLM:]] instruction exactly as written
2. **NEVER show markup** - Hide all [[LLM:]], {{placeholders}}, @{examples}, and template syntax
3. **STOP and EXECUTE** - When you see "apply tasks#" or "execute tasks#", STOP and run that task immediately
4. **WAIT for user input** - At review points and after elicitation tasks
## Execution Flow
### 1. Identify Template
- Load from `templates#*` or `{root}/templates directory`
- Agent-specific templates are listed in agent's dependencies
- If agent has `templates: [prd-tmpl, architecture-tmpl]`, offer to create "PRD" and "Architecture" documents
### 2. Ask Interaction Mode
> 1. **Incremental** - Section by section with reviews
> 2. **YOLO Mode** - Complete draft then review (user can type `/yolo` anytime to switch)
### 3. Execute Template
- Replace {{placeholders}} with real content
- Execute [[LLM:]] instructions as you encounter them
- Process <<REPEAT>> loops and ^^CONDITIONS^^
- Use @{examples} for guidance but never output them
### 4. Key Execution Patterns
**When you see:** `[[LLM: Draft X and immediately execute tasks#advanced-elicitation]]`
- Draft the content
- Present it to user
- IMMEDIATELY execute the task
- Wait for completion before continuing
**When you see:** `[[LLM: After section completion, apply tasks#Y]]`
- Finish the section
- STOP and execute the task
- Wait for user input
### 5. Validation & Final Presentation
- Run any specified checklists
- Present clean, formatted content only
- No truncation or summarization
- Begin directly with content (no preamble)
- Include any handoff prompts from template
## Common Mistakes to Avoid
❌ Skipping elicitation tasks
❌ Showing template markup to users
❌ Continuing past STOP signals
❌ Combining multiple review points
✅ Execute ALL instructions in sequence
✅ Present only clean, formatted content
✅ Stop at every elicitation point
✅ Wait for user confirmation when instructed
## Remember
Templates contain precise instructions for a reason. Follow them exactly to ensure document quality and completeness.

View File

@@ -2,13 +2,9 @@
This task provides instructions for validating documentation against checklists. The agent MUST follow these instructions to ensure thorough and systematic validation of documents. This task provides instructions for validating documentation against checklists. The agent MUST follow these instructions to ensure thorough and systematic validation of documents.
## Context
The BMAD Method uses various checklists to ensure quality and completeness of different artifacts. Each checklist contains embedded prompts and instructions to guide the LLM through thorough validation and advanced elicitation. The checklists automatically identify their required artifacts and guide the validation process.
## Available Checklists ## Available Checklists
If the user asks or does not specify a specific checklist, list the checklists available to the agent persona. If the task is being run not with a specific agent, tell the user to check the bmad-core/checklists folder to select the appropriate one to run. If the user asks or does not specify a specific checklist, list the checklists available to the agent persona. If the task is being run not with a specific agent, tell the user to check the {root}/checklists folder to select the appropriate one to run.
## Instructions ## Instructions
@@ -17,7 +13,7 @@ If the user asks or does not specify a specific checklist, list the checklists a
- If user or the task being run provides a checklist name: - If user or the task being run provides a checklist name:
- Try fuzzy matching (e.g. "architecture checklist" -> "architect-checklist") - Try fuzzy matching (e.g. "architecture checklist" -> "architect-checklist")
- If multiple matches found, ask user to clarify - If multiple matches found, ask user to clarify
- Load the appropriate checklist from bmad-core/checklists/ - Load the appropriate checklist from {root}/checklists/
- If no checklist specified: - If no checklist specified:
- Ask the user which checklist they want to use - Ask the user which checklist they want to use
- Present the available options from the files in the checklists folder - Present the available options from the files in the checklists folder

View File

@@ -0,0 +1,69 @@
# Workflow Management
Enables BMAD orchestrator to manage and execute team workflows.
## Dynamic Workflow Loading
Read available workflows from current team configuration's `workflows` field. Each team bundle defines its own supported workflows.
**Key Commands**:
- `/workflows` - List workflows in current bundle or workflows folder
- `/agent-list` - Show agents in current bundle
## Workflow Commands
### /workflows
Lists available workflows with titles and descriptions.
### /workflow-start {workflow-id}
Starts workflow and transitions to first agent.
### /workflow-status
Shows current progress, completed artifacts, and next steps.
### /workflow-resume
Resumes workflow from last position. User can provide completed artifacts.
### /workflow-next
Shows next recommended agent and action.
## Execution Flow
1. **Starting**: Load definition → Identify first stage → Transition to agent → Guide artifact creation
2. **Stage Transitions**: Mark complete → Check conditions → Load next agent → Pass artifacts
3. **Artifact Tracking**: Track status, creator, timestamps in workflow_state
4. **Interruption Handling**: Analyze provided artifacts → Determine position → Suggest next step
## Context Passing
When transitioning, pass:
- Previous artifacts
- Current workflow stage
- Expected outputs
- Decisions/constraints
## Multi-Path Workflows
Handle conditional paths by asking clarifying questions when needed.
## Best Practices
1. Show progress
2. Explain transitions
3. Preserve context
4. Allow flexibility
5. Track state
## Agent Integration
Agents should be workflow-aware: know active workflow, their role, access artifacts, understand expected outputs.

View File

@@ -652,76 +652,73 @@ Present these numbered options to the user:
## Purpose ## Purpose
- Generate documents from any specified template following embedded instructions from the perspective of the selected agent persona Generate documents from templates by EXECUTING (not just reading) embedded instructions from the perspective of the selected agent persona.
## Instructions ## CRITICAL RULES
### 1. Identify Template and Context 1. **Templates are PROGRAMS** - Execute every [[LLM:]] instruction exactly as written
2. **NEVER show markup** - Hide all [[LLM:]], {{placeholders}}, @{examples}, and template syntax
3. **STOP and EXECUTE** - When you see "apply tasks#" or "execute tasks#", STOP and run that task immediately
4. **WAIT for user input** - At review points and after elicitation tasks
- Determine which template to use (user-provided or list available for selection to user) ## Execution Flow
- Agent-specific templates are listed in the agent's dependencies under `templates`. For each template listed, consider it a document the agent can create. So if an agent has: ### 1. Identify Template
@{example} - Load from `templates#*` or `{root}/templates directory`
dependencies: - Agent-specific templates are listed in agent's dependencies
templates: - prd-tmpl - architecture-tmpl - If agent has `templates: [prd-tmpl, architecture-tmpl]`, offer to create "PRD" and "Architecture" documents
@{/example}
You would offer to create "PRD" and "Architecture" documents when the user asks what you can help with. ### 2. Ask Interaction Mode
- Gather all relevant inputs, or ask for them, or else rely on user providing necessary details to complete the document > 1. **Incremental** - Section by section with reviews
- Understand the document purpose and target audience > 2. **YOLO Mode** - Complete draft then review (user can type `/yolo` anytime to switch)
### 2. Determine Interaction Mode
Confirm with the user their preferred interaction style:
- **Incremental:** Work through chunks of the document.
- **YOLO Mode:** Draft complete document making reasonable assumptions in one shot. (Can be entered also after starting incremental by just typing /yolo)
### 3. Execute Template ### 3. Execute Template
- Load specified template from `templates#*` or the /templates directory - Replace {{placeholders}} with real content
- Follow ALL embedded LLM instructions within the template - Execute [[LLM:]] instructions as you encounter them
- Process template markup according to `utils#template-format` conventions - Process <<REPEAT>> loops and ^^CONDITIONS^^
### 4. Template Processing Rules
#### CRITICAL: Never display template markup, LLM instructions, or examples to users
- Replace all {{placeholders}} with actual content
- Execute all [[LLM: instructions]] internally
- Process `<<REPEAT>>` sections as needed
- Evaluate ^^CONDITION^^ blocks and include only if applicable
- Use @{examples} for guidance but never output them - Use @{examples} for guidance but never output them
### 5. Content Generation ### 4. Key Execution Patterns
- **Incremental Mode**: Present each major section for review before proceeding **When you see:** `[[LLM: Draft X and immediately execute tasks#advanced-elicitation]]`
- **YOLO Mode**: Generate all sections, then review complete document with user
- Apply any elicitation protocols specified in template
- Incorporate user feedback and iterate as needed
### 6. Validation - Draft the content
- Present it to user
- IMMEDIATELY execute the task
- Wait for completion before continuing
If template specifies a checklist: **When you see:** `[[LLM: After section completion, apply tasks#Y]]`
- Run the appropriate checklist against completed document - Finish the section
- Document completion status for each item - STOP and execute the task
- Address any deficiencies found - Wait for user input
- Present validation summary to user
### 7. Final Presentation ### 5. Validation & Final Presentation
- Run any specified checklists
- Present clean, formatted content only - Present clean, formatted content only
- Ensure all sections are complete - No truncation or summarization
- DO NOT truncate or summarize content - Begin directly with content (no preamble)
- Begin directly with document content (no preamble) - Include any handoff prompts from template
- Include any handoff prompts specified in template
## Important Notes ## Common Mistakes to Avoid
- Template markup is for AI processing only - never expose to users ❌ Skipping elicitation tasks
❌ Showing template markup to users
❌ Continuing past STOP signals
❌ Combining multiple review points
✅ Execute ALL instructions in sequence
✅ Present only clean, formatted content
✅ Stop at every elicitation point
✅ Wait for user confirmation when instructed
## Remember
Templates contain precise instructions for a reason. Follow them exactly to ensure document quality and completeness.
==================== END: tasks#create-doc ==================== ==================== END: tasks#create-doc ====================
==================== START: tasks#advanced-elicitation ==================== ==================== START: tasks#advanced-elicitation ====================
@@ -2013,7 +2010,7 @@ BMAD transforms you into a "Vibe CEO" - directing a team of specialized AI agent
5. Type `/help` to see available commands 5. Type `/help` to see available commands
#### Option 2: IDE Integration #### Option 2: IDE Integration
**Best for**: Cursor, Claude Code, Windsurf, Cline, Roo Code users **Best for**: Cursor, Claude Code, Windsurf, Cline, Roo Code, VS Code Copilot users
```bash ```bash
# Interactive installation (recommended) # Interactive installation (recommended)
@@ -2654,7 +2651,7 @@ Expansion packs extend BMAD-METHOD beyond traditional software development into
### Using Expansion Packs ### Using Expansion Packs
1. **Browse Available Packs**: Check `expansion-packs/` directory 1. **Browse Available Packs**: Check `expansion-packs/` directory
2. **Get Inspiration**: See `docs/expansion-pack-ideas.md` for detailed examples 2. **Get Inspiration**: See `docs/expansion-packs.md` for detailed examples and ideas
3. **Install via CLI**: 3. **Install via CLI**:
```bash ```bash
npx bmad-method install npx bmad-method install

View File

@@ -107,76 +107,73 @@ dependencies:
## Purpose ## Purpose
- Generate documents from any specified template following embedded instructions from the perspective of the selected agent persona Generate documents from templates by EXECUTING (not just reading) embedded instructions from the perspective of the selected agent persona.
## Instructions ## CRITICAL RULES
### 1. Identify Template and Context 1. **Templates are PROGRAMS** - Execute every [[LLM:]] instruction exactly as written
2. **NEVER show markup** - Hide all [[LLM:]], {{placeholders}}, @{examples}, and template syntax
3. **STOP and EXECUTE** - When you see "apply tasks#" or "execute tasks#", STOP and run that task immediately
4. **WAIT for user input** - At review points and after elicitation tasks
- Determine which template to use (user-provided or list available for selection to user) ## Execution Flow
- Agent-specific templates are listed in the agent's dependencies under `templates`. For each template listed, consider it a document the agent can create. So if an agent has: ### 1. Identify Template
@{example} - Load from `templates#*` or `{root}/templates directory`
dependencies: - Agent-specific templates are listed in agent's dependencies
templates: - prd-tmpl - architecture-tmpl - If agent has `templates: [prd-tmpl, architecture-tmpl]`, offer to create "PRD" and "Architecture" documents
@{/example}
You would offer to create "PRD" and "Architecture" documents when the user asks what you can help with. ### 2. Ask Interaction Mode
- Gather all relevant inputs, or ask for them, or else rely on user providing necessary details to complete the document > 1. **Incremental** - Section by section with reviews
- Understand the document purpose and target audience > 2. **YOLO Mode** - Complete draft then review (user can type `/yolo` anytime to switch)
### 2. Determine Interaction Mode
Confirm with the user their preferred interaction style:
- **Incremental:** Work through chunks of the document.
- **YOLO Mode:** Draft complete document making reasonable assumptions in one shot. (Can be entered also after starting incremental by just typing /yolo)
### 3. Execute Template ### 3. Execute Template
- Load specified template from `templates#*` or the /templates directory - Replace {{placeholders}} with real content
- Follow ALL embedded LLM instructions within the template - Execute [[LLM:]] instructions as you encounter them
- Process template markup according to `utils#template-format` conventions - Process <<REPEAT>> loops and ^^CONDITIONS^^
### 4. Template Processing Rules
#### CRITICAL: Never display template markup, LLM instructions, or examples to users
- Replace all {{placeholders}} with actual content
- Execute all [[LLM: instructions]] internally
- Process `<<REPEAT>>` sections as needed
- Evaluate ^^CONDITION^^ blocks and include only if applicable
- Use @{examples} for guidance but never output them - Use @{examples} for guidance but never output them
### 5. Content Generation ### 4. Key Execution Patterns
- **Incremental Mode**: Present each major section for review before proceeding **When you see:** `[[LLM: Draft X and immediately execute tasks#advanced-elicitation]]`
- **YOLO Mode**: Generate all sections, then review complete document with user
- Apply any elicitation protocols specified in template
- Incorporate user feedback and iterate as needed
### 6. Validation - Draft the content
- Present it to user
- IMMEDIATELY execute the task
- Wait for completion before continuing
If template specifies a checklist: **When you see:** `[[LLM: After section completion, apply tasks#Y]]`
- Run the appropriate checklist against completed document - Finish the section
- Document completion status for each item - STOP and execute the task
- Address any deficiencies found - Wait for user input
- Present validation summary to user
### 7. Final Presentation ### 5. Validation & Final Presentation
- Run any specified checklists
- Present clean, formatted content only - Present clean, formatted content only
- Ensure all sections are complete - No truncation or summarization
- DO NOT truncate or summarize content - Begin directly with content (no preamble)
- Begin directly with document content (no preamble) - Include any handoff prompts from template
- Include any handoff prompts specified in template
## Important Notes ## Common Mistakes to Avoid
- Template markup is for AI processing only - never expose to users ❌ Skipping elicitation tasks
❌ Showing template markup to users
❌ Continuing past STOP signals
❌ Combining multiple review points
✅ Execute ALL instructions in sequence
✅ Present only clean, formatted content
✅ Stop at every elicitation point
✅ Wait for user confirmation when instructed
## Remember
Templates contain precise instructions for a reason. Follow them exactly to ensure document quality and completeness.
==================== END: tasks#create-doc ==================== ==================== END: tasks#create-doc ====================
==================== START: tasks#create-deep-research-prompt ==================== ==================== START: tasks#create-deep-research-prompt ====================
@@ -808,13 +805,9 @@ Apply the advanced elicitation task after major sections to refine based on user
This task provides instructions for validating documentation against checklists. The agent MUST follow these instructions to ensure thorough and systematic validation of documents. This task provides instructions for validating documentation against checklists. The agent MUST follow these instructions to ensure thorough and systematic validation of documents.
## Context
The BMAD Method uses various checklists to ensure quality and completeness of different artifacts. Each checklist contains embedded prompts and instructions to guide the LLM through thorough validation and advanced elicitation. The checklists automatically identify their required artifacts and guide the validation process.
## Available Checklists ## Available Checklists
If the user asks or does not specify a specific checklist, list the checklists available to the agent persona. If the task is being run not with a specific agent, tell the user to check the bmad-core/checklists folder to select the appropriate one to run. If the user asks or does not specify a specific checklist, list the checklists available to the agent persona. If the task is being run not with a specific agent, tell the user to check the {root}/checklists folder to select the appropriate one to run.
## Instructions ## Instructions
@@ -823,7 +816,7 @@ If the user asks or does not specify a specific checklist, list the checklists a
- If user or the task being run provides a checklist name: - If user or the task being run provides a checklist name:
- Try fuzzy matching (e.g. "architecture checklist" -> "architect-checklist") - Try fuzzy matching (e.g. "architecture checklist" -> "architect-checklist")
- If multiple matches found, ask user to clarify - If multiple matches found, ask user to clarify
- Load the appropriate checklist from bmad-core/checklists/ - Load the appropriate checklist from {root}/checklists/
- If no checklist specified: - If no checklist specified:
- Ask the user which checklist they want to use - Ask the user which checklist they want to use
- Present the available options from the files in the checklists folder - Present the available options from the files in the checklists folder

View File

@@ -788,83 +788,6 @@ The story creation is successful when:
- Stories should take no more than 4 hours of focused development work - Stories should take no more than 4 hours of focused development work
==================== END: tasks#brownfield-create-story ==================== ==================== END: tasks#brownfield-create-story ====================
==================== START: tasks#core-dump ====================
# Core Dump Task
## Purpose
To create a concise memory recording file (`.ai/core-dump-n.md`) that captures the essential context of the current agent session, enabling seamless continuation of work in future agent sessions. This task ensures persistent context across agent conversations while maintaining minimal token usage for efficient context loading.
## Inputs for this Task
- Current session conversation history and accomplishments
- Files created, modified, or deleted during the session
- Key decisions made and procedures followed
- Current project state and next logical steps
- User requests and agent responses that shaped the session
## Task Execution Instructions
### 0. Check Existing Core Dump
Before proceeding, check if `.ai/core-dump.md` already exists:
- If file exists, ask user: "Core dump file exists. Should I: 1. Overwrite, 2. Update, 3. Append or 4. Create new?"
- **Overwrite**: Replace entire file with new content
- **Update**: Merge new session info with existing content, updating relevant sections
- **Append**: Add new session as a separate entry while preserving existing content
- **Create New**: Create a new file, appending the next possible -# to the file, such as core-dump-3.md if 1 and 2 already exist.
- If file doesn't exist, proceed with creation of `core-dump-1.md`
### 1. Analyze Session Context
- Review the entire conversation to identify key accomplishments
- Note any specific tasks, procedures, or workflows that were executed
- Identify important decisions made or problems solved
- Capture the user's working style and preferences observed during the session
### 2. Document What Was Accomplished
- **Primary Actions**: List the main tasks completed concisely
- **Story Progress**: For story work, use format "Tasks Complete: 1-6, 8. Next Task Pending: 7, 9"
- **Problem Solving**: Document any challenges encountered and how they were resolved
- **User Communications**: Summarize key user requests, preferences, and discussion points
### 3. Record File System Changes (Concise Format)
- **Files Created**: `filename.ext` (brief purpose/size)
- **Files Modified**: `filename.ext` (what changed)
- **Files Deleted**: `filename.ext` (why removed)
- Focus on essential details, avoid verbose descriptions
### 4. Capture Current Project State
- **Project Progress**: Where the project stands after this session
- **Current Issues**: Any blockers or problems that need resolution
- **Next Logical Steps**: What would be the natural next actions to take
### 5. Create/Update Core Dump File
Based on user's choice from step 0, handle the file accordingly:
### 6. Optimize for Minimal Context
- Keep descriptions concise but informative
- Use abbreviated formats where possible (file sizes, task numbers)
- Focus on actionable information rather than detailed explanations
- Avoid redundant information that can be found in project documentation
- Prioritize information that would be lost without this recording
- Ensure the file can be quickly scanned and understood
### 7. Validate Completeness
- Verify all significant session activities are captured
- Ensure a future agent could understand the current state
- Check that file changes are accurately recorded
- Confirm next steps are clear and actionable
- Verify user communication style and preferences are noted
==================== END: tasks#core-dump ====================
==================== START: tasks#correct-course ==================== ==================== START: tasks#correct-course ====================
# Correct Course Task # Correct Course Task
@@ -1250,76 +1173,73 @@ Present these numbered options to the user:
## Purpose ## Purpose
- Generate documents from any specified template following embedded instructions from the perspective of the selected agent persona Generate documents from templates by EXECUTING (not just reading) embedded instructions from the perspective of the selected agent persona.
## Instructions ## CRITICAL RULES
### 1. Identify Template and Context 1. **Templates are PROGRAMS** - Execute every [[LLM:]] instruction exactly as written
2. **NEVER show markup** - Hide all [[LLM:]], {{placeholders}}, @{examples}, and template syntax
3. **STOP and EXECUTE** - When you see "apply tasks#" or "execute tasks#", STOP and run that task immediately
4. **WAIT for user input** - At review points and after elicitation tasks
- Determine which template to use (user-provided or list available for selection to user) ## Execution Flow
- Agent-specific templates are listed in the agent's dependencies under `templates`. For each template listed, consider it a document the agent can create. So if an agent has: ### 1. Identify Template
@{example} - Load from `templates#*` or `{root}/templates directory`
dependencies: - Agent-specific templates are listed in agent's dependencies
templates: - prd-tmpl - architecture-tmpl - If agent has `templates: [prd-tmpl, architecture-tmpl]`, offer to create "PRD" and "Architecture" documents
@{/example}
You would offer to create "PRD" and "Architecture" documents when the user asks what you can help with. ### 2. Ask Interaction Mode
- Gather all relevant inputs, or ask for them, or else rely on user providing necessary details to complete the document > 1. **Incremental** - Section by section with reviews
- Understand the document purpose and target audience > 2. **YOLO Mode** - Complete draft then review (user can type `/yolo` anytime to switch)
### 2. Determine Interaction Mode
Confirm with the user their preferred interaction style:
- **Incremental:** Work through chunks of the document.
- **YOLO Mode:** Draft complete document making reasonable assumptions in one shot. (Can be entered also after starting incremental by just typing /yolo)
### 3. Execute Template ### 3. Execute Template
- Load specified template from `templates#*` or the /templates directory - Replace {{placeholders}} with real content
- Follow ALL embedded LLM instructions within the template - Execute [[LLM:]] instructions as you encounter them
- Process template markup according to `utils#template-format` conventions - Process <<REPEAT>> loops and ^^CONDITIONS^^
### 4. Template Processing Rules
#### CRITICAL: Never display template markup, LLM instructions, or examples to users
- Replace all {{placeholders}} with actual content
- Execute all [[LLM: instructions]] internally
- Process `<<REPEAT>>` sections as needed
- Evaluate ^^CONDITION^^ blocks and include only if applicable
- Use @{examples} for guidance but never output them - Use @{examples} for guidance but never output them
### 5. Content Generation ### 4. Key Execution Patterns
- **Incremental Mode**: Present each major section for review before proceeding **When you see:** `[[LLM: Draft X and immediately execute tasks#advanced-elicitation]]`
- **YOLO Mode**: Generate all sections, then review complete document with user
- Apply any elicitation protocols specified in template
- Incorporate user feedback and iterate as needed
### 6. Validation - Draft the content
- Present it to user
- IMMEDIATELY execute the task
- Wait for completion before continuing
If template specifies a checklist: **When you see:** `[[LLM: After section completion, apply tasks#Y]]`
- Run the appropriate checklist against completed document - Finish the section
- Document completion status for each item - STOP and execute the task
- Address any deficiencies found - Wait for user input
- Present validation summary to user
### 7. Final Presentation ### 5. Validation & Final Presentation
- Run any specified checklists
- Present clean, formatted content only - Present clean, formatted content only
- Ensure all sections are complete - No truncation or summarization
- DO NOT truncate or summarize content - Begin directly with content (no preamble)
- Begin directly with document content (no preamble) - Include any handoff prompts from template
- Include any handoff prompts specified in template
## Important Notes ## Common Mistakes to Avoid
- Template markup is for AI processing only - never expose to users ❌ Skipping elicitation tasks
❌ Showing template markup to users
❌ Continuing past STOP signals
❌ Combining multiple review points
✅ Execute ALL instructions in sequence
✅ Present only clean, formatted content
✅ Stop at every elicitation point
✅ Wait for user confirmation when instructed
## Remember
Templates contain precise instructions for a reason. Follow them exactly to ensure document quality and completeness.
==================== END: tasks#create-doc ==================== ==================== END: tasks#create-doc ====================
==================== START: tasks#document-project ==================== ==================== START: tasks#document-project ====================
@@ -1902,13 +1822,9 @@ Provide a summary to the user including:
This task provides instructions for validating documentation against checklists. The agent MUST follow these instructions to ensure thorough and systematic validation of documents. This task provides instructions for validating documentation against checklists. The agent MUST follow these instructions to ensure thorough and systematic validation of documents.
## Context
The BMAD Method uses various checklists to ensure quality and completeness of different artifacts. Each checklist contains embedded prompts and instructions to guide the LLM through thorough validation and advanced elicitation. The checklists automatically identify their required artifacts and guide the validation process.
## Available Checklists ## Available Checklists
If the user asks or does not specify a specific checklist, list the checklists available to the agent persona. If the task is being run not with a specific agent, tell the user to check the bmad-core/checklists folder to select the appropriate one to run. If the user asks or does not specify a specific checklist, list the checklists available to the agent persona. If the task is being run not with a specific agent, tell the user to check the {root}/checklists folder to select the appropriate one to run.
## Instructions ## Instructions
@@ -1917,7 +1833,7 @@ If the user asks or does not specify a specific checklist, list the checklists a
- If user or the task being run provides a checklist name: - If user or the task being run provides a checklist name:
- Try fuzzy matching (e.g. "architecture checklist" -> "architect-checklist") - Try fuzzy matching (e.g. "architecture checklist" -> "architect-checklist")
- If multiple matches found, ask user to clarify - If multiple matches found, ask user to clarify
- Load the appropriate checklist from bmad-core/checklists/ - Load the appropriate checklist from {root}/checklists/
- If no checklist specified: - If no checklist specified:
- Ask the user which checklist they want to use - Ask the user which checklist they want to use
- Present the available options from the files in the checklists folder - Present the available options from the files in the checklists folder
@@ -8480,7 +8396,7 @@ BMAD transforms you into a "Vibe CEO" - directing a team of specialized AI agent
5. Type `/help` to see available commands 5. Type `/help` to see available commands
#### Option 2: IDE Integration #### Option 2: IDE Integration
**Best for**: Cursor, Claude Code, Windsurf, Cline, Roo Code users **Best for**: Cursor, Claude Code, Windsurf, Cline, Roo Code, VS Code Copilot users
```bash ```bash
# Interactive installation (recommended) # Interactive installation (recommended)
@@ -9121,7 +9037,7 @@ Expansion packs extend BMAD-METHOD beyond traditional software development into
### Using Expansion Packs ### Using Expansion Packs
1. **Browse Available Packs**: Check `expansion-packs/` directory 1. **Browse Available Packs**: Check `expansion-packs/` directory
2. **Get Inspiration**: See `docs/expansion-pack-ideas.md` for detailed examples 2. **Get Inspiration**: See `docs/expansion-packs.md` for detailed examples and ideas
3. **Install via CLI**: 3. **Install via CLI**:
```bash ```bash
npx bmad-method install npx bmad-method install
@@ -9187,225 +9103,71 @@ Templates in the BMAD method use standardized markup for AI processing. These co
==================== START: utils#workflow-management ==================== ==================== START: utils#workflow-management ====================
# Workflow Management # Workflow Management
This utility enables the BMAD orchestrator to manage and execute team workflows. Enables BMAD orchestrator to manage and execute team workflows.
## Important: Dynamic Workflow Loading ## Dynamic Workflow Loading
The BMAD orchestrator MUST read the available workflows from the current team configuration's `workflows` field. Do not use hardcoded workflow lists. Each team bundle defines its own set of supported workflows based on the agents it includes. Read available workflows from current team configuration's `workflows` field. Each team bundle defines its own supported workflows.
**Critical Distinction**: **Key Commands**:
- When asked "what workflows are available?", show ONLY the workflows defined in the current team bundle's configuration - `/workflows` - List workflows in current bundle or workflows folder
- Use `/agent-list` to show agents in the current bundle - `/agent-list` - Show agents in current bundle
- Use `/workflows` to show workflows in the current bundle, NOT any creation tasks
### Workflow Descriptions
When displaying workflows, use these descriptions based on the workflow ID:
- **greenfield-fullstack**: Build a new full-stack application from concept to development
- **brownfield-fullstack**: Enhance an existing full-stack application with new features
- **greenfield-service**: Build a new backend service or API from concept to development
- **brownfield-service**: Enhance an existing backend service or API
- **greenfield-ui**: Build a new frontend/UI application from concept to development
- **brownfield-ui**: Enhance an existing frontend/UI application
## Workflow Commands ## Workflow Commands
### /workflows ### /workflows
Lists all available workflows for the current team. The available workflows are determined by the team configuration and may include workflows such as: Lists available workflows with titles and descriptions.
- greenfield-fullstack
- brownfield-fullstack
- greenfield-service
- brownfield-service
- greenfield-ui
- brownfield-ui
The actual list depends on which team bundle is loaded. When responding to this command, display the workflows that are configured in the current team's `workflows` field.
Example response format:
```text
Available workflows for [Team Name]:
1. [workflow-id] - [Brief description based on workflow type]
2. [workflow-id] - [Brief description based on workflow type]
[... etc. ...]
Use /workflow-start {number or id} to begin a workflow.
```
### /workflow-start {workflow-id} ### /workflow-start {workflow-id}
Starts a specific workflow and transitions to the first agent. Starts workflow and transitions to first agent.
Example: `/workflow-start greenfield-fullstack`
### /workflow-status ### /workflow-status
Shows current workflow progress, completed artifacts, and next steps. Shows current progress, completed artifacts, and next steps.
Example response:
```text
Current Workflow: Greenfield Full-Stack Development
Stage: Product Planning (2 of 6)
Completed:
✓ Discovery & Requirements
- project-brief (completed by Mary)
In Progress:
⚡ Product Planning
- Create PRD (John) - awaiting input
Next: Technical Architecture
```
### /workflow-resume ### /workflow-resume
Resumes a workflow from where it left off, useful when starting a new chat. Resumes workflow from last position. User can provide completed artifacts.
User can provide completed artifacts:
```text
User: /workflow-resume greenfield-fullstack
I have completed: project-brief, PRD
BMad: I see you've completed Discovery and part of Product Planning.
Based on the greenfield-fullstack workflow, the next step is:
- UX Strategy with Sally (ux-expert)
Would you like me to load Sally to continue?
```
### /workflow-next ### /workflow-next
Shows the next recommended agent and action in the current workflow. Shows next recommended agent and action.
## Workflow Execution Flow ## Execution Flow
### 1. Starting a Workflow 1. **Starting**: Load definition → Identify first stage → Transition to agent → Guide artifact creation
When a workflow is started: 2. **Stage Transitions**: Mark complete → Check conditions → Load next agent → Pass artifacts
1. Load the workflow definition 3. **Artifact Tracking**: Track status, creator, timestamps in workflow_state
2. Identify the first stage and step
3. Transition to the required agent
4. Provide context about expected inputs/outputs
5. Guide artifact creation
### 2. Stage Transitions 4. **Interruption Handling**: Analyze provided artifacts → Determine position → Suggest next step
After each artifact is completed: ## Context Passing
1. Mark the step as complete When transitioning, pass:
2. Check transition conditions
3. If stage is complete, move to next stage
4. Load the appropriate agent
5. Pass relevant artifacts as context
### 3. Artifact Tracking - Previous artifacts
- Current workflow stage
Track all created artifacts: - Expected outputs
- Decisions/constraints
```yaml
workflow_state:
current_workflow: greenfield-fullstack
current_stage: planning
current_step: 2
artifacts:
project-brief:
status: completed
created_by: analyst
timestamp: 2024-01-15T10:30:00.000Z
prd:
status: in-progress
created_by: pm
started: 2024-01-15T11:00:00.000Z
```
### 4. Workflow Interruption Handling
When user returns after interruption:
1. Ask if continuing previous workflow
2. Request any completed artifacts
3. Analyze provided artifacts
4. Determine workflow position
5. Suggest next appropriate step
Example:
```text
User: I'm working on a new app. Here's my PRD and architecture doc.
BMad: I see you have a PRD and architecture document. Based on these artifacts,
it looks like you're following the greenfield-fullstack workflow and have completed
stages 1-3. The next recommended step would be:
Stage 4: Validation & Refinement
- Load Sarah (Product Owner) to validate all artifacts
Would you like to continue with this workflow?
```
## Workflow Context Passing
When transitioning between agents, pass:
1. Previous artifacts created
2. Current workflow stage
3. Expected outputs
4. Any decisions or constraints identified
Example transition:
```text
BMad: Great! John has completed the PRD. According to the greenfield-fullstack workflow,
the next step is UX Strategy with Sally.
/ux-expert
Sally: I see we're in the Product Planning stage of the greenfield-fullstack workflow.
I have access to:
- Project Brief from Mary
- PRD from John
Let's create the UX strategy and UI specifications. First, let me review
the PRD to understand the features we're designing for...
```
## Multi-Path Workflows ## Multi-Path Workflows
Some workflows may have multiple paths: Handle conditional paths by asking clarifying questions when needed.
```yaml ## Best Practices
conditional_paths:
- condition: project_type == 'mobile'
next_stage: mobile-specific-design
- condition: project_type == 'web'
next_stage: web-architecture
- default: fullstack-architecture
```
Handle these by asking clarifying questions when needed. 1. Show progress
2. Explain transitions
3. Preserve context
4. Allow flexibility
5. Track state
## Workflow Best Practices ## Agent Integration
1. **Always show progress** - Users should know where they are Agents should be workflow-aware: know active workflow, their role, access artifacts, understand expected outputs.
2. **Explain transitions** - Why moving to next agent
3. **Preserve context** - Pass relevant information forward
4. **Allow flexibility** - Users can skip or modify steps
5. **Track everything** - Maintain complete workflow state
## Integration with Agents
Each agent should be workflow-aware:
- Know which workflow is active
- Understand their role in the workflow
- Access previous artifacts
- Know expected outputs
- Guide toward workflow goals
This creates a seamless experience where the entire team works together toward the workflow's objectives.
==================== END: utils#workflow-management ==================== ==================== END: utils#workflow-management ====================

View File

@@ -263,76 +263,73 @@ Choose an action (0-9 - 9 to bypass - HELP for explanation of these options):
## Purpose ## Purpose
- Generate documents from any specified template following embedded instructions from the perspective of the selected agent persona Generate documents from templates by EXECUTING (not just reading) embedded instructions from the perspective of the selected agent persona.
## Instructions ## CRITICAL RULES
### 1. Identify Template and Context 1. **Templates are PROGRAMS** - Execute every [[LLM:]] instruction exactly as written
2. **NEVER show markup** - Hide all [[LLM:]], {{placeholders}}, @{examples}, and template syntax
3. **STOP and EXECUTE** - When you see "apply tasks#" or "execute tasks#", STOP and run that task immediately
4. **WAIT for user input** - At review points and after elicitation tasks
- Determine which template to use (user-provided or list available for selection to user) ## Execution Flow
- Agent-specific templates are listed in the agent's dependencies under `templates`. For each template listed, consider it a document the agent can create. So if an agent has: ### 1. Identify Template
@{example} - Load from `templates#*` or `{root}/templates directory`
dependencies: - Agent-specific templates are listed in agent's dependencies
templates: - prd-tmpl - architecture-tmpl - If agent has `templates: [prd-tmpl, architecture-tmpl]`, offer to create "PRD" and "Architecture" documents
@{/example}
You would offer to create "PRD" and "Architecture" documents when the user asks what you can help with. ### 2. Ask Interaction Mode
- Gather all relevant inputs, or ask for them, or else rely on user providing necessary details to complete the document > 1. **Incremental** - Section by section with reviews
- Understand the document purpose and target audience > 2. **YOLO Mode** - Complete draft then review (user can type `/yolo` anytime to switch)
### 2. Determine Interaction Mode
Confirm with the user their preferred interaction style:
- **Incremental:** Work through chunks of the document.
- **YOLO Mode:** Draft complete document making reasonable assumptions in one shot. (Can be entered also after starting incremental by just typing /yolo)
### 3. Execute Template ### 3. Execute Template
- Load specified template from `templates#*` or the /templates directory - Replace {{placeholders}} with real content
- Follow ALL embedded LLM instructions within the template - Execute [[LLM:]] instructions as you encounter them
- Process template markup according to `utils#template-format` conventions - Process <<REPEAT>> loops and ^^CONDITIONS^^
### 4. Template Processing Rules
#### CRITICAL: Never display template markup, LLM instructions, or examples to users
- Replace all {{placeholders}} with actual content
- Execute all [[LLM: instructions]] internally
- Process `<<REPEAT>>` sections as needed
- Evaluate ^^CONDITION^^ blocks and include only if applicable
- Use @{examples} for guidance but never output them - Use @{examples} for guidance but never output them
### 5. Content Generation ### 4. Key Execution Patterns
- **Incremental Mode**: Present each major section for review before proceeding **When you see:** `[[LLM: Draft X and immediately execute tasks#advanced-elicitation]]`
- **YOLO Mode**: Generate all sections, then review complete document with user
- Apply any elicitation protocols specified in template
- Incorporate user feedback and iterate as needed
### 6. Validation - Draft the content
- Present it to user
- IMMEDIATELY execute the task
- Wait for completion before continuing
If template specifies a checklist: **When you see:** `[[LLM: After section completion, apply tasks#Y]]`
- Run the appropriate checklist against completed document - Finish the section
- Document completion status for each item - STOP and execute the task
- Address any deficiencies found - Wait for user input
- Present validation summary to user
### 7. Final Presentation ### 5. Validation & Final Presentation
- Run any specified checklists
- Present clean, formatted content only - Present clean, formatted content only
- Ensure all sections are complete - No truncation or summarization
- DO NOT truncate or summarize content - Begin directly with content (no preamble)
- Begin directly with document content (no preamble) - Include any handoff prompts from template
- Include any handoff prompts specified in template
## Important Notes ## Common Mistakes to Avoid
- Template markup is for AI processing only - never expose to users ❌ Skipping elicitation tasks
❌ Showing template markup to users
❌ Continuing past STOP signals
❌ Combining multiple review points
✅ Execute ALL instructions in sequence
✅ Present only clean, formatted content
✅ Stop at every elicitation point
✅ Wait for user confirmation when instructed
## Remember
Templates contain precise instructions for a reason. Follow them exactly to ensure document quality and completeness.
==================== END: tasks#create-doc ==================== ==================== END: tasks#create-doc ====================
==================== START: tasks#kb-mode-interaction ==================== ==================== START: tasks#kb-mode-interaction ====================
@@ -489,7 +486,7 @@ BMAD transforms you into a "Vibe CEO" - directing a team of specialized AI agent
5. Type `/help` to see available commands 5. Type `/help` to see available commands
#### Option 2: IDE Integration #### Option 2: IDE Integration
**Best for**: Cursor, Claude Code, Windsurf, Cline, Roo Code users **Best for**: Cursor, Claude Code, Windsurf, Cline, Roo Code, VS Code Copilot users
```bash ```bash
# Interactive installation (recommended) # Interactive installation (recommended)
@@ -1130,7 +1127,7 @@ Expansion packs extend BMAD-METHOD beyond traditional software development into
### Using Expansion Packs ### Using Expansion Packs
1. **Browse Available Packs**: Check `expansion-packs/` directory 1. **Browse Available Packs**: Check `expansion-packs/` directory
2. **Get Inspiration**: See `docs/expansion-pack-ideas.md` for detailed examples 2. **Get Inspiration**: See `docs/expansion-packs.md` for detailed examples and ideas
3. **Install via CLI**: 3. **Install via CLI**:
```bash ```bash
npx bmad-method install npx bmad-method install
@@ -1161,227 +1158,73 @@ Use the **expansion-creator** pack to build your own:
==================== START: utils#workflow-management ==================== ==================== START: utils#workflow-management ====================
# Workflow Management # Workflow Management
This utility enables the BMAD orchestrator to manage and execute team workflows. Enables BMAD orchestrator to manage and execute team workflows.
## Important: Dynamic Workflow Loading ## Dynamic Workflow Loading
The BMAD orchestrator MUST read the available workflows from the current team configuration's `workflows` field. Do not use hardcoded workflow lists. Each team bundle defines its own set of supported workflows based on the agents it includes. Read available workflows from current team configuration's `workflows` field. Each team bundle defines its own supported workflows.
**Critical Distinction**: **Key Commands**:
- When asked "what workflows are available?", show ONLY the workflows defined in the current team bundle's configuration - `/workflows` - List workflows in current bundle or workflows folder
- Use `/agent-list` to show agents in the current bundle - `/agent-list` - Show agents in current bundle
- Use `/workflows` to show workflows in the current bundle, NOT any creation tasks
### Workflow Descriptions
When displaying workflows, use these descriptions based on the workflow ID:
- **greenfield-fullstack**: Build a new full-stack application from concept to development
- **brownfield-fullstack**: Enhance an existing full-stack application with new features
- **greenfield-service**: Build a new backend service or API from concept to development
- **brownfield-service**: Enhance an existing backend service or API
- **greenfield-ui**: Build a new frontend/UI application from concept to development
- **brownfield-ui**: Enhance an existing frontend/UI application
## Workflow Commands ## Workflow Commands
### /workflows ### /workflows
Lists all available workflows for the current team. The available workflows are determined by the team configuration and may include workflows such as: Lists available workflows with titles and descriptions.
- greenfield-fullstack
- brownfield-fullstack
- greenfield-service
- brownfield-service
- greenfield-ui
- brownfield-ui
The actual list depends on which team bundle is loaded. When responding to this command, display the workflows that are configured in the current team's `workflows` field.
Example response format:
```text
Available workflows for [Team Name]:
1. [workflow-id] - [Brief description based on workflow type]
2. [workflow-id] - [Brief description based on workflow type]
[... etc. ...]
Use /workflow-start {number or id} to begin a workflow.
```
### /workflow-start {workflow-id} ### /workflow-start {workflow-id}
Starts a specific workflow and transitions to the first agent. Starts workflow and transitions to first agent.
Example: `/workflow-start greenfield-fullstack`
### /workflow-status ### /workflow-status
Shows current workflow progress, completed artifacts, and next steps. Shows current progress, completed artifacts, and next steps.
Example response:
```text
Current Workflow: Greenfield Full-Stack Development
Stage: Product Planning (2 of 6)
Completed:
✓ Discovery & Requirements
- project-brief (completed by Mary)
In Progress:
⚡ Product Planning
- Create PRD (John) - awaiting input
Next: Technical Architecture
```
### /workflow-resume ### /workflow-resume
Resumes a workflow from where it left off, useful when starting a new chat. Resumes workflow from last position. User can provide completed artifacts.
User can provide completed artifacts:
```text
User: /workflow-resume greenfield-fullstack
I have completed: project-brief, PRD
BMad: I see you've completed Discovery and part of Product Planning.
Based on the greenfield-fullstack workflow, the next step is:
- UX Strategy with Sally (ux-expert)
Would you like me to load Sally to continue?
```
### /workflow-next ### /workflow-next
Shows the next recommended agent and action in the current workflow. Shows next recommended agent and action.
## Workflow Execution Flow ## Execution Flow
### 1. Starting a Workflow 1. **Starting**: Load definition → Identify first stage → Transition to agent → Guide artifact creation
When a workflow is started: 2. **Stage Transitions**: Mark complete → Check conditions → Load next agent → Pass artifacts
1. Load the workflow definition 3. **Artifact Tracking**: Track status, creator, timestamps in workflow_state
2. Identify the first stage and step
3. Transition to the required agent
4. Provide context about expected inputs/outputs
5. Guide artifact creation
### 2. Stage Transitions 4. **Interruption Handling**: Analyze provided artifacts → Determine position → Suggest next step
After each artifact is completed: ## Context Passing
1. Mark the step as complete When transitioning, pass:
2. Check transition conditions
3. If stage is complete, move to next stage
4. Load the appropriate agent
5. Pass relevant artifacts as context
### 3. Artifact Tracking - Previous artifacts
- Current workflow stage
Track all created artifacts: - Expected outputs
- Decisions/constraints
```yaml
workflow_state:
current_workflow: greenfield-fullstack
current_stage: planning
current_step: 2
artifacts:
project-brief:
status: completed
created_by: analyst
timestamp: 2024-01-15T10:30:00.000Z
prd:
status: in-progress
created_by: pm
started: 2024-01-15T11:00:00.000Z
```
### 4. Workflow Interruption Handling
When user returns after interruption:
1. Ask if continuing previous workflow
2. Request any completed artifacts
3. Analyze provided artifacts
4. Determine workflow position
5. Suggest next appropriate step
Example:
```text
User: I'm working on a new app. Here's my PRD and architecture doc.
BMad: I see you have a PRD and architecture document. Based on these artifacts,
it looks like you're following the greenfield-fullstack workflow and have completed
stages 1-3. The next recommended step would be:
Stage 4: Validation & Refinement
- Load Sarah (Product Owner) to validate all artifacts
Would you like to continue with this workflow?
```
## Workflow Context Passing
When transitioning between agents, pass:
1. Previous artifacts created
2. Current workflow stage
3. Expected outputs
4. Any decisions or constraints identified
Example transition:
```text
BMad: Great! John has completed the PRD. According to the greenfield-fullstack workflow,
the next step is UX Strategy with Sally.
/ux-expert
Sally: I see we're in the Product Planning stage of the greenfield-fullstack workflow.
I have access to:
- Project Brief from Mary
- PRD from John
Let's create the UX strategy and UI specifications. First, let me review
the PRD to understand the features we're designing for...
```
## Multi-Path Workflows ## Multi-Path Workflows
Some workflows may have multiple paths: Handle conditional paths by asking clarifying questions when needed.
```yaml ## Best Practices
conditional_paths:
- condition: project_type == 'mobile'
next_stage: mobile-specific-design
- condition: project_type == 'web'
next_stage: web-architecture
- default: fullstack-architecture
```
Handle these by asking clarifying questions when needed. 1. Show progress
2. Explain transitions
3. Preserve context
4. Allow flexibility
5. Track state
## Workflow Best Practices ## Agent Integration
1. **Always show progress** - Users should know where they are Agents should be workflow-aware: know active workflow, their role, access artifacts, understand expected outputs.
2. **Explain transitions** - Why moving to next agent
3. **Preserve context** - Pass relevant information forward
4. **Allow flexibility** - Users can skip or modify steps
5. **Track everything** - Maintain complete workflow state
## Integration with Agents
Each agent should be workflow-aware:
- Know which workflow is active
- Understand their role in the workflow
- Access previous artifacts
- Know expected outputs
- Guide toward workflow goals
This creates a seamless experience where the entire team works together toward the workflow's objectives.
==================== END: utils#workflow-management ==================== ==================== END: utils#workflow-management ====================
==================== START: utils#template-format ==================== ==================== START: utils#template-format ====================

10
dist/agents/dev.txt vendored
View File

@@ -83,7 +83,7 @@ task-execution:
updates-ONLY: updates-ONLY:
- 'Checkboxes: [ ] not started | [-] in progress | [x] complete' - 'Checkboxes: [ ] not started | [-] in progress | [x] complete'
- 'Debug Log: | Task | File | Change | Reverted? |' - 'Debug Log: | Task | File | Change | Reverted? |'
- 'Completion Notes: Deviations only, <50 words' - 'Completion Notes: Deviations from AC or tasks during execution only, <50 words'
- 'Change Log: Requirement changes only' - 'Change Log: Requirement changes only'
- 'File List: CRITICAL - Maintain complete list of ALL files created/modified during implementation' - 'File List: CRITICAL - Maintain complete list of ALL files created/modified during implementation'
blocking: Unapproved deps | Ambiguous after story check | 3 failures | Missing config | Failing validations blocking: Unapproved deps | Ambiguous after story check | 3 failures | Missing config | Failing validations
@@ -102,13 +102,9 @@ dependencies:
This task provides instructions for validating documentation against checklists. The agent MUST follow these instructions to ensure thorough and systematic validation of documents. This task provides instructions for validating documentation against checklists. The agent MUST follow these instructions to ensure thorough and systematic validation of documents.
## Context
The BMAD Method uses various checklists to ensure quality and completeness of different artifacts. Each checklist contains embedded prompts and instructions to guide the LLM through thorough validation and advanced elicitation. The checklists automatically identify their required artifacts and guide the validation process.
## Available Checklists ## Available Checklists
If the user asks or does not specify a specific checklist, list the checklists available to the agent persona. If the task is being run not with a specific agent, tell the user to check the bmad-core/checklists folder to select the appropriate one to run. If the user asks or does not specify a specific checklist, list the checklists available to the agent persona. If the task is being run not with a specific agent, tell the user to check the {root}/checklists folder to select the appropriate one to run.
## Instructions ## Instructions
@@ -117,7 +113,7 @@ If the user asks or does not specify a specific checklist, list the checklists a
- If user or the task being run provides a checklist name: - If user or the task being run provides a checklist name:
- Try fuzzy matching (e.g. "architecture checklist" -> "architect-checklist") - Try fuzzy matching (e.g. "architecture checklist" -> "architect-checklist")
- If multiple matches found, ask user to clarify - If multiple matches found, ask user to clarify
- Load the appropriate checklist from bmad-core/checklists/ - Load the appropriate checklist from {root}/checklists/
- If no checklist specified: - If no checklist specified:
- Ask the user which checklist they want to use - Ask the user which checklist they want to use
- Present the available options from the files in the checklists folder - Present the available options from the files in the checklists folder

103
dist/agents/pm.txt vendored
View File

@@ -104,76 +104,73 @@ dependencies:
## Purpose ## Purpose
- Generate documents from any specified template following embedded instructions from the perspective of the selected agent persona Generate documents from templates by EXECUTING (not just reading) embedded instructions from the perspective of the selected agent persona.
## Instructions ## CRITICAL RULES
### 1. Identify Template and Context 1. **Templates are PROGRAMS** - Execute every [[LLM:]] instruction exactly as written
2. **NEVER show markup** - Hide all [[LLM:]], {{placeholders}}, @{examples}, and template syntax
3. **STOP and EXECUTE** - When you see "apply tasks#" or "execute tasks#", STOP and run that task immediately
4. **WAIT for user input** - At review points and after elicitation tasks
- Determine which template to use (user-provided or list available for selection to user) ## Execution Flow
- Agent-specific templates are listed in the agent's dependencies under `templates`. For each template listed, consider it a document the agent can create. So if an agent has: ### 1. Identify Template
@{example} - Load from `templates#*` or `{root}/templates directory`
dependencies: - Agent-specific templates are listed in agent's dependencies
templates: - prd-tmpl - architecture-tmpl - If agent has `templates: [prd-tmpl, architecture-tmpl]`, offer to create "PRD" and "Architecture" documents
@{/example}
You would offer to create "PRD" and "Architecture" documents when the user asks what you can help with. ### 2. Ask Interaction Mode
- Gather all relevant inputs, or ask for them, or else rely on user providing necessary details to complete the document > 1. **Incremental** - Section by section with reviews
- Understand the document purpose and target audience > 2. **YOLO Mode** - Complete draft then review (user can type `/yolo` anytime to switch)
### 2. Determine Interaction Mode
Confirm with the user their preferred interaction style:
- **Incremental:** Work through chunks of the document.
- **YOLO Mode:** Draft complete document making reasonable assumptions in one shot. (Can be entered also after starting incremental by just typing /yolo)
### 3. Execute Template ### 3. Execute Template
- Load specified template from `templates#*` or the /templates directory - Replace {{placeholders}} with real content
- Follow ALL embedded LLM instructions within the template - Execute [[LLM:]] instructions as you encounter them
- Process template markup according to `utils#template-format` conventions - Process <<REPEAT>> loops and ^^CONDITIONS^^
### 4. Template Processing Rules
#### CRITICAL: Never display template markup, LLM instructions, or examples to users
- Replace all {{placeholders}} with actual content
- Execute all [[LLM: instructions]] internally
- Process `<<REPEAT>>` sections as needed
- Evaluate ^^CONDITION^^ blocks and include only if applicable
- Use @{examples} for guidance but never output them - Use @{examples} for guidance but never output them
### 5. Content Generation ### 4. Key Execution Patterns
- **Incremental Mode**: Present each major section for review before proceeding **When you see:** `[[LLM: Draft X and immediately execute tasks#advanced-elicitation]]`
- **YOLO Mode**: Generate all sections, then review complete document with user
- Apply any elicitation protocols specified in template
- Incorporate user feedback and iterate as needed
### 6. Validation - Draft the content
- Present it to user
- IMMEDIATELY execute the task
- Wait for completion before continuing
If template specifies a checklist: **When you see:** `[[LLM: After section completion, apply tasks#Y]]`
- Run the appropriate checklist against completed document - Finish the section
- Document completion status for each item - STOP and execute the task
- Address any deficiencies found - Wait for user input
- Present validation summary to user
### 7. Final Presentation ### 5. Validation & Final Presentation
- Run any specified checklists
- Present clean, formatted content only - Present clean, formatted content only
- Ensure all sections are complete - No truncation or summarization
- DO NOT truncate or summarize content - Begin directly with content (no preamble)
- Begin directly with document content (no preamble) - Include any handoff prompts from template
- Include any handoff prompts specified in template
## Important Notes ## Common Mistakes to Avoid
- Template markup is for AI processing only - never expose to users ❌ Skipping elicitation tasks
❌ Showing template markup to users
❌ Continuing past STOP signals
❌ Combining multiple review points
✅ Execute ALL instructions in sequence
✅ Present only clean, formatted content
✅ Stop at every elicitation point
✅ Wait for user confirmation when instructed
## Remember
Templates contain precise instructions for a reason. Follow them exactly to ensure document quality and completeness.
==================== END: tasks#create-doc ==================== ==================== END: tasks#create-doc ====================
==================== START: tasks#correct-course ==================== ==================== START: tasks#correct-course ====================
@@ -874,13 +871,9 @@ The story creation is successful when:
This task provides instructions for validating documentation against checklists. The agent MUST follow these instructions to ensure thorough and systematic validation of documents. This task provides instructions for validating documentation against checklists. The agent MUST follow these instructions to ensure thorough and systematic validation of documents.
## Context
The BMAD Method uses various checklists to ensure quality and completeness of different artifacts. Each checklist contains embedded prompts and instructions to guide the LLM through thorough validation and advanced elicitation. The checklists automatically identify their required artifacts and guide the validation process.
## Available Checklists ## Available Checklists
If the user asks or does not specify a specific checklist, list the checklists available to the agent persona. If the task is being run not with a specific agent, tell the user to check the bmad-core/checklists folder to select the appropriate one to run. If the user asks or does not specify a specific checklist, list the checklists available to the agent persona. If the task is being run not with a specific agent, tell the user to check the {root}/checklists folder to select the appropriate one to run.
## Instructions ## Instructions
@@ -889,7 +882,7 @@ If the user asks or does not specify a specific checklist, list the checklists a
- If user or the task being run provides a checklist name: - If user or the task being run provides a checklist name:
- Try fuzzy matching (e.g. "architecture checklist" -> "architect-checklist") - Try fuzzy matching (e.g. "architecture checklist" -> "architect-checklist")
- If multiple matches found, ask user to clarify - If multiple matches found, ask user to clarify
- Load the appropriate checklist from bmad-core/checklists/ - Load the appropriate checklist from {root}/checklists/
- If no checklist specified: - If no checklist specified:
- Ask the user which checklist they want to use - Ask the user which checklist they want to use
- Present the available options from the files in the checklists folder - Present the available options from the files in the checklists folder

8
dist/agents/po.txt vendored
View File

@@ -106,13 +106,9 @@ dependencies:
This task provides instructions for validating documentation against checklists. The agent MUST follow these instructions to ensure thorough and systematic validation of documents. This task provides instructions for validating documentation against checklists. The agent MUST follow these instructions to ensure thorough and systematic validation of documents.
## Context
The BMAD Method uses various checklists to ensure quality and completeness of different artifacts. Each checklist contains embedded prompts and instructions to guide the LLM through thorough validation and advanced elicitation. The checklists automatically identify their required artifacts and guide the validation process.
## Available Checklists ## Available Checklists
If the user asks or does not specify a specific checklist, list the checklists available to the agent persona. If the task is being run not with a specific agent, tell the user to check the bmad-core/checklists folder to select the appropriate one to run. If the user asks or does not specify a specific checklist, list the checklists available to the agent persona. If the task is being run not with a specific agent, tell the user to check the {root}/checklists folder to select the appropriate one to run.
## Instructions ## Instructions
@@ -121,7 +117,7 @@ If the user asks or does not specify a specific checklist, list the checklists a
- If user or the task being run provides a checklist name: - If user or the task being run provides a checklist name:
- Try fuzzy matching (e.g. "architecture checklist" -> "architect-checklist") - Try fuzzy matching (e.g. "architecture checklist" -> "architect-checklist")
- If multiple matches found, ask user to clarify - If multiple matches found, ask user to clarify
- Load the appropriate checklist from bmad-core/checklists/ - Load the appropriate checklist from {root}/checklists/
- If no checklist specified: - If no checklist specified:
- Ask the user which checklist they want to use - Ask the user which checklist they want to use
- Present the available options from the files in the checklists folder - Present the available options from the files in the checklists folder

8
dist/agents/sm.txt vendored
View File

@@ -349,13 +349,9 @@ Provide a summary to the user including:
This task provides instructions for validating documentation against checklists. The agent MUST follow these instructions to ensure thorough and systematic validation of documents. This task provides instructions for validating documentation against checklists. The agent MUST follow these instructions to ensure thorough and systematic validation of documents.
## Context
The BMAD Method uses various checklists to ensure quality and completeness of different artifacts. Each checklist contains embedded prompts and instructions to guide the LLM through thorough validation and advanced elicitation. The checklists automatically identify their required artifacts and guide the validation process.
## Available Checklists ## Available Checklists
If the user asks or does not specify a specific checklist, list the checklists available to the agent persona. If the task is being run not with a specific agent, tell the user to check the bmad-core/checklists folder to select the appropriate one to run. If the user asks or does not specify a specific checklist, list the checklists available to the agent persona. If the task is being run not with a specific agent, tell the user to check the {root}/checklists folder to select the appropriate one to run.
## Instructions ## Instructions
@@ -364,7 +360,7 @@ If the user asks or does not specify a specific checklist, list the checklists a
- If user or the task being run provides a checklist name: - If user or the task being run provides a checklist name:
- Try fuzzy matching (e.g. "architecture checklist" -> "architect-checklist") - Try fuzzy matching (e.g. "architecture checklist" -> "architect-checklist")
- If multiple matches found, ask user to clarify - If multiple matches found, ask user to clarify
- Load the appropriate checklist from bmad-core/checklists/ - Load the appropriate checklist from {root}/checklists/
- If no checklist specified: - If no checklist specified:
- Ask the user which checklist they want to use - Ask the user which checklist they want to use
- Present the available options from the files in the checklists folder - Present the available options from the files in the checklists folder

View File

@@ -464,76 +464,73 @@ Present these numbered options to the user:
## Purpose ## Purpose
- Generate documents from any specified template following embedded instructions from the perspective of the selected agent persona Generate documents from templates by EXECUTING (not just reading) embedded instructions from the perspective of the selected agent persona.
## Instructions ## CRITICAL RULES
### 1. Identify Template and Context 1. **Templates are PROGRAMS** - Execute every [[LLM:]] instruction exactly as written
2. **NEVER show markup** - Hide all [[LLM:]], {{placeholders}}, @{examples}, and template syntax
3. **STOP and EXECUTE** - When you see "apply tasks#" or "execute tasks#", STOP and run that task immediately
4. **WAIT for user input** - At review points and after elicitation tasks
- Determine which template to use (user-provided or list available for selection to user) ## Execution Flow
- Agent-specific templates are listed in the agent's dependencies under `templates`. For each template listed, consider it a document the agent can create. So if an agent has: ### 1. Identify Template
@{example} - Load from `templates#*` or `{root}/templates directory`
dependencies: - Agent-specific templates are listed in agent's dependencies
templates: - prd-tmpl - architecture-tmpl - If agent has `templates: [prd-tmpl, architecture-tmpl]`, offer to create "PRD" and "Architecture" documents
@{/example}
You would offer to create "PRD" and "Architecture" documents when the user asks what you can help with. ### 2. Ask Interaction Mode
- Gather all relevant inputs, or ask for them, or else rely on user providing necessary details to complete the document > 1. **Incremental** - Section by section with reviews
- Understand the document purpose and target audience > 2. **YOLO Mode** - Complete draft then review (user can type `/yolo` anytime to switch)
### 2. Determine Interaction Mode
Confirm with the user their preferred interaction style:
- **Incremental:** Work through chunks of the document.
- **YOLO Mode:** Draft complete document making reasonable assumptions in one shot. (Can be entered also after starting incremental by just typing /yolo)
### 3. Execute Template ### 3. Execute Template
- Load specified template from `templates#*` or the /templates directory - Replace {{placeholders}} with real content
- Follow ALL embedded LLM instructions within the template - Execute [[LLM:]] instructions as you encounter them
- Process template markup according to `utils#template-format` conventions - Process <<REPEAT>> loops and ^^CONDITIONS^^
### 4. Template Processing Rules
#### CRITICAL: Never display template markup, LLM instructions, or examples to users
- Replace all {{placeholders}} with actual content
- Execute all [[LLM: instructions]] internally
- Process `<<REPEAT>>` sections as needed
- Evaluate ^^CONDITION^^ blocks and include only if applicable
- Use @{examples} for guidance but never output them - Use @{examples} for guidance but never output them
### 5. Content Generation ### 4. Key Execution Patterns
- **Incremental Mode**: Present each major section for review before proceeding **When you see:** `[[LLM: Draft X and immediately execute tasks#advanced-elicitation]]`
- **YOLO Mode**: Generate all sections, then review complete document with user
- Apply any elicitation protocols specified in template
- Incorporate user feedback and iterate as needed
### 6. Validation - Draft the content
- Present it to user
- IMMEDIATELY execute the task
- Wait for completion before continuing
If template specifies a checklist: **When you see:** `[[LLM: After section completion, apply tasks#Y]]`
- Run the appropriate checklist against completed document - Finish the section
- Document completion status for each item - STOP and execute the task
- Address any deficiencies found - Wait for user input
- Present validation summary to user
### 7. Final Presentation ### 5. Validation & Final Presentation
- Run any specified checklists
- Present clean, formatted content only - Present clean, formatted content only
- Ensure all sections are complete - No truncation or summarization
- DO NOT truncate or summarize content - Begin directly with content (no preamble)
- Begin directly with document content (no preamble) - Include any handoff prompts from template
- Include any handoff prompts specified in template
## Important Notes ## Common Mistakes to Avoid
- Template markup is for AI processing only - never expose to users ❌ Skipping elicitation tasks
❌ Showing template markup to users
❌ Continuing past STOP signals
❌ Combining multiple review points
✅ Execute ALL instructions in sequence
✅ Present only clean, formatted content
✅ Stop at every elicitation point
✅ Wait for user confirmation when instructed
## Remember
Templates contain precise instructions for a reason. Follow them exactly to ensure document quality and completeness.
==================== END: tasks#create-doc ==================== ==================== END: tasks#create-doc ====================
==================== START: tasks#execute-checklist ==================== ==================== START: tasks#execute-checklist ====================
@@ -541,13 +538,9 @@ If template specifies a checklist:
This task provides instructions for validating documentation against checklists. The agent MUST follow these instructions to ensure thorough and systematic validation of documents. This task provides instructions for validating documentation against checklists. The agent MUST follow these instructions to ensure thorough and systematic validation of documents.
## Context
The BMAD Method uses various checklists to ensure quality and completeness of different artifacts. Each checklist contains embedded prompts and instructions to guide the LLM through thorough validation and advanced elicitation. The checklists automatically identify their required artifacts and guide the validation process.
## Available Checklists ## Available Checklists
If the user asks or does not specify a specific checklist, list the checklists available to the agent persona. If the task is being run not with a specific agent, tell the user to check the bmad-core/checklists folder to select the appropriate one to run. If the user asks or does not specify a specific checklist, list the checklists available to the agent persona. If the task is being run not with a specific agent, tell the user to check the {root}/checklists folder to select the appropriate one to run.
## Instructions ## Instructions
@@ -556,7 +549,7 @@ If the user asks or does not specify a specific checklist, list the checklists a
- If user or the task being run provides a checklist name: - If user or the task being run provides a checklist name:
- Try fuzzy matching (e.g. "architecture checklist" -> "architect-checklist") - Try fuzzy matching (e.g. "architecture checklist" -> "architect-checklist")
- If multiple matches found, ask user to clarify - If multiple matches found, ask user to clarify
- Load the appropriate checklist from bmad-core/checklists/ - Load the appropriate checklist from {root}/checklists/
- If no checklist specified: - If no checklist specified:
- Ask the user which checklist they want to use - Ask the user which checklist they want to use
- Present the available options from the files in the checklists folder - Present the available options from the files in the checklists folder

View File

@@ -104,76 +104,73 @@ dependencies:
## Purpose ## Purpose
- Generate documents from any specified template following embedded instructions from the perspective of the selected agent persona Generate documents from templates by EXECUTING (not just reading) embedded instructions from the perspective of the selected agent persona.
## Instructions ## CRITICAL RULES
### 1. Identify Template and Context 1. **Templates are PROGRAMS** - Execute every [[LLM:]] instruction exactly as written
2. **NEVER show markup** - Hide all [[LLM:]], {{placeholders}}, @{examples}, and template syntax
3. **STOP and EXECUTE** - When you see "apply tasks#" or "execute tasks#", STOP and run that task immediately
4. **WAIT for user input** - At review points and after elicitation tasks
- Determine which template to use (user-provided or list available for selection to user) ## Execution Flow
- Agent-specific templates are listed in the agent's dependencies under `templates`. For each template listed, consider it a document the agent can create. So if an agent has: ### 1. Identify Template
@{example} - Load from `templates#*` or `{root}/templates directory`
dependencies: - Agent-specific templates are listed in agent's dependencies
templates: - prd-tmpl - architecture-tmpl - If agent has `templates: [prd-tmpl, architecture-tmpl]`, offer to create "PRD" and "Architecture" documents
@{/example}
You would offer to create "PRD" and "Architecture" documents when the user asks what you can help with. ### 2. Ask Interaction Mode
- Gather all relevant inputs, or ask for them, or else rely on user providing necessary details to complete the document > 1. **Incremental** - Section by section with reviews
- Understand the document purpose and target audience > 2. **YOLO Mode** - Complete draft then review (user can type `/yolo` anytime to switch)
### 2. Determine Interaction Mode
Confirm with the user their preferred interaction style:
- **Incremental:** Work through chunks of the document.
- **YOLO Mode:** Draft complete document making reasonable assumptions in one shot. (Can be entered also after starting incremental by just typing /yolo)
### 3. Execute Template ### 3. Execute Template
- Load specified template from `templates#*` or the /templates directory - Replace {{placeholders}} with real content
- Follow ALL embedded LLM instructions within the template - Execute [[LLM:]] instructions as you encounter them
- Process template markup according to `utils#template-format` conventions - Process <<REPEAT>> loops and ^^CONDITIONS^^
### 4. Template Processing Rules
#### CRITICAL: Never display template markup, LLM instructions, or examples to users
- Replace all {{placeholders}} with actual content
- Execute all [[LLM: instructions]] internally
- Process `<<REPEAT>>` sections as needed
- Evaluate ^^CONDITION^^ blocks and include only if applicable
- Use @{examples} for guidance but never output them - Use @{examples} for guidance but never output them
### 5. Content Generation ### 4. Key Execution Patterns
- **Incremental Mode**: Present each major section for review before proceeding **When you see:** `[[LLM: Draft X and immediately execute tasks#advanced-elicitation]]`
- **YOLO Mode**: Generate all sections, then review complete document with user
- Apply any elicitation protocols specified in template
- Incorporate user feedback and iterate as needed
### 6. Validation - Draft the content
- Present it to user
- IMMEDIATELY execute the task
- Wait for completion before continuing
If template specifies a checklist: **When you see:** `[[LLM: After section completion, apply tasks#Y]]`
- Run the appropriate checklist against completed document - Finish the section
- Document completion status for each item - STOP and execute the task
- Address any deficiencies found - Wait for user input
- Present validation summary to user
### 7. Final Presentation ### 5. Validation & Final Presentation
- Run any specified checklists
- Present clean, formatted content only - Present clean, formatted content only
- Ensure all sections are complete - No truncation or summarization
- DO NOT truncate or summarize content - Begin directly with content (no preamble)
- Begin directly with document content (no preamble) - Include any handoff prompts from template
- Include any handoff prompts specified in template
## Important Notes ## Common Mistakes to Avoid
- Template markup is for AI processing only - never expose to users ❌ Skipping elicitation tasks
❌ Showing template markup to users
❌ Continuing past STOP signals
❌ Combining multiple review points
✅ Execute ALL instructions in sequence
✅ Present only clean, formatted content
✅ Stop at every elicitation point
✅ Wait for user confirmation when instructed
## Remember
Templates contain precise instructions for a reason. Follow them exactly to ensure document quality and completeness.
==================== END: tasks#create-doc ==================== ==================== END: tasks#create-doc ====================
==================== START: tasks#execute-checklist ==================== ==================== START: tasks#execute-checklist ====================
@@ -181,13 +178,9 @@ If template specifies a checklist:
This task provides instructions for validating documentation against checklists. The agent MUST follow these instructions to ensure thorough and systematic validation of documents. This task provides instructions for validating documentation against checklists. The agent MUST follow these instructions to ensure thorough and systematic validation of documents.
## Context
The BMAD Method uses various checklists to ensure quality and completeness of different artifacts. Each checklist contains embedded prompts and instructions to guide the LLM through thorough validation and advanced elicitation. The checklists automatically identify their required artifacts and guide the validation process.
## Available Checklists ## Available Checklists
If the user asks or does not specify a specific checklist, list the checklists available to the agent persona. If the task is being run not with a specific agent, tell the user to check the bmad-core/checklists folder to select the appropriate one to run. If the user asks or does not specify a specific checklist, list the checklists available to the agent persona. If the task is being run not with a specific agent, tell the user to check the {root}/checklists folder to select the appropriate one to run.
## Instructions ## Instructions
@@ -196,7 +189,7 @@ If the user asks or does not specify a specific checklist, list the checklists a
- If user or the task being run provides a checklist name: - If user or the task being run provides a checklist name:
- Try fuzzy matching (e.g. "architecture checklist" -> "architect-checklist") - Try fuzzy matching (e.g. "architecture checklist" -> "architect-checklist")
- If multiple matches found, ask user to clarify - If multiple matches found, ask user to clarify
- Load the appropriate checklist from bmad-core/checklists/ - Load the appropriate checklist from {root}/checklists/
- If no checklist specified: - If no checklist specified:
- Ask the user which checklist they want to use - Ask the user which checklist they want to use
- Present the available options from the files in the checklists folder - Present the available options from the files in the checklists folder

View File

@@ -112,13 +112,9 @@ dependencies:
This task provides instructions for validating documentation against checklists. The agent MUST follow these instructions to ensure thorough and systematic validation of documents. This task provides instructions for validating documentation against checklists. The agent MUST follow these instructions to ensure thorough and systematic validation of documents.
## Context
The BMAD Method uses various checklists to ensure quality and completeness of different artifacts. Each checklist contains embedded prompts and instructions to guide the LLM through thorough validation and advanced elicitation. The checklists automatically identify their required artifacts and guide the validation process.
## Available Checklists ## Available Checklists
If the user asks or does not specify a specific checklist, list the checklists available to the agent persona. If the task is being run not with a specific agent, tell the user to check the bmad-core/checklists folder to select the appropriate one to run. If the user asks or does not specify a specific checklist, list the checklists available to the agent persona. If the task is being run not with a specific agent, tell the user to check the {root}/checklists folder to select the appropriate one to run.
## Instructions ## Instructions
@@ -127,7 +123,7 @@ If the user asks or does not specify a specific checklist, list the checklists a
- If user or the task being run provides a checklist name: - If user or the task being run provides a checklist name:
- Try fuzzy matching (e.g. "architecture checklist" -> "architect-checklist") - Try fuzzy matching (e.g. "architecture checklist" -> "architect-checklist")
- If multiple matches found, ask user to clarify - If multiple matches found, ask user to clarify
- Load the appropriate checklist from bmad-core/checklists/ - Load the appropriate checklist from {root}/checklists/
- If no checklist specified: - If no checklist specified:
- Ask the user which checklist they want to use - Ask the user which checklist they want to use
- Present the available options from the files in the checklists folder - Present the available options from the files in the checklists folder

View File

@@ -316,13 +316,9 @@ This task ensures game development stories are immediately actionable and enable
This task provides instructions for validating documentation against checklists. The agent MUST follow these instructions to ensure thorough and systematic validation of documents. This task provides instructions for validating documentation against checklists. The agent MUST follow these instructions to ensure thorough and systematic validation of documents.
## Context
The BMAD Method uses various checklists to ensure quality and completeness of different artifacts. Each checklist contains embedded prompts and instructions to guide the LLM through thorough validation and advanced elicitation. The checklists automatically identify their required artifacts and guide the validation process.
## Available Checklists ## Available Checklists
If the user asks or does not specify a specific checklist, list the checklists available to the agent persona. If the task is being run not with a specific agent, tell the user to check the bmad-core/checklists folder to select the appropriate one to run. If the user asks or does not specify a specific checklist, list the checklists available to the agent persona. If the task is being run not with a specific agent, tell the user to check the {root}/checklists folder to select the appropriate one to run.
## Instructions ## Instructions
@@ -331,7 +327,7 @@ If the user asks or does not specify a specific checklist, list the checklists a
- If user or the task being run provides a checklist name: - If user or the task being run provides a checklist name:
- Try fuzzy matching (e.g. "architecture checklist" -> "architect-checklist") - Try fuzzy matching (e.g. "architecture checklist" -> "architect-checklist")
- If multiple matches found, ask user to clarify - If multiple matches found, ask user to clarify
- Load the appropriate checklist from bmad-core/checklists/ - Load the appropriate checklist from {root}/checklists/
- If no checklist specified: - If no checklist specified:
- Ask the user which checklist they want to use - Ask the user which checklist they want to use
- Present the available options from the files in the checklists folder - Present the available options from the files in the checklists folder

View File

@@ -977,76 +977,73 @@ Present these numbered options to the user:
## Purpose ## Purpose
- Generate documents from any specified template following embedded instructions from the perspective of the selected agent persona Generate documents from templates by EXECUTING (not just reading) embedded instructions from the perspective of the selected agent persona.
## Instructions ## CRITICAL RULES
### 1. Identify Template and Context 1. **Templates are PROGRAMS** - Execute every [[LLM:]] instruction exactly as written
2. **NEVER show markup** - Hide all [[LLM:]], {{placeholders}}, @{examples}, and template syntax
3. **STOP and EXECUTE** - When you see "apply tasks#" or "execute tasks#", STOP and run that task immediately
4. **WAIT for user input** - At review points and after elicitation tasks
- Determine which template to use (user-provided or list available for selection to user) ## Execution Flow
- Agent-specific templates are listed in the agent's dependencies under `templates`. For each template listed, consider it a document the agent can create. So if an agent has: ### 1. Identify Template
@{example} - Load from `templates#*` or `{root}/templates directory`
dependencies: - Agent-specific templates are listed in agent's dependencies
templates: - prd-tmpl - architecture-tmpl - If agent has `templates: [prd-tmpl, architecture-tmpl]`, offer to create "PRD" and "Architecture" documents
@{/example}
You would offer to create "PRD" and "Architecture" documents when the user asks what you can help with. ### 2. Ask Interaction Mode
- Gather all relevant inputs, or ask for them, or else rely on user providing necessary details to complete the document > 1. **Incremental** - Section by section with reviews
- Understand the document purpose and target audience > 2. **YOLO Mode** - Complete draft then review (user can type `/yolo` anytime to switch)
### 2. Determine Interaction Mode
Confirm with the user their preferred interaction style:
- **Incremental:** Work through chunks of the document.
- **YOLO Mode:** Draft complete document making reasonable assumptions in one shot. (Can be entered also after starting incremental by just typing /yolo)
### 3. Execute Template ### 3. Execute Template
- Load specified template from `templates#*` or the /templates directory - Replace {{placeholders}} with real content
- Follow ALL embedded LLM instructions within the template - Execute [[LLM:]] instructions as you encounter them
- Process template markup according to `utils#template-format` conventions - Process <<REPEAT>> loops and ^^CONDITIONS^^
### 4. Template Processing Rules
#### CRITICAL: Never display template markup, LLM instructions, or examples to users
- Replace all {{placeholders}} with actual content
- Execute all [[LLM: instructions]] internally
- Process `<<REPEAT>>` sections as needed
- Evaluate ^^CONDITION^^ blocks and include only if applicable
- Use @{examples} for guidance but never output them - Use @{examples} for guidance but never output them
### 5. Content Generation ### 4. Key Execution Patterns
- **Incremental Mode**: Present each major section for review before proceeding **When you see:** `[[LLM: Draft X and immediately execute tasks#advanced-elicitation]]`
- **YOLO Mode**: Generate all sections, then review complete document with user
- Apply any elicitation protocols specified in template
- Incorporate user feedback and iterate as needed
### 6. Validation - Draft the content
- Present it to user
- IMMEDIATELY execute the task
- Wait for completion before continuing
If template specifies a checklist: **When you see:** `[[LLM: After section completion, apply tasks#Y]]`
- Run the appropriate checklist against completed document - Finish the section
- Document completion status for each item - STOP and execute the task
- Address any deficiencies found - Wait for user input
- Present validation summary to user
### 7. Final Presentation ### 5. Validation & Final Presentation
- Run any specified checklists
- Present clean, formatted content only - Present clean, formatted content only
- Ensure all sections are complete - No truncation or summarization
- DO NOT truncate or summarize content - Begin directly with content (no preamble)
- Begin directly with document content (no preamble) - Include any handoff prompts from template
- Include any handoff prompts specified in template
## Important Notes ## Common Mistakes to Avoid
- Template markup is for AI processing only - never expose to users ❌ Skipping elicitation tasks
❌ Showing template markup to users
❌ Continuing past STOP signals
❌ Combining multiple review points
✅ Execute ALL instructions in sequence
✅ Present only clean, formatted content
✅ Stop at every elicitation point
✅ Wait for user confirmation when instructed
## Remember
Templates contain precise instructions for a reason. Follow them exactly to ensure document quality and completeness.
==================== END: tasks#create-doc ==================== ==================== END: tasks#create-doc ====================
==================== START: tasks#advanced-elicitation ==================== ==================== START: tasks#advanced-elicitation ====================
@@ -2638,227 +2635,73 @@ Or ask me about anything else related to BMAD-METHOD!
==================== START: utils#workflow-management ==================== ==================== START: utils#workflow-management ====================
# Workflow Management # Workflow Management
This utility enables the BMAD orchestrator to manage and execute team workflows. Enables BMAD orchestrator to manage and execute team workflows.
## Important: Dynamic Workflow Loading ## Dynamic Workflow Loading
The BMAD orchestrator MUST read the available workflows from the current team configuration's `workflows` field. Do not use hardcoded workflow lists. Each team bundle defines its own set of supported workflows based on the agents it includes. Read available workflows from current team configuration's `workflows` field. Each team bundle defines its own supported workflows.
**Critical Distinction**: **Key Commands**:
- When asked "what workflows are available?", show ONLY the workflows defined in the current team bundle's configuration - `/workflows` - List workflows in current bundle or workflows folder
- Use `/agent-list` to show agents in the current bundle - `/agent-list` - Show agents in current bundle
- Use `/workflows` to show workflows in the current bundle, NOT any creation tasks
### Workflow Descriptions
When displaying workflows, use these descriptions based on the workflow ID:
- **greenfield-fullstack**: Build a new full-stack application from concept to development
- **brownfield-fullstack**: Enhance an existing full-stack application with new features
- **greenfield-service**: Build a new backend service or API from concept to development
- **brownfield-service**: Enhance an existing backend service or API
- **greenfield-ui**: Build a new frontend/UI application from concept to development
- **brownfield-ui**: Enhance an existing frontend/UI application
## Workflow Commands ## Workflow Commands
### /workflows ### /workflows
Lists all available workflows for the current team. The available workflows are determined by the team configuration and may include workflows such as: Lists available workflows with titles and descriptions.
- greenfield-fullstack
- brownfield-fullstack
- greenfield-service
- brownfield-service
- greenfield-ui
- brownfield-ui
The actual list depends on which team bundle is loaded. When responding to this command, display the workflows that are configured in the current team's `workflows` field.
Example response format:
```text
Available workflows for [Team Name]:
1. [workflow-id] - [Brief description based on workflow type]
2. [workflow-id] - [Brief description based on workflow type]
[... etc. ...]
Use /workflow-start {number or id} to begin a workflow.
```
### /workflow-start {workflow-id} ### /workflow-start {workflow-id}
Starts a specific workflow and transitions to the first agent. Starts workflow and transitions to first agent.
Example: `/workflow-start greenfield-fullstack`
### /workflow-status ### /workflow-status
Shows current workflow progress, completed artifacts, and next steps. Shows current progress, completed artifacts, and next steps.
Example response:
```text
Current Workflow: Greenfield Full-Stack Development
Stage: Product Planning (2 of 6)
Completed:
✓ Discovery & Requirements
- project-brief (completed by Mary)
In Progress:
⚡ Product Planning
- Create PRD (John) - awaiting input
Next: Technical Architecture
```
### /workflow-resume ### /workflow-resume
Resumes a workflow from where it left off, useful when starting a new chat. Resumes workflow from last position. User can provide completed artifacts.
User can provide completed artifacts:
```text
User: /workflow-resume greenfield-fullstack
I have completed: project-brief, PRD
BMad: I see you've completed Discovery and part of Product Planning.
Based on the greenfield-fullstack workflow, the next step is:
- UX Strategy with Sally (ux-expert)
Would you like me to load Sally to continue?
```
### /workflow-next ### /workflow-next
Shows the next recommended agent and action in the current workflow. Shows next recommended agent and action.
## Workflow Execution Flow ## Execution Flow
### 1. Starting a Workflow 1. **Starting**: Load definition → Identify first stage → Transition to agent → Guide artifact creation
When a workflow is started: 2. **Stage Transitions**: Mark complete → Check conditions → Load next agent → Pass artifacts
1. Load the workflow definition 3. **Artifact Tracking**: Track status, creator, timestamps in workflow_state
2. Identify the first stage and step
3. Transition to the required agent
4. Provide context about expected inputs/outputs
5. Guide artifact creation
### 2. Stage Transitions 4. **Interruption Handling**: Analyze provided artifacts → Determine position → Suggest next step
After each artifact is completed: ## Context Passing
1. Mark the step as complete When transitioning, pass:
2. Check transition conditions
3. If stage is complete, move to next stage
4. Load the appropriate agent
5. Pass relevant artifacts as context
### 3. Artifact Tracking - Previous artifacts
- Current workflow stage
Track all created artifacts: - Expected outputs
- Decisions/constraints
```yaml
workflow_state:
current_workflow: greenfield-fullstack
current_stage: planning
current_step: 2
artifacts:
project-brief:
status: completed
created_by: analyst
timestamp: 2024-01-15T10:30:00.000Z
prd:
status: in-progress
created_by: pm
started: 2024-01-15T11:00:00.000Z
```
### 4. Workflow Interruption Handling
When user returns after interruption:
1. Ask if continuing previous workflow
2. Request any completed artifacts
3. Analyze provided artifacts
4. Determine workflow position
5. Suggest next appropriate step
Example:
```text
User: I'm working on a new app. Here's my PRD and architecture doc.
BMad: I see you have a PRD and architecture document. Based on these artifacts,
it looks like you're following the greenfield-fullstack workflow and have completed
stages 1-3. The next recommended step would be:
Stage 4: Validation & Refinement
- Load Sarah (Product Owner) to validate all artifacts
Would you like to continue with this workflow?
```
## Workflow Context Passing
When transitioning between agents, pass:
1. Previous artifacts created
2. Current workflow stage
3. Expected outputs
4. Any decisions or constraints identified
Example transition:
```text
BMad: Great! John has completed the PRD. According to the greenfield-fullstack workflow,
the next step is UX Strategy with Sally.
/ux-expert
Sally: I see we're in the Product Planning stage of the greenfield-fullstack workflow.
I have access to:
- Project Brief from Mary
- PRD from John
Let's create the UX strategy and UI specifications. First, let me review
the PRD to understand the features we're designing for...
```
## Multi-Path Workflows ## Multi-Path Workflows
Some workflows may have multiple paths: Handle conditional paths by asking clarifying questions when needed.
```yaml ## Best Practices
conditional_paths:
- condition: project_type == 'mobile'
next_stage: mobile-specific-design
- condition: project_type == 'web'
next_stage: web-architecture
- default: fullstack-architecture
```
Handle these by asking clarifying questions when needed. 1. Show progress
2. Explain transitions
3. Preserve context
4. Allow flexibility
5. Track state
## Workflow Best Practices ## Agent Integration
1. **Always show progress** - Users should know where they are Agents should be workflow-aware: know active workflow, their role, access artifacts, understand expected outputs.
2. **Explain transitions** - Why moving to next agent
3. **Preserve context** - Pass relevant information forward
4. **Allow flexibility** - Users can skip or modify steps
5. **Track everything** - Maintain complete workflow state
## Integration with Agents
Each agent should be workflow-aware:
- Know which workflow is active
- Understand their role in the workflow
- Access previous artifacts
- Know expected outputs
- Guide toward workflow goals
This creates a seamless experience where the entire team works together toward the workflow's objectives.
==================== END: utils#workflow-management ==================== ==================== END: utils#workflow-management ====================
==================== START: tasks#execute-checklist ==================== ==================== START: tasks#execute-checklist ====================
@@ -2866,13 +2709,9 @@ This creates a seamless experience where the entire team works together toward t
This task provides instructions for validating documentation against checklists. The agent MUST follow these instructions to ensure thorough and systematic validation of documents. This task provides instructions for validating documentation against checklists. The agent MUST follow these instructions to ensure thorough and systematic validation of documents.
## Context
The BMAD Method uses various checklists to ensure quality and completeness of different artifacts. Each checklist contains embedded prompts and instructions to guide the LLM through thorough validation and advanced elicitation. The checklists automatically identify their required artifacts and guide the validation process.
## Available Checklists ## Available Checklists
If the user asks or does not specify a specific checklist, list the checklists available to the agent persona. If the task is being run not with a specific agent, tell the user to check the bmad-core/checklists folder to select the appropriate one to run. If the user asks or does not specify a specific checklist, list the checklists available to the agent persona. If the task is being run not with a specific agent, tell the user to check the {root}/checklists folder to select the appropriate one to run.
## Instructions ## Instructions
@@ -2881,7 +2720,7 @@ If the user asks or does not specify a specific checklist, list the checklists a
- If user or the task being run provides a checklist name: - If user or the task being run provides a checklist name:
- Try fuzzy matching (e.g. "architecture checklist" -> "architect-checklist") - Try fuzzy matching (e.g. "architecture checklist" -> "architect-checklist")
- If multiple matches found, ask user to clarify - If multiple matches found, ask user to clarify
- Load the appropriate checklist from bmad-core/checklists/ - Load the appropriate checklist from {root}/checklists/
- If no checklist specified: - If no checklist specified:
- Ask the user which checklist they want to use - Ask the user which checklist they want to use
- Present the available options from the files in the checklists folder - Present the available options from the files in the checklists folder

View File

@@ -736,17 +736,17 @@ IMPORTANT: Work through plan.md checklist systematically!
**Step 2: Copy Core Utilities** **Step 2: Copy Core Utilities**
Before proceeding, copy these essential files from bmad-core: Before proceeding, copy these essential files from common:
```bash ```bash
# Copy core task utilities # Copy core task utilities
cp bmad-core/tasks/create-doc.md expansion-packs/{pack-name}/tasks/ cp common/tasks/create-doc.md expansion-packs/{pack-name}/tasks/
cp bmad-core/tasks/execute-checklist.md expansion-packs/{pack-name}/tasks/ cp common/tasks/execute-checklist.md expansion-packs/{pack-name}/tasks/
# Copy core utility files # Copy core utility files
mkdir -p expansion-packs/{pack-name}/utils mkdir -p expansion-packs/{pack-name}/utils
cp bmad-core/utils/template-format.md expansion-packs/{pack-name}/utils/ cp common/utils/template-format.md expansion-packs/{pack-name}/utils/
cp bmad-core/utils/workflow-management.md expansion-packs/{pack-name}/utils/ cp common/utils/workflow-management.md expansion-packs/{pack-name}/utils/
``` ```
**Step 3: Technical Implementation** **Step 3: Technical Implementation**

View File

@@ -105,76 +105,73 @@ dependencies:
## Purpose ## Purpose
- Generate documents from any specified template following embedded instructions from the perspective of the selected agent persona Generate documents from templates by EXECUTING (not just reading) embedded instructions from the perspective of the selected agent persona.
## Instructions ## CRITICAL RULES
### 1. Identify Template and Context 1. **Templates are PROGRAMS** - Execute every [[LLM:]] instruction exactly as written
2. **NEVER show markup** - Hide all [[LLM:]], {{placeholders}}, @{examples}, and template syntax
3. **STOP and EXECUTE** - When you see "apply tasks#" or "execute tasks#", STOP and run that task immediately
4. **WAIT for user input** - At review points and after elicitation tasks
- Determine which template to use (user-provided or list available for selection to user) ## Execution Flow
- Agent-specific templates are listed in the agent's dependencies under `templates`. For each template listed, consider it a document the agent can create. So if an agent has: ### 1. Identify Template
@{example} - Load from `templates#*` or `{root}/templates directory`
dependencies: - Agent-specific templates are listed in agent's dependencies
templates: - prd-tmpl - architecture-tmpl - If agent has `templates: [prd-tmpl, architecture-tmpl]`, offer to create "PRD" and "Architecture" documents
@{/example}
You would offer to create "PRD" and "Architecture" documents when the user asks what you can help with. ### 2. Ask Interaction Mode
- Gather all relevant inputs, or ask for them, or else rely on user providing necessary details to complete the document > 1. **Incremental** - Section by section with reviews
- Understand the document purpose and target audience > 2. **YOLO Mode** - Complete draft then review (user can type `/yolo` anytime to switch)
### 2. Determine Interaction Mode
Confirm with the user their preferred interaction style:
- **Incremental:** Work through chunks of the document.
- **YOLO Mode:** Draft complete document making reasonable assumptions in one shot. (Can be entered also after starting incremental by just typing /yolo)
### 3. Execute Template ### 3. Execute Template
- Load specified template from `templates#*` or the /templates directory - Replace {{placeholders}} with real content
- Follow ALL embedded LLM instructions within the template - Execute [[LLM:]] instructions as you encounter them
- Process template markup according to `utils#template-format` conventions - Process <<REPEAT>> loops and ^^CONDITIONS^^
### 4. Template Processing Rules
#### CRITICAL: Never display template markup, LLM instructions, or examples to users
- Replace all {{placeholders}} with actual content
- Execute all [[LLM: instructions]] internally
- Process `<<REPEAT>>` sections as needed
- Evaluate ^^CONDITION^^ blocks and include only if applicable
- Use @{examples} for guidance but never output them - Use @{examples} for guidance but never output them
### 5. Content Generation ### 4. Key Execution Patterns
- **Incremental Mode**: Present each major section for review before proceeding **When you see:** `[[LLM: Draft X and immediately execute tasks#advanced-elicitation]]`
- **YOLO Mode**: Generate all sections, then review complete document with user
- Apply any elicitation protocols specified in template
- Incorporate user feedback and iterate as needed
### 6. Validation - Draft the content
- Present it to user
- IMMEDIATELY execute the task
- Wait for completion before continuing
If template specifies a checklist: **When you see:** `[[LLM: After section completion, apply tasks#Y]]`
- Run the appropriate checklist against completed document - Finish the section
- Document completion status for each item - STOP and execute the task
- Address any deficiencies found - Wait for user input
- Present validation summary to user
### 7. Final Presentation ### 5. Validation & Final Presentation
- Run any specified checklists
- Present clean, formatted content only - Present clean, formatted content only
- Ensure all sections are complete - No truncation or summarization
- DO NOT truncate or summarize content - Begin directly with content (no preamble)
- Begin directly with document content (no preamble) - Include any handoff prompts from template
- Include any handoff prompts specified in template
## Important Notes ## Common Mistakes to Avoid
- Template markup is for AI processing only - never expose to users ❌ Skipping elicitation tasks
❌ Showing template markup to users
❌ Continuing past STOP signals
❌ Combining multiple review points
✅ Execute ALL instructions in sequence
✅ Present only clean, formatted content
✅ Stop at every elicitation point
✅ Wait for user confirmation when instructed
## Remember
Templates contain precise instructions for a reason. Follow them exactly to ensure document quality and completeness.
==================== END: tasks#create-doc ==================== ==================== END: tasks#create-doc ====================
==================== START: tasks#review-infrastructure ==================== ==================== START: tasks#review-infrastructure ====================

View File

@@ -353,7 +353,7 @@ task-execution:
updates-ONLY: updates-ONLY:
- 'Checkboxes: [ ] not started | [-] in progress | [x] complete' - 'Checkboxes: [ ] not started | [-] in progress | [x] complete'
- 'Debug Log: | Task | File | Change | Reverted? |' - 'Debug Log: | Task | File | Change | Reverted? |'
- 'Completion Notes: Deviations only, <50 words' - 'Completion Notes: Deviations from AC or tasks during execution only, <50 words'
- 'Change Log: Requirement changes only' - 'Change Log: Requirement changes only'
- 'File List: CRITICAL - Maintain complete list of ALL files created/modified during implementation' - 'File List: CRITICAL - Maintain complete list of ALL files created/modified during implementation'
blocking: Unapproved deps | Ambiguous after story check | 3 failures | Missing config | Failing validations blocking: Unapproved deps | Ambiguous after story check | 3 failures | Missing config | Failing validations
@@ -755,76 +755,73 @@ Choose an action (0-9 - 9 to bypass - HELP for explanation of these options):
## Purpose ## Purpose
- Generate documents from any specified template following embedded instructions from the perspective of the selected agent persona Generate documents from templates by EXECUTING (not just reading) embedded instructions from the perspective of the selected agent persona.
## Instructions ## CRITICAL RULES
### 1. Identify Template and Context 1. **Templates are PROGRAMS** - Execute every [[LLM:]] instruction exactly as written
2. **NEVER show markup** - Hide all [[LLM:]], {{placeholders}}, @{examples}, and template syntax
3. **STOP and EXECUTE** - When you see "apply tasks#" or "execute tasks#", STOP and run that task immediately
4. **WAIT for user input** - At review points and after elicitation tasks
- Determine which template to use (user-provided or list available for selection to user) ## Execution Flow
- Agent-specific templates are listed in the agent's dependencies under `templates`. For each template listed, consider it a document the agent can create. So if an agent has: ### 1. Identify Template
@{example} - Load from `templates#*` or `{root}/templates directory`
dependencies: - Agent-specific templates are listed in agent's dependencies
templates: - prd-tmpl - architecture-tmpl - If agent has `templates: [prd-tmpl, architecture-tmpl]`, offer to create "PRD" and "Architecture" documents
@{/example}
You would offer to create "PRD" and "Architecture" documents when the user asks what you can help with. ### 2. Ask Interaction Mode
- Gather all relevant inputs, or ask for them, or else rely on user providing necessary details to complete the document > 1. **Incremental** - Section by section with reviews
- Understand the document purpose and target audience > 2. **YOLO Mode** - Complete draft then review (user can type `/yolo` anytime to switch)
### 2. Determine Interaction Mode
Confirm with the user their preferred interaction style:
- **Incremental:** Work through chunks of the document.
- **YOLO Mode:** Draft complete document making reasonable assumptions in one shot. (Can be entered also after starting incremental by just typing /yolo)
### 3. Execute Template ### 3. Execute Template
- Load specified template from `templates#*` or the /templates directory - Replace {{placeholders}} with real content
- Follow ALL embedded LLM instructions within the template - Execute [[LLM:]] instructions as you encounter them
- Process template markup according to `utils#template-format` conventions - Process <<REPEAT>> loops and ^^CONDITIONS^^
### 4. Template Processing Rules
#### CRITICAL: Never display template markup, LLM instructions, or examples to users
- Replace all {{placeholders}} with actual content
- Execute all [[LLM: instructions]] internally
- Process `<<REPEAT>>` sections as needed
- Evaluate ^^CONDITION^^ blocks and include only if applicable
- Use @{examples} for guidance but never output them - Use @{examples} for guidance but never output them
### 5. Content Generation ### 4. Key Execution Patterns
- **Incremental Mode**: Present each major section for review before proceeding **When you see:** `[[LLM: Draft X and immediately execute tasks#advanced-elicitation]]`
- **YOLO Mode**: Generate all sections, then review complete document with user
- Apply any elicitation protocols specified in template
- Incorporate user feedback and iterate as needed
### 6. Validation - Draft the content
- Present it to user
- IMMEDIATELY execute the task
- Wait for completion before continuing
If template specifies a checklist: **When you see:** `[[LLM: After section completion, apply tasks#Y]]`
- Run the appropriate checklist against completed document - Finish the section
- Document completion status for each item - STOP and execute the task
- Address any deficiencies found - Wait for user input
- Present validation summary to user
### 7. Final Presentation ### 5. Validation & Final Presentation
- Run any specified checklists
- Present clean, formatted content only - Present clean, formatted content only
- Ensure all sections are complete - No truncation or summarization
- DO NOT truncate or summarize content - Begin directly with content (no preamble)
- Begin directly with document content (no preamble) - Include any handoff prompts from template
- Include any handoff prompts specified in template
## Important Notes ## Common Mistakes to Avoid
- Template markup is for AI processing only - never expose to users ❌ Skipping elicitation tasks
❌ Showing template markup to users
❌ Continuing past STOP signals
❌ Combining multiple review points
✅ Execute ALL instructions in sequence
✅ Present only clean, formatted content
✅ Stop at every elicitation point
✅ Wait for user confirmation when instructed
## Remember
Templates contain precise instructions for a reason. Follow them exactly to ensure document quality and completeness.
==================== END: tasks#create-doc ==================== ==================== END: tasks#create-doc ====================
==================== START: tasks#kb-mode-interaction ==================== ==================== START: tasks#kb-mode-interaction ====================
@@ -981,7 +978,7 @@ BMAD transforms you into a "Vibe CEO" - directing a team of specialized AI agent
5. Type `/help` to see available commands 5. Type `/help` to see available commands
#### Option 2: IDE Integration #### Option 2: IDE Integration
**Best for**: Cursor, Claude Code, Windsurf, Cline, Roo Code users **Best for**: Cursor, Claude Code, Windsurf, Cline, Roo Code, VS Code Copilot users
```bash ```bash
# Interactive installation (recommended) # Interactive installation (recommended)
@@ -1622,7 +1619,7 @@ Expansion packs extend BMAD-METHOD beyond traditional software development into
### Using Expansion Packs ### Using Expansion Packs
1. **Browse Available Packs**: Check `expansion-packs/` directory 1. **Browse Available Packs**: Check `expansion-packs/` directory
2. **Get Inspiration**: See `docs/expansion-pack-ideas.md` for detailed examples 2. **Get Inspiration**: See `docs/expansion-packs.md` for detailed examples and ideas
3. **Install via CLI**: 3. **Install via CLI**:
```bash ```bash
npx bmad-method install npx bmad-method install
@@ -1653,227 +1650,73 @@ Use the **expansion-creator** pack to build your own:
==================== START: utils#workflow-management ==================== ==================== START: utils#workflow-management ====================
# Workflow Management # Workflow Management
This utility enables the BMAD orchestrator to manage and execute team workflows. Enables BMAD orchestrator to manage and execute team workflows.
## Important: Dynamic Workflow Loading ## Dynamic Workflow Loading
The BMAD orchestrator MUST read the available workflows from the current team configuration's `workflows` field. Do not use hardcoded workflow lists. Each team bundle defines its own set of supported workflows based on the agents it includes. Read available workflows from current team configuration's `workflows` field. Each team bundle defines its own supported workflows.
**Critical Distinction**: **Key Commands**:
- When asked "what workflows are available?", show ONLY the workflows defined in the current team bundle's configuration - `/workflows` - List workflows in current bundle or workflows folder
- Use `/agent-list` to show agents in the current bundle - `/agent-list` - Show agents in current bundle
- Use `/workflows` to show workflows in the current bundle, NOT any creation tasks
### Workflow Descriptions
When displaying workflows, use these descriptions based on the workflow ID:
- **greenfield-fullstack**: Build a new full-stack application from concept to development
- **brownfield-fullstack**: Enhance an existing full-stack application with new features
- **greenfield-service**: Build a new backend service or API from concept to development
- **brownfield-service**: Enhance an existing backend service or API
- **greenfield-ui**: Build a new frontend/UI application from concept to development
- **brownfield-ui**: Enhance an existing frontend/UI application
## Workflow Commands ## Workflow Commands
### /workflows ### /workflows
Lists all available workflows for the current team. The available workflows are determined by the team configuration and may include workflows such as: Lists available workflows with titles and descriptions.
- greenfield-fullstack
- brownfield-fullstack
- greenfield-service
- brownfield-service
- greenfield-ui
- brownfield-ui
The actual list depends on which team bundle is loaded. When responding to this command, display the workflows that are configured in the current team's `workflows` field.
Example response format:
```text
Available workflows for [Team Name]:
1. [workflow-id] - [Brief description based on workflow type]
2. [workflow-id] - [Brief description based on workflow type]
[... etc. ...]
Use /workflow-start {number or id} to begin a workflow.
```
### /workflow-start {workflow-id} ### /workflow-start {workflow-id}
Starts a specific workflow and transitions to the first agent. Starts workflow and transitions to first agent.
Example: `/workflow-start greenfield-fullstack`
### /workflow-status ### /workflow-status
Shows current workflow progress, completed artifacts, and next steps. Shows current progress, completed artifacts, and next steps.
Example response:
```text
Current Workflow: Greenfield Full-Stack Development
Stage: Product Planning (2 of 6)
Completed:
✓ Discovery & Requirements
- project-brief (completed by Mary)
In Progress:
⚡ Product Planning
- Create PRD (John) - awaiting input
Next: Technical Architecture
```
### /workflow-resume ### /workflow-resume
Resumes a workflow from where it left off, useful when starting a new chat. Resumes workflow from last position. User can provide completed artifacts.
User can provide completed artifacts:
```text
User: /workflow-resume greenfield-fullstack
I have completed: project-brief, PRD
BMad: I see you've completed Discovery and part of Product Planning.
Based on the greenfield-fullstack workflow, the next step is:
- UX Strategy with Sally (ux-expert)
Would you like me to load Sally to continue?
```
### /workflow-next ### /workflow-next
Shows the next recommended agent and action in the current workflow. Shows next recommended agent and action.
## Workflow Execution Flow ## Execution Flow
### 1. Starting a Workflow 1. **Starting**: Load definition → Identify first stage → Transition to agent → Guide artifact creation
When a workflow is started: 2. **Stage Transitions**: Mark complete → Check conditions → Load next agent → Pass artifacts
1. Load the workflow definition 3. **Artifact Tracking**: Track status, creator, timestamps in workflow_state
2. Identify the first stage and step
3. Transition to the required agent
4. Provide context about expected inputs/outputs
5. Guide artifact creation
### 2. Stage Transitions 4. **Interruption Handling**: Analyze provided artifacts → Determine position → Suggest next step
After each artifact is completed: ## Context Passing
1. Mark the step as complete When transitioning, pass:
2. Check transition conditions
3. If stage is complete, move to next stage
4. Load the appropriate agent
5. Pass relevant artifacts as context
### 3. Artifact Tracking - Previous artifacts
- Current workflow stage
Track all created artifacts: - Expected outputs
- Decisions/constraints
```yaml
workflow_state:
current_workflow: greenfield-fullstack
current_stage: planning
current_step: 2
artifacts:
project-brief:
status: completed
created_by: analyst
timestamp: 2024-01-15T10:30:00.000Z
prd:
status: in-progress
created_by: pm
started: 2024-01-15T11:00:00.000Z
```
### 4. Workflow Interruption Handling
When user returns after interruption:
1. Ask if continuing previous workflow
2. Request any completed artifacts
3. Analyze provided artifacts
4. Determine workflow position
5. Suggest next appropriate step
Example:
```text
User: I'm working on a new app. Here's my PRD and architecture doc.
BMad: I see you have a PRD and architecture document. Based on these artifacts,
it looks like you're following the greenfield-fullstack workflow and have completed
stages 1-3. The next recommended step would be:
Stage 4: Validation & Refinement
- Load Sarah (Product Owner) to validate all artifacts
Would you like to continue with this workflow?
```
## Workflow Context Passing
When transitioning between agents, pass:
1. Previous artifacts created
2. Current workflow stage
3. Expected outputs
4. Any decisions or constraints identified
Example transition:
```text
BMad: Great! John has completed the PRD. According to the greenfield-fullstack workflow,
the next step is UX Strategy with Sally.
/ux-expert
Sally: I see we're in the Product Planning stage of the greenfield-fullstack workflow.
I have access to:
- Project Brief from Mary
- PRD from John
Let's create the UX strategy and UI specifications. First, let me review
the PRD to understand the features we're designing for...
```
## Multi-Path Workflows ## Multi-Path Workflows
Some workflows may have multiple paths: Handle conditional paths by asking clarifying questions when needed.
```yaml ## Best Practices
conditional_paths:
- condition: project_type == 'mobile'
next_stage: mobile-specific-design
- condition: project_type == 'web'
next_stage: web-architecture
- default: fullstack-architecture
```
Handle these by asking clarifying questions when needed. 1. Show progress
2. Explain transitions
3. Preserve context
4. Allow flexibility
5. Track state
## Workflow Best Practices ## Agent Integration
1. **Always show progress** - Users should know where they are Agents should be workflow-aware: know active workflow, their role, access artifacts, understand expected outputs.
2. **Explain transitions** - Why moving to next agent
3. **Preserve context** - Pass relevant information forward
4. **Allow flexibility** - Users can skip or modify steps
5. **Track everything** - Maintain complete workflow state
## Integration with Agents
Each agent should be workflow-aware:
- Know which workflow is active
- Understand their role in the workflow
- Access previous artifacts
- Know expected outputs
- Guide toward workflow goals
This creates a seamless experience where the entire team works together toward the workflow's objectives.
==================== END: utils#workflow-management ==================== ==================== END: utils#workflow-management ====================
==================== START: utils#template-format ==================== ==================== START: utils#template-format ====================
@@ -3568,13 +3411,9 @@ These replace the standard elicitation options when working on competitive analy
This task provides instructions for validating documentation against checklists. The agent MUST follow these instructions to ensure thorough and systematic validation of documents. This task provides instructions for validating documentation against checklists. The agent MUST follow these instructions to ensure thorough and systematic validation of documents.
## Context
The BMAD Method uses various checklists to ensure quality and completeness of different artifacts. Each checklist contains embedded prompts and instructions to guide the LLM through thorough validation and advanced elicitation. The checklists automatically identify their required artifacts and guide the validation process.
## Available Checklists ## Available Checklists
If the user asks or does not specify a specific checklist, list the checklists available to the agent persona. If the task is being run not with a specific agent, tell the user to check the bmad-core/checklists folder to select the appropriate one to run. If the user asks or does not specify a specific checklist, list the checklists available to the agent persona. If the task is being run not with a specific agent, tell the user to check the {root}/checklists folder to select the appropriate one to run.
## Instructions ## Instructions
@@ -3583,7 +3422,7 @@ If the user asks or does not specify a specific checklist, list the checklists a
- If user or the task being run provides a checklist name: - If user or the task being run provides a checklist name:
- Try fuzzy matching (e.g. "architecture checklist" -> "architect-checklist") - Try fuzzy matching (e.g. "architecture checklist" -> "architect-checklist")
- If multiple matches found, ask user to clarify - If multiple matches found, ask user to clarify
- Load the appropriate checklist from bmad-core/checklists/ - Load the appropriate checklist from {root}/checklists/
- If no checklist specified: - If no checklist specified:
- Ask the user which checklist they want to use - Ask the user which checklist they want to use
- Present the available options from the files in the checklists folder - Present the available options from the files in the checklists folder
@@ -9900,21 +9739,21 @@ workflow:
notes: "Review existing documentation, codebase structure, and identify integration points. Document current system understanding before proceeding." notes: "Review existing documentation, codebase structure, and identify integration points. Document current system understanding before proceeding."
- agent: pm - agent: pm
creates: brownfield-prd.md creates: prd.md
uses: brownfield-prd-tmpl uses: brownfield-prd-tmpl
requires: existing_project_analysis requires: existing_project_analysis
notes: "Creates comprehensive brownfield PRD with existing system analysis and enhancement planning. SAVE OUTPUT: Copy final brownfield-prd.md to your project's docs/ folder." notes: "Creates comprehensive PRD with existing system analysis and enhancement planning. SAVE OUTPUT: Copy final prd.md to your project's docs/ folder."
- agent: architect - agent: architect
creates: brownfield-architecture.md creates: architecture.md
uses: brownfield-architecture-tmpl uses: brownfield-architecture-tmpl
requires: brownfield-prd.md requires: prd.md
notes: "Creates brownfield architecture with integration strategy and existing system constraints. SAVE OUTPUT: Copy final brownfield-architecture.md to your project's docs/ folder." notes: "Creates architecture with integration strategy and existing system constraints. SAVE OUTPUT: Copy final architecture.md to your project's docs/ folder."
- agent: po - agent: po
validates: all_artifacts validates: all_artifacts
uses: po-master-checklist uses: po-master-checklist
notes: "Validates all brownfield documents for integration safety and completeness. May require updates to any document." notes: "Validates all documents for integration safety and completeness. May require updates to any document."
- agent: various - agent: various
updates: any_flagged_documents updates: any_flagged_documents
@@ -9964,8 +9803,8 @@ workflow:
```mermaid ```mermaid
graph TD graph TD
A[Start: Brownfield Enhancement] --> B[analyst: analyze existing project] A[Start: Brownfield Enhancement] --> B[analyst: analyze existing project]
B --> C[pm: brownfield-prd.md] B --> C[pm: prd.md]
C --> D[architect: brownfield-architecture.md] C --> D[architect: architecture.md]
D --> E[po: validate with po-master-checklist] D --> E[po: validate with po-master-checklist]
E --> F{PO finds issues?} E --> F{PO finds issues?}
F -->|Yes| G[Return to relevant agent for fixes] F -->|Yes| G[Return to relevant agent for fixes]
@@ -9986,11 +9825,11 @@ workflow:
- Multiple team members will work on related changes - Multiple team members will work on related changes
handoff_prompts: handoff_prompts:
analyst_to_pm: "Existing project analysis complete. Create comprehensive brownfield PRD with integration strategy." analyst_to_pm: "Existing project analysis complete. Create comprehensive PRD with integration strategy."
pm_to_architect: "Brownfield PRD ready. Save it as docs/brownfield-prd.md, then create the integration architecture." pm_to_architect: "PRD ready. Save it as docs/prd.md, then create the integration architecture."
architect_to_po: "Architecture complete. Save it as docs/brownfield-architecture.md. Please validate all artifacts for integration safety." architect_to_po: "Architecture complete. Save it as docs/architecture.md. Please validate all artifacts for integration safety."
po_issues: "PO found issues with [document]. Please return to [agent] to fix and re-save the updated document." po_issues: "PO found issues with [document]. Please return to [agent] to fix and re-save the updated document."
complete: "All brownfield planning artifacts validated and saved in docs/ folder. Move to IDE environment to begin development." complete: "All planning artifacts validated and saved in docs/ folder. Move to IDE environment to begin development."
==================== END: workflows#brownfield-fullstack ==================== ==================== END: workflows#brownfield-fullstack ====================
==================== START: workflows#brownfield-service ==================== ==================== START: workflows#brownfield-service ====================
@@ -10016,21 +9855,21 @@ workflow:
notes: "Review existing service documentation, codebase, performance metrics, and identify integration dependencies." notes: "Review existing service documentation, codebase, performance metrics, and identify integration dependencies."
- agent: pm - agent: pm
creates: brownfield-prd.md creates: prd.md
uses: brownfield-prd-tmpl uses: brownfield-prd-tmpl
requires: existing_service_analysis requires: existing_service_analysis
notes: "Creates comprehensive brownfield PRD focused on service enhancement with existing system analysis. SAVE OUTPUT: Copy final brownfield-prd.md to your project's docs/ folder." notes: "Creates comprehensive PRD focused on service enhancement with existing system analysis. SAVE OUTPUT: Copy final prd.md to your project's docs/ folder."
- agent: architect - agent: architect
creates: brownfield-architecture.md creates: architecture.md
uses: brownfield-architecture-tmpl uses: brownfield-architecture-tmpl
requires: brownfield-prd.md requires: prd.md
notes: "Creates brownfield architecture with service integration strategy and API evolution planning. SAVE OUTPUT: Copy final brownfield-architecture.md to your project's docs/ folder." notes: "Creates architecture with service integration strategy and API evolution planning. SAVE OUTPUT: Copy final architecture.md to your project's docs/ folder."
- agent: po - agent: po
validates: all_artifacts validates: all_artifacts
uses: po-master-checklist uses: po-master-checklist
notes: "Validates all brownfield documents for service integration safety and API compatibility. May require updates to any document." notes: "Validates all documents for service integration safety and API compatibility. May require updates to any document."
- agent: various - agent: various
updates: any_flagged_documents updates: any_flagged_documents
@@ -10080,8 +9919,8 @@ workflow:
```mermaid ```mermaid
graph TD graph TD
A[Start: Service Enhancement] --> B[analyst: analyze existing service] A[Start: Service Enhancement] --> B[analyst: analyze existing service]
B --> C[pm: brownfield-prd.md] B --> C[pm: prd.md]
C --> D[architect: brownfield-architecture.md] C --> D[architect: architecture.md]
D --> E[po: validate with po-master-checklist] D --> E[po: validate with po-master-checklist]
E --> F{PO finds issues?} E --> F{PO finds issues?}
F -->|Yes| G[Return to relevant agent for fixes] F -->|Yes| G[Return to relevant agent for fixes]
@@ -10102,11 +9941,11 @@ workflow:
- Multiple integration points affected - Multiple integration points affected
handoff_prompts: handoff_prompts:
analyst_to_pm: "Service analysis complete. Create comprehensive brownfield PRD with service integration strategy." analyst_to_pm: "Service analysis complete. Create comprehensive PRD with service integration strategy."
pm_to_architect: "Brownfield PRD ready. Save it as docs/brownfield-prd.md, then create the service architecture." pm_to_architect: "PRD ready. Save it as docs/prd.md, then create the service architecture."
architect_to_po: "Architecture complete. Save it as docs/brownfield-architecture.md. Please validate all artifacts for service integration safety." architect_to_po: "Architecture complete. Save it as docs/architecture.md. Please validate all artifacts for service integration safety."
po_issues: "PO found issues with [document]. Please return to [agent] to fix and re-save the updated document." po_issues: "PO found issues with [document]. Please return to [agent] to fix and re-save the updated document."
complete: "All brownfield planning artifacts validated and saved in docs/ folder. Move to IDE environment to begin development." complete: "All planning artifacts validated and saved in docs/ folder. Move to IDE environment to begin development."
==================== END: workflows#brownfield-service ==================== ==================== END: workflows#brownfield-service ====================
==================== START: workflows#brownfield-ui ==================== ==================== START: workflows#brownfield-ui ====================
@@ -10131,29 +9970,29 @@ workflow:
notes: "Review existing frontend application, user feedback, analytics data, and identify improvement areas." notes: "Review existing frontend application, user feedback, analytics data, and identify improvement areas."
- agent: pm - agent: pm
creates: brownfield-prd.md creates: prd.md
uses: brownfield-prd-tmpl uses: brownfield-prd-tmpl
requires: existing_ui_analysis requires: existing_ui_analysis
notes: "Creates comprehensive brownfield PRD focused on UI enhancement with existing system analysis. SAVE OUTPUT: Copy final brownfield-prd.md to your project's docs/ folder." notes: "Creates comprehensive PRD focused on UI enhancement with existing system analysis. SAVE OUTPUT: Copy final prd.md to your project's docs/ folder."
- agent: ux-expert - agent: ux-expert
creates: front-end-spec.md creates: front-end-spec.md
uses: front-end-spec-tmpl uses: front-end-spec-tmpl
requires: brownfield-prd.md requires: prd.md
notes: "Creates UI/UX specification for brownfield enhancement that integrates with existing design patterns. SAVE OUTPUT: Copy final front-end-spec.md to your project's docs/ folder." notes: "Creates UI/UX specification that integrates with existing design patterns. SAVE OUTPUT: Copy final front-end-spec.md to your project's docs/ folder."
- agent: architect - agent: architect
creates: brownfield-architecture.md creates: architecture.md
uses: brownfield-architecture-tmpl uses: brownfield-architecture-tmpl
requires: requires:
- brownfield-prd.md - prd.md
- front-end-spec.md - front-end-spec.md
notes: "Creates brownfield frontend architecture with component integration strategy and migration planning. SAVE OUTPUT: Copy final brownfield-architecture.md to your project's docs/ folder." notes: "Creates frontend architecture with component integration strategy and migration planning. SAVE OUTPUT: Copy final architecture.md to your project's docs/ folder."
- agent: po - agent: po
validates: all_artifacts validates: all_artifacts
uses: po-master-checklist uses: po-master-checklist
notes: "Validates all brownfield documents for UI integration safety and design consistency. May require updates to any document." notes: "Validates all documents for UI integration safety and design consistency. May require updates to any document."
- agent: various - agent: various
updates: any_flagged_documents updates: any_flagged_documents
@@ -10203,9 +10042,9 @@ workflow:
```mermaid ```mermaid
graph TD graph TD
A[Start: UI Enhancement] --> B[analyst: analyze existing UI] A[Start: UI Enhancement] --> B[analyst: analyze existing UI]
B --> C[pm: brownfield-prd.md] B --> C[pm: prd.md]
C --> D[ux-expert: front-end-spec.md] C --> D[ux-expert: front-end-spec.md]
D --> E[architect: brownfield-architecture.md] D --> E[architect: architecture.md]
E --> F[po: validate with po-master-checklist] E --> F[po: validate with po-master-checklist]
F --> G{PO finds issues?} F --> G{PO finds issues?}
G -->|Yes| H[Return to relevant agent for fixes] G -->|Yes| H[Return to relevant agent for fixes]
@@ -10227,12 +10066,12 @@ workflow:
- Multiple team members will work on related changes - Multiple team members will work on related changes
handoff_prompts: handoff_prompts:
analyst_to_pm: "UI analysis complete. Create comprehensive brownfield PRD with UI integration strategy." analyst_to_pm: "UI analysis complete. Create comprehensive PRD with UI integration strategy."
pm_to_ux: "Brownfield PRD ready. Save it as docs/brownfield-prd.md, then create the UI/UX specification." pm_to_ux: "PRD ready. Save it as docs/prd.md, then create the UI/UX specification."
ux_to_architect: "UI/UX spec complete. Save it as docs/front-end-spec.md, then create the frontend architecture." ux_to_architect: "UI/UX spec complete. Save it as docs/front-end-spec.md, then create the frontend architecture."
architect_to_po: "Architecture complete. Save it as docs/brownfield-architecture.md. Please validate all artifacts for UI integration safety." architect_to_po: "Architecture complete. Save it as docs/architecture.md. Please validate all artifacts for UI integration safety."
po_issues: "PO found issues with [document]. Please return to [agent] to fix and re-save the updated document." po_issues: "PO found issues with [document]. Please return to [agent] to fix and re-save the updated document."
complete: "All brownfield planning artifacts validated and saved in docs/ folder. Move to IDE environment to begin development." complete: "All planning artifacts validated and saved in docs/ folder. Move to IDE environment to begin development."
==================== END: workflows#brownfield-ui ==================== ==================== END: workflows#brownfield-ui ====================
==================== START: workflows#greenfield-fullstack ==================== ==================== START: workflows#greenfield-fullstack ====================

View File

@@ -599,76 +599,73 @@ Choose an action (0-9 - 9 to bypass - HELP for explanation of these options):
## Purpose ## Purpose
- Generate documents from any specified template following embedded instructions from the perspective of the selected agent persona Generate documents from templates by EXECUTING (not just reading) embedded instructions from the perspective of the selected agent persona.
## Instructions ## CRITICAL RULES
### 1. Identify Template and Context 1. **Templates are PROGRAMS** - Execute every [[LLM:]] instruction exactly as written
2. **NEVER show markup** - Hide all [[LLM:]], {{placeholders}}, @{examples}, and template syntax
3. **STOP and EXECUTE** - When you see "apply tasks#" or "execute tasks#", STOP and run that task immediately
4. **WAIT for user input** - At review points and after elicitation tasks
- Determine which template to use (user-provided or list available for selection to user) ## Execution Flow
- Agent-specific templates are listed in the agent's dependencies under `templates`. For each template listed, consider it a document the agent can create. So if an agent has: ### 1. Identify Template
@{example} - Load from `templates#*` or `{root}/templates directory`
dependencies: - Agent-specific templates are listed in agent's dependencies
templates: - prd-tmpl - architecture-tmpl - If agent has `templates: [prd-tmpl, architecture-tmpl]`, offer to create "PRD" and "Architecture" documents
@{/example}
You would offer to create "PRD" and "Architecture" documents when the user asks what you can help with. ### 2. Ask Interaction Mode
- Gather all relevant inputs, or ask for them, or else rely on user providing necessary details to complete the document > 1. **Incremental** - Section by section with reviews
- Understand the document purpose and target audience > 2. **YOLO Mode** - Complete draft then review (user can type `/yolo` anytime to switch)
### 2. Determine Interaction Mode
Confirm with the user their preferred interaction style:
- **Incremental:** Work through chunks of the document.
- **YOLO Mode:** Draft complete document making reasonable assumptions in one shot. (Can be entered also after starting incremental by just typing /yolo)
### 3. Execute Template ### 3. Execute Template
- Load specified template from `templates#*` or the /templates directory - Replace {{placeholders}} with real content
- Follow ALL embedded LLM instructions within the template - Execute [[LLM:]] instructions as you encounter them
- Process template markup according to `utils#template-format` conventions - Process <<REPEAT>> loops and ^^CONDITIONS^^
### 4. Template Processing Rules
#### CRITICAL: Never display template markup, LLM instructions, or examples to users
- Replace all {{placeholders}} with actual content
- Execute all [[LLM: instructions]] internally
- Process `<<REPEAT>>` sections as needed
- Evaluate ^^CONDITION^^ blocks and include only if applicable
- Use @{examples} for guidance but never output them - Use @{examples} for guidance but never output them
### 5. Content Generation ### 4. Key Execution Patterns
- **Incremental Mode**: Present each major section for review before proceeding **When you see:** `[[LLM: Draft X and immediately execute tasks#advanced-elicitation]]`
- **YOLO Mode**: Generate all sections, then review complete document with user
- Apply any elicitation protocols specified in template
- Incorporate user feedback and iterate as needed
### 6. Validation - Draft the content
- Present it to user
- IMMEDIATELY execute the task
- Wait for completion before continuing
If template specifies a checklist: **When you see:** `[[LLM: After section completion, apply tasks#Y]]`
- Run the appropriate checklist against completed document - Finish the section
- Document completion status for each item - STOP and execute the task
- Address any deficiencies found - Wait for user input
- Present validation summary to user
### 7. Final Presentation ### 5. Validation & Final Presentation
- Run any specified checklists
- Present clean, formatted content only - Present clean, formatted content only
- Ensure all sections are complete - No truncation or summarization
- DO NOT truncate or summarize content - Begin directly with content (no preamble)
- Begin directly with document content (no preamble) - Include any handoff prompts from template
- Include any handoff prompts specified in template
## Important Notes ## Common Mistakes to Avoid
- Template markup is for AI processing only - never expose to users ❌ Skipping elicitation tasks
❌ Showing template markup to users
❌ Continuing past STOP signals
❌ Combining multiple review points
✅ Execute ALL instructions in sequence
✅ Present only clean, formatted content
✅ Stop at every elicitation point
✅ Wait for user confirmation when instructed
## Remember
Templates contain precise instructions for a reason. Follow them exactly to ensure document quality and completeness.
==================== END: tasks#create-doc ==================== ==================== END: tasks#create-doc ====================
==================== START: tasks#kb-mode-interaction ==================== ==================== START: tasks#kb-mode-interaction ====================
@@ -825,7 +822,7 @@ BMAD transforms you into a "Vibe CEO" - directing a team of specialized AI agent
5. Type `/help` to see available commands 5. Type `/help` to see available commands
#### Option 2: IDE Integration #### Option 2: IDE Integration
**Best for**: Cursor, Claude Code, Windsurf, Cline, Roo Code users **Best for**: Cursor, Claude Code, Windsurf, Cline, Roo Code, VS Code Copilot users
```bash ```bash
# Interactive installation (recommended) # Interactive installation (recommended)
@@ -1466,7 +1463,7 @@ Expansion packs extend BMAD-METHOD beyond traditional software development into
### Using Expansion Packs ### Using Expansion Packs
1. **Browse Available Packs**: Check `expansion-packs/` directory 1. **Browse Available Packs**: Check `expansion-packs/` directory
2. **Get Inspiration**: See `docs/expansion-pack-ideas.md` for detailed examples 2. **Get Inspiration**: See `docs/expansion-packs.md` for detailed examples and ideas
3. **Install via CLI**: 3. **Install via CLI**:
```bash ```bash
npx bmad-method install npx bmad-method install
@@ -1497,227 +1494,73 @@ Use the **expansion-creator** pack to build your own:
==================== START: utils#workflow-management ==================== ==================== START: utils#workflow-management ====================
# Workflow Management # Workflow Management
This utility enables the BMAD orchestrator to manage and execute team workflows. Enables BMAD orchestrator to manage and execute team workflows.
## Important: Dynamic Workflow Loading ## Dynamic Workflow Loading
The BMAD orchestrator MUST read the available workflows from the current team configuration's `workflows` field. Do not use hardcoded workflow lists. Each team bundle defines its own set of supported workflows based on the agents it includes. Read available workflows from current team configuration's `workflows` field. Each team bundle defines its own supported workflows.
**Critical Distinction**: **Key Commands**:
- When asked "what workflows are available?", show ONLY the workflows defined in the current team bundle's configuration - `/workflows` - List workflows in current bundle or workflows folder
- Use `/agent-list` to show agents in the current bundle - `/agent-list` - Show agents in current bundle
- Use `/workflows` to show workflows in the current bundle, NOT any creation tasks
### Workflow Descriptions
When displaying workflows, use these descriptions based on the workflow ID:
- **greenfield-fullstack**: Build a new full-stack application from concept to development
- **brownfield-fullstack**: Enhance an existing full-stack application with new features
- **greenfield-service**: Build a new backend service or API from concept to development
- **brownfield-service**: Enhance an existing backend service or API
- **greenfield-ui**: Build a new frontend/UI application from concept to development
- **brownfield-ui**: Enhance an existing frontend/UI application
## Workflow Commands ## Workflow Commands
### /workflows ### /workflows
Lists all available workflows for the current team. The available workflows are determined by the team configuration and may include workflows such as: Lists available workflows with titles and descriptions.
- greenfield-fullstack
- brownfield-fullstack
- greenfield-service
- brownfield-service
- greenfield-ui
- brownfield-ui
The actual list depends on which team bundle is loaded. When responding to this command, display the workflows that are configured in the current team's `workflows` field.
Example response format:
```text
Available workflows for [Team Name]:
1. [workflow-id] - [Brief description based on workflow type]
2. [workflow-id] - [Brief description based on workflow type]
[... etc. ...]
Use /workflow-start {number or id} to begin a workflow.
```
### /workflow-start {workflow-id} ### /workflow-start {workflow-id}
Starts a specific workflow and transitions to the first agent. Starts workflow and transitions to first agent.
Example: `/workflow-start greenfield-fullstack`
### /workflow-status ### /workflow-status
Shows current workflow progress, completed artifacts, and next steps. Shows current progress, completed artifacts, and next steps.
Example response:
```text
Current Workflow: Greenfield Full-Stack Development
Stage: Product Planning (2 of 6)
Completed:
✓ Discovery & Requirements
- project-brief (completed by Mary)
In Progress:
⚡ Product Planning
- Create PRD (John) - awaiting input
Next: Technical Architecture
```
### /workflow-resume ### /workflow-resume
Resumes a workflow from where it left off, useful when starting a new chat. Resumes workflow from last position. User can provide completed artifacts.
User can provide completed artifacts:
```text
User: /workflow-resume greenfield-fullstack
I have completed: project-brief, PRD
BMad: I see you've completed Discovery and part of Product Planning.
Based on the greenfield-fullstack workflow, the next step is:
- UX Strategy with Sally (ux-expert)
Would you like me to load Sally to continue?
```
### /workflow-next ### /workflow-next
Shows the next recommended agent and action in the current workflow. Shows next recommended agent and action.
## Workflow Execution Flow ## Execution Flow
### 1. Starting a Workflow 1. **Starting**: Load definition → Identify first stage → Transition to agent → Guide artifact creation
When a workflow is started: 2. **Stage Transitions**: Mark complete → Check conditions → Load next agent → Pass artifacts
1. Load the workflow definition 3. **Artifact Tracking**: Track status, creator, timestamps in workflow_state
2. Identify the first stage and step
3. Transition to the required agent
4. Provide context about expected inputs/outputs
5. Guide artifact creation
### 2. Stage Transitions 4. **Interruption Handling**: Analyze provided artifacts → Determine position → Suggest next step
After each artifact is completed: ## Context Passing
1. Mark the step as complete When transitioning, pass:
2. Check transition conditions
3. If stage is complete, move to next stage
4. Load the appropriate agent
5. Pass relevant artifacts as context
### 3. Artifact Tracking - Previous artifacts
- Current workflow stage
Track all created artifacts: - Expected outputs
- Decisions/constraints
```yaml
workflow_state:
current_workflow: greenfield-fullstack
current_stage: planning
current_step: 2
artifacts:
project-brief:
status: completed
created_by: analyst
timestamp: 2024-01-15T10:30:00.000Z
prd:
status: in-progress
created_by: pm
started: 2024-01-15T11:00:00.000Z
```
### 4. Workflow Interruption Handling
When user returns after interruption:
1. Ask if continuing previous workflow
2. Request any completed artifacts
3. Analyze provided artifacts
4. Determine workflow position
5. Suggest next appropriate step
Example:
```text
User: I'm working on a new app. Here's my PRD and architecture doc.
BMad: I see you have a PRD and architecture document. Based on these artifacts,
it looks like you're following the greenfield-fullstack workflow and have completed
stages 1-3. The next recommended step would be:
Stage 4: Validation & Refinement
- Load Sarah (Product Owner) to validate all artifacts
Would you like to continue with this workflow?
```
## Workflow Context Passing
When transitioning between agents, pass:
1. Previous artifacts created
2. Current workflow stage
3. Expected outputs
4. Any decisions or constraints identified
Example transition:
```text
BMad: Great! John has completed the PRD. According to the greenfield-fullstack workflow,
the next step is UX Strategy with Sally.
/ux-expert
Sally: I see we're in the Product Planning stage of the greenfield-fullstack workflow.
I have access to:
- Project Brief from Mary
- PRD from John
Let's create the UX strategy and UI specifications. First, let me review
the PRD to understand the features we're designing for...
```
## Multi-Path Workflows ## Multi-Path Workflows
Some workflows may have multiple paths: Handle conditional paths by asking clarifying questions when needed.
```yaml ## Best Practices
conditional_paths:
- condition: project_type == 'mobile'
next_stage: mobile-specific-design
- condition: project_type == 'web'
next_stage: web-architecture
- default: fullstack-architecture
```
Handle these by asking clarifying questions when needed. 1. Show progress
2. Explain transitions
3. Preserve context
4. Allow flexibility
5. Track state
## Workflow Best Practices ## Agent Integration
1. **Always show progress** - Users should know where they are Agents should be workflow-aware: know active workflow, their role, access artifacts, understand expected outputs.
2. **Explain transitions** - Why moving to next agent
3. **Preserve context** - Pass relevant information forward
4. **Allow flexibility** - Users can skip or modify steps
5. **Track everything** - Maintain complete workflow state
## Integration with Agents
Each agent should be workflow-aware:
- Know which workflow is active
- Understand their role in the workflow
- Access previous artifacts
- Know expected outputs
- Guide toward workflow goals
This creates a seamless experience where the entire team works together toward the workflow's objectives.
==================== END: utils#workflow-management ==================== ==================== END: utils#workflow-management ====================
==================== START: utils#template-format ==================== ==================== START: utils#template-format ====================
@@ -3801,13 +3644,9 @@ The story creation is successful when:
This task provides instructions for validating documentation against checklists. The agent MUST follow these instructions to ensure thorough and systematic validation of documents. This task provides instructions for validating documentation against checklists. The agent MUST follow these instructions to ensure thorough and systematic validation of documents.
## Context
The BMAD Method uses various checklists to ensure quality and completeness of different artifacts. Each checklist contains embedded prompts and instructions to guide the LLM through thorough validation and advanced elicitation. The checklists automatically identify their required artifacts and guide the validation process.
## Available Checklists ## Available Checklists
If the user asks or does not specify a specific checklist, list the checklists available to the agent persona. If the task is being run not with a specific agent, tell the user to check the bmad-core/checklists folder to select the appropriate one to run. If the user asks or does not specify a specific checklist, list the checklists available to the agent persona. If the task is being run not with a specific agent, tell the user to check the {root}/checklists folder to select the appropriate one to run.
## Instructions ## Instructions
@@ -3816,7 +3655,7 @@ If the user asks or does not specify a specific checklist, list the checklists a
- If user or the task being run provides a checklist name: - If user or the task being run provides a checklist name:
- Try fuzzy matching (e.g. "architecture checklist" -> "architect-checklist") - Try fuzzy matching (e.g. "architecture checklist" -> "architect-checklist")
- If multiple matches found, ask user to clarify - If multiple matches found, ask user to clarify
- Load the appropriate checklist from bmad-core/checklists/ - Load the appropriate checklist from {root}/checklists/
- If no checklist specified: - If no checklist specified:
- Ask the user which checklist they want to use - Ask the user which checklist they want to use
- Present the available options from the files in the checklists folder - Present the available options from the files in the checklists folder
@@ -9088,21 +8927,21 @@ workflow:
notes: "Review existing documentation, codebase structure, and identify integration points. Document current system understanding before proceeding." notes: "Review existing documentation, codebase structure, and identify integration points. Document current system understanding before proceeding."
- agent: pm - agent: pm
creates: brownfield-prd.md creates: prd.md
uses: brownfield-prd-tmpl uses: brownfield-prd-tmpl
requires: existing_project_analysis requires: existing_project_analysis
notes: "Creates comprehensive brownfield PRD with existing system analysis and enhancement planning. SAVE OUTPUT: Copy final brownfield-prd.md to your project's docs/ folder." notes: "Creates comprehensive PRD with existing system analysis and enhancement planning. SAVE OUTPUT: Copy final prd.md to your project's docs/ folder."
- agent: architect - agent: architect
creates: brownfield-architecture.md creates: architecture.md
uses: brownfield-architecture-tmpl uses: brownfield-architecture-tmpl
requires: brownfield-prd.md requires: prd.md
notes: "Creates brownfield architecture with integration strategy and existing system constraints. SAVE OUTPUT: Copy final brownfield-architecture.md to your project's docs/ folder." notes: "Creates architecture with integration strategy and existing system constraints. SAVE OUTPUT: Copy final architecture.md to your project's docs/ folder."
- agent: po - agent: po
validates: all_artifacts validates: all_artifacts
uses: po-master-checklist uses: po-master-checklist
notes: "Validates all brownfield documents for integration safety and completeness. May require updates to any document." notes: "Validates all documents for integration safety and completeness. May require updates to any document."
- agent: various - agent: various
updates: any_flagged_documents updates: any_flagged_documents
@@ -9152,8 +8991,8 @@ workflow:
```mermaid ```mermaid
graph TD graph TD
A[Start: Brownfield Enhancement] --> B[analyst: analyze existing project] A[Start: Brownfield Enhancement] --> B[analyst: analyze existing project]
B --> C[pm: brownfield-prd.md] B --> C[pm: prd.md]
C --> D[architect: brownfield-architecture.md] C --> D[architect: architecture.md]
D --> E[po: validate with po-master-checklist] D --> E[po: validate with po-master-checklist]
E --> F{PO finds issues?} E --> F{PO finds issues?}
F -->|Yes| G[Return to relevant agent for fixes] F -->|Yes| G[Return to relevant agent for fixes]
@@ -9174,11 +9013,11 @@ workflow:
- Multiple team members will work on related changes - Multiple team members will work on related changes
handoff_prompts: handoff_prompts:
analyst_to_pm: "Existing project analysis complete. Create comprehensive brownfield PRD with integration strategy." analyst_to_pm: "Existing project analysis complete. Create comprehensive PRD with integration strategy."
pm_to_architect: "Brownfield PRD ready. Save it as docs/brownfield-prd.md, then create the integration architecture." pm_to_architect: "PRD ready. Save it as docs/prd.md, then create the integration architecture."
architect_to_po: "Architecture complete. Save it as docs/brownfield-architecture.md. Please validate all artifacts for integration safety." architect_to_po: "Architecture complete. Save it as docs/architecture.md. Please validate all artifacts for integration safety."
po_issues: "PO found issues with [document]. Please return to [agent] to fix and re-save the updated document." po_issues: "PO found issues with [document]. Please return to [agent] to fix and re-save the updated document."
complete: "All brownfield planning artifacts validated and saved in docs/ folder. Move to IDE environment to begin development." complete: "All planning artifacts validated and saved in docs/ folder. Move to IDE environment to begin development."
==================== END: workflows#brownfield-fullstack ==================== ==================== END: workflows#brownfield-fullstack ====================
==================== START: workflows#brownfield-service ==================== ==================== START: workflows#brownfield-service ====================
@@ -9204,21 +9043,21 @@ workflow:
notes: "Review existing service documentation, codebase, performance metrics, and identify integration dependencies." notes: "Review existing service documentation, codebase, performance metrics, and identify integration dependencies."
- agent: pm - agent: pm
creates: brownfield-prd.md creates: prd.md
uses: brownfield-prd-tmpl uses: brownfield-prd-tmpl
requires: existing_service_analysis requires: existing_service_analysis
notes: "Creates comprehensive brownfield PRD focused on service enhancement with existing system analysis. SAVE OUTPUT: Copy final brownfield-prd.md to your project's docs/ folder." notes: "Creates comprehensive PRD focused on service enhancement with existing system analysis. SAVE OUTPUT: Copy final prd.md to your project's docs/ folder."
- agent: architect - agent: architect
creates: brownfield-architecture.md creates: architecture.md
uses: brownfield-architecture-tmpl uses: brownfield-architecture-tmpl
requires: brownfield-prd.md requires: prd.md
notes: "Creates brownfield architecture with service integration strategy and API evolution planning. SAVE OUTPUT: Copy final brownfield-architecture.md to your project's docs/ folder." notes: "Creates architecture with service integration strategy and API evolution planning. SAVE OUTPUT: Copy final architecture.md to your project's docs/ folder."
- agent: po - agent: po
validates: all_artifacts validates: all_artifacts
uses: po-master-checklist uses: po-master-checklist
notes: "Validates all brownfield documents for service integration safety and API compatibility. May require updates to any document." notes: "Validates all documents for service integration safety and API compatibility. May require updates to any document."
- agent: various - agent: various
updates: any_flagged_documents updates: any_flagged_documents
@@ -9268,8 +9107,8 @@ workflow:
```mermaid ```mermaid
graph TD graph TD
A[Start: Service Enhancement] --> B[analyst: analyze existing service] A[Start: Service Enhancement] --> B[analyst: analyze existing service]
B --> C[pm: brownfield-prd.md] B --> C[pm: prd.md]
C --> D[architect: brownfield-architecture.md] C --> D[architect: architecture.md]
D --> E[po: validate with po-master-checklist] D --> E[po: validate with po-master-checklist]
E --> F{PO finds issues?} E --> F{PO finds issues?}
F -->|Yes| G[Return to relevant agent for fixes] F -->|Yes| G[Return to relevant agent for fixes]
@@ -9290,11 +9129,11 @@ workflow:
- Multiple integration points affected - Multiple integration points affected
handoff_prompts: handoff_prompts:
analyst_to_pm: "Service analysis complete. Create comprehensive brownfield PRD with service integration strategy." analyst_to_pm: "Service analysis complete. Create comprehensive PRD with service integration strategy."
pm_to_architect: "Brownfield PRD ready. Save it as docs/brownfield-prd.md, then create the service architecture." pm_to_architect: "PRD ready. Save it as docs/prd.md, then create the service architecture."
architect_to_po: "Architecture complete. Save it as docs/brownfield-architecture.md. Please validate all artifacts for service integration safety." architect_to_po: "Architecture complete. Save it as docs/architecture.md. Please validate all artifacts for service integration safety."
po_issues: "PO found issues with [document]. Please return to [agent] to fix and re-save the updated document." po_issues: "PO found issues with [document]. Please return to [agent] to fix and re-save the updated document."
complete: "All brownfield planning artifacts validated and saved in docs/ folder. Move to IDE environment to begin development." complete: "All planning artifacts validated and saved in docs/ folder. Move to IDE environment to begin development."
==================== END: workflows#brownfield-service ==================== ==================== END: workflows#brownfield-service ====================
==================== START: workflows#brownfield-ui ==================== ==================== START: workflows#brownfield-ui ====================
@@ -9319,29 +9158,29 @@ workflow:
notes: "Review existing frontend application, user feedback, analytics data, and identify improvement areas." notes: "Review existing frontend application, user feedback, analytics data, and identify improvement areas."
- agent: pm - agent: pm
creates: brownfield-prd.md creates: prd.md
uses: brownfield-prd-tmpl uses: brownfield-prd-tmpl
requires: existing_ui_analysis requires: existing_ui_analysis
notes: "Creates comprehensive brownfield PRD focused on UI enhancement with existing system analysis. SAVE OUTPUT: Copy final brownfield-prd.md to your project's docs/ folder." notes: "Creates comprehensive PRD focused on UI enhancement with existing system analysis. SAVE OUTPUT: Copy final prd.md to your project's docs/ folder."
- agent: ux-expert - agent: ux-expert
creates: front-end-spec.md creates: front-end-spec.md
uses: front-end-spec-tmpl uses: front-end-spec-tmpl
requires: brownfield-prd.md requires: prd.md
notes: "Creates UI/UX specification for brownfield enhancement that integrates with existing design patterns. SAVE OUTPUT: Copy final front-end-spec.md to your project's docs/ folder." notes: "Creates UI/UX specification that integrates with existing design patterns. SAVE OUTPUT: Copy final front-end-spec.md to your project's docs/ folder."
- agent: architect - agent: architect
creates: brownfield-architecture.md creates: architecture.md
uses: brownfield-architecture-tmpl uses: brownfield-architecture-tmpl
requires: requires:
- brownfield-prd.md - prd.md
- front-end-spec.md - front-end-spec.md
notes: "Creates brownfield frontend architecture with component integration strategy and migration planning. SAVE OUTPUT: Copy final brownfield-architecture.md to your project's docs/ folder." notes: "Creates frontend architecture with component integration strategy and migration planning. SAVE OUTPUT: Copy final architecture.md to your project's docs/ folder."
- agent: po - agent: po
validates: all_artifacts validates: all_artifacts
uses: po-master-checklist uses: po-master-checklist
notes: "Validates all brownfield documents for UI integration safety and design consistency. May require updates to any document." notes: "Validates all documents for UI integration safety and design consistency. May require updates to any document."
- agent: various - agent: various
updates: any_flagged_documents updates: any_flagged_documents
@@ -9391,9 +9230,9 @@ workflow:
```mermaid ```mermaid
graph TD graph TD
A[Start: UI Enhancement] --> B[analyst: analyze existing UI] A[Start: UI Enhancement] --> B[analyst: analyze existing UI]
B --> C[pm: brownfield-prd.md] B --> C[pm: prd.md]
C --> D[ux-expert: front-end-spec.md] C --> D[ux-expert: front-end-spec.md]
D --> E[architect: brownfield-architecture.md] D --> E[architect: architecture.md]
E --> F[po: validate with po-master-checklist] E --> F[po: validate with po-master-checklist]
F --> G{PO finds issues?} F --> G{PO finds issues?}
G -->|Yes| H[Return to relevant agent for fixes] G -->|Yes| H[Return to relevant agent for fixes]
@@ -9415,12 +9254,12 @@ workflow:
- Multiple team members will work on related changes - Multiple team members will work on related changes
handoff_prompts: handoff_prompts:
analyst_to_pm: "UI analysis complete. Create comprehensive brownfield PRD with UI integration strategy." analyst_to_pm: "UI analysis complete. Create comprehensive PRD with UI integration strategy."
pm_to_ux: "Brownfield PRD ready. Save it as docs/brownfield-prd.md, then create the UI/UX specification." pm_to_ux: "PRD ready. Save it as docs/prd.md, then create the UI/UX specification."
ux_to_architect: "UI/UX spec complete. Save it as docs/front-end-spec.md, then create the frontend architecture." ux_to_architect: "UI/UX spec complete. Save it as docs/front-end-spec.md, then create the frontend architecture."
architect_to_po: "Architecture complete. Save it as docs/brownfield-architecture.md. Please validate all artifacts for UI integration safety." architect_to_po: "Architecture complete. Save it as docs/architecture.md. Please validate all artifacts for UI integration safety."
po_issues: "PO found issues with [document]. Please return to [agent] to fix and re-save the updated document." po_issues: "PO found issues with [document]. Please return to [agent] to fix and re-save the updated document."
complete: "All brownfield planning artifacts validated and saved in docs/ folder. Move to IDE environment to begin development." complete: "All planning artifacts validated and saved in docs/ folder. Move to IDE environment to begin development."
==================== END: workflows#brownfield-ui ==================== ==================== END: workflows#brownfield-ui ====================
==================== START: workflows#greenfield-fullstack ==================== ==================== START: workflows#greenfield-fullstack ====================

View File

@@ -335,7 +335,7 @@ task-execution:
updates-ONLY: updates-ONLY:
- 'Checkboxes: [ ] not started | [-] in progress | [x] complete' - 'Checkboxes: [ ] not started | [-] in progress | [x] complete'
- 'Debug Log: | Task | File | Change | Reverted? |' - 'Debug Log: | Task | File | Change | Reverted? |'
- 'Completion Notes: Deviations only, <50 words' - 'Completion Notes: Deviations from AC or tasks during execution only, <50 words'
- 'Change Log: Requirement changes only' - 'Change Log: Requirement changes only'
- 'File List: CRITICAL - Maintain complete list of ALL files created/modified during implementation' - 'File List: CRITICAL - Maintain complete list of ALL files created/modified during implementation'
blocking: Unapproved deps | Ambiguous after story check | 3 failures | Missing config | Failing validations blocking: Unapproved deps | Ambiguous after story check | 3 failures | Missing config | Failing validations
@@ -499,76 +499,73 @@ Choose an action (0-9 - 9 to bypass - HELP for explanation of these options):
## Purpose ## Purpose
- Generate documents from any specified template following embedded instructions from the perspective of the selected agent persona Generate documents from templates by EXECUTING (not just reading) embedded instructions from the perspective of the selected agent persona.
## Instructions ## CRITICAL RULES
### 1. Identify Template and Context 1. **Templates are PROGRAMS** - Execute every [[LLM:]] instruction exactly as written
2. **NEVER show markup** - Hide all [[LLM:]], {{placeholders}}, @{examples}, and template syntax
3. **STOP and EXECUTE** - When you see "apply tasks#" or "execute tasks#", STOP and run that task immediately
4. **WAIT for user input** - At review points and after elicitation tasks
- Determine which template to use (user-provided or list available for selection to user) ## Execution Flow
- Agent-specific templates are listed in the agent's dependencies under `templates`. For each template listed, consider it a document the agent can create. So if an agent has: ### 1. Identify Template
@{example} - Load from `templates#*` or `{root}/templates directory`
dependencies: - Agent-specific templates are listed in agent's dependencies
templates: - prd-tmpl - architecture-tmpl - If agent has `templates: [prd-tmpl, architecture-tmpl]`, offer to create "PRD" and "Architecture" documents
@{/example}
You would offer to create "PRD" and "Architecture" documents when the user asks what you can help with. ### 2. Ask Interaction Mode
- Gather all relevant inputs, or ask for them, or else rely on user providing necessary details to complete the document > 1. **Incremental** - Section by section with reviews
- Understand the document purpose and target audience > 2. **YOLO Mode** - Complete draft then review (user can type `/yolo` anytime to switch)
### 2. Determine Interaction Mode
Confirm with the user their preferred interaction style:
- **Incremental:** Work through chunks of the document.
- **YOLO Mode:** Draft complete document making reasonable assumptions in one shot. (Can be entered also after starting incremental by just typing /yolo)
### 3. Execute Template ### 3. Execute Template
- Load specified template from `templates#*` or the /templates directory - Replace {{placeholders}} with real content
- Follow ALL embedded LLM instructions within the template - Execute [[LLM:]] instructions as you encounter them
- Process template markup according to `utils#template-format` conventions - Process <<REPEAT>> loops and ^^CONDITIONS^^
### 4. Template Processing Rules
#### CRITICAL: Never display template markup, LLM instructions, or examples to users
- Replace all {{placeholders}} with actual content
- Execute all [[LLM: instructions]] internally
- Process `<<REPEAT>>` sections as needed
- Evaluate ^^CONDITION^^ blocks and include only if applicable
- Use @{examples} for guidance but never output them - Use @{examples} for guidance but never output them
### 5. Content Generation ### 4. Key Execution Patterns
- **Incremental Mode**: Present each major section for review before proceeding **When you see:** `[[LLM: Draft X and immediately execute tasks#advanced-elicitation]]`
- **YOLO Mode**: Generate all sections, then review complete document with user
- Apply any elicitation protocols specified in template
- Incorporate user feedback and iterate as needed
### 6. Validation - Draft the content
- Present it to user
- IMMEDIATELY execute the task
- Wait for completion before continuing
If template specifies a checklist: **When you see:** `[[LLM: After section completion, apply tasks#Y]]`
- Run the appropriate checklist against completed document - Finish the section
- Document completion status for each item - STOP and execute the task
- Address any deficiencies found - Wait for user input
- Present validation summary to user
### 7. Final Presentation ### 5. Validation & Final Presentation
- Run any specified checklists
- Present clean, formatted content only - Present clean, formatted content only
- Ensure all sections are complete - No truncation or summarization
- DO NOT truncate or summarize content - Begin directly with content (no preamble)
- Begin directly with document content (no preamble) - Include any handoff prompts from template
- Include any handoff prompts specified in template
## Important Notes ## Common Mistakes to Avoid
- Template markup is for AI processing only - never expose to users ❌ Skipping elicitation tasks
❌ Showing template markup to users
❌ Continuing past STOP signals
❌ Combining multiple review points
✅ Execute ALL instructions in sequence
✅ Present only clean, formatted content
✅ Stop at every elicitation point
✅ Wait for user confirmation when instructed
## Remember
Templates contain precise instructions for a reason. Follow them exactly to ensure document quality and completeness.
==================== END: tasks#create-doc ==================== ==================== END: tasks#create-doc ====================
==================== START: tasks#kb-mode-interaction ==================== ==================== START: tasks#kb-mode-interaction ====================
@@ -725,7 +722,7 @@ BMAD transforms you into a "Vibe CEO" - directing a team of specialized AI agent
5. Type `/help` to see available commands 5. Type `/help` to see available commands
#### Option 2: IDE Integration #### Option 2: IDE Integration
**Best for**: Cursor, Claude Code, Windsurf, Cline, Roo Code users **Best for**: Cursor, Claude Code, Windsurf, Cline, Roo Code, VS Code Copilot users
```bash ```bash
# Interactive installation (recommended) # Interactive installation (recommended)
@@ -1366,7 +1363,7 @@ Expansion packs extend BMAD-METHOD beyond traditional software development into
### Using Expansion Packs ### Using Expansion Packs
1. **Browse Available Packs**: Check `expansion-packs/` directory 1. **Browse Available Packs**: Check `expansion-packs/` directory
2. **Get Inspiration**: See `docs/expansion-pack-ideas.md` for detailed examples 2. **Get Inspiration**: See `docs/expansion-packs.md` for detailed examples and ideas
3. **Install via CLI**: 3. **Install via CLI**:
```bash ```bash
npx bmad-method install npx bmad-method install
@@ -1397,227 +1394,73 @@ Use the **expansion-creator** pack to build your own:
==================== START: utils#workflow-management ==================== ==================== START: utils#workflow-management ====================
# Workflow Management # Workflow Management
This utility enables the BMAD orchestrator to manage and execute team workflows. Enables BMAD orchestrator to manage and execute team workflows.
## Important: Dynamic Workflow Loading ## Dynamic Workflow Loading
The BMAD orchestrator MUST read the available workflows from the current team configuration's `workflows` field. Do not use hardcoded workflow lists. Each team bundle defines its own set of supported workflows based on the agents it includes. Read available workflows from current team configuration's `workflows` field. Each team bundle defines its own supported workflows.
**Critical Distinction**: **Key Commands**:
- When asked "what workflows are available?", show ONLY the workflows defined in the current team bundle's configuration - `/workflows` - List workflows in current bundle or workflows folder
- Use `/agent-list` to show agents in the current bundle - `/agent-list` - Show agents in current bundle
- Use `/workflows` to show workflows in the current bundle, NOT any creation tasks
### Workflow Descriptions
When displaying workflows, use these descriptions based on the workflow ID:
- **greenfield-fullstack**: Build a new full-stack application from concept to development
- **brownfield-fullstack**: Enhance an existing full-stack application with new features
- **greenfield-service**: Build a new backend service or API from concept to development
- **brownfield-service**: Enhance an existing backend service or API
- **greenfield-ui**: Build a new frontend/UI application from concept to development
- **brownfield-ui**: Enhance an existing frontend/UI application
## Workflow Commands ## Workflow Commands
### /workflows ### /workflows
Lists all available workflows for the current team. The available workflows are determined by the team configuration and may include workflows such as: Lists available workflows with titles and descriptions.
- greenfield-fullstack
- brownfield-fullstack
- greenfield-service
- brownfield-service
- greenfield-ui
- brownfield-ui
The actual list depends on which team bundle is loaded. When responding to this command, display the workflows that are configured in the current team's `workflows` field.
Example response format:
```text
Available workflows for [Team Name]:
1. [workflow-id] - [Brief description based on workflow type]
2. [workflow-id] - [Brief description based on workflow type]
[... etc. ...]
Use /workflow-start {number or id} to begin a workflow.
```
### /workflow-start {workflow-id} ### /workflow-start {workflow-id}
Starts a specific workflow and transitions to the first agent. Starts workflow and transitions to first agent.
Example: `/workflow-start greenfield-fullstack`
### /workflow-status ### /workflow-status
Shows current workflow progress, completed artifacts, and next steps. Shows current progress, completed artifacts, and next steps.
Example response:
```text
Current Workflow: Greenfield Full-Stack Development
Stage: Product Planning (2 of 6)
Completed:
✓ Discovery & Requirements
- project-brief (completed by Mary)
In Progress:
⚡ Product Planning
- Create PRD (John) - awaiting input
Next: Technical Architecture
```
### /workflow-resume ### /workflow-resume
Resumes a workflow from where it left off, useful when starting a new chat. Resumes workflow from last position. User can provide completed artifacts.
User can provide completed artifacts:
```text
User: /workflow-resume greenfield-fullstack
I have completed: project-brief, PRD
BMad: I see you've completed Discovery and part of Product Planning.
Based on the greenfield-fullstack workflow, the next step is:
- UX Strategy with Sally (ux-expert)
Would you like me to load Sally to continue?
```
### /workflow-next ### /workflow-next
Shows the next recommended agent and action in the current workflow. Shows next recommended agent and action.
## Workflow Execution Flow ## Execution Flow
### 1. Starting a Workflow 1. **Starting**: Load definition → Identify first stage → Transition to agent → Guide artifact creation
When a workflow is started: 2. **Stage Transitions**: Mark complete → Check conditions → Load next agent → Pass artifacts
1. Load the workflow definition 3. **Artifact Tracking**: Track status, creator, timestamps in workflow_state
2. Identify the first stage and step
3. Transition to the required agent
4. Provide context about expected inputs/outputs
5. Guide artifact creation
### 2. Stage Transitions 4. **Interruption Handling**: Analyze provided artifacts → Determine position → Suggest next step
After each artifact is completed: ## Context Passing
1. Mark the step as complete When transitioning, pass:
2. Check transition conditions
3. If stage is complete, move to next stage
4. Load the appropriate agent
5. Pass relevant artifacts as context
### 3. Artifact Tracking - Previous artifacts
- Current workflow stage
Track all created artifacts: - Expected outputs
- Decisions/constraints
```yaml
workflow_state:
current_workflow: greenfield-fullstack
current_stage: planning
current_step: 2
artifacts:
project-brief:
status: completed
created_by: analyst
timestamp: 2024-01-15T10:30:00.000Z
prd:
status: in-progress
created_by: pm
started: 2024-01-15T11:00:00.000Z
```
### 4. Workflow Interruption Handling
When user returns after interruption:
1. Ask if continuing previous workflow
2. Request any completed artifacts
3. Analyze provided artifacts
4. Determine workflow position
5. Suggest next appropriate step
Example:
```text
User: I'm working on a new app. Here's my PRD and architecture doc.
BMad: I see you have a PRD and architecture document. Based on these artifacts,
it looks like you're following the greenfield-fullstack workflow and have completed
stages 1-3. The next recommended step would be:
Stage 4: Validation & Refinement
- Load Sarah (Product Owner) to validate all artifacts
Would you like to continue with this workflow?
```
## Workflow Context Passing
When transitioning between agents, pass:
1. Previous artifacts created
2. Current workflow stage
3. Expected outputs
4. Any decisions or constraints identified
Example transition:
```text
BMad: Great! John has completed the PRD. According to the greenfield-fullstack workflow,
the next step is UX Strategy with Sally.
/ux-expert
Sally: I see we're in the Product Planning stage of the greenfield-fullstack workflow.
I have access to:
- Project Brief from Mary
- PRD from John
Let's create the UX strategy and UI specifications. First, let me review
the PRD to understand the features we're designing for...
```
## Multi-Path Workflows ## Multi-Path Workflows
Some workflows may have multiple paths: Handle conditional paths by asking clarifying questions when needed.
```yaml ## Best Practices
conditional_paths:
- condition: project_type == 'mobile'
next_stage: mobile-specific-design
- condition: project_type == 'web'
next_stage: web-architecture
- default: fullstack-architecture
```
Handle these by asking clarifying questions when needed. 1. Show progress
2. Explain transitions
3. Preserve context
4. Allow flexibility
5. Track state
## Workflow Best Practices ## Agent Integration
1. **Always show progress** - Users should know where they are Agents should be workflow-aware: know active workflow, their role, access artifacts, understand expected outputs.
2. **Explain transitions** - Why moving to next agent
3. **Preserve context** - Pass relevant information forward
4. **Allow flexibility** - Users can skip or modify steps
5. **Track everything** - Maintain complete workflow state
## Integration with Agents
Each agent should be workflow-aware:
- Know which workflow is active
- Understand their role in the workflow
- Access previous artifacts
- Know expected outputs
- Guide toward workflow goals
This creates a seamless experience where the entire team works together toward the workflow's objectives.
==================== END: utils#workflow-management ==================== ==================== END: utils#workflow-management ====================
==================== START: utils#template-format ==================== ==================== START: utils#template-format ====================
@@ -1654,13 +1497,9 @@ Templates in the BMAD method use standardized markup for AI processing. These co
This task provides instructions for validating documentation against checklists. The agent MUST follow these instructions to ensure thorough and systematic validation of documents. This task provides instructions for validating documentation against checklists. The agent MUST follow these instructions to ensure thorough and systematic validation of documents.
## Context
The BMAD Method uses various checklists to ensure quality and completeness of different artifacts. Each checklist contains embedded prompts and instructions to guide the LLM through thorough validation and advanced elicitation. The checklists automatically identify their required artifacts and guide the validation process.
## Available Checklists ## Available Checklists
If the user asks or does not specify a specific checklist, list the checklists available to the agent persona. If the task is being run not with a specific agent, tell the user to check the bmad-core/checklists folder to select the appropriate one to run. If the user asks or does not specify a specific checklist, list the checklists available to the agent persona. If the task is being run not with a specific agent, tell the user to check the {root}/checklists folder to select the appropriate one to run.
## Instructions ## Instructions
@@ -1669,7 +1508,7 @@ If the user asks or does not specify a specific checklist, list the checklists a
- If user or the task being run provides a checklist name: - If user or the task being run provides a checklist name:
- Try fuzzy matching (e.g. "architecture checklist" -> "architect-checklist") - Try fuzzy matching (e.g. "architecture checklist" -> "architect-checklist")
- If multiple matches found, ask user to clarify - If multiple matches found, ask user to clarify
- Load the appropriate checklist from bmad-core/checklists/ - Load the appropriate checklist from {root}/checklists/
- If no checklist specified: - If no checklist specified:
- Ask the user which checklist they want to use - Ask the user which checklist they want to use
- Present the available options from the files in the checklists folder - Present the available options from the files in the checklists folder

View File

@@ -531,76 +531,73 @@ Choose an action (0-9 - 9 to bypass - HELP for explanation of these options):
## Purpose ## Purpose
- Generate documents from any specified template following embedded instructions from the perspective of the selected agent persona Generate documents from templates by EXECUTING (not just reading) embedded instructions from the perspective of the selected agent persona.
## Instructions ## CRITICAL RULES
### 1. Identify Template and Context 1. **Templates are PROGRAMS** - Execute every [[LLM:]] instruction exactly as written
2. **NEVER show markup** - Hide all [[LLM:]], {{placeholders}}, @{examples}, and template syntax
3. **STOP and EXECUTE** - When you see "apply tasks#" or "execute tasks#", STOP and run that task immediately
4. **WAIT for user input** - At review points and after elicitation tasks
- Determine which template to use (user-provided or list available for selection to user) ## Execution Flow
- Agent-specific templates are listed in the agent's dependencies under `templates`. For each template listed, consider it a document the agent can create. So if an agent has: ### 1. Identify Template
@{example} - Load from `templates#*` or `{root}/templates directory`
dependencies: - Agent-specific templates are listed in agent's dependencies
templates: - prd-tmpl - architecture-tmpl - If agent has `templates: [prd-tmpl, architecture-tmpl]`, offer to create "PRD" and "Architecture" documents
@{/example}
You would offer to create "PRD" and "Architecture" documents when the user asks what you can help with. ### 2. Ask Interaction Mode
- Gather all relevant inputs, or ask for them, or else rely on user providing necessary details to complete the document > 1. **Incremental** - Section by section with reviews
- Understand the document purpose and target audience > 2. **YOLO Mode** - Complete draft then review (user can type `/yolo` anytime to switch)
### 2. Determine Interaction Mode
Confirm with the user their preferred interaction style:
- **Incremental:** Work through chunks of the document.
- **YOLO Mode:** Draft complete document making reasonable assumptions in one shot. (Can be entered also after starting incremental by just typing /yolo)
### 3. Execute Template ### 3. Execute Template
- Load specified template from `templates#*` or the /templates directory - Replace {{placeholders}} with real content
- Follow ALL embedded LLM instructions within the template - Execute [[LLM:]] instructions as you encounter them
- Process template markup according to `utils#template-format` conventions - Process <<REPEAT>> loops and ^^CONDITIONS^^
### 4. Template Processing Rules
#### CRITICAL: Never display template markup, LLM instructions, or examples to users
- Replace all {{placeholders}} with actual content
- Execute all [[LLM: instructions]] internally
- Process `<<REPEAT>>` sections as needed
- Evaluate ^^CONDITION^^ blocks and include only if applicable
- Use @{examples} for guidance but never output them - Use @{examples} for guidance but never output them
### 5. Content Generation ### 4. Key Execution Patterns
- **Incremental Mode**: Present each major section for review before proceeding **When you see:** `[[LLM: Draft X and immediately execute tasks#advanced-elicitation]]`
- **YOLO Mode**: Generate all sections, then review complete document with user
- Apply any elicitation protocols specified in template
- Incorporate user feedback and iterate as needed
### 6. Validation - Draft the content
- Present it to user
- IMMEDIATELY execute the task
- Wait for completion before continuing
If template specifies a checklist: **When you see:** `[[LLM: After section completion, apply tasks#Y]]`
- Run the appropriate checklist against completed document - Finish the section
- Document completion status for each item - STOP and execute the task
- Address any deficiencies found - Wait for user input
- Present validation summary to user
### 7. Final Presentation ### 5. Validation & Final Presentation
- Run any specified checklists
- Present clean, formatted content only - Present clean, formatted content only
- Ensure all sections are complete - No truncation or summarization
- DO NOT truncate or summarize content - Begin directly with content (no preamble)
- Begin directly with document content (no preamble) - Include any handoff prompts from template
- Include any handoff prompts specified in template
## Important Notes ## Common Mistakes to Avoid
- Template markup is for AI processing only - never expose to users ❌ Skipping elicitation tasks
❌ Showing template markup to users
❌ Continuing past STOP signals
❌ Combining multiple review points
✅ Execute ALL instructions in sequence
✅ Present only clean, formatted content
✅ Stop at every elicitation point
✅ Wait for user confirmation when instructed
## Remember
Templates contain precise instructions for a reason. Follow them exactly to ensure document quality and completeness.
==================== END: tasks#create-doc ==================== ==================== END: tasks#create-doc ====================
==================== START: tasks#kb-mode-interaction ==================== ==================== START: tasks#kb-mode-interaction ====================
@@ -757,7 +754,7 @@ BMAD transforms you into a "Vibe CEO" - directing a team of specialized AI agent
5. Type `/help` to see available commands 5. Type `/help` to see available commands
#### Option 2: IDE Integration #### Option 2: IDE Integration
**Best for**: Cursor, Claude Code, Windsurf, Cline, Roo Code users **Best for**: Cursor, Claude Code, Windsurf, Cline, Roo Code, VS Code Copilot users
```bash ```bash
# Interactive installation (recommended) # Interactive installation (recommended)
@@ -1398,7 +1395,7 @@ Expansion packs extend BMAD-METHOD beyond traditional software development into
### Using Expansion Packs ### Using Expansion Packs
1. **Browse Available Packs**: Check `expansion-packs/` directory 1. **Browse Available Packs**: Check `expansion-packs/` directory
2. **Get Inspiration**: See `docs/expansion-pack-ideas.md` for detailed examples 2. **Get Inspiration**: See `docs/expansion-packs.md` for detailed examples and ideas
3. **Install via CLI**: 3. **Install via CLI**:
```bash ```bash
npx bmad-method install npx bmad-method install
@@ -1429,227 +1426,73 @@ Use the **expansion-creator** pack to build your own:
==================== START: utils#workflow-management ==================== ==================== START: utils#workflow-management ====================
# Workflow Management # Workflow Management
This utility enables the BMAD orchestrator to manage and execute team workflows. Enables BMAD orchestrator to manage and execute team workflows.
## Important: Dynamic Workflow Loading ## Dynamic Workflow Loading
The BMAD orchestrator MUST read the available workflows from the current team configuration's `workflows` field. Do not use hardcoded workflow lists. Each team bundle defines its own set of supported workflows based on the agents it includes. Read available workflows from current team configuration's `workflows` field. Each team bundle defines its own supported workflows.
**Critical Distinction**: **Key Commands**:
- When asked "what workflows are available?", show ONLY the workflows defined in the current team bundle's configuration - `/workflows` - List workflows in current bundle or workflows folder
- Use `/agent-list` to show agents in the current bundle - `/agent-list` - Show agents in current bundle
- Use `/workflows` to show workflows in the current bundle, NOT any creation tasks
### Workflow Descriptions
When displaying workflows, use these descriptions based on the workflow ID:
- **greenfield-fullstack**: Build a new full-stack application from concept to development
- **brownfield-fullstack**: Enhance an existing full-stack application with new features
- **greenfield-service**: Build a new backend service or API from concept to development
- **brownfield-service**: Enhance an existing backend service or API
- **greenfield-ui**: Build a new frontend/UI application from concept to development
- **brownfield-ui**: Enhance an existing frontend/UI application
## Workflow Commands ## Workflow Commands
### /workflows ### /workflows
Lists all available workflows for the current team. The available workflows are determined by the team configuration and may include workflows such as: Lists available workflows with titles and descriptions.
- greenfield-fullstack
- brownfield-fullstack
- greenfield-service
- brownfield-service
- greenfield-ui
- brownfield-ui
The actual list depends on which team bundle is loaded. When responding to this command, display the workflows that are configured in the current team's `workflows` field.
Example response format:
```text
Available workflows for [Team Name]:
1. [workflow-id] - [Brief description based on workflow type]
2. [workflow-id] - [Brief description based on workflow type]
[... etc. ...]
Use /workflow-start {number or id} to begin a workflow.
```
### /workflow-start {workflow-id} ### /workflow-start {workflow-id}
Starts a specific workflow and transitions to the first agent. Starts workflow and transitions to first agent.
Example: `/workflow-start greenfield-fullstack`
### /workflow-status ### /workflow-status
Shows current workflow progress, completed artifacts, and next steps. Shows current progress, completed artifacts, and next steps.
Example response:
```text
Current Workflow: Greenfield Full-Stack Development
Stage: Product Planning (2 of 6)
Completed:
✓ Discovery & Requirements
- project-brief (completed by Mary)
In Progress:
⚡ Product Planning
- Create PRD (John) - awaiting input
Next: Technical Architecture
```
### /workflow-resume ### /workflow-resume
Resumes a workflow from where it left off, useful when starting a new chat. Resumes workflow from last position. User can provide completed artifacts.
User can provide completed artifacts:
```text
User: /workflow-resume greenfield-fullstack
I have completed: project-brief, PRD
BMad: I see you've completed Discovery and part of Product Planning.
Based on the greenfield-fullstack workflow, the next step is:
- UX Strategy with Sally (ux-expert)
Would you like me to load Sally to continue?
```
### /workflow-next ### /workflow-next
Shows the next recommended agent and action in the current workflow. Shows next recommended agent and action.
## Workflow Execution Flow ## Execution Flow
### 1. Starting a Workflow 1. **Starting**: Load definition → Identify first stage → Transition to agent → Guide artifact creation
When a workflow is started: 2. **Stage Transitions**: Mark complete → Check conditions → Load next agent → Pass artifacts
1. Load the workflow definition 3. **Artifact Tracking**: Track status, creator, timestamps in workflow_state
2. Identify the first stage and step
3. Transition to the required agent
4. Provide context about expected inputs/outputs
5. Guide artifact creation
### 2. Stage Transitions 4. **Interruption Handling**: Analyze provided artifacts → Determine position → Suggest next step
After each artifact is completed: ## Context Passing
1. Mark the step as complete When transitioning, pass:
2. Check transition conditions
3. If stage is complete, move to next stage
4. Load the appropriate agent
5. Pass relevant artifacts as context
### 3. Artifact Tracking - Previous artifacts
- Current workflow stage
Track all created artifacts: - Expected outputs
- Decisions/constraints
```yaml
workflow_state:
current_workflow: greenfield-fullstack
current_stage: planning
current_step: 2
artifacts:
project-brief:
status: completed
created_by: analyst
timestamp: 2024-01-15T10:30:00.000Z
prd:
status: in-progress
created_by: pm
started: 2024-01-15T11:00:00.000Z
```
### 4. Workflow Interruption Handling
When user returns after interruption:
1. Ask if continuing previous workflow
2. Request any completed artifacts
3. Analyze provided artifacts
4. Determine workflow position
5. Suggest next appropriate step
Example:
```text
User: I'm working on a new app. Here's my PRD and architecture doc.
BMad: I see you have a PRD and architecture document. Based on these artifacts,
it looks like you're following the greenfield-fullstack workflow and have completed
stages 1-3. The next recommended step would be:
Stage 4: Validation & Refinement
- Load Sarah (Product Owner) to validate all artifacts
Would you like to continue with this workflow?
```
## Workflow Context Passing
When transitioning between agents, pass:
1. Previous artifacts created
2. Current workflow stage
3. Expected outputs
4. Any decisions or constraints identified
Example transition:
```text
BMad: Great! John has completed the PRD. According to the greenfield-fullstack workflow,
the next step is UX Strategy with Sally.
/ux-expert
Sally: I see we're in the Product Planning stage of the greenfield-fullstack workflow.
I have access to:
- Project Brief from Mary
- PRD from John
Let's create the UX strategy and UI specifications. First, let me review
the PRD to understand the features we're designing for...
```
## Multi-Path Workflows ## Multi-Path Workflows
Some workflows may have multiple paths: Handle conditional paths by asking clarifying questions when needed.
```yaml ## Best Practices
conditional_paths:
- condition: project_type == 'mobile'
next_stage: mobile-specific-design
- condition: project_type == 'web'
next_stage: web-architecture
- default: fullstack-architecture
```
Handle these by asking clarifying questions when needed. 1. Show progress
2. Explain transitions
3. Preserve context
4. Allow flexibility
5. Track state
## Workflow Best Practices ## Agent Integration
1. **Always show progress** - Users should know where they are Agents should be workflow-aware: know active workflow, their role, access artifacts, understand expected outputs.
2. **Explain transitions** - Why moving to next agent
3. **Preserve context** - Pass relevant information forward
4. **Allow flexibility** - Users can skip or modify steps
5. **Track everything** - Maintain complete workflow state
## Integration with Agents
Each agent should be workflow-aware:
- Know which workflow is active
- Understand their role in the workflow
- Access previous artifacts
- Know expected outputs
- Guide toward workflow goals
This creates a seamless experience where the entire team works together toward the workflow's objectives.
==================== END: utils#workflow-management ==================== ==================== END: utils#workflow-management ====================
==================== START: utils#template-format ==================== ==================== START: utils#template-format ====================
@@ -3733,13 +3576,9 @@ The story creation is successful when:
This task provides instructions for validating documentation against checklists. The agent MUST follow these instructions to ensure thorough and systematic validation of documents. This task provides instructions for validating documentation against checklists. The agent MUST follow these instructions to ensure thorough and systematic validation of documents.
## Context
The BMAD Method uses various checklists to ensure quality and completeness of different artifacts. Each checklist contains embedded prompts and instructions to guide the LLM through thorough validation and advanced elicitation. The checklists automatically identify their required artifacts and guide the validation process.
## Available Checklists ## Available Checklists
If the user asks or does not specify a specific checklist, list the checklists available to the agent persona. If the task is being run not with a specific agent, tell the user to check the bmad-core/checklists folder to select the appropriate one to run. If the user asks or does not specify a specific checklist, list the checklists available to the agent persona. If the task is being run not with a specific agent, tell the user to check the {root}/checklists folder to select the appropriate one to run.
## Instructions ## Instructions
@@ -3748,7 +3587,7 @@ If the user asks or does not specify a specific checklist, list the checklists a
- If user or the task being run provides a checklist name: - If user or the task being run provides a checklist name:
- Try fuzzy matching (e.g. "architecture checklist" -> "architect-checklist") - Try fuzzy matching (e.g. "architecture checklist" -> "architect-checklist")
- If multiple matches found, ask user to clarify - If multiple matches found, ask user to clarify
- Load the appropriate checklist from bmad-core/checklists/ - Load the appropriate checklist from {root}/checklists/
- If no checklist specified: - If no checklist specified:
- Ask the user which checklist they want to use - Ask the user which checklist they want to use
- Present the available options from the files in the checklists folder - Present the available options from the files in the checklists folder
@@ -8686,21 +8525,21 @@ workflow:
notes: "Review existing service documentation, codebase, performance metrics, and identify integration dependencies." notes: "Review existing service documentation, codebase, performance metrics, and identify integration dependencies."
- agent: pm - agent: pm
creates: brownfield-prd.md creates: prd.md
uses: brownfield-prd-tmpl uses: brownfield-prd-tmpl
requires: existing_service_analysis requires: existing_service_analysis
notes: "Creates comprehensive brownfield PRD focused on service enhancement with existing system analysis. SAVE OUTPUT: Copy final brownfield-prd.md to your project's docs/ folder." notes: "Creates comprehensive PRD focused on service enhancement with existing system analysis. SAVE OUTPUT: Copy final prd.md to your project's docs/ folder."
- agent: architect - agent: architect
creates: brownfield-architecture.md creates: architecture.md
uses: brownfield-architecture-tmpl uses: brownfield-architecture-tmpl
requires: brownfield-prd.md requires: prd.md
notes: "Creates brownfield architecture with service integration strategy and API evolution planning. SAVE OUTPUT: Copy final brownfield-architecture.md to your project's docs/ folder." notes: "Creates architecture with service integration strategy and API evolution planning. SAVE OUTPUT: Copy final architecture.md to your project's docs/ folder."
- agent: po - agent: po
validates: all_artifacts validates: all_artifacts
uses: po-master-checklist uses: po-master-checklist
notes: "Validates all brownfield documents for service integration safety and API compatibility. May require updates to any document." notes: "Validates all documents for service integration safety and API compatibility. May require updates to any document."
- agent: various - agent: various
updates: any_flagged_documents updates: any_flagged_documents
@@ -8750,8 +8589,8 @@ workflow:
```mermaid ```mermaid
graph TD graph TD
A[Start: Service Enhancement] --> B[analyst: analyze existing service] A[Start: Service Enhancement] --> B[analyst: analyze existing service]
B --> C[pm: brownfield-prd.md] B --> C[pm: prd.md]
C --> D[architect: brownfield-architecture.md] C --> D[architect: architecture.md]
D --> E[po: validate with po-master-checklist] D --> E[po: validate with po-master-checklist]
E --> F{PO finds issues?} E --> F{PO finds issues?}
F -->|Yes| G[Return to relevant agent for fixes] F -->|Yes| G[Return to relevant agent for fixes]
@@ -8772,9 +8611,9 @@ workflow:
- Multiple integration points affected - Multiple integration points affected
handoff_prompts: handoff_prompts:
analyst_to_pm: "Service analysis complete. Create comprehensive brownfield PRD with service integration strategy." analyst_to_pm: "Service analysis complete. Create comprehensive PRD with service integration strategy."
pm_to_architect: "Brownfield PRD ready. Save it as docs/brownfield-prd.md, then create the service architecture." pm_to_architect: "PRD ready. Save it as docs/prd.md, then create the service architecture."
architect_to_po: "Architecture complete. Save it as docs/brownfield-architecture.md. Please validate all artifacts for service integration safety." architect_to_po: "Architecture complete. Save it as docs/architecture.md. Please validate all artifacts for service integration safety."
po_issues: "PO found issues with [document]. Please return to [agent] to fix and re-save the updated document." po_issues: "PO found issues with [document]. Please return to [agent] to fix and re-save the updated document."
complete: "All brownfield planning artifacts validated and saved in docs/ folder. Move to IDE environment to begin development." complete: "All planning artifacts validated and saved in docs/ folder. Move to IDE environment to begin development."
==================== END: workflows#brownfield-service ==================== ==================== END: workflows#brownfield-service ====================

View File

@@ -0,0 +1,36 @@
# BMAD Method Guide for Claude Code
This guide covers Claude Code-specific setup and usage with BMAD Method. For the complete workflow, see the [BMAD Workflow Guide](../bmad-workflow-guide.md).
## Installation
When running `npx bmad-method install`, select **Claude Code** as your IDE. This creates:
- `.bmad-core/` folder with all agents
- `.claude/commands/` folder with agent command files (`.md`)
## Using BMAD Agents in Claude Code
Type `/agent-name` in your chat to activate an agent:
- `/bmad-master` - Universal task executor
- `/sm` - Scrum Master
- `/dev` - Full-stack developer
- `/architect` - Solution architect
- `/pm` - Product manager
- `/analyst` - Business analyst
- `/qa` - QA specialist
- `/po` - Product owner
- `/ux-expert` - UX specialist
## Claude Code-Specific Features
- **Command files**: Stored in `.claude/commands/` as `.md` files
- **Activation**: Use forward slash `/` prefix for all agents
- **Chat management**: Start new chats when switching agents for clean context
## Tips for Claude Code Users
- Commands are auto-suggested as you type `/`
- Each agent supports `*help` to see available commands
- Claude Code maintains excellent context within each chat

View File

@@ -0,0 +1,42 @@
# BMAD Method Guide for Cline (VS Code)
This guide covers Cline-specific setup and usage with BMAD Method. For the complete workflow, see the [BMAD Workflow Guide](../bmad-workflow-guide.md).
## Installation
When running `npx bmad-method install`, select **Cline** as your IDE. This creates:
- `.clinerules/` directory with numbered agent rule files (`.md`)
- Agents ordered by priority (bmad-master first)
## Using BMAD Agents in Cline
1. **Open Cline panel** in VS Code
2. **Type `@agent-name`** in the chat (e.g., `@dev`, `@sm`, `@architect`)
3. The agent adopts that persona for the conversation
## Available Agents
All agents use `@` prefix:
- `@bmad-master` - Universal task executor
- `@sm` - Scrum Master
- `@dev` - Full-stack developer
- `@architect` - Solution architect
- `@pm` - Product manager
- `@analyst` - Business analyst
- `@qa` - QA specialist
- `@po` - Product owner
- `@ux-expert` - UX specialist
## Cline-Specific Features
- **Rule files**: Stored as numbered files in `.clinerules/` (e.g., `01-bmad-master.md`)
- **Agent ordering**: Prioritized list with core agents first
- **VS Code integration**: Works within VS Code's Cline extension panel
## Tips for Cline Users
- Cline maintains conversation context well
- Use `@agent-name` at the start of your message for best results
- Agent rules are loaded automatically when mentioned

View File

@@ -0,0 +1,37 @@
# BMAD Method Guide for Cursor
This guide covers Cursor-specific setup and usage with BMAD Method. For the complete workflow, see the [BMAD Workflow Guide](../bmad-workflow-guide.md).
## Installation
When running `npx bmad-method install`, select **Cursor** as your IDE. This creates:
- `.bmad-core/` folder with all agents
- `.cursor/rules/` folder with agent rule files (`.mdc`)
## Using BMAD Agents in Cursor
Type `@agent-name` in chat (Ctrl+L / Cmd+L) to activate an agent:
- `@bmad-master` - Universal task executor
- `@sm` - Scrum Master
- `@dev` - Full-stack developer
- `@architect` - Solution architect
- `@pm` - Product manager
- `@analyst` - Business analyst
- `@qa` - QA specialist
- `@po` - Product owner
- `@ux-expert` - UX specialist
## Cursor-Specific Features
- **Rule files**: Stored in `.cursor/rules/` as `.mdc` files
- **Auto-completion**: Cursor suggests agents as you type `@`
- **Context awareness**: Agents can see your current file selection
- **Custom agents**: For better performance, copy agent content into Cursor's custom modes
## Tips for Cursor Users
- Start new chats when switching agents
- Each agent supports `*help` to see available commands
- Leverage Cursor's file context for more accurate assistance

View File

@@ -0,0 +1,46 @@
# BMAD Method Guide for Gemini CLI
This guide covers Gemini CLI-specific setup and usage with BMAD Method. For the complete workflow, see the [BMAD Workflow Guide](../bmad-workflow-guide.md).
## Installation
When running `npx bmad-method install`, select **Gemini CLI** as your IDE. This creates:
- `.gemini/agents/` directory with all agent context files
- `.gemini/settings.json` configured to load all agents automatically
## Using BMAD Agents with Gemini CLI
Simply mention the agent in your prompt:
- "As @dev, implement the login feature"
- "Acting as @architect, review this system design"
- "@sm, create the next story for our project"
The Gemini CLI automatically loads the appropriate agent context.
## Available Agents
All agents are referenced with `@` in prompts:
- `@bmad-master` - Universal task executor
- `@sm` - Scrum Master
- `@dev` - Full-stack developer
- `@architect` - Solution architect
- `@pm` - Product manager
- `@analyst` - Business analyst
- `@qa` - QA specialist
- `@po` - Product owner
- `@ux-expert` - UX specialist
## Gemini CLI-Specific Features
- **Context files**: All agents loaded as context in `.gemini/agents/`
- **Automatic loading**: Settings.json ensures agents are always available
- **Natural language**: No special syntax needed, just mention the agent
## Tips for Gemini CLI Users
- Be explicit about which agent you're addressing
- You can switch agents mid-conversation by mentioning a different one
- The CLI maintains context across your session

View File

@@ -0,0 +1,46 @@
# BMAD Method Guide for Roo Code
This guide covers Roo Code-specific setup and usage with BMAD Method. For the complete workflow, see the [BMAD Workflow Guide](../bmad-workflow-guide.md).
## Installation
When running `npx bmad-method install`, select **Roo Code** as your IDE. This creates:
- `.bmad-core/` folder with all agents
- `.roomodes` file in project root with custom modes
## Using BMAD Agents in Roo Code
Select mode from the mode selector (usually in status bar):
- `bmad-bmad-master` - 🧙 Universal task executor
- `bmad-sm` - 🏃 Scrum Master
- `bmad-dev` - 💻 Full-stack developer
- `bmad-architect` - 🏗️ Solution architect
- `bmad-pm` - 📋 Product manager
- `bmad-analyst` - 📊 Business analyst
- `bmad-qa` - 🧪 QA specialist
- `bmad-po` - 🎯 Product owner
- `bmad-ux-expert` - 🎨 UX specialist
## Roo Code-Specific Features
- **Mode file**: `.roomodes` in project root
- **Mode switching**: Use mode selector instead of starting new chats
- **Context preservation**: Maintains context across mode switches
- **File permissions**: Each agent has specific file access:
### File Permission Summary
- **Documentation agents** (analyst, pm, po, sm): `.md`, `.txt` only
- **bmad-architect**: `.md`, `.txt`, `.yml`, `.yaml`, `.json`
- **bmad-qa**: Test files (`.test.*`, `.spec.*`) and `.md`
- **bmad-ux-expert**: `.md`, `.css`, `.scss`, `.html`, `.jsx`, `.tsx`
- **Full access**: `bmad-dev`, `bmad-bmad-master`, `bmad-orchestrator`
## Tips for Roo Code Users
- Switch modes instead of starting new chats
- Each mode supports `*help` to see available commands
- Agents respect file permission boundaries
- Context persists across mode switches

View File

@@ -0,0 +1,37 @@
# BMAD Method Guide for Windsurf
This guide covers Windsurf-specific setup and usage with BMAD Method. For the complete workflow, see the [BMAD Workflow Guide](../bmad-workflow-guide.md).
## Installation
When running `npx bmad-method install`, select **Windsurf** as your IDE. This creates:
- `.bmad-core/` folder with all agents
- `.windsurf/rules/` folder with agent rule files (`.md`)
## Using BMAD Agents in Windsurf
Type `@agent-name` in chat to activate an agent:
- `@bmad-master` - Universal task executor
- `@sm` - Scrum Master
- `@dev` - Full-stack developer
- `@architect` - Solution architect
- `@pm` - Product manager
- `@analyst` - Business analyst
- `@qa` - QA specialist
- `@po` - Product owner
- `@ux-expert` - UX specialist
## Windsurf-Specific Features
- **Rule files**: Stored in `.windsurf/rules/` as `.md` files
- **Activation**: Use `@` prefix to mention agents
- **Collaborative features**: Works well with BMAD's agent-switching pattern
- **Project context**: Agents have access to your full project context
## Tips for Windsurf Users
- Start new chats when switching agents
- Each agent supports `*help` to see available commands
- Leverage Windsurf's collaboration features for team reviews

View File

@@ -22,7 +22,7 @@ The BMAD Method follows a structured approach to AI-assisted software developmen
``` ```
- Choose "Complete installation" - Choose "Complete installation"
- Select your IDE (Cursor, Claude Code, Windsurf, or Roo Code) - Select your IDE (Cursor, Claude Code, Windsurf, Roo Code, or VS Code Copilot)
2. **Verify installation**: 2. **Verify installation**:
- `.bmad-core/` folder created with all agents - `.bmad-core/` folder created with all agents
@@ -113,6 +113,7 @@ Follow the SM → Dev cycle for systematic story development:
- **Cursor**: `@agent-name` (e.g., `@bmad-master`) - **Cursor**: `@agent-name` (e.g., `@bmad-master`)
- **Windsurf**: `@agent-name` (e.g., `@bmad-master`) - **Windsurf**: `@agent-name` (e.g., `@bmad-master`)
- **Roo Code**: Select mode from mode selector (e.g., `bmad-bmad-master`) - **Roo Code**: Select mode from mode selector (e.g., `bmad-bmad-master`)
- **VS Code Copilot**: Open the Chat view (`⌃⌘I` on Mac, `Ctrl+Alt+I` on Windows/Linux) and select **Agent** from the chat mode selector.
### Chat Management: ### Chat Management:

View File

@@ -1,121 +0,0 @@
# BMAD Method Guide for Claude Code
This guide walks you through the complete BMAD workflow using Claude Code as your AI-powered IDE.
## Step 1: Install BMAD in Your Project
1. Navigate to your project directory
2. Run the BMAD installer:
```bash
npx bmad-method install
```
3. When prompted:
- **Installation Type**: Choose "Complete installation (recommended)"
- **IDE**: Select "Claude Code"
This creates a `.bmad-core` folder with all agents and a `.claude/commands` folder with agent commands.
## Step 2: Set Up Team Fullstack in Gemini
For ideation and planning, use Google's Gemini Custom Gem with the team-fullstack configuration:
1. Open [Google gems](https://gemini.google.com/gems/view)
2. Create a new Gem - give it a title and description
3. Copy the contents of `.<install location>/<web-bundles>/teams/team-fullstack.txt` (location can vary if you chose a non default installation location for the bundles) - or just use the bundle premade from the repo dist folder.
4. Paste this content into Gemini to set up the team
### Gemini Planning Phase
In Gemini, ask the BMAD team to help you:
- **Ideate** your project concept
- **Brainstorm** features and requirements
- **Create a PRD** (Product Requirements Document)
- **Design the architecture**
Ask questions like:
- "Help me brainstorm a [type of application] that does [core functionality]"
- "Create a comprehensive PRD for this concept"
- "Design the technical architecture for this system"
Copy the PRD and architecture documents that Gemini creates into your project's `docs/` folder:
- `docs/prd.md`
- `docs/architecture.md`
## Step 3: Back to Claude Code - Document Sharding
Once you have your PRD and architecture documents in the `docs/` folder:
1. **Start a new chat in Claude Code**
2. **Load the bmad-master agent**: Type `/bmad-master`
3. **Shard the PRD**: Type `*shard-doc docs/prd.md prd`
4. **Shard the architecture**: Type `*shard-doc docs/architecture.md architecture`
This creates organized folders:
- `docs/prd/` - Contains broken down PRD sections
- `docs/architecture/` - Contains broken down architecture sections
## Step 4: Story Development Cycle
Now begin the iterative development cycle:
### Create Stories (Scrum Master)
1. **Start a new chat**
2. **Load SM agent**: Type `/sm`
3. **Create story**: Type `*create` (this runs the create-next-story task)
4. **Review the generated story**
5. **If approved**: Set story status to "Approved" in the story file
### Implement Stories (Developer)
1. **Start a new chat**
2. **Load Dev agent**: Type `/dev`
3. **The agent will ask which story to implement**
4. **Follow the development tasks** the agent provides
5. **When story is complete**: Mark status as "Done"
### Repeat the Cycle
1. **Start a new chat with SM agent** (`/sm`)
2. **Create next story**: Type `*create`
3. **Review and approve**
4. **Start new chat with Dev agent** (`/dev`)
5. **Implement the story**
6. **Repeat until project complete**
## Available Commands in Claude Code
All BMAD agents are available as Claude Code commands:
- `/bmad-master` - Universal task executor
- `/sm` - Scrum Master for story creation
- `/dev` - Full-stack developer for implementation
- `/architect` - Solution architect for design
- `/pm` - Product manager for planning
- `/analyst` - Business analyst for requirements
- `/qa` - QA specialist for testing
- `/po` - Product owner for prioritization
- `/ux-expert` - UX specialist for design
## Key Workflow Principles
1. **Always start new chats** when switching agents to avoid context confusion
2. **Use Gemini for initial planning** and ideation with the team-fullstack bundle
3. **Use bmad-master for document management** (sharding, templates, etc.)
4. **Follow the SM → Dev cycle** for consistent story development
5. **Review and approve stories** before implementation begins
## Tips for Success
- **Keep chats focused**: Each chat should have one agent and one primary task
- **Use \*help command**: Every agent supports `*help` to see available commands
- **Review generated content**: Always review and approve stories before marking them ready
- **Maintain status updates**: Keep story statuses current (Draft → Approved → InProgress → Done)
This workflow ensures systematic, AI-assisted development following agile principles with clear handoffs between planning, story creation, and implementation phases.

View File

@@ -204,12 +204,181 @@ graph TD
F -->|Approved| G["Dev: Implement Story"] F -->|Approved| G["Dev: Implement Story"]
F -->|Needs Changes| E F -->|Needs Changes| E
G --> H["Dev: Complete story Tasks"] G --> H["Dev: Complete story Tasks"]
H --> I{"User Verification"} H --> I["Dev: Mark Ready for Review"]
I -->|Verified Complete| J["Mark Story as Done"] I --> J{"User Verification"}
I -->|Needs Fixes| G J -->|Request QA Review| K["QA: Run review-story task"]
J --> E J -->|Approve Without QA| M["Mark Story as Done"]
K --> L{"QA Review Results"}
L -->|Needs Work| G
L -->|Approved| M["Mark Story as Done"]
J -->|Needs Fixes| G
M --> E
style J fill:#34a853,color:#fff style M fill:#34a853,color:#fff
style K fill:#f9ab00,color:#fff
``` ```
This cycle continues, with the Scrum Master and Developer agents working in tandem, until all stories in the epic are completed. This cycle continues, with the Scrum Master, Developer, and optionally QA agents working together. The QA agent provides senior developer review capabilities through the `review-story` task, offering code refactoring, quality improvements, and knowledge transfer. This ensures high code quality while maintaining development velocity.
## 8. Complete Source Tree
The BMAD-METHOD project structure is designed for clarity, modularity, and extensibility. Here's the complete source tree with explanations:
```plaintext
bmad-method/
├── .bmad-core/ # Core framework (installed in user projects)
│ ├── agents/ # Individual agent definitions
│ │ ├── analyst.md # Business analyst agent
│ │ ├── architect.md # Solution architect agent
│ │ ├── bmad-master.md # Universal expert agent
│ │ ├── bmad-orchestrator.md # Multi-agent coordinator
│ │ ├── dev.md # Full-stack developer agent
│ │ ├── pm.md # Product manager agent
│ │ ├── po.md # Product owner agent
│ │ ├── qa.md # QA specialist agent
│ │ ├── sm.md # Scrum master agent
│ │ └── ux-expert.md # UX designer agent
│ ├── agent-teams/ # Pre-configured agent teams
│ │ ├── team-all.yml # All agents bundle
│ │ ├── team-fullstack.yml # Full-stack development team
│ │ ├── team-ide-minimal.yml # Minimal IDE-focused team
│ │ └── team-no-ui.yml # Backend-only team
│ ├── checklists/ # Quality assurance checklists
│ │ ├── architect-checklist.md
│ │ ├── po-master-checklist.md
│ │ └── story-dod-checklist.md
│ ├── data/ # Knowledge base and preferences
│ │ ├── bmad-kb.md # Core knowledge base
│ │ └── technical-preferences.md # User tech preferences
│ ├── tasks/ # Reusable task definitions
│ │ ├── advanced-elicitation.md # Deep diving techniques
│ │ ├── create-doc.md # Document creation task
│ │ ├── create-next-story.md # Story generation task
│ │ ├── doc-migration-task.md # V3 to V4 migration
│ │ ├── execute-checklist.md # Checklist runner
│ │ └── shard-doc.md # Document sharding task
│ ├── templates/ # Document templates
│ │ ├── full-stack-architecture-tmpl.md
│ │ ├── prd-tmpl.md
│ │ ├── project-brief-tmpl.md
│ │ ├── story-tmpl.md
│ │ └── [other templates...]
│ ├── utils/ # Utility components
│ │ ├── agent-switcher.web # Web UI agent switching
│ │ ├── template-format.md # Template markup spec
│ │ └── workflow-management.md # Workflow helpers
│ ├── workflows/ # Development workflows
│ │ ├── brownfield-enhancement.yml
│ │ ├── greenfield-fullstack.yml
│ │ ├── greenfield-service.yml
│ │ └── greenfield-simple.yml
│ └── core-config.yml # V4 configuration system
├── dist/ # Pre-built bundles (generated)
│ ├── agents/ # Individual agent bundles
│ │ ├── analyst.txt
│ │ ├── architect.txt
│ │ └── [other agents...]
│ ├── teams/ # Team bundles for web UI
│ │ ├── team-all.txt
│ │ ├── team-fullstack.txt
│ │ └── [other teams...]
│ └── expansion-packs/ # Expansion pack bundles
├── docs/ # Documentation
│ ├── agentic-tools/ # IDE-specific guides
│ │ ├── claude-code-guide.md
│ │ ├── cursor-guide.md
│ │ ├── cline-guide.md
│ │ ├── gemini-cli-guide.md
│ │ ├── roo-code-guide.md
│ │ ├── windsurf-guide.md
│ │ └── vs-code-copilot-guide.md
│ ├── bmad-workflow-guide.md # Universal workflow guide
│ ├── core-architecture.md # This document
│ ├── expansion-packs.md # Expansion pack guide
│ ├── user-guide.md # Comprehensive user guide
│ └── [other docs...]
├── expansion-packs/ # Domain-specific extensions
│ ├── bmad-2d-phaser-game-dev/ # Game development pack
│ ├── bmad-creator-tools/ # Agent creation tools
│ ├── bmad-infrastructure-devops/ # DevOps pack
│ └── README.md
├── tools/ # Build and installation tools
│ ├── builders/ # Build system
│ │ └── web-builder.js # Bundle generator
│ ├── cli.js # Main CLI tool
│ ├── installer/ # NPX installer
│ │ ├── index.js # Installer entry point
│ │ ├── config/ # Installation configs
│ │ ├── lib/ # Installer utilities
│ │ └── templates/ # IDE template files
│ └── lib/ # Shared libraries
│ ├── bundle-utils.js
│ ├── dependency-resolver.js
│ └── file-processor.js
├── .github/ # GitHub configuration
│ ├── workflows/ # GitHub Actions
│ └── ISSUE_TEMPLATE/ # Issue templates
├── common/ # Shared resources
│ ├── tasks/ # Common tasks
│ └── utils/ # Common utilities
├── bmad-core/ # Source for .bmad-core
│ └── [mirrors .bmad-core structure]
├── package.json # Node.js configuration
├── README.md # Project readme
├── CONTRIBUTING.md # Contribution guidelines
├── GUIDING-PRINCIPLES.md # Core principles
└── LICENSE # MIT license
```
### Directory Purposes
#### Core Framework (.bmad-core/)
- **agents/**: Individual AI agent personalities and capabilities
- **agent-teams/**: Bundles of agents for specific workflows
- **checklists/**: Quality assurance and validation steps
- **data/**: Knowledge base and user preferences
- **tasks/**: Reusable procedures agents can execute
- **templates/**: Document templates with embedded AI instructions
- **utils/**: Helper components for agents
- **workflows/**: Structured development processes
#### Generated Bundles (dist/)
- Pre-built text files ready for web UI upload
- Automatically generated by the build system
- Includes resolved dependencies for each agent/team
#### Tools (tools/)
- **cli.js**: Main build tool for creating bundles
- **installer/**: NPX-based installer for projects
- **builders/**: Bundle generation logic
- **lib/**: Shared utilities for build system
#### Expansion Packs (expansion-packs/)
- Domain-specific agent collections
- Extend BMAD beyond software development
- Each pack is self-contained with its own agents, tasks, and templates
#### Documentation (docs/)
- Comprehensive guides for users
- Technical architecture documentation
- IDE-specific setup instructions
### Key Files
- **core-config.yml**: V4's flexible configuration system
- **bmad-kb.md**: Central knowledge base loaded by most agents
- **template-format.md**: Specification for BMAD's template markup
- **dependency-resolver.js**: Manages agent resource loading

View File

@@ -1,131 +0,0 @@
# BMAD Method Guide for Cursor
This guide walks you through the complete BMAD workflow using Cursor as your AI-powered IDE.
## Step 1: Install BMAD in Your Project
1. Navigate to your project directory
2. Run the BMAD installer:
```bash
npx bmad-method install
```
3. When prompted:
- **Installation Type**: Choose "Complete installation (recommended)"
- **IDE**: Select "Cursor"
This creates a `.bmad-core` folder with all agents and a `.cursor/rules` folder with agent rules.
## Step 2: Set Up Team Fullstack in Gemini
For ideation and planning, use Google's Gemini Custom Gem with the team-fullstack configuration:
1. Open [Google gems](https://gemini.google.com/gems/view)
2. Create a new Gem - give it a title and description
3. Copy the contents of `.<install location>/<web-bundles>/teams/team-fullstack.txt` (location can vary if you chose a non default installation location for the bundles) - or just use the bundle premade from the repo dist folder.
4. Paste this content into Gemini to set up the team
### Gemini Planning Phase
In Gemini, ask the BMAD team to help you:
- **Ideate** your project concept
- **Brainstorm** features and requirements
- **Create a PRD** (Product Requirements Document)
- **Design the architecture**
Ask questions like:
- "Help me brainstorm a [type of application] that does [core functionality]"
- "Create a comprehensive PRD for this concept"
- "Design the technical architecture for this system"
Copy the PRD and architecture documents that Gemini creates into your project's `docs/` folder:
- `docs/prd.md`
- `docs/architecture.md`
## Step 3: Back to Cursor - Document Sharding
Once you have your PRD and architecture documents in the `docs/` folder:
1. **Start a new chat in Cursor**
2. **Load the bmad-master agent**: Type `@bmad-master`
3. **Shard the PRD**: Type `*shard-doc docs/prd.md prd`
4. **Shard the architecture**: Type `*shard-doc docs/architecture.md architecture`
This creates organized folders:
- `docs/prd/` - Contains broken down PRD sections
- `docs/architecture/` - Contains broken down architecture sections
## Step 4: Story Development Cycle
Now begin the iterative development cycle:
### Create Stories (Scrum Master)
1. **Start a new chat**
2. **Load SM agent**: Type `@sm`
3. **Create story**: Type `*create` (this runs the create-next-story task)
4. **Review the generated story**
5. **If approved**: Set story status to "Approved" in the story file
### Implement Stories (Developer)
1. **Start a new chat**
2. **Load Dev agent**: Type `@dev`
3. **The agent will ask which story to implement**
4. **Follow the development tasks** the agent provides
5. **When story is complete**: Mark status as "Done"
### Repeat the Cycle
1. **Start a new chat with SM agent** (`@sm`)
2. **Create next story**: Type `*create`
3. **Review and approve**
4. **Start new chat with Dev agent** (`@dev`)
5. **Implement the story**
6. **Repeat until project complete**
## Available Agent Rules in Cursor
All BMAD agents are available as Cursor rules (use `@` prefix):
- `@bmad-master` - Universal task executor
- `@sm` - Scrum Master for story creation
- `@dev` - Full-stack developer for implementation
- `@architect` - Solution architect for design
- `@pm` - Product manager for planning
- `@analyst` - Business analyst for requirements
- `@qa` - QA specialist for testing
- `@po` - Product owner for prioritization
- `@ux-expert` - UX specialist for design
Alternatively, and more performance - you can copy the contents of an agent file into a custom mode - see the cursor docs on how to use custom agents.
## Cursor-Specific Features
- **Agent rules are stored in**: `.cursor/rules/` as `.mdc` files
- **Auto-completion**: Cursor will suggest `@agent-name` as you type
- **Rule activation**: Rules activate automatically when you mention `@agent-name`
- **Context awareness**: Agents have access to your current file context
## Key Workflow Principles
1. **Always start new chats** when switching agents to avoid context confusion
2. **Use Gemini for initial planning** and ideation with the team-fullstack bundle
3. **Use bmad-master for document management** (sharding, templates, etc.)
4. **Follow the SM → Dev cycle** for consistent story development
5. **Review and approve stories** before implementation begins
## Tips for Success
- **Keep chats focused**: Each chat should have one agent and one primary task
- **Use \*help command**: Every agent supports `*help` to see available commands
- **Review generated content**: Always review and approve stories before marking them ready
- **Maintain status updates**: Keep story statuses current (Draft → Approved → InProgress → Done)
- **Leverage Cursor's context**: Agents can see your current file selection for better assistance
This workflow ensures systematic, AI-assisted development following agile principles with clear handoffs between planning, story creation, and implementation phases.

View File

@@ -1,121 +0,0 @@
# Expansion Pack Ideas
The BMAD Method's natural language framework can be applied to any domain. Here are ideas to inspire your own expansion packs:
## Health & Wellness Pack
### Agents
- **Fitness Coach** - Creates personalized workout plans
- **Nutrition Advisor** - Designs meal plans and tracks nutrition
- **Meditation Guide** - Leads mindfulness sessions
- **Sleep Optimizer** - Improves sleep habits
### Tasks
- `create-workout-plan` - Generates weekly exercise routines
- `analyze-nutrition` - Reviews dietary habits
- `design-meditation` - Creates guided meditation scripts
### Templates
- `workout-plan-tmpl` - Structured exercise program
- `meal-plan-tmpl` - Weekly nutrition guide
- `wellness-journal-tmpl` - Progress tracking
## Creative Writing Pack
### Agents
- **Story Architect** - Plots narratives and story structures
- **Character Developer** - Creates deep, complex characters
- **World Builder** - Designs fictional universes
- **Dialog Master** - Crafts authentic conversations
### Tasks
- `develop-plot` - Creates story outlines
- `build-character` - Develops character profiles
- `create-world` - Designs settings and cultures
### Templates
- `story-outline-tmpl` - Three-act structure
- `character-sheet-tmpl` - Detailed character profile
- `world-bible-tmpl` - Universe documentation
## Business Strategy Pack
### Agents
- **Strategy Consultant** - Develops business strategies
- **Market Analyst** - Researches market opportunities
- **Financial Advisor** - Creates financial projections
- **Operations Expert** - Optimizes business processes
### Tasks
- `swot-analysis` - Conducts SWOT analysis
- `market-research` - Analyzes market conditions
- `financial-forecast` - Projects revenue/costs
### Templates
- `business-plan-tmpl` - Complete business plan
- `market-analysis-tmpl` - Market research report
- `pitch-deck-tmpl` - Investor presentation
## Education Pack
### Agents
- **Curriculum Designer** - Creates learning pathways
- **Lesson Planner** - Develops engaging lessons
- **Assessment Creator** - Designs fair evaluations
- **Learning Coach** - Provides personalized guidance
### Tasks
- `design-curriculum` - Creates course structure
- `plan-lesson` - Develops lesson content
- `create-assessment` - Builds tests/quizzes
### Templates
- `course-outline-tmpl` - Semester plan
- `lesson-plan-tmpl` - Daily lesson structure
- `rubric-tmpl` - Assessment criteria
## Personal Development Pack
### Agents
- **Life Coach** - Guides personal growth
- **Goal Strategist** - Helps achieve objectives
- **Habit Builder** - Creates lasting habits
- **Mindset Mentor** - Develops positive thinking
### Tasks
- `goal-setting` - Defines SMART goals
- `habit-tracking` - Monitors habit formation
- `reflection-exercise` - Facilitates self-reflection
### Templates
- `goal-plan-tmpl` - Goal achievement roadmap
- `habit-tracker-tmpl` - Daily habit log
- `journal-prompts-tmpl` - Reflection questions
## Creating Your Own
To create an expansion pack:
1. **Identify the domain** - What area of expertise?
2. **Define agent roles** - Who are the experts?
3. **Create tasks** - What procedures do they follow?
4. **Design templates** - What outputs do they produce?
5. **Test with users** - Does it provide value?
6. **Share with community** - Help others benefit!
Remember: The BMAD Method works anywhere natural language instructions can guide AI assistance!

View File

@@ -132,6 +132,21 @@ Property investment and management:
- **Flip Strategist**: Renovation ROI, project planning - **Flip Strategist**: Renovation ROI, project planning
- **Agent Assistant**: Listing optimization, showing prep - **Agent Assistant**: Listing optimization, showing prep
### Personal Development Pack
Complete personal growth system:
- **Life Coach**: Guides personal growth and transformation
- **Goal Strategist**: Helps achieve objectives with SMART goals
- **Habit Builder**: Creates lasting habits with accountability
- **Mindset Mentor**: Develops positive thinking patterns
Key tasks include:
- `goal-setting`: Defines SMART goals with action plans
- `habit-tracking`: Monitors habit formation progress
- `reflection-exercise`: Facilitates deep self-reflection
## Unique & Innovative Packs ## Unique & Innovative Packs
### Role-Playing Game Master Pack ### Role-Playing Game Master Pack

View File

@@ -8,7 +8,15 @@ A pull request (PR) is how you propose changes to a project on GitHub. Think of
## Before You Start ## Before You Start
⚠️ **Important**: Please keep your contributions small and focused! We prefer many small, clear changes rather than one massive change. If you're planning something big, please [open an issue](https://github.com/bmadcode/bmad-method/issues) or start a [discussion](https://github.com/bmadcode/bmad-method/discussions) first. ⚠️ **Important**: Please keep your contributions small and focused! We prefer many small, clear changes rather than one massive change.
**Required before submitting PRs:**
- **For bug fixes**: Create an issue using the [bug report template](https://github.com/bmadcode/bmad-method/issues/new?template=bug_report.md)
- **For new features**:
1. Discuss in Discord [#general-dev channel](https://discord.gg/g6ypHytrCB)
2. Create an issue using the [feature request template](https://github.com/bmadcode/bmad-method/issues/new?template=feature_request.md)
- **For large changes**: Always open an issue first to discuss alignment
## Step-by-Step Guide ## Step-by-Step Guide
@@ -82,9 +90,15 @@ git push origin fix/typo-in-readme
1. Go to your fork on GitHub 1. Go to your fork on GitHub
2. You'll see a green "Compare & pull request" button - click it 2. You'll see a green "Compare & pull request" button - click it
3. Fill out the PR template: 3. Select the correct target branch:
- **Title**: Clear, descriptive title - **`next` branch** for most contributions (features, docs, enhancements)
- **Description**: Explain what you changed and why - **`main` branch** only for critical fixes
4. Fill out the PR description using the template in CONTRIBUTING.md:
- **What**: 1-2 sentences describing what changed
- **Why**: 1-2 sentences explaining why
- **How**: 2-3 bullets on implementation
- **Testing**: How you tested
5. Reference the related issue number (e.g., "Fixes #123")
### 8. Wait for Review ### 8. Wait for Review
@@ -117,9 +131,12 @@ git push origin fix/typo-in-readme
## Need Help? ## Need Help?
- 💬 Join our [Discord Community](https://discord.gg/g6ypHytrCB) for real-time help - 💬 Join our [Discord Community](https://discord.gg/g6ypHytrCB) for real-time help:
- 💬 Ask questions in [Discussions](https://github.com/bmadcode/bmad-method/discussions) - **#general-dev** - Technical questions and feature discussions
- 🐛 Report bugs in [Issues](https://github.com/bmadcode/bmad-method/issues) - **#bugs-issues** - Get help with bugs before filing issues
- 💬 Ask questions in [GitHub Discussions](https://github.com/bmadcode/bmad-method/discussions)
- 🐛 Report bugs using the [bug report template](https://github.com/bmadcode/bmad-method/issues/new?template=bug_report.md)
- 💡 Suggest features using the [feature request template](https://github.com/bmadcode/bmad-method/issues/new?template=feature_request.md)
- 📖 Read the full [Contributing Guidelines](../CONTRIBUTING.md) - 📖 Read the full [Contributing Guidelines](../CONTRIBUTING.md)
## Example: Good vs Bad PRs ## Example: Good vs Bad PRs

View File

@@ -1,142 +0,0 @@
# BMAD Method Guide for Roo Code
This guide walks you through the complete BMAD workflow using Roo Code as your AI-powered IDE.
## Step 1: Install BMAD in Your Project
1. Navigate to your project directory
2. Run the BMAD installer:
```bash
npx bmad-method install
```
3. When prompted:
- **Installation Type**: Choose "Complete installation (recommended)"
- **IDE**: Select "Roo Code"
This creates a `.bmad-core` folder with all agents and a `.roomodes` file (in the project root) with custom modes.
## Step 2: Set Up Team Fullstack in Gemini
For ideation and planning, use Google's Gemini Custom Gem with the team-fullstack configuration:
1. Open [Google gems](https://gemini.google.com/gems/view)
2. Create a new Gem - give it a title and description
3. Copy the contents of `.<install location>/<web-bundles>/teams/team-fullstack.txt` (location can vary if you chose a non default installation location for the bundles) - or just use the bundle premade from the repo dist folder.
4. Paste this content into Gemini to set up the team
### Gemini Planning Phase
In Gemini, ask the BMAD team to help you:
- **Ideate** your project concept
- **Brainstorm** features and requirements
- **Create a PRD** (Product Requirements Document)
- **Design the architecture**
Ask questions like:
- "Help me brainstorm a [type of application] that does [core functionality]"
- "Create a comprehensive PRD for this concept"
- "Design the technical architecture for this system"
Copy the PRD and architecture documents that Gemini creates into your project's `docs/` folder:
- `docs/prd.md`
- `docs/architecture.md`
## Step 3: Back to Roo Code - Document Sharding
Once you have your PRD and architecture documents in the `docs/` folder:
1. **Open your project in Roo Code**
2. **Select the bmad-master mode** from the mode selector (usually in status bar)
3. **Shard the PRD**: Type `*shard-doc docs/prd.md prd`
4. **Shard the architecture**: Type `*shard-doc docs/architecture.md architecture`
This creates organized folders:
- `docs/prd/` - Contains broken down PRD sections
- `docs/architecture/` - Contains broken down architecture sections
## Step 4: Story Development Cycle
Now begin the iterative development cycle:
### Create Stories (Scrum Master)
1. **Start a new chat or conversation**
2. **Switch to SM mode**: Select `bmad-sm` from the mode selector
3. **Create story**: Type `*create` (this runs the create-next-story task)
4. **Review the generated story**
5. **If approved**: Set story status to "Approved" in the story file
### Implement Stories (Developer)
1. **Start a new conversation**
2. **Switch to Dev mode**: Select `bmad-dev` from the mode selector
3. **The agent will ask which story to implement**
4. **Follow the development tasks** the agent provides
5. **When story is complete**: Mark status as "Done"
### Repeat the Cycle
1. **Switch to SM mode** (`bmad-sm`)
2. **Create next story**: Type `*create`
3. **Review and approve**
4. **Switch to Dev mode** (`bmad-dev`)
5. **Implement the story**
6. **Repeat until project complete**
## Available Custom Modes in Roo Code
All BMAD agents are available as custom modes:
- `bmad-bmad-master` - 🧙 Universal task executor
- `bmad-sm` - 🏃 Scrum Master for story creation
- `bmad-dev` - 💻 Full-stack developer for implementation
- `bmad-architect` - 🏗️ Solution architect for design
- `bmad-pm` - 📋 Product manager for planning
- `bmad-analyst` - 📊 Business analyst for requirements
- `bmad-qa` - 🧪 QA specialist for testing
- `bmad-po` - 🎯 Product owner for prioritization
- `bmad-ux-expert` - 🎨 UX specialist for design
## Roo Code-Specific Features
- **Custom modes are stored in**: `.roomodes` file (in the project root)
- **Mode switching**: Use the mode selector in Roo Code's interface
- **File permissions**: Each agent has specific file access permissions
- **Documentation agents** (SM, PM, PO, Analyst): Limited to `.md` and `.txt` files
- **Technical agents** (Dev, Architect, Master): Full file access
- **QA agents**: Access to test files and documentation
- **UX agents**: Access to design-related files
- **Context preservation**: Modes maintain context within conversations
## Key Workflow Principles
1. **Switch modes instead of starting new chats** - Roo Code handles context better with mode switching
2. **Use Gemini for initial planning** and ideation with the team-fullstack bundle
3. **Use bmad-master mode for document management** (sharding, templates, etc.)
4. **Follow the SM → Dev mode cycle** for consistent story development
5. **Review and approve stories** before implementation begins
## Tips for Success
- **Use mode selector effectively**: Switch modes as needed for different tasks
- **Respect file permissions**: Agents can only edit files they have permission for
- **Use \*help command**: Every mode supports `*help` to see available commands
- **Review generated content**: Always review and approve stories before marking them ready
- **Maintain status updates**: Keep story statuses current (Draft → Approved → InProgress → Done)
- **Leverage Roo's context**: Modes can maintain context across the conversation
## File Permission Summary
- **bmad-analyst, bmad-pm, bmad-po, bmad-sm**: `.md`, `.txt` files only
- **bmad-architect**: `.md`, `.txt`, `.yml`, `.yaml`, `.json` files
- **bmad-qa**: Test files (`.test.js`, `.spec.ts`, etc.) and `.md` files
- **bmad-ux-expert**: `.md`, `.css`, `.scss`, `.html`, `.jsx`, `.tsx` files
- **bmad-dev, bmad-bmad-master, bmad-orchestrator**: Full file access
This workflow ensures systematic, AI-assisted development following agile principles with clear handoffs between planning, story creation, and implementation phases.

View File

@@ -1,6 +1,6 @@
# BMAD-METHOD User Guide # BMAD-METHOD Agentic Agile Driven Development User Guide
This comprehensive guide will help you understand and effectively use the BMAD-METHOD framework for AI-assisted software development. This comprehensive guide will help you understand and effectively use the BMad Method framework for AI-assisted software development.
## Table of Contents ## Table of Contents
@@ -61,6 +61,19 @@ Best for: Cursor, Claude Code, Windsurf, VS Code users
npx bmad-method install npx bmad-method install
``` ```
### CLI Commands
```bash
# List all available agents
npx bmad-method list
# Install or update (automatically detects existing installations)
npx bmad-method install
# Check installation status
npx bmad-method status
```
### First Steps ### First Steps
1. **Choose Your Environment**: Web UI or IDE 1. **Choose Your Environment**: Web UI or IDE
@@ -68,20 +81,47 @@ npx bmad-method install
3. **Initialize Project**: Run `/help` or `*help` to see capabilities 3. **Initialize Project**: Run `/help` or `*help` to see capabilities
4. **Start Development**: Begin with planning or jump into coding 4. **Start Development**: Begin with planning or jump into coding
### Upgrading from V3 to V4
If you have an existing BMAD-METHOD V3 project, simply run the installer in your project directory:
```bash
npx bmad-method install
# The installer will automatically detect your V3 installation and offer to upgrade
```
The upgrade process will:
1. Create a backup of your V3 files in `.bmad-v3-backup/`
2. Install the new V4 `.bmad-core/` structure
3. Migrate your documents (PRD, Architecture, Stories, Epics)
4. Set up IDE integration for all V4 agents
5. Create an install manifest for future updates
After upgrading:
1. Review your documents in the `docs/` folder - if you had a PRD or architecture in your old project, copy it from the backup to the docs folder if they are not there.
2. Optionally run the `doc-migration-task` to align your documents with V4 templates - you can do this with your agent by saying something like: 'run {drag in task} against {drag prd or arch file from docs} to align with {drag the template from .bmad-core/templates/full-stack-architecture.md}'
3. If you have separate front-end and backend architecture docs you can modify step 2 to merge both into a single full stack architecture or separate Front and Back end.
The reason #2 and #3 are optional is because now BMAD V4 makes sharding optional for the SM. See [Core Configuration](#core-configuration-coreconfigyml)
**Note**: The agents in `.bmad-core/` fully replace the items in `bmad-agent/` - you can remove the backup folder versions.
## Agent System ## Agent System
### Core Development Team ### Core Development Team
| Agent | Role | Primary Functions | When to Use | | Agent | Role | Primary Functions | When to Use |
| ----------- | ------------------ | --------------------------------------- | -------------------------------------- | | ----------- | ------------------ | ---------------------------------------------- | ------------------------------------------------- |
| `analyst` | Business Analyst | Market research, requirements gathering | Project planning, competitive analysis | | `analyst` | Business Analyst | Market research, requirements gathering | Project planning, competitive analysis |
| `pm` | Product Manager | PRD creation, feature prioritization | Strategic planning, roadmaps | | `pm` | Product Manager | PRD creation, feature prioritization | Strategic planning, roadmaps |
| `architect` | Solution Architect | System design, technical architecture | Complex systems, scalability planning | | `architect` | Solution Architect | System design, technical architecture | Complex systems, scalability planning |
| `dev` | Developer | Code implementation, debugging | All development tasks | | `dev` | Developer | Sequential task execution, testing, validation | Story implementation with test-driven development |
| `qa` | QA Specialist | Test planning, quality assurance | Testing strategies, bug validation | | `qa` | QA Specialist | Code review, refactoring, test validation | Senior developer review via `review-story` task |
| `ux-expert` | UX Designer | UI/UX design, prototypes | User experience, interface design | | `ux-expert` | UX Designer | UI/UX design, prototypes | User experience, interface design |
| `po` | Product Owner | Backlog management, story validation | Story refinement, acceptance criteria | | `po` | Product Owner | Backlog management, story validation | Story refinement, acceptance criteria |
| `sm` | Scrum Master | Sprint planning, story creation | Project management, workflow | | `sm` | Scrum Master | Sprint planning, story creation | Project management, workflow |
### Meta Agents ### Meta Agents
@@ -284,20 +324,29 @@ Once planning is complete and documents are sharded, BMAD follows a structured d
```mermaid ```mermaid
graph TD graph TD
A["Start: Planning Artifacts Complete"] --> B["PO: Shard Epics"] A["Development Phase Start"] --> B["SM: Reviews Previous Story Dev/QA Notes"]
B --> C["PO: Shard Arch"] B --> B2["SM: Drafts Next Story from Sharded Epic + Architecture"]
C --> D["Development Phase"] B2 --> C{"User Approval"}
D --> E["Scrum Master: Drafts next story from sharded epic"] C -->|Approved| D["Dev: Sequential Task Execution"]
E --> F{"User Approval"} C -->|Needs Changes| B2
F -->|Approved| G["Dev: Implement Story"] D --> E["Dev: Implement Tasks + Tests"]
F -->|Needs Changes| E E --> F["Dev: Run All Validations"]
G --> H["Dev: Complete story Tasks"] F --> G["Dev: Mark Ready for Review + Add Notes"]
H --> I{"User Verification"} G --> H{"User Verification"}
I -->|Verified Complete| J["Mark Story as Done"] H -->|Request QA Review| I["QA: Senior Dev Review + Active Refactoring"]
I -->|Needs Fixes| G H -->|Approve Without QA| K["Mark Story as Done"]
J --> E I --> J["QA: Review, Refactor Code, Add Tests, Document Notes"]
J --> L{"QA Decision"}
L -->|Needs Dev Work| D
L -->|Approved| K
H -->|Needs Fixes| D
K --> B
style J fill:#34a853,color:#fff style K fill:#34a853,color:#fff
style I fill:#f9ab00,color:#fff
style J fill:#ffd54f,color:#000
style E fill:#e3f2fd,color:#000
style B fill:#e8f5e9,color:#000
``` ```
### Workflow Phases ### Workflow Phases
@@ -319,15 +368,213 @@ graph TD
- **SM**: Draft next story from sharded epic - **SM**: Draft next story from sharded epic
- **User**: Review and approve story - **User**: Review and approve story
- **Dev**: Implement all story tasks - **Dev**: Sequential task execution:
- Reads each task in the story
- Implements code for the task
- Writes tests alongside implementation
- Runs validations (linting, tests)
- Updates task checkbox [x] only if all validations pass
- Maintains Debug Log for temporary changes
- Updates File List with all created/modified files
- **Dev**: After all tasks complete:
- Runs integration tests (if specified)
- Runs E2E tests (if specified)
- Validates Definition of Done checklist
- Marks story as "Ready for Review"
- **User**: Verify implementation - **User**: Verify implementation
- **Optional QA Review**: User can request QA to run `review-story` task
- **Repeat**: Until all stories complete - **Repeat**: Until all stories complete
#### 4. Quality Assurance #### Dev Agent Workflow Details
- **QA**: Test planning and execution The Dev agent follows a strict test-driven sequential workflow:
- **Dev**: Bug fixes and refinements
- **PO**: Acceptance criteria validation **Key Behaviors:**
- **Story-Centric**: Works only from the story file, never loads PRD/architecture unless specified in dev notes
- **Sequential Execution**: Completes tasks one by one, marking [x] only after validations pass
- **Test-Driven**: Writes tests alongside code for every task
- **Quality Gates**: Never marks tasks complete if validations fail
- **Debug Logging**: Tracks temporary changes in the story's Debug Log table
- **File Tracking**: Maintains complete File List of all created/modified files
**Blocking Conditions:**
The Dev agent will stop and request help if:
- Story is not approved
- Requirements are ambiguous after checking the story
- Validations fail 3 times for the same task
- Critical configuration files are missing
- Automated tests or linting fails
#### 4. Quality Assurance Integration
The QA agent plays a crucial role after development:
- **When Dev marks "Ready for Review"**: Story is ready for user verification
- **User Options**:
- **Direct Approval**: If satisfied, mark story as "Done"
- **Request Changes**: Send back to Dev with specific feedback
- **Request QA Review**: Ask QA to run the `review-story` task for senior developer review
- **QA Review Process** (`/qa run review-story`):
- Reviews code as a senior developer with authority to refactor
- **Active Refactoring**: Makes improvements directly in the code
- **Comprehensive Review Focus**:
- Code architecture and design patterns
- Refactoring opportunities and code duplication
- Performance optimizations and security concerns
- Best practices and patterns
- **Standards Compliance**: Verifies adherence to:
- `docs/coding-standards.md`
- `docs/unified-project-structure.md`
- `docs/testing-strategy.md`
- **Test Coverage Review**: Can add missing tests if critical coverage is lacking
- **Documentation**: Adds comments for complex logic if missing
- **Results Documentation** in story's QA Results section:
- Code quality assessment
- Refactoring performed with WHY and HOW explanations
- Compliance check results
- Improvements checklist (completed vs. pending items)
- Security and performance findings
- Final approval status
### Understanding the SM/Dev/QA Story Workflow
The story file is the central artifact that enables seamless collaboration between the Scrum Master (SM), Developer (Dev), and Quality Assurance (QA) agents. Here's how they work together:
#### Why We Have the Scrum Master
The SM agent serves as a critical bridge between high-level planning and technical implementation:
1. **Document Synthesis**: Reads sharded PRD epics and architecture documents to extract relevant technical details
2. **Story Enrichment**: Creates self-contained stories with all technical context needed for implementation
3. **Continuous Learning**: Uses notes from previous stories to improve future story preparation
4. **Developer Efficiency**: Ensures developers have everything needed without searching multiple documents
#### The Story Creation Process
When the SM agent executes the `create-next-story` task:
1. **Loads Configuration**: Reads `core-config.yml` to understand project structure
2. **Identifies Next Story**: Sequentially processes stories from epics (1.1, 1.2, 2.1, etc.)
3. **Gathers Architecture Context**: Reads relevant sharded architecture documents based on story type:
- Backend stories: data models, API specs, database schemas
- Frontend stories: component specs, UI patterns, workflows
- Full-stack: both backend and frontend documents
4. **Reviews Previous Story**: Extracts Dev and QA notes to learn from past implementation
#### The Story Template Structure
The story template contains embedded LLM instructions for different agents:
**SM Agent Instructions**:
- Populate Dev Notes with specific technical details from architecture
- Include source references for all technical guidance
- Create detailed tasks based on architecture constraints
- Add testing requirements from testing strategy
**Dev Agent Instructions**:
- Update Debug Log References during implementation
- Document any deviations in Completion Notes
- Maintain comprehensive File List of all changes
- Track requirement changes in Change Log
**QA Agent Instructions**:
- Append review results in QA Results section
- Document refactoring performed with explanations
- Note security and performance considerations
#### How Agents Pass Information
##### SM → Dev Flow
The SM prepares the story with:
- **Dev Notes**: Specific technical guidance extracted from architecture
- **Testing Requirements**: Unit, integration, and E2E test specifications
- **Tasks/Subtasks**: Detailed implementation steps with AC mappings
##### Dev → SM Flow
The Dev agent provides feedback through:
- **Completion Notes**: Deviations or discoveries that impact future stories
- **Debug Log References**: Technical challenges and solutions
- **File List**: Complete inventory of created/modified files
- **Change Log**: Any requirement modifications during development
##### QA → SM Flow
The QA agent contributes:
- **Code Quality Assessment**: Senior developer perspective on implementation quality
- **Refactoring Performed**: Direct code improvements with:
- What was changed
- Why the change was made
- How it improves the code
- **Compliance Results**: Verification against coding standards, project structure, and testing strategy
- **Test Coverage**: Added tests for critical missing coverage
- **Security Review**: Any security concerns found and whether addressed
- **Performance Considerations**: Performance issues found and optimizations made
- **Improvements Checklist**: Items completed (marked [x]) vs. items for Dev to address (marked [ ])
- **Learning Opportunities**: Explanations for junior/mid-level developer growth
#### Example: How Notes Flow Between Stories
**Story 1.1 Completion**:
```markdown
### Completion Notes List
- Discovered that user authentication requires additional session management not specified in architecture
- Created new SessionManager service in services/auth/session-manager.ts
- Recommend updating architecture to include session management patterns
```
**Story 1.2 Creation** (SM uses the above notes):
```markdown
## Dev Notes
### Previous Story Insights
- Story 1.1 created SessionManager service for auth (services/auth/session-manager.ts)
- Consider using SessionManager for this story's user profile feature
- Architecture update pending for session management patterns
```
This continuous feedback loop ensures each story benefits from lessons learned in previous implementations.
#### QA Agent Key Principles
When the QA agent performs the review-story task:
- **Senior Developer Authority**: Reviews as a senior developer with authority to refactor directly
- **Active Improvement**: Makes code improvements rather than just identifying issues
- **Teaching Focus**: Explains all changes for developer learning and growth
- **Pragmatic Balance**: Focuses on significant improvements, not nitpicks
- **Quality Gates**: Can block story completion if critical issues exist
**QA Blocking Conditions**:
The QA will stop and request clarification if:
- Story file is incomplete or missing critical sections
- File List is empty or clearly incomplete
- No tests exist when they were required
- Code changes don't align with story requirements
- Critical architectural issues require discussion
- **Benefits of QA Review**:
- Code quality improvements and refactoring
- Knowledge transfer through documented explanations
- Catching edge cases and security issues
- Ensuring architectural consistency
### Workflow Types ### Workflow Types
@@ -528,7 +775,7 @@ Web UI agents focus on planning and documentation. Here's how to interact with e
### Dynamic Resource Loading ### Dynamic Resource Loading
BMAD's dependency system ensures agents only load necessary resources: BMad's dependency system ensures agents only load necessary resources:
- **Templates**: Only relevant document templates - **Templates**: Only relevant document templates
- **Tasks**: Only required automation tasks - **Tasks**: Only required automation tasks
@@ -595,7 +842,7 @@ phases:
Templates are self-contained documents that embed both output structure and processing instructions. Follow these patterns from existing templates: Templates are self-contained documents that embed both output structure and processing instructions. Follow these patterns from existing templates:
#### Template Structure #### Template Structure Example
```markdown ```markdown
# {{Project Name}} Document Title # {{Project Name}} Document Title
@@ -1135,7 +1382,7 @@ Add specialized capabilities:
- **Data Pack**: Analytics, ML integration - **Data Pack**: Analytics, ML integration
- **Security Pack**: Security analysis, compliance - **Security Pack**: Security analysis, compliance
## Troubleshooting ## Troubleshooting Guide
### Common Issues ### Common Issues
@@ -1178,7 +1425,7 @@ Add specialized capabilities:
- **Documentation**: [Browse docs](https://github.com/bmadcode/bmad-method/tree/main/docs) - **Documentation**: [Browse docs](https://github.com/bmadcode/bmad-method/tree/main/docs)
- **YouTube**: [BMadCode Channel](https://www.youtube.com/@BMadCode) - **YouTube**: [BMadCode Channel](https://www.youtube.com/@BMadCode)
## Best Practices ## Best Practices and Tips
### Project Organization ### Project Organization
@@ -1201,7 +1448,7 @@ project/
- Version control all BMAD-generated content - Version control all BMAD-generated content
- Regular backups of `.bmad-core/` customizations - Regular backups of `.bmad-core/` customizations
### Development Workflow ### Recommended Development Flow
#### Planning Phase #### Planning Phase

View File

@@ -2,7 +2,7 @@
## Automated Releases (Recommended) ## Automated Releases (Recommended)
The easiest way to release new versions is through **automatic semantic releases**. Just commit with the right message format and push - everything else happens automatically! The easiest way to release new versions is through **automatic semantic releases**. Just commit with the right message format and push and everything else happens automatically.
### Commit Message Format ### Commit Message Format
@@ -58,7 +58,7 @@ npm run release:test # Safe to run locally - tests the config
## Manual Release Methods (Exceptions Only) ## Manual Release Methods (Exceptions Only)
**⚠️ Only use these methods if you need to bypass the automatic system** ⚠️ Only use these methods if you need to bypass the automatic system
### Quick Manual Version Bump ### Quick Manual Version Bump
@@ -75,11 +75,3 @@ git push && git push --tags
### Manual GitHub Actions Trigger ### Manual GitHub Actions Trigger
You can also trigger releases manually through GitHub Actions workflow dispatch if needed. You can also trigger releases manually through GitHub Actions workflow dispatch if needed.
---
## Summary
**For 99% of releases**: Just use `fix:` or `feat:` commit messages and push. Everything else is automatic!
**Manual methods**: Only needed for special cases or if you want to bypass the automated system.

View File

@@ -16,7 +16,6 @@ Guiding Principles of V4:
- Helpers for installers and web builders that will work with any OS and IDE easily - Helpers for installers and web builders that will work with any OS and IDE easily
- Align all agents to be the same for IDE and Web, without losing the power of the web versions, or the leanness of the files in the IDE to reduce context - Align all agents to be the same for IDE and Web, without losing the power of the web versions, or the leanness of the files in the IDE to reduce context
- Further improvements to the two most important agents - the SM and DEV - Further improvements to the two most important agents - the SM and DEV
- Expansion Packs - Coming soon...
## V3 ## V3

View File

@@ -1,129 +0,0 @@
# BMAD Method Guide for Windsurf
This guide walks you through the complete BMAD workflow using Windsurf as your AI-powered IDE.
## Step 1: Install BMAD in Your Project
1. Navigate to your project directory
2. Run the BMAD installer:
```bash
npx bmad-method install
```
3. When prompted:
- **Installation Type**: Choose "Complete installation (recommended)"
- **IDE**: Select "Windsurf"
This creates a `.bmad-core` folder with all agents and a `.windsurf/rules` folder with agent rules.
## Step 2: Set Up Team Fullstack in Gemini
For ideation and planning, use Google's Gemini Custom Gem with the team-fullstack configuration:
1. Open [Google gems](https://gemini.google.com/gems/view)
2. Create a new Gem - give it a title and description
3. Copy the contents of `.<install location>/<web-bundles>/teams/team-fullstack.txt` (location can vary if you chose a non default installation location for the bundles) - or just use the bundle premade from the repo dist folder.
4. Paste this content into Gemini to set up the team
### Gemini Planning Phase
In Gemini, ask the BMAD team to help you:
- **Ideate** your project concept
- **Brainstorm** features and requirements
- **Create a PRD** (Product Requirements Document)
- **Design the architecture**
Ask questions like:
- "Help me brainstorm a [type of application] that does [core functionality]"
- "Create a comprehensive PRD for this concept"
- "Design the technical architecture for this system"
Copy the PRD and architecture documents that Gemini creates into your project's `docs/` folder:
- `docs/prd.md`
- `docs/architecture.md`
## Step 3: Back to Windsurf - Document Sharding
Once you have your PRD and architecture documents in the `docs/` folder:
1. **Start a new chat in Windsurf**
2. **Load the bmad-master agent**: Type `@bmad-master`
3. **Shard the PRD**: Type `*shard-doc docs/prd.md prd`
4. **Shard the architecture**: Type `*shard-doc docs/architecture.md architecture`
This creates organized folders:
- `docs/prd/` - Contains broken down PRD sections
- `docs/architecture/` - Contains broken down architecture sections
## Step 4: Story Development Cycle
Now begin the iterative development cycle:
### Create Stories (Scrum Master)
1. **Start a new chat**
2. **Load SM agent**: Type `@sm`
3. **Create story**: Type `*create` (this runs the create-next-story task)
4. **Review the generated story**
5. **If approved**: Set story status to "Approved" in the story file
### Implement Stories (Developer)
1. **Start a new chat**
2. **Load Dev agent**: Type `@dev`
3. **The agent will ask which story to implement**
4. **Follow the development tasks** the agent provides
5. **When story is complete**: Mark status as "Done"
### Repeat the Cycle
1. **Start a new chat with SM agent** (`@sm`)
2. **Create next story**: Type `*create`
3. **Review and approve**
4. **Start new chat with Dev agent** (`@dev`)
5. **Implement the story**
6. **Repeat until project complete**
## Available Agent Rules in Windsurf
All BMAD agents are available as Windsurf rules (use `@` prefix):
- `@bmad-master` - Universal task executor
- `@sm` - Scrum Master for story creation
- `@dev` - Full-stack developer for implementation
- `@architect` - Solution architect for design
- `@pm` - Product manager for planning
- `@analyst` - Business analyst for requirements
- `@qa` - QA specialist for testing
- `@po` - Product owner for prioritization
- `@ux-expert` - UX specialist for design
## Windsurf-Specific Features
- **Agent rules are stored in**: `.windsurf/rules/` as `.md` files
- **Rule activation**: Rules activate when you mention `@agent-name` in chat
- **Collaborative workflow**: Windsurf's collaborative features work well with BMAD's agent-switching pattern
- **Context awareness**: Agents have access to your project context
## Key Workflow Principles
1. **Always start new chats** when switching agents to avoid context confusion
2. **Use Gemini for initial planning** and ideation with the team-fullstack bundle
3. **Use bmad-master for document management** (sharding, templates, etc.)
4. **Follow the SM → Dev cycle** for consistent story development
5. **Review and approve stories** before implementation begins
## Tips for Success
- **Keep chats focused**: Each chat should have one agent and one primary task
- **Use \*help command**: Every agent supports `*help` to see available commands
- **Review generated content**: Always review and approve stories before marking them ready
- **Maintain status updates**: Keep story statuses current (Draft → Approved → InProgress → Done)
- **Leverage Windsurf's collaboration**: Use the collaborative features for team reviews
This workflow ensures systematic, AI-assisted development following agile principles with clear handoffs between planning, story creation, and implementation phases.

View File

@@ -1,22 +1,18 @@
# Working in the Brownfield: A Complete Guide # Working in the Brownfield: A Complete Guide
> 🚀 **HIGHLY RECOMMENDED: Use Gemini Web for Brownfield Documentation!** > 🚀 **HIGHLY RECOMMENDED: Use Gemini Web or Gemini CLI for Brownfield Documentation!**
> >
> Gemini Web's 1M+ token context window can analyze your ENTIRE codebase at once: > Gemini Web's 1M+ token context window or Gemini CLI (when its working) can analyze your ENTIRE codebase at once:
> >
> - Upload via GitHub URL > - Upload via GitHub URL
> - Upload up to 1000 files > - Upload up to 1000 files
> - Upload zipped project > - Upload zipped project
>
> This is MUCH more cost-effective than IDE analysis which reads files one by one!
## What is Brownfield Development? ## What is Brownfield Development?
Brownfield development refers to adding features, fixing bugs, or modernizing existing software projects. Unlike greenfield (new) projects, brownfield work requires understanding existing code, respecting constraints, and ensuring new changes integrate seamlessly without breaking existing functionality. Brownfield development refers to adding features, fixing bugs, or modernizing existing software projects. Unlike greenfield (new) projects, brownfield work requires understanding existing code, respecting constraints, and ensuring new changes integrate seamlessly without breaking existing functionality.
## When to Use BMAD for Brownfield ## When to Use BMad for Brownfield
BMAD-METHOD excels at brownfield development when you need to:
- Add significant new features to existing applications - Add significant new features to existing applications
- Modernize legacy codebases - Modernize legacy codebases
@@ -29,7 +25,7 @@ BMAD-METHOD excels at brownfield development when you need to:
### Choose Your Approach ### Choose Your Approach
#### Approach A: PRD-First (Recommended for Large Codebases/Monorepos) #### Approach A: PRD-First (Recommended if adding very large and complex new features, single or multiple epics or massive changes)
**Best for**: Large codebases, monorepos, or when you know exactly what you want to build **Best for**: Large codebases, monorepos, or when you know exactly what you want to build
@@ -116,7 +112,7 @@ The analyst will generate comprehensive documentation of everything.
#### Option A: Full Brownfield Workflow (Recommended for Major Changes) #### Option A: Full Brownfield Workflow (Recommended for Major Changes)
**1. Create Brownfield PRD** **1. Create Brownfield PRD**:
```bash ```bash
@pm @pm
@@ -143,7 +139,7 @@ The PM agent will:
- "What are the critical constraints we must respect?" - "What are the critical constraints we must respect?"
- "What is your timeline and team size?" - "What is your timeline and team size?"
**2. Create Brownfield Architecture** **2. Create Brownfield Architecture**:
```bash ```bash
@architect @architect

View File

@@ -0,0 +1,7 @@
name: bmad-2d-phaser-game-dev
version: 1.2.0
short-title: 2D game development with Phaser 3 & TypeScript
description: >-
2D Game Development expansion pack for BMAD Method - Phaser 3 & TypeScript
focused
author: Brian (BMad)

View File

@@ -1,45 +0,0 @@
name: bmad-2d-phaser-game-dev
version: 1.0.0
description: 2D Game Development expansion pack for BMAD Method - Phaser 3 & TypeScript focused
author: BMAD Team
files:
- source: agents/game-designer.md
destination: .bmad-core/agents/game-designer.md
- source: agents/game-developer.md
destination: .bmad-core/agents/game-developer.md
- source: agents/game-sm.md
destination: .bmad-core/agents/game-sm.md
- source: team-game-dev.yml
destination: .bmad-core/agent-teams/team-game-dev.yml
- source: templates/game-design-doc-tmpl.md
destination: .bmad-core/templates/game-design-doc-tmpl.md
- source: templates/game-architecture-tmpl.md
destination: .bmad-core/templates/game-architecture-tmpl.md
- source: templates/level-design-doc-tmpl.md
destination: .bmad-core/templates/level-design-doc-tmpl.md
- source: templates/game-story-tmpl.md
destination: .bmad-core/templates/game-story-tmpl.md
- source: templates/game-brief-tmpl.md
destination: .bmad-core/templates/game-brief-tmpl.md
- source: tasks/create-game-story.md
destination: .bmad-core/tasks/create-game-story.md
- source: tasks/game-design-brainstorming.md
destination: .bmad-core/tasks/game-design-brainstorming.md
- source: tasks/advanced-elicitation.md
destination: .bmad-core/tasks/advanced-elicitation.md
- source: checklists/game-story-dod-checklist.md
destination: .bmad-core/checklists/game-story-dod-checklist.md
- source: checklists/game-design-checklist.md
destination: .bmad-core/checklists/game-design-checklist.md
- source: data/bmad-kb.md
destination: .bmad-core/data/bmad-kb.md
- source: data/development-guidelines.md
destination: .bmad-core/data/development-guidelines.md
- source: workflows/game-dev-greenfield.yml
destination: .bmad-core/workflows/game-dev-greenfield.yml
- source: workflows/game-prototype.yml
destination: .bmad-core/workflows/game-prototype.yml
dependencies:
- architect
- developer
- sm

View File

@@ -0,0 +1,5 @@
name: bmad-creator-tools
version: 1.1.0
short-title: Tools for creating BMAD framework components
description: Tools for creating and extending BMAD framework components.
author: Brian (BMad)

View File

@@ -436,17 +436,17 @@ IMPORTANT: Work through plan.md checklist systematically!
**Step 2: Copy Core Utilities** **Step 2: Copy Core Utilities**
Before proceeding, copy these essential files from bmad-core: Before proceeding, copy these essential files from common:
```bash ```bash
# Copy core task utilities # Copy core task utilities
cp bmad-core/tasks/create-doc.md expansion-packs/{pack-name}/tasks/ cp common/tasks/create-doc.md expansion-packs/{pack-name}/tasks/
cp bmad-core/tasks/execute-checklist.md expansion-packs/{pack-name}/tasks/ cp common/tasks/execute-checklist.md expansion-packs/{pack-name}/tasks/
# Copy core utility files # Copy core utility files
mkdir -p expansion-packs/{pack-name}/utils mkdir -p expansion-packs/{pack-name}/utils
cp bmad-core/utils/template-format.md expansion-packs/{pack-name}/utils/ cp common/utils/template-format.md expansion-packs/{pack-name}/utils/
cp bmad-core/utils/workflow-management.md expansion-packs/{pack-name}/utils/ cp common/utils/workflow-management.md expansion-packs/{pack-name}/utils/
``` ```
**Step 3: Technical Implementation** **Step 3: Technical Implementation**

View File

@@ -0,0 +1,8 @@
name: bmad-infrastructure-devops
version: 1.1.0
short-title: Infrastructure and DevOps capabilities
description: >-
This expansion pack extends BMAD Method with comprehensive infrastructure and
DevOps capabilities. It's designed for teams that need to define, implement,
and manage cloud infrastructure alongside their application development.
author: Brian (BMad)

View File

@@ -1,23 +0,0 @@
name: bmad-infrastructure-devops
version: 1.0.0
description: Infrastructure & DevOps expansion pack for BMAD Method - Platform engineering and cloud infrastructure focused
author: BMAD Team
files:
- source: agents/infra-devops-platform.md
destination: .bmad-core/agents/infra-devops-platform.md
- source: templates/infrastructure-architecture-tmpl.md
destination: .bmad-core/templates/infrastructure-architecture-tmpl.md
- source: templates/infrastructure-platform-from-arch-tmpl.md
destination: .bmad-core/templates/infrastructure-platform-from-arch-tmpl.md
- source: tasks/create-doc.md
destination: .bmad-core/tasks/create-doc.md
- source: tasks/review-infrastructure.md
destination: .bmad-core/tasks/review-infrastructure.md
- source: tasks/validate-infrastructure.md
destination: .bmad-core/tasks/validate-infrastructure.md
- source: checklists/infrastructure-checklist.md
destination: .bmad-core/checklists/infrastructure-checklist.md
dependencies:
- architect
- operations-specialist
- security-specialist

View File

@@ -1,74 +0,0 @@
# Create Document from Template Task
## Purpose
- Generate documents from any specified template following embedded instructions from the perspective of the selected agent persona
## Instructions
### 1. Identify Template and Context
- Determine which template to use (user-provided or list available for selection to user)
- Agent-specific templates are listed in the agent's dependencies under `templates`. For each template listed, consider it a document the agent can create. So if an agent has:
@{example}
dependencies:
templates: - prd-tmpl - architecture-tmpl
@{/example}
You would offer to create "PRD" and "Architecture" documents when the user asks what you can help with.
- Gather all relevant inputs, or ask for them, or else rely on user providing necessary details to complete the document
- Understand the document purpose and target audience
### 2. Determine Interaction Mode
Confirm with the user their preferred interaction style:
- **Incremental:** Work through chunks of the document.
- **YOLO Mode:** Draft complete document making reasonable assumptions in one shot. (Can be entered also after starting incremental by just typing /yolo)
### 3. Execute Template
- Load specified template from `templates#*` or the /templates directory
- Follow ALL embedded LLM instructions within the template
- Process template markup according to `utils#template-format` conventions
### 4. Template Processing Rules
#### CRITICAL: Never display template markup, LLM instructions, or examples to users
- Replace all {{placeholders}} with actual content
- Execute all [[LLM: instructions]] internally
- Process `<<REPEAT>>` sections as needed
- Evaluate ^^CONDITION^^ blocks and include only if applicable
- Use @{examples} for guidance but never output them
### 5. Content Generation
- **Incremental Mode**: Present each major section for review before proceeding
- **YOLO Mode**: Generate all sections, then review complete document with user
- Apply any elicitation protocols specified in template
- Incorporate user feedback and iterate as needed
### 6. Validation
If template specifies a checklist:
- Run the appropriate checklist against completed document
- Document completion status for each item
- Address any deficiencies found
- Present validation summary to user
### 7. Final Presentation
- Present clean, formatted content only
- Ensure all sections are complete
- DO NOT truncate or summarize content
- Begin directly with document content (no preamble)
- Include any handoff prompts specified in template
## Important Notes
- Template markup is for AI processing only - never expose to users

View File

@@ -1,74 +0,0 @@
# Create Document from Template Task
## Purpose
- Generate documents from any specified template following embedded instructions from the perspective of the selected agent persona
## Instructions
### 1. Identify Template and Context
- Determine which template to use (user-provided or list available for selection to user)
- Agent-specific templates are listed in the agent's dependencies under `templates`. For each template listed, consider it a document the agent can create. So if an agent has:
@{example}
dependencies:
templates: - prd-tmpl - architecture-tmpl
@{/example}
You would offer to create "PRD" and "Architecture" documents when the user asks what you can help with.
- Gather all relevant inputs, or ask for them, or else rely on user providing necessary details to complete the document
- Understand the document purpose and target audience
### 2. Determine Interaction Mode
Confirm with the user their preferred interaction style:
- **Incremental:** Work through chunks of the document.
- **YOLO Mode:** Draft complete document making reasonable assumptions in one shot. (Can be entered also after starting incremental by just typing /yolo)
### 3. Execute Template
- Load specified template from `templates#*` or the /templates directory
- Follow ALL embedded LLM instructions within the template
- Process template markup according to `utils#template-format` conventions
### 4. Template Processing Rules
#### CRITICAL: Never display template markup, LLM instructions, or examples to users
- Replace all {{placeholders}} with actual content
- Execute all [[LLM: instructions]] internally
- Process `<<REPEAT>>` sections as needed
- Evaluate ^^CONDITION^^ blocks and include only if applicable
- Use @{examples} for guidance but never output them
### 5. Content Generation
- **Incremental Mode**: Present each major section for review before proceeding
- **YOLO Mode**: Generate all sections, then review complete document with user
- Apply any elicitation protocols specified in template
- Incorporate user feedback and iterate as needed
### 6. Validation
If template specifies a checklist:
- Run the appropriate checklist against completed document
- Document completion status for each item
- Address any deficiencies found
- Present validation summary to user
### 7. Final Presentation
- Present clean, formatted content only
- Ensure all sections are complete
- DO NOT truncate or summarize content
- Begin directly with document content (no preamble)
- Include any handoff prompts specified in template
## Important Notes
- Template markup is for AI processing only - never expose to users

View File

@@ -1,12 +0,0 @@
name: bmad-creator-tools
version: 1.0.0
description: Tools for creating and extending BMAD framework components
type: creator-tools
compatibility:
bmad-version: '>=4.0.0'
components:
agents:
- bmad-the-creator
tasks:
- create-agent
- generate-expansion-pack

View File

@@ -1,26 +0,0 @@
# Template Format Conventions
Templates in the BMAD method use standardized markup for AI processing. These conventions ensure consistent document generation.
## Template Markup Elements
- **{{placeholders}}**: Variables to be replaced with actual content
- **[[LLM: instructions]]**: Internal processing instructions for AI agents (never shown to users)
- **REPEAT** sections: Content blocks that may be repeated as needed
- **^^CONDITION^^** blocks: Conditional content included only if criteria are met
- **@{examples}**: Example content for guidance (never output to users)
## Processing Rules
- Replace all {{placeholders}} with project-specific content
- Execute all [[LLM: instructions]] internally without showing users
- Process conditional and repeat blocks as specified
- Use examples for guidance but never include them in final output
- Present only clean, formatted content to users
## Critical Guidelines
- **NEVER display template markup, LLM instructions, or examples to users**
- Template elements are for AI processing only
- Focus on faithful template execution and clean output
- All template-specific instructions are embedded within templates

View File

@@ -1,223 +0,0 @@
# Workflow Management
This utility enables the BMAD orchestrator to manage and execute team workflows.
## Important: Dynamic Workflow Loading
The BMAD orchestrator MUST read the available workflows from the current team configuration's `workflows` field. Do not use hardcoded workflow lists. Each team bundle defines its own set of supported workflows based on the agents it includes.
**Critical Distinction**:
- When asked "what workflows are available?", show ONLY the workflows defined in the current team bundle's configuration
- Use `/agent-list` to show agents in the current bundle
- Use `/workflows` to show workflows in the current bundle, NOT any creation tasks
### Workflow Descriptions
When displaying workflows, use these descriptions based on the workflow ID:
- **greenfield-fullstack**: Build a new full-stack application from concept to development
- **brownfield-fullstack**: Enhance an existing full-stack application with new features
- **greenfield-service**: Build a new backend service or API from concept to development
- **brownfield-service**: Enhance an existing backend service or API
- **greenfield-ui**: Build a new frontend/UI application from concept to development
- **brownfield-ui**: Enhance an existing frontend/UI application
## Workflow Commands
### /workflows
Lists all available workflows for the current team. The available workflows are determined by the team configuration and may include workflows such as:
- greenfield-fullstack
- brownfield-fullstack
- greenfield-service
- brownfield-service
- greenfield-ui
- brownfield-ui
The actual list depends on which team bundle is loaded. When responding to this command, display the workflows that are configured in the current team's `workflows` field.
Example response format:
```text
Available workflows for [Team Name]:
1. [workflow-id] - [Brief description based on workflow type]
2. [workflow-id] - [Brief description based on workflow type]
[... etc. ...]
Use /workflow-start {number or id} to begin a workflow.
```
### /workflow-start {workflow-id}
Starts a specific workflow and transitions to the first agent.
Example: `/workflow-start greenfield-fullstack`
### /workflow-status
Shows current workflow progress, completed artifacts, and next steps.
Example response:
```text
Current Workflow: Greenfield Full-Stack Development
Stage: Product Planning (2 of 6)
Completed:
✓ Discovery & Requirements
- project-brief (completed by Mary)
In Progress:
⚡ Product Planning
- Create PRD (John) - awaiting input
Next: Technical Architecture
```
### /workflow-resume
Resumes a workflow from where it left off, useful when starting a new chat.
User can provide completed artifacts:
```text
User: /workflow-resume greenfield-fullstack
I have completed: project-brief, PRD
BMad: I see you've completed Discovery and part of Product Planning.
Based on the greenfield-fullstack workflow, the next step is:
- UX Strategy with Sally (ux-expert)
Would you like me to load Sally to continue?
```
### /workflow-next
Shows the next recommended agent and action in the current workflow.
## Workflow Execution Flow
### 1. Starting a Workflow
When a workflow is started:
1. Load the workflow definition
2. Identify the first stage and step
3. Transition to the required agent
4. Provide context about expected inputs/outputs
5. Guide artifact creation
### 2. Stage Transitions
After each artifact is completed:
1. Mark the step as complete
2. Check transition conditions
3. If stage is complete, move to next stage
4. Load the appropriate agent
5. Pass relevant artifacts as context
### 3. Artifact Tracking
Track all created artifacts:
```yaml
workflow_state:
current_workflow: greenfield-fullstack
current_stage: planning
current_step: 2
artifacts:
project-brief:
status: completed
created_by: analyst
timestamp: 2024-01-15T10:30:00.000Z
prd:
status: in-progress
created_by: pm
started: 2024-01-15T11:00:00.000Z
```
### 4. Workflow Interruption Handling
When user returns after interruption:
1. Ask if continuing previous workflow
2. Request any completed artifacts
3. Analyze provided artifacts
4. Determine workflow position
5. Suggest next appropriate step
Example:
```text
User: I'm working on a new app. Here's my PRD and architecture doc.
BMad: I see you have a PRD and architecture document. Based on these artifacts,
it looks like you're following the greenfield-fullstack workflow and have completed
stages 1-3. The next recommended step would be:
Stage 4: Validation & Refinement
- Load Sarah (Product Owner) to validate all artifacts
Would you like to continue with this workflow?
```
## Workflow Context Passing
When transitioning between agents, pass:
1. Previous artifacts created
2. Current workflow stage
3. Expected outputs
4. Any decisions or constraints identified
Example transition:
```text
BMad: Great! John has completed the PRD. According to the greenfield-fullstack workflow,
the next step is UX Strategy with Sally.
/ux-expert
Sally: I see we're in the Product Planning stage of the greenfield-fullstack workflow.
I have access to:
- Project Brief from Mary
- PRD from John
Let's create the UX strategy and UI specifications. First, let me review
the PRD to understand the features we're designing for...
```
## Multi-Path Workflows
Some workflows may have multiple paths:
```yaml
conditional_paths:
- condition: project_type == 'mobile'
next_stage: mobile-specific-design
- condition: project_type == 'web'
next_stage: web-architecture
- default: fullstack-architecture
```
Handle these by asking clarifying questions when needed.
## Workflow Best Practices
1. **Always show progress** - Users should know where they are
2. **Explain transitions** - Why moving to next agent
3. **Preserve context** - Pass relevant information forward
4. **Allow flexibility** - Users can skip or modify steps
5. **Track everything** - Maintain complete workflow state
## Integration with Agents
Each agent should be workflow-aware:
- Know which workflow is active
- Understand their role in the workflow
- Access previous artifacts
- Know expected outputs
- Guide toward workflow goals
This creates a seamless experience where the entire team works together toward the workflow's objectives.

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{ {
"name": "bmad-method", "name": "bmad-method",
"version": "4.15.0", "version": "4.23.0",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "bmad-method", "name": "bmad-method",
"version": "4.15.0", "version": "4.23.0",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@kayvan/markdown-tree-parser": "^1.5.0", "@kayvan/markdown-tree-parser": "^1.5.0",

View File

@@ -1,6 +1,6 @@
{ {
"name": "bmad-method", "name": "bmad-method",
"version": "4.15.0", "version": "4.23.0",
"description": "Breakthrough Method of Agile AI-driven Development", "description": "Breakthrough Method of Agile AI-driven Development",
"main": "tools/cli.js", "main": "tools/cli.js",
"bin": { "bin": {
@@ -18,6 +18,20 @@
"version:patch": "node tools/version-bump.js patch", "version:patch": "node tools/version-bump.js patch",
"version:minor": "node tools/version-bump.js minor", "version:minor": "node tools/version-bump.js minor",
"version:major": "node tools/version-bump.js major", "version:major": "node tools/version-bump.js major",
"version:core": "node tools/bump-core-version.js",
"version:core:major": "node tools/bump-core-version.js major",
"version:core:minor": "node tools/bump-core-version.js minor",
"version:core:patch": "node tools/bump-core-version.js patch",
"version:expansion": "node tools/bump-expansion-version.js",
"version:expansion:set": "node tools/update-expansion-version.js",
"version:all": "node tools/bump-all-versions.js",
"version:all:minor": "node tools/bump-all-versions.js minor",
"version:all:major": "node tools/bump-all-versions.js major",
"version:all:patch": "node tools/bump-all-versions.js patch",
"version:expansion:all": "node tools/bump-all-versions.js",
"version:expansion:all:minor": "node tools/bump-all-versions.js minor",
"version:expansion:all:major": "node tools/bump-all-versions.js major",
"version:expansion:all:patch": "node tools/bump-all-versions.js patch",
"release": "semantic-release", "release": "semantic-release",
"release:test": "semantic-release --dry-run --no-ci || echo 'Config test complete - authentication errors are expected locally'", "release:test": "semantic-release --dry-run --no-ci || echo 'Config test complete - authentication errors are expected locally'",
"prepare": "husky" "prepare": "husky"

View File

@@ -9,8 +9,8 @@ class WebBuilder {
this.resolver = new DependencyResolver(this.rootDir); this.resolver = new DependencyResolver(this.rootDir);
this.templatePath = path.join( this.templatePath = path.join(
this.rootDir, this.rootDir,
"bmad-core", "tools",
"utils", "md-assets",
"web-agent-startup-instructions.md" "web-agent-startup-instructions.md"
); );
} }
@@ -117,35 +117,39 @@ class WebBuilder {
const yamlContent = yamlMatch[1]; const yamlContent = yamlMatch[1];
const yamlStartIndex = content.indexOf(yamlMatch[0]); const yamlStartIndex = content.indexOf(yamlMatch[0]);
const yamlEndIndex = yamlStartIndex + yamlMatch[0].length; const yamlEndIndex = yamlStartIndex + yamlMatch[0].length;
// Parse YAML and remove root and IDE-FILE-RESOLUTION properties // Parse YAML and remove root and IDE-FILE-RESOLUTION properties
try { try {
const yaml = require("js-yaml"); const yaml = require("js-yaml");
const parsed = yaml.load(yamlContent); const parsed = yaml.load(yamlContent);
// Remove the properties if they exist at root level // Remove the properties if they exist at root level
delete parsed.root; delete parsed.root;
delete parsed['IDE-FILE-RESOLUTION']; delete parsed["IDE-FILE-RESOLUTION"];
delete parsed['REQUEST-RESOLUTION']; delete parsed["REQUEST-RESOLUTION"];
// Also remove from activation-instructions if they exist // Also remove from activation-instructions if they exist
if (parsed['activation-instructions'] && Array.isArray(parsed['activation-instructions'])) { if (parsed["activation-instructions"] && Array.isArray(parsed["activation-instructions"])) {
parsed['activation-instructions'] = parsed['activation-instructions'].filter(instruction => { parsed["activation-instructions"] = parsed["activation-instructions"].filter(
return !instruction.startsWith('IDE-FILE-RESOLUTION:') && (instruction) => {
!instruction.startsWith('REQUEST-RESOLUTION:'); return (
}); !instruction.startsWith("IDE-FILE-RESOLUTION:") &&
!instruction.startsWith("REQUEST-RESOLUTION:")
);
}
);
} }
// Reconstruct the YAML // Reconstruct the YAML
const cleanedYaml = yaml.dump(parsed, { lineWidth: -1 }); const cleanedYaml = yaml.dump(parsed, { lineWidth: -1 });
// Get the agent name from the YAML for the header // Get the agent name from the YAML for the header
const agentName = parsed.agent?.id || 'agent'; const agentName = parsed.agent?.id || "agent";
// Build the new content with just the agent header and YAML // Build the new content with just the agent header and YAML
const newHeader = `# ${agentName}\n\nCRITICAL: Read the full YML, start activation to alter your state of being, follow startup section instructions, stay in this being until told to exit this mode:\n\n`; const newHeader = `# ${agentName}\n\nCRITICAL: Read the full YML, start activation to alter your state of being, follow startup section instructions, stay in this being until told to exit this mode:\n\n`;
const afterYaml = content.substring(yamlEndIndex); const afterYaml = content.substring(yamlEndIndex);
return newHeader + "```yaml\n" + cleanedYaml.trim() + "\n```" + afterYaml; return newHeader + "```yaml\n" + cleanedYaml.trim() + "\n```" + afterYaml;
} catch (error) { } catch (error) {
console.warn("Failed to process agent YAML:", error.message); console.warn("Failed to process agent YAML:", error.message);
@@ -156,12 +160,12 @@ class WebBuilder {
formatSection(path, content) { formatSection(path, content) {
const separator = "===================="; const separator = "====================";
// Process agent content if this is an agent file // Process agent content if this is an agent file
if (path.startsWith("agents#")) { if (path.startsWith("agents#")) {
content = this.processAgentContent(content); content = this.processAgentContent(content);
} }
return [ return [
`${separator} START: ${path} ${separator}`, `${separator} START: ${path} ${separator}`,
content.trim(), content.trim(),
@@ -341,6 +345,28 @@ class WebBuilder {
} }
} }
// If not found in core, try common folder
if (!found) {
for (const ext of extensions) {
const commonPath = path.join(
this.rootDir,
"common",
resourceType,
`${resourceName}${ext}`
);
try {
const commonContent = await fs.readFile(commonPath, "utf8");
sections.push(
this.formatSection(`${resourceType}#${resourceName}`, commonContent)
);
found = true;
break;
} catch (error) {
// Not in common either, continue
}
}
}
if (!found) { if (!found) {
console.warn( console.warn(
` ⚠ Dependency ${resourceType}#${resourceName} not found in expansion pack or core` ` ⚠ Dependency ${resourceType}#${resourceName} not found in expansion pack or core`
@@ -516,6 +542,21 @@ class WebBuilder {
} }
} }
// If not found in core, try common folder
if (!found) {
for (const ext of extensions) {
const commonPath = path.join(this.rootDir, "common", dep.type, `${dep.name}${ext}`);
try {
const content = await fs.readFile(commonPath, "utf8");
sections.push(this.formatSection(key, content));
found = true;
break;
} catch (error) {
// Not in common either, continue
}
}
}
if (!found) { if (!found) {
console.warn(` ⚠ Dependency ${key} not found in expansion pack or core`); console.warn(` ⚠ Dependency ${key} not found in expansion pack or core`);
} }

107
tools/bump-all-versions.js Executable file
View File

@@ -0,0 +1,107 @@
#!/usr/bin/env node
const fs = require('fs');
const path = require('path');
const yaml = require('js-yaml');
const args = process.argv.slice(2);
const bumpType = args[0] || 'minor'; // default to minor
if (!['major', 'minor', 'patch'].includes(bumpType)) {
console.log('Usage: node bump-all-versions.js [major|minor|patch]');
console.log('Default: minor');
process.exit(1);
}
function bumpVersion(currentVersion, type) {
const [major, minor, patch] = currentVersion.split('.').map(Number);
switch (type) {
case 'major':
return `${major + 1}.0.0`;
case 'minor':
return `${major}.${minor + 1}.0`;
case 'patch':
return `${major}.${minor}.${patch + 1}`;
default:
return currentVersion;
}
}
async function bumpAllVersions() {
const updatedItems = [];
// First, bump the core version
const coreConfigPath = path.join(__dirname, '..', 'bmad-core', 'core-config.yml');
try {
const coreConfigContent = fs.readFileSync(coreConfigPath, 'utf8');
const coreConfig = yaml.load(coreConfigContent);
const oldCoreVersion = coreConfig.version || '1.0.0';
const newCoreVersion = bumpVersion(oldCoreVersion, bumpType);
coreConfig.version = newCoreVersion;
const updatedCoreYaml = yaml.dump(coreConfig, { indent: 2 });
fs.writeFileSync(coreConfigPath, updatedCoreYaml);
updatedItems.push({ type: 'core', name: 'BMad Core', oldVersion: oldCoreVersion, newVersion: newCoreVersion });
console.log(`✓ BMad Core: ${oldCoreVersion}${newCoreVersion}`);
} catch (error) {
console.error(`✗ Failed to update BMad Core: ${error.message}`);
}
// Then, bump all expansion packs
const expansionPacksDir = path.join(__dirname, '..', 'expansion-packs');
try {
const entries = fs.readdirSync(expansionPacksDir, { withFileTypes: true });
for (const entry of entries) {
if (entry.isDirectory() && !entry.name.startsWith('.') && entry.name !== 'README.md') {
const packId = entry.name;
const configPath = path.join(expansionPacksDir, packId, 'config.yml');
if (fs.existsSync(configPath)) {
try {
const configContent = fs.readFileSync(configPath, 'utf8');
const config = yaml.load(configContent);
const oldVersion = config.version || '1.0.0';
const newVersion = bumpVersion(oldVersion, bumpType);
config.version = newVersion;
const updatedYaml = yaml.dump(config, { indent: 2 });
fs.writeFileSync(configPath, updatedYaml);
updatedItems.push({ type: 'expansion', name: packId, oldVersion, newVersion });
console.log(`${packId}: ${oldVersion}${newVersion}`);
} catch (error) {
console.error(`✗ Failed to update ${packId}: ${error.message}`);
}
}
}
}
if (updatedItems.length > 0) {
const coreCount = updatedItems.filter(i => i.type === 'core').length;
const expansionCount = updatedItems.filter(i => i.type === 'expansion').length;
console.log(`\n✓ Successfully bumped ${updatedItems.length} item(s) with ${bumpType} version bump`);
if (coreCount > 0) console.log(` - ${coreCount} core`);
if (expansionCount > 0) console.log(` - ${expansionCount} expansion pack(s)`);
console.log('\nNext steps:');
console.log('1. Test the changes');
console.log('2. Commit: git add -A && git commit -m "chore: bump all versions (' + bumpType + ')"');
} else {
console.log('No items found to update');
}
} catch (error) {
console.error('Error reading expansion packs directory:', error.message);
process.exit(1);
}
}
bumpAllVersions();

View File

@@ -0,0 +1,57 @@
#!/usr/bin/env node
const fs = require('fs');
const path = require('path');
const yaml = require('js-yaml');
const args = process.argv.slice(2);
const bumpType = args[0] || 'minor'; // default to minor
if (!['major', 'minor', 'patch'].includes(bumpType)) {
console.log('Usage: node bump-core-version.js [major|minor|patch]');
console.log('Default: minor');
process.exit(1);
}
function bumpVersion(currentVersion, type) {
const [major, minor, patch] = currentVersion.split('.').map(Number);
switch (type) {
case 'major':
return `${major + 1}.0.0`;
case 'minor':
return `${major}.${minor + 1}.0`;
case 'patch':
return `${major}.${minor}.${patch + 1}`;
default:
return currentVersion;
}
}
async function bumpCoreVersion() {
try {
const coreConfigPath = path.join(__dirname, '..', 'bmad-core', 'core-config.yml');
const coreConfigContent = fs.readFileSync(coreConfigPath, 'utf8');
const coreConfig = yaml.load(coreConfigContent);
const oldVersion = coreConfig.version || '1.0.0';
const newVersion = bumpVersion(oldVersion, bumpType);
coreConfig.version = newVersion;
const updatedYaml = yaml.dump(coreConfig, { indent: 2 });
fs.writeFileSync(coreConfigPath, updatedYaml);
console.log(`✓ BMad Core: ${oldVersion}${newVersion}`);
console.log(`\n✓ Successfully bumped BMad Core with ${bumpType} version bump`);
console.log('\nNext steps:');
console.log('1. Test the changes');
console.log('2. Commit: git add -A && git commit -m "chore: bump core version (' + bumpType + ')"');
} catch (error) {
console.error('Error updating core version:', error.message);
process.exit(1);
}
}
bumpCoreVersion();

View File

@@ -0,0 +1,78 @@
#!/usr/bin/env node
const fs = require('fs');
const path = require('path');
const yaml = require('js-yaml');
const args = process.argv.slice(2);
if (args.length < 1 || args.length > 2) {
console.log('Usage: node bump-expansion-version.js <expansion-pack-id> [major|minor|patch]');
console.log('Default: minor');
console.log('Example: node bump-expansion-version.js bmad-creator-tools patch');
process.exit(1);
}
const packId = args[0];
const bumpType = args[1] || 'minor'; // default to minor
if (!['major', 'minor', 'patch'].includes(bumpType)) {
console.error('Error: Bump type must be major, minor, or patch');
process.exit(1);
}
function bumpVersion(currentVersion, type) {
const [major, minor, patch] = currentVersion.split('.').map(Number);
switch (type) {
case 'major':
return `${major + 1}.0.0`;
case 'minor':
return `${major}.${minor + 1}.0`;
case 'patch':
return `${major}.${minor}.${patch + 1}`;
default:
return currentVersion;
}
}
async function updateVersion() {
try {
const configPath = path.join(__dirname, '..', 'expansion-packs', packId, 'config.yml');
if (!fs.existsSync(configPath)) {
console.error(`Error: Expansion pack '${packId}' not found`);
console.log('\nAvailable expansion packs:');
const expansionPacksDir = path.join(__dirname, '..', 'expansion-packs');
const entries = fs.readdirSync(expansionPacksDir, { withFileTypes: true });
entries.forEach(entry => {
if (entry.isDirectory() && !entry.name.startsWith('.')) {
console.log(` - ${entry.name}`);
}
});
process.exit(1);
}
const configContent = fs.readFileSync(configPath, 'utf8');
const config = yaml.load(configContent);
const oldVersion = config.version || '1.0.0';
const newVersion = bumpVersion(oldVersion, bumpType);
config.version = newVersion;
const updatedYaml = yaml.dump(config, { indent: 2 });
fs.writeFileSync(configPath, updatedYaml);
console.log(`${packId}: ${oldVersion}${newVersion}`);
console.log(`\n✓ Successfully bumped ${packId} with ${bumpType} version bump`);
console.log('\nNext steps:');
console.log('1. Test the changes');
console.log('2. Commit: git add -A && git commit -m "chore: bump ' + packId + ' version (' + bumpType + ')"');
} catch (error) {
console.error('Error updating version:', error.message);
process.exit(1);
}
}
updateVersion();

View File

@@ -2,6 +2,8 @@
const { program } = require('commander'); const { program } = require('commander');
const path = require('path'); const path = require('path');
const fs = require('fs').promises;
const yaml = require('js-yaml');
// Dynamic imports for ES modules // Dynamic imports for ES modules
let chalk, inquirer; let chalk, inquirer;
@@ -40,22 +42,20 @@ try {
program program
.version(version) .version(version)
.description('BMAD Method installer - AI-powered Agile development framework'); .description('BMAD Method installer - Universal AI agent framework for any domain');
program program
.command('install') .command('install')
.description('Install BMAD Method agents and tools') .description('Install BMAD Method agents and tools')
.option('-f, --full', 'Install complete .bmad-core folder') .option('-f, --full', 'Install complete BMAD Method')
.option('-a, --agent <agent>', 'Install specific agent with dependencies')
.option('-t, --team <team>', 'Install specific team with required agents and dependencies')
.option('-x, --expansion-only', 'Install only expansion packs (no bmad-core)') .option('-x, --expansion-only', 'Install only expansion packs (no bmad-core)')
.option('-d, --directory <path>', 'Installation directory (default: .bmad-core)') .option('-d, --directory <path>', 'Installation directory')
.option('-i, --ide <ide...>', 'Configure for specific IDE(s) - can specify multiple (cursor, claude-code, windsurf, roo, cline, gemini, other)') .option('-i, --ide <ide...>', 'Configure for specific IDE(s) - can specify multiple (cursor, claude-code, windsurf, roo, cline, gemini, vs-code-copilot, other)')
.option('-e, --expansion-packs <packs...>', 'Install specific expansion packs (can specify multiple)') .option('-e, --expansion-packs <packs...>', 'Install specific expansion packs (can specify multiple)')
.action(async (options) => { .action(async (options) => {
try { try {
await initializeModules(); await initializeModules();
if (!options.full && !options.agent && !options.team && !options.expansionOnly) { if (!options.full && !options.expansionOnly) {
// Interactive mode // Interactive mode
const answers = await promptInstallation(); const answers = await promptInstallation();
if (!answers._alreadyInstalled) { if (!answers._alreadyInstalled) {
@@ -64,15 +64,11 @@ program
} else { } else {
// Direct mode // Direct mode
let installType = 'full'; let installType = 'full';
if (options.agent) installType = 'single-agent'; if (options.expansionOnly) installType = 'expansion-only';
else if (options.team) installType = 'team';
else if (options.expansionOnly) installType = 'expansion-only';
const config = { const config = {
installType, installType,
agent: options.agent, directory: options.directory || '.',
team: options.team,
directory: options.directory || '.bmad-core',
ides: (options.ide || []).filter(ide => ide !== 'other'), ides: (options.ide || []).filter(ide => ide !== 'other'),
expansionPacks: options.expansionPacks || [] expansionPacks: options.expansionPacks || []
}; };
@@ -100,19 +96,6 @@ program
} }
}); });
program
.command('list')
.description('List available agents')
.action(async () => {
try {
await installer.listAgents();
} catch (error) {
if (!chalk) await initializeModules();
console.error(chalk.red('Error:'), error.message);
process.exit(1);
}
});
program program
.command('list:expansions') .command('list:expansions')
.description('List available expansion packs') .description('List available expansion packs')
@@ -145,7 +128,7 @@ async function promptInstallation() {
const answers = {}; const answers = {};
// Ask for installation directory // Ask for installation directory first
const { directory } = await inquirer.prompt([ const { directory } = await inquirer.prompt([
{ {
type: 'input', type: 'input',
@@ -161,147 +144,85 @@ async function promptInstallation() {
]); ]);
answers.directory = directory; answers.directory = directory;
// Check if this is an existing v4 installation // Detect existing installations
const installDir = path.resolve(answers.directory); const installDir = path.resolve(directory);
const state = await installer.detectInstallationState(installDir); const state = await installer.detectInstallationState(installDir);
// Check for existing expansion packs
const existingExpansionPacks = state.expansionPacks || {};
// Get available expansion packs
const availableExpansionPacks = await installer.getAvailableExpansionPacks();
// Build choices list
const choices = [];
// Load core config to get short-title
const coreConfigPath = path.join(__dirname, '..', '..', '..', 'bmad-core', 'core-config.yml');
const coreConfig = yaml.load(await fs.readFile(coreConfigPath, 'utf8'));
const coreShortTitle = coreConfig['short-title'] || 'BMad Agile Core System';
// Add BMAD core option
let bmadOptionText;
if (state.type === 'v4_existing') { if (state.type === 'v4_existing') {
console.log(chalk.yellow('\n🔍 Found existing BMAD v4 installation')); const currentVersion = state.manifest?.version || 'unknown';
console.log(` Directory: ${installDir}`); const newVersion = coreConfig.version || 'unknown'; // Use version from core-config.yml
console.log(` Version: ${state.manifest?.version || 'Unknown'}`); const versionInfo = currentVersion === newVersion
console.log(` Installed: ${state.manifest?.installed_at ? new Date(state.manifest.installed_at).toLocaleDateString() : 'Unknown'}`); ? `(v${currentVersion} - reinstall)`
: `(v${currentVersion} → v${newVersion})`;
const { shouldUpdate } = await inquirer.prompt([ bmadOptionText = `Update ${coreShortTitle} ${versionInfo} .bmad-core`;
{ } else {
type: 'confirm', bmadOptionText = `Install ${coreShortTitle} (v${coreConfig.version || version}) .bmad-core`;
name: 'shouldUpdate',
message: 'Would you like to update your existing BMAD v4 installation?',
default: true
}
]);
if (shouldUpdate) {
// Skip other prompts and go directly to update
answers.installType = 'update';
answers._alreadyInstalled = true; // Flag to prevent double installation
await installer.install(answers);
return answers; // Return the answers object
}
// If user doesn't want to update, continue with normal flow
} }
// Ask for installation type choices.push({
const { installType } = await inquirer.prompt([ name: bmadOptionText,
value: 'bmad-core',
checked: true
});
// Add expansion pack options
for (const pack of availableExpansionPacks) {
const existing = existingExpansionPacks[pack.id];
let packOptionText;
if (existing) {
const currentVersion = existing.manifest?.version || 'unknown';
const newVersion = pack.version;
const versionInfo = currentVersion === newVersion
? `(v${currentVersion} - reinstall)`
: `(v${currentVersion} → v${newVersion})`;
packOptionText = `Update ${pack.description} ${versionInfo} .${pack.id}`;
} else {
packOptionText = `Install ${pack.description} (v${pack.version}) .${pack.id}`;
}
choices.push({
name: packOptionText,
value: pack.id,
checked: false
});
}
// Ask what to install
const { selectedItems } = await inquirer.prompt([
{ {
type: 'list', type: 'checkbox',
name: 'installType', name: 'selectedItems',
message: 'How would you like to install BMAD?', message: 'Select what to install/update (use space to select, enter to continue):',
choices: [ choices: choices,
{ validate: (selected) => {
name: 'Complete installation (recommended) - All agents and tools', if (selected.length === 0) {
value: 'full' return 'Please select at least one item to install';
},
{
name: 'Team installation - Install a specific team with required agents',
value: 'team'
},
{
name: 'Single agent - Choose one agent to install',
value: 'single-agent'
},
{
name: 'Expansion packs only - Install expansion packs without bmad-core',
value: 'expansion-only'
} }
] return true;
}
} }
]); ]);
answers.installType = installType;
// Process selections
// If single agent, ask which one answers.installType = selectedItems.includes('bmad-core') ? 'full' : 'expansion-only';
if (installType === 'single-agent') { answers.expansionPacks = selectedItems.filter(item => item !== 'bmad-core');
const agents = await installer.getAvailableAgents();
const { agent } = await inquirer.prompt([
{
type: 'list',
name: 'agent',
message: 'Select an agent to install:',
choices: agents.map(a => ({
name: `${a.id} - ${a.name} (${a.description})`,
value: a.id
}))
}
]);
answers.agent = agent;
}
// If team installation, ask which team
if (installType === 'team') {
const teams = await installer.getAvailableTeams();
const { team } = await inquirer.prompt([
{
type: 'list',
name: 'team',
message: 'Select a team to install in your IDE project folder:',
choices: teams.map(t => ({
name: `${t.icon || '📋'} ${t.name}: ${t.description}`,
value: t.id
}))
}
]);
answers.team = team;
}
// Ask for expansion pack selection
if (installType === 'full' || installType === 'team' || installType === 'expansion-only') {
try {
const availableExpansionPacks = await installer.getAvailableExpansionPacks();
if (availableExpansionPacks.length > 0) {
let choices;
let message;
if (installType === 'expansion-only') {
message = 'Select expansion packs to install (required):'
choices = availableExpansionPacks.map(pack => ({
name: `${pack.name} - ${pack.description}`,
value: pack.id
}));
} else {
message = 'Select expansion packs to install (press Enter to skip, or check any to install):';
choices = availableExpansionPacks.map(pack => ({
name: `${pack.name} - ${pack.description}`,
value: pack.id
}));
}
const { expansionPacks } = await inquirer.prompt([
{
type: 'checkbox',
name: 'expansionPacks',
message,
choices,
validate: installType === 'expansion-only' ? (answer) => {
if (answer.length < 1) {
return 'You must select at least one expansion pack for expansion-only installation.';
}
return true;
} : undefined
}
]);
// Use selected expansion packs directly
answers.expansionPacks = expansionPacks;
} else {
answers.expansionPacks = [];
}
} catch (error) {
console.warn(chalk.yellow('Warning: Could not load expansion packs. Continuing without them.'));
answers.expansionPacks = [];
}
} else {
answers.expansionPacks = [];
}
// Ask for IDE configuration // Ask for IDE configuration
const { ides } = await inquirer.prompt([ const { ides } = await inquirer.prompt([
@@ -315,7 +236,8 @@ async function promptInstallation() {
{ name: 'Windsurf', value: 'windsurf' }, { name: 'Windsurf', value: 'windsurf' },
{ name: 'Roo Code', value: 'roo' }, { name: 'Roo Code', value: 'roo' },
{ name: 'Cline', value: 'cline' }, { name: 'Cline', value: 'cline' },
{ name: 'Gemini CLI', value: 'gemini' } { name: 'Gemini CLI', value: 'gemini' },
{ name: 'VS Code Copilot', value: 'vs-code-copilot' }
] ]
} }
]); ]);
@@ -329,7 +251,7 @@ async function promptInstallation() {
type: 'confirm', type: 'confirm',
name: 'includeWebBundles', name: 'includeWebBundles',
message: 'Would you like to include pre-built web bundles? (standalone files for ChatGPT, Claude, Gemini)', message: 'Would you like to include pre-built web bundles? (standalone files for ChatGPT, Claude, Gemini)',
default: true default: false
} }
]); ]);

View File

@@ -0,0 +1,58 @@
# IDE-specific agent configurations
# This file defines agent-specific settings for different IDEs
# Roo Code file permissions
# Each agent can have restricted file access based on regex patterns
# If an agent is not listed here, it gets full edit access
roo-permissions:
# Core agents
analyst:
fileRegex: "\\.(md|txt)$"
description: "Documentation and text files"
pm:
fileRegex: "\\.(md|txt)$"
description: "Product documentation"
architect:
fileRegex: "\\.(md|txt|yml|yaml|json)$"
description: "Architecture docs and configs"
qa:
fileRegex: "\\.(test|spec)\\.(js|ts|jsx|tsx)$|\\.md$"
description: "Test files and documentation"
ux-expert:
fileRegex: "\\.(md|css|scss|html|jsx|tsx)$"
description: "Design-related files"
po:
fileRegex: "\\.(md|txt)$"
description: "Story and requirement docs"
sm:
fileRegex: "\\.(md|txt)$"
description: "Process and planning docs"
# Expansion pack agents
game-designer:
fileRegex: "\\.(md|txt|json|yaml|yml)$"
description: "Game design documents and configs"
game-sm:
fileRegex: "\\.(md|txt)$"
description: "Game project management docs"
# Cline agent ordering
# Lower numbers appear first in the list
# Agents not listed get order 99
cline-order:
# Core agents
bmad-master: 1
bmad-orchestrator: 2
pm: 3
analyst: 4
architect: 5
po: 6
sm: 7
dev: 8
qa: 9
ux-expert: 10
# Expansion pack agents
bmad-the-creator: 11
game-designer: 12
game-developer: 13
game-sm: 14
infra-devops-platform: 15

View File

@@ -8,50 +8,6 @@ installation-options:
name: Single Agent name: Single Agent
description: Select and install a single agent with its dependencies description: Select and install a single agent with its dependencies
action: copy-agent action: copy-agent
agent-dependencies:
core-files:
- bmad-core/utils/template-format.md
dev:
- bmad-core/templates/story-tmpl.md
- bmad-core/checklists/story-dod-checklist.md
pm:
- bmad-core/templates/prd-tmpl.md
- bmad-core/templates/brownfield-prd-tmpl.md
- bmad-core/checklists/pm-checklist.md
- bmad-core/checklists/change-checklist.md
- bmad-core/tasks/advanced-elicitation.md
- bmad-core/tasks/create-doc.md
- bmad-core/tasks/correct-course.md
- bmad-core/tasks/create-deep-research-prompt.md
- bmad-core/tasks/brownfield-create-epic.md
- bmad-core/tasks/brownfield-create-story.md
- bmad-core/tasks/execute-checklist.md
- bmad-core/tasks/shard-doc.md
architect:
- bmad-core/templates/architecture-tmpl.md
- bmad-core/checklists/architect-checklist.md
sm:
- bmad-core/templates/story-tmpl.md
- bmad-core/checklists/story-draft-checklist.md
- bmad-core/workflows/*.yml
po:
- bmad-core/checklists/po-master-checklist.md
- bmad-core/templates/acceptance-criteria-tmpl.md
analyst:
- bmad-core/templates/prd-tmpl.md
- bmad-core/tasks/advanced-elicitation.md
qa:
- bmad-core/checklists/story-dod-checklist.md
- bmad-core/templates/test-plan-tmpl.md
ux-expert:
- bmad-core/templates/ux-tmpl.md
bmad-master:
- bmad-core/templates/*.md
- bmad-core/tasks/*.md
- bmad-core/schemas/*.yml
bmad-orchestrator:
- bmad-core/agent-teams/*.yml
- bmad-core/workflows/*.yml
ide-configurations: ide-configurations:
cursor: cursor:
name: Cursor name: Cursor
@@ -111,44 +67,16 @@ ide-configurations:
# 2. It also configures .gemini/settings.json to load all agent files. # 2. It also configures .gemini/settings.json to load all agent files.
# 3. Simply mention the agent in your prompt (e.g., "As @dev, ..."). # 3. Simply mention the agent in your prompt (e.g., "As @dev, ...").
# 4. The Gemini CLI will automatically have the context for that agent. # 4. The Gemini CLI will automatically have the context for that agent.
available-agents: vs-code-copilot:
- id: analyst name: VS Code Copilot
name: Business Analyst rule-dir: .github/chatmodes/
file: bmad-core/agents/analyst.md format: multi-file
description: Requirements gathering and analysis command-suffix: .md
- id: pm instructions: |
name: Product Manager # To use BMAD agents with VS Code Copilot:
file: bmad-core/agents/pm.md # 1. The installer creates a .github/chatmodes/ directory in your project
description: Product strategy and roadmap planning # 2. Open the Chat view (`⌃⌘I` on Mac, `Ctrl+Alt+I` on Windows/Linux) and select **Agent** from the chat mode selector.
- id: architect # 3. The agent will adopt that persona for the conversation
name: Solution Architect # 4. Requires VS Code 1.99+ with `chat.agent.enabled: true` in settings
file: bmad-core/agents/architect.md # 5. Agent files are stored in .github/chatmodes/
description: Technical design and architecture # 6. Use `/help` to see available commands and agents
- id: po
name: Product Owner
file: bmad-core/agents/po.md
description: Backlog management and prioritization
- id: sm
name: Scrum Master
file: bmad-core/agents/sm.md
description: Agile process and story creation
- id: dev
name: Developer
file: bmad-core/agents/dev.md
description: Code implementation and testing
- id: qa
name: QA Engineer
file: bmad-core/agents/qa.md
description: Quality assurance and testing
- id: ux-expert
name: UX Expert
file: bmad-core/agents/ux-expert.md
description: User experience design
- id: bmad-master
name: BMAD Master
file: bmad-core/agents/bmad-master.md
description: BMAD framework expert and guide
- id: bmad-orchestrator
name: BMAD Orchestrator
file: bmad-core/agents/bmad-orchestrator.md
description: Multi-agent workflow coordinator

View File

@@ -26,8 +26,47 @@ class ConfigLoader {
} }
async getAvailableAgents() { async getAvailableAgents() {
const config = await this.load(); const agentsDir = path.join(this.getBmadCorePath(), 'agents');
return config['available-agents'] || [];
try {
const entries = await fs.readdir(agentsDir, { withFileTypes: true });
const agents = [];
for (const entry of entries) {
if (entry.isFile() && entry.name.endsWith('.md')) {
const agentPath = path.join(agentsDir, entry.name);
const agentId = path.basename(entry.name, '.md');
try {
const agentContent = await fs.readFile(agentPath, 'utf8');
// Extract YAML block from agent file
const yamlMatch = agentContent.match(/```yml\n([\s\S]*?)\n```/);
if (yamlMatch) {
const yamlContent = yaml.load(yamlMatch[1]);
const agentConfig = yamlContent.agent || {};
agents.push({
id: agentId,
name: agentConfig.title || agentConfig.name || agentId,
file: `bmad-core/agents/${entry.name}`,
description: agentConfig.whenToUse || 'No description available'
});
}
} catch (error) {
console.warn(`Failed to read agent ${entry.name}: ${error.message}`);
}
}
}
// Sort agents by name for consistent display
agents.sort((a, b) => a.name.localeCompare(b.name));
return agents;
} catch (error) {
console.warn(`Failed to read agents directory: ${error.message}`);
return [];
}
} }
async getAvailableExpansionPacks() { async getAvailableExpansionPacks() {
@@ -38,24 +77,45 @@ class ConfigLoader {
const expansionPacks = []; const expansionPacks = [];
for (const entry of entries) { for (const entry of entries) {
if (entry.isDirectory()) { if (entry.isDirectory() && !entry.name.startsWith('.')) {
const manifestPath = path.join(expansionPacksDir, entry.name, 'manifest.yml'); const packPath = path.join(expansionPacksDir, entry.name);
const configPath = path.join(packPath, 'config.yml');
try { try {
const manifestContent = await fs.readFile(manifestPath, 'utf8'); // Read config.yml
const manifest = yaml.load(manifestContent); const configContent = await fs.readFile(configPath, 'utf8');
const config = yaml.load(configContent);
expansionPacks.push({ expansionPacks.push({
id: entry.name, id: entry.name,
name: manifest.name || entry.name, name: config.name || entry.name,
description: manifest.description || 'No description available', description: config['short-title'] || config.description || 'No description available',
version: manifest.version || '1.0.0', fullDescription: config.description || config['short-title'] || 'No description available',
author: manifest.author || 'Unknown', version: config.version || '1.0.0',
manifestPath: manifestPath, author: config.author || 'BMAD Team',
dependencies: manifest.dependencies || [] packPath: packPath,
dependencies: config.dependencies?.agents || []
}); });
} catch (error) { } catch (error) {
console.warn(`Failed to read manifest for expansion pack ${entry.name}: ${error.message}`); // Fallback if config.yml doesn't exist or can't be read
console.warn(`Failed to read config for expansion pack ${entry.name}: ${error.message}`);
// Try to derive info from directory name as fallback
const name = entry.name
.split('-')
.map(word => word.charAt(0).toUpperCase() + word.slice(1))
.join(' ');
expansionPacks.push({
id: entry.name,
name: name,
description: 'No description available',
fullDescription: 'No description available',
version: '1.0.0',
author: 'BMAD Team',
packPath: packPath,
dependencies: []
});
} }
} }
} }
@@ -72,36 +132,24 @@ class ConfigLoader {
const DependencyResolver = require('../../lib/dependency-resolver'); const DependencyResolver = require('../../lib/dependency-resolver');
const resolver = new DependencyResolver(path.join(__dirname, '..', '..', '..')); const resolver = new DependencyResolver(path.join(__dirname, '..', '..', '..'));
try { const agentDeps = await resolver.resolveAgentDependencies(agentId);
const agentDeps = await resolver.resolveAgentDependencies(agentId);
// Convert to flat list of file paths
// Convert to flat list of file paths const depPaths = [];
const depPaths = [];
// Core files and utilities are included automatically by DependencyResolver
// Core files and utilities are included automatically by DependencyResolver
// Add agent file itself is already handled by installer
// Add agent file itself is already handled by installer
// Add all resolved resources
// Add all resolved resources for (const resource of agentDeps.resources) {
for (const resource of agentDeps.resources) { const filePath = `.bmad-core/${resource.type}/${resource.id}.md`;
const filePath = `.bmad-core/${resource.type}/${resource.id}.md`; if (!depPaths.includes(filePath)) {
if (!depPaths.includes(filePath)) { depPaths.push(filePath);
depPaths.push(filePath);
}
} }
return depPaths;
} catch (error) {
console.warn(`Failed to dynamically resolve dependencies for ${agentId}: ${error.message}`);
// Fall back to static config
const config = await this.load();
const dependencies = config['agent-dependencies'] || {};
const coreFiles = dependencies['core-files'] || [];
const agentDeps = dependencies[agentId] || [];
return [...coreFiles, ...agentDeps];
} }
return depPaths;
} }
async getIdeConfiguration(ide) { async getIdeConfiguration(ide) {

View File

@@ -83,13 +83,24 @@ class FileManager {
this.manifestFile this.manifestFile
); );
// Read version from core-config.yml
const coreConfigPath = path.join(__dirname, "../../../bmad-core/core-config.yml");
let coreVersion = "unknown";
try {
const coreConfigContent = await fs.readFile(coreConfigPath, "utf8");
const coreConfig = yaml.load(coreConfigContent);
coreVersion = coreConfig.version || "unknown";
} catch (error) {
console.warn("Could not read version from core-config.yml, using 'unknown'");
}
const manifest = { const manifest = {
version: require("../../../package.json").version, version: coreVersion,
installed_at: new Date().toISOString(), installed_at: new Date().toISOString(),
install_type: config.installType, install_type: config.installType,
agent: config.agent || null, agent: config.agent || null,
ide_setup: config.ide || null,
ides_setup: config.ides || [], ides_setup: config.ides || [],
expansion_packs: config.expansionPacks || [],
files: [], files: [],
}; };
@@ -127,6 +138,21 @@ class FileManager {
} }
} }
async readExpansionPackManifest(installDir, packId) {
const manifestPath = path.join(
installDir,
`.${packId}`,
this.manifestFile
);
try {
const content = await fs.readFile(manifestPath, "utf8");
return yaml.load(content);
} catch (error) {
return null;
}
}
async checkModifiedFiles(installDir, manifest) { async checkModifiedFiles(installDir, manifest) {
const modified = []; const modified = [];
@@ -142,6 +168,33 @@ class FileManager {
return modified; return modified;
} }
async checkFileIntegrity(installDir, manifest) {
const result = {
missing: [],
modified: []
};
for (const file of manifest.files) {
const filePath = path.join(installDir, file.path);
// Skip checking the manifest file itself - it will always be different due to timestamps
if (file.path.endsWith('install-manifest.yml')) {
continue;
}
if (!(await this.pathExists(filePath))) {
result.missing.push(file.path);
} else {
const currentHash = await this.calculateFileHash(filePath);
if (currentHash && currentHash !== file.hash) {
result.modified.push(file.path);
}
}
}
return result;
}
async backupFile(filePath) { async backupFile(filePath) {
const backupPath = filePath + ".bak"; const backupPath = filePath + ".bak";
let counter = 1; let counter = 1;
@@ -182,6 +235,42 @@ class FileManager {
async removeDirectory(dirPath) { async removeDirectory(dirPath) {
await fs.remove(dirPath); await fs.remove(dirPath);
} }
async createExpansionPackManifest(installDir, packId, config, files) {
const manifestPath = path.join(
installDir,
`.${packId}`,
this.manifestFile
);
const manifest = {
version: config.expansionPackVersion || require("../../../package.json").version,
installed_at: new Date().toISOString(),
install_type: config.installType,
expansion_pack_id: config.expansionPackId,
expansion_pack_name: config.expansionPackName,
ides_setup: config.ides || [],
files: [],
};
// Add file information
for (const file of files) {
const filePath = path.join(installDir, file);
const hash = await this.calculateFileHash(filePath);
manifest.files.push({
path: file,
hash: hash,
modified: false,
});
}
// Write manifest
await fs.ensureDir(path.dirname(manifestPath));
await fs.writeFile(manifestPath, yaml.dump(manifest, { indent: 2 }));
return manifest;
}
} }
module.exports = new FileManager(); module.exports = new FileManager();

View File

@@ -1,19 +1,46 @@
const path = require("path"); const path = require("path");
const fs = require("fs-extra");
const yaml = require("js-yaml");
const fileManager = require("./file-manager"); const fileManager = require("./file-manager");
const configLoader = require("./config-loader"); const configLoader = require("./config-loader");
// Dynamic import for ES module // Dynamic import for ES module
let chalk; let chalk;
let inquirer;
// Initialize ES modules // Initialize ES modules
async function initializeModules() { async function initializeModules() {
if (!chalk) { if (!chalk) {
chalk = (await import("chalk")).default; chalk = (await import("chalk")).default;
} }
if (!inquirer) {
inquirer = (await import("inquirer")).default;
}
} }
class IdeSetup { class IdeSetup {
async setup(ide, installDir, selectedAgent = null) { constructor() {
this.ideAgentConfig = null;
}
async loadIdeAgentConfig() {
if (this.ideAgentConfig) return this.ideAgentConfig;
try {
const configPath = path.join(__dirname, '..', 'config', 'ide-agent-config.yml');
const configContent = await fs.readFile(configPath, 'utf8');
this.ideAgentConfig = yaml.load(configContent);
return this.ideAgentConfig;
} catch (error) {
console.warn('Failed to load IDE agent configuration, using defaults');
return {
'roo-permissions': {},
'cline-order': {}
};
}
}
async setup(ide, installDir, selectedAgent = null, spinner = null) {
await initializeModules(); await initializeModules();
const ideConfig = await configLoader.getIdeConfiguration(ide); const ideConfig = await configLoader.getIdeConfiguration(ide);
@@ -35,6 +62,8 @@ class IdeSetup {
return this.setupCline(installDir, selectedAgent); return this.setupCline(installDir, selectedAgent);
case "gemini": case "gemini":
return this.setupGeminiCli(installDir, selectedAgent); return this.setupGeminiCli(installDir, selectedAgent);
case "vs-code-copilot":
return this.setupVsCodeCopilot(installDir, selectedAgent, spinner);
default: default:
console.log(chalk.yellow(`\nIDE ${ide} not yet supported`)); console.log(chalk.yellow(`\nIDE ${ide} not yet supported`));
return false; return false;
@@ -48,13 +77,10 @@ class IdeSetup {
await fileManager.ensureDirectory(cursorRulesDir); await fileManager.ensureDirectory(cursorRulesDir);
for (const agentId of agents) { for (const agentId of agents) {
// Check if .bmad-core is a subdirectory (full install) or if agents are in root (single agent install) // Find the agent file
let agentPath = path.join(installDir, ".bmad-core", "agents", `${agentId}.md`); const agentPath = await this.findAgentPath(agentId, installDir);
if (!(await fileManager.pathExists(agentPath))) {
agentPath = path.join(installDir, "agents", `${agentId}.md`);
}
if (await fileManager.pathExists(agentPath)) { if (agentPath) {
const agentContent = await fileManager.readFile(agentPath); const agentContent = await fileManager.readFile(agentPath);
const mdcPath = path.join(cursorRulesDir, `${agentId}.mdc`); const mdcPath = path.join(cursorRulesDir, `${agentId}.mdc`);
@@ -65,8 +91,9 @@ class IdeSetup {
mdcContent += "alwaysApply: false\n"; mdcContent += "alwaysApply: false\n";
mdcContent += "---\n\n"; mdcContent += "---\n\n";
mdcContent += `# ${agentId.toUpperCase()} Agent Rule\n\n`; mdcContent += `# ${agentId.toUpperCase()} Agent Rule\n\n`;
mdcContent += `This rule is triggered when the user types \`@${agentId}\` and activates the ${this.getAgentTitle( mdcContent += `This rule is triggered when the user types \`@${agentId}\` and activates the ${await this.getAgentTitle(
agentId agentId,
installDir
)} agent persona.\n\n`; )} agent persona.\n\n`;
mdcContent += "## Agent Activation\n\n"; mdcContent += "## Agent Activation\n\n";
mdcContent += mdcContent +=
@@ -82,10 +109,12 @@ class IdeSetup {
} }
mdcContent += "\n```\n\n"; mdcContent += "\n```\n\n";
mdcContent += "## File Reference\n\n"; mdcContent += "## File Reference\n\n";
mdcContent += `The complete agent definition is available in [.bmad-core/agents/${agentId}.md](mdc:.bmad-core/agents/${agentId}.md).\n\n`; const relativePath = path.relative(installDir, agentPath).replace(/\\/g, '/');
mdcContent += `The complete agent definition is available in [${relativePath}](mdc:${relativePath}).\n\n`;
mdcContent += "## Usage\n\n"; mdcContent += "## Usage\n\n";
mdcContent += `When the user types \`@${agentId}\`, activate this ${this.getAgentTitle( mdcContent += `When the user types \`@${agentId}\`, activate this ${await this.getAgentTitle(
agentId agentId,
installDir
)} persona and follow all instructions defined in the YML configuration above.\n`; )} persona and follow all instructions defined in the YML configuration above.\n`;
await fileManager.writeFile(mdcPath, mdcContent); await fileManager.writeFile(mdcPath, mdcContent);
@@ -105,14 +134,11 @@ class IdeSetup {
await fileManager.ensureDirectory(commandsDir); await fileManager.ensureDirectory(commandsDir);
for (const agentId of agents) { for (const agentId of agents) {
// Check if .bmad-core is a subdirectory (full install) or if agents are in root (single agent install) // Find the agent file
let agentPath = path.join(installDir, ".bmad-core", "agents", `${agentId}.md`); const agentPath = await this.findAgentPath(agentId, installDir);
if (!(await fileManager.pathExists(agentPath))) {
agentPath = path.join(installDir, "agents", `${agentId}.md`);
}
const commandPath = path.join(commandsDir, `${agentId}.md`); const commandPath = path.join(commandsDir, `${agentId}.md`);
if (await fileManager.pathExists(agentPath)) { if (agentPath) {
// Create command file with agent content // Create command file with agent content
const agentContent = await fileManager.readFile(agentPath); const agentContent = await fileManager.readFile(agentPath);
@@ -138,20 +164,18 @@ class IdeSetup {
await fileManager.ensureDirectory(windsurfRulesDir); await fileManager.ensureDirectory(windsurfRulesDir);
for (const agentId of agents) { for (const agentId of agents) {
// Check if .bmad-core is a subdirectory (full install) or if agents are in root (single agent install) // Find the agent file
let agentPath = path.join(installDir, ".bmad-core", "agents", `${agentId}.md`); const agentPath = await this.findAgentPath(agentId, installDir);
if (!(await fileManager.pathExists(agentPath))) {
agentPath = path.join(installDir, "agents", `${agentId}.md`);
}
if (await fileManager.pathExists(agentPath)) { if (agentPath) {
const agentContent = await fileManager.readFile(agentPath); const agentContent = await fileManager.readFile(agentPath);
const mdPath = path.join(windsurfRulesDir, `${agentId}.md`); const mdPath = path.join(windsurfRulesDir, `${agentId}.md`);
// Create MD content (similar to Cursor but without frontmatter) // Create MD content (similar to Cursor but without frontmatter)
let mdContent = `# ${agentId.toUpperCase()} Agent Rule\n\n`; let mdContent = `# ${agentId.toUpperCase()} Agent Rule\n\n`;
mdContent += `This rule is triggered when the user types \`@${agentId}\` and activates the ${this.getAgentTitle( mdContent += `This rule is triggered when the user types \`@${agentId}\` and activates the ${await this.getAgentTitle(
agentId agentId,
installDir
)} agent persona.\n\n`; )} agent persona.\n\n`;
mdContent += "## Agent Activation\n\n"; mdContent += "## Agent Activation\n\n";
mdContent += mdContent +=
@@ -167,10 +191,12 @@ class IdeSetup {
} }
mdContent += "\n```\n\n"; mdContent += "\n```\n\n";
mdContent += "## File Reference\n\n"; mdContent += "## File Reference\n\n";
mdContent += `The complete agent definition is available in [.bmad-core/agents/${agentId}.md](.bmad-core/agents/${agentId}.md).\n\n`; const relativePath = path.relative(installDir, agentPath).replace(/\\/g, '/');
mdContent += `The complete agent definition is available in [${relativePath}](${relativePath}).\n\n`;
mdContent += "## Usage\n\n"; mdContent += "## Usage\n\n";
mdContent += `When the user types \`@${agentId}\`, activate this ${this.getAgentTitle( mdContent += `When the user types \`@${agentId}\`, activate this ${await this.getAgentTitle(
agentId agentId,
installDir
)} persona and follow all instructions defined in the YML configuration above.\n`; )} persona and follow all instructions defined in the YML configuration above.\n`;
await fileManager.writeFile(mdPath, mdContent); await fileManager.writeFile(mdPath, mdContent);
@@ -183,32 +209,93 @@ class IdeSetup {
return true; return true;
} }
async findAgentPath(agentId, installDir) {
// Try to find the agent file in various locations
const possiblePaths = [
path.join(installDir, ".bmad-core", "agents", `${agentId}.md`),
path.join(installDir, "agents", `${agentId}.md`)
];
// Also check expansion pack directories
const glob = require("glob");
const expansionDirs = glob.sync(".*/agents", { cwd: installDir });
for (const expDir of expansionDirs) {
possiblePaths.push(path.join(installDir, expDir, `${agentId}.md`));
}
for (const agentPath of possiblePaths) {
if (await fileManager.pathExists(agentPath)) {
return agentPath;
}
}
return null;
}
async getAllAgentIds(installDir) { async getAllAgentIds(installDir) {
// Check if .bmad-core is a subdirectory (full install) or if agents are in root (single agent install) const glob = require("glob");
const allAgentIds = [];
// Check core agents in .bmad-core or root
let agentsDir = path.join(installDir, ".bmad-core", "agents"); let agentsDir = path.join(installDir, ".bmad-core", "agents");
if (!(await fileManager.pathExists(agentsDir))) { if (!(await fileManager.pathExists(agentsDir))) {
agentsDir = path.join(installDir, "agents"); agentsDir = path.join(installDir, "agents");
} }
const glob = require("glob"); if (await fileManager.pathExists(agentsDir)) {
const agentFiles = glob.sync("*.md", { cwd: agentsDir }); const agentFiles = glob.sync("*.md", { cwd: agentsDir });
return agentFiles.map((file) => path.basename(file, ".md")); allAgentIds.push(...agentFiles.map((file) => path.basename(file, ".md")));
}
// Also check for expansion pack agents in dot folders
const expansionDirs = glob.sync(".*/agents", { cwd: installDir });
for (const expDir of expansionDirs) {
const fullExpDir = path.join(installDir, expDir);
const expAgentFiles = glob.sync("*.md", { cwd: fullExpDir });
allAgentIds.push(...expAgentFiles.map((file) => path.basename(file, ".md")));
}
// Remove duplicates
return [...new Set(allAgentIds)];
} }
getAgentTitle(agentId) { async getAgentTitle(agentId, installDir) {
const agentTitles = { // Try to find the agent file in various locations
analyst: "Business Analyst", const possiblePaths = [
architect: "Solution Architect", path.join(installDir, ".bmad-core", "agents", `${agentId}.md`),
"bmad-master": "BMAD Master", path.join(installDir, "agents", `${agentId}.md`)
"bmad-orchestrator": "BMAD Orchestrator", ];
dev: "Developer",
pm: "Product Manager", // Also check expansion pack directories
po: "Product Owner", const glob = require("glob");
qa: "QA Specialist", const expansionDirs = glob.sync(".*/agents", { cwd: installDir });
sm: "Scrum Master", for (const expDir of expansionDirs) {
"ux-expert": "UX Expert", possiblePaths.push(path.join(installDir, expDir, `${agentId}.md`));
}; }
return agentTitles[agentId] || agentId;
for (const agentPath of possiblePaths) {
if (await fileManager.pathExists(agentPath)) {
try {
const agentContent = await fileManager.readFile(agentPath);
const yamlMatch = agentContent.match(/```ya?ml\n([\s\S]*?)```/);
if (yamlMatch) {
const yaml = yamlMatch[1];
const titleMatch = yaml.match(/title:\s*(.+)/);
if (titleMatch) {
return titleMatch[1].trim();
}
}
} catch (error) {
console.warn(`Failed to read agent title for ${agentId}: ${error.message}`);
}
}
}
// Fallback to formatted agent ID
return agentId.split('-').map(word =>
word.charAt(0).toUpperCase() + word.slice(1)
).join(' ');
} }
async setupRoo(installDir, selectedAgent) { async setupRoo(installDir, selectedAgent) {
@@ -232,40 +319,9 @@ class IdeSetup {
// Create new modes content // Create new modes content
let newModesContent = ""; let newModesContent = "";
// Define file permissions for each agent type // Load dynamic agent permissions from configuration
const agentPermissions = { const config = await this.loadIdeAgentConfig();
analyst: { const agentPermissions = config['roo-permissions'] || {};
fileRegex: "\\.(md|txt)$",
description: "Documentation and text files",
},
pm: {
fileRegex: "\\.(md|txt)$",
description: "Product documentation",
},
architect: {
fileRegex: "\\.(md|txt|yml|yaml|json)$",
description: "Architecture docs and configs",
},
dev: null, // Full edit access
qa: {
fileRegex: "\\.(test|spec)\\.(js|ts|jsx|tsx)$|\\.md$",
description: "Test files and documentation",
},
"ux-expert": {
fileRegex: "\\.(md|css|scss|html|jsx|tsx)$",
description: "Design-related files",
},
po: {
fileRegex: "\\.(md|txt)$",
description: "Story and requirement docs",
},
sm: {
fileRegex: "\\.(md|txt)$",
description: "Process and planning docs",
},
"bmad-orchestrator": null, // Full edit access
"bmad-master": null, // Full edit access
};
for (const agentId of agents) { for (const agentId of agents) {
// Skip if already exists // Skip if already exists
@@ -275,12 +331,9 @@ class IdeSetup {
} }
// Read agent file to extract all information // Read agent file to extract all information
let agentPath = path.join(installDir, ".bmad-core", "agents", `${agentId}.md`); const agentPath = await this.findAgentPath(agentId, installDir);
if (!(await fileManager.pathExists(agentPath))) {
agentPath = path.join(installDir, "agents", `${agentId}.md`);
}
if (await fileManager.pathExists(agentPath)) { if (agentPath) {
const agentContent = await fileManager.readFile(agentPath); const agentContent = await fileManager.readFile(agentPath);
// Extract YAML content // Extract YAML content
@@ -294,7 +347,7 @@ class IdeSetup {
const whenToUseMatch = yaml.match(/whenToUse:\s*"(.+)"/); const whenToUseMatch = yaml.match(/whenToUse:\s*"(.+)"/);
const roleDefinitionMatch = yaml.match(/roleDefinition:\s*"(.+)"/); const roleDefinitionMatch = yaml.match(/roleDefinition:\s*"(.+)"/);
const title = titleMatch ? titleMatch[1].trim() : this.getAgentTitle(agentId); const title = titleMatch ? titleMatch[1].trim() : await this.getAgentTitle(agentId, installDir);
const icon = iconMatch ? iconMatch[1].trim() : "🤖"; const icon = iconMatch ? iconMatch[1].trim() : "🤖";
const whenToUse = whenToUseMatch ? whenToUseMatch[1].trim() : `Use for ${title} tasks`; const whenToUse = whenToUseMatch ? whenToUseMatch[1].trim() : `Use for ${title} tasks`;
const roleDefinition = roleDefinitionMatch const roleDefinition = roleDefinitionMatch
@@ -306,7 +359,9 @@ class IdeSetup {
newModesContent += ` name: '${icon} ${title}'\n`; newModesContent += ` name: '${icon} ${title}'\n`;
newModesContent += ` roleDefinition: ${roleDefinition}\n`; newModesContent += ` roleDefinition: ${roleDefinition}\n`;
newModesContent += ` whenToUse: ${whenToUse}\n`; newModesContent += ` whenToUse: ${whenToUse}\n`;
newModesContent += ` customInstructions: CRITICAL Read the full YML from .bmad-core/agents/${agentId}.md start activation to alter your state of being follow startup section instructions stay in this being until told to exit this mode\n`; // Get relative path from installDir to agent file
const relativePath = path.relative(installDir, agentPath).replace(/\\/g, '/');
newModesContent += ` customInstructions: CRITICAL Read the full YML from ${relativePath} start activation to alter your state of being follow startup section instructions stay in this being until told to exit this mode\n`;
newModesContent += ` groups:\n`; newModesContent += ` groups:\n`;
newModesContent += ` - read\n`; newModesContent += ` - read\n`;
@@ -351,28 +406,15 @@ class IdeSetup {
await fileManager.ensureDirectory(clineRulesDir); await fileManager.ensureDirectory(clineRulesDir);
// Define agent order for numeric prefixes // Load dynamic agent ordering from configuration
const agentOrder = { const config = await this.loadIdeAgentConfig();
'bmad-master': 1, const agentOrder = config['cline-order'] || {};
'bmad-orchestrator': 2,
'pm': 3,
'analyst': 4,
'architect': 5,
'po': 6,
'sm': 7,
'dev': 8,
'qa': 9,
'ux-expert': 10
};
for (const agentId of agents) { for (const agentId of agents) {
// Check if .bmad-core is a subdirectory (full install) or if agents are in root (single agent install) // Find the agent file
let agentPath = path.join(installDir, ".bmad-core", "agents", `${agentId}.md`); const agentPath = await this.findAgentPath(agentId, installDir);
if (!(await fileManager.pathExists(agentPath))) {
agentPath = path.join(installDir, "agents", `${agentId}.md`);
}
if (await fileManager.pathExists(agentPath)) { if (agentPath) {
const agentContent = await fileManager.readFile(agentPath); const agentContent = await fileManager.readFile(agentPath);
// Get numeric prefix for ordering // Get numeric prefix for ordering
@@ -381,8 +423,8 @@ class IdeSetup {
const mdPath = path.join(clineRulesDir, `${prefix}-${agentId}.md`); const mdPath = path.join(clineRulesDir, `${prefix}-${agentId}.md`);
// Create MD content for Cline (focused on project standards and role) // Create MD content for Cline (focused on project standards and role)
let mdContent = `# ${this.getAgentTitle(agentId)} Agent\n\n`; let mdContent = `# ${await this.getAgentTitle(agentId, installDir)} Agent\n\n`;
mdContent += `This rule defines the ${this.getAgentTitle(agentId)} persona and project standards.\n\n`; mdContent += `This rule defines the ${await this.getAgentTitle(agentId, installDir)} persona and project standards.\n\n`;
mdContent += "## Role Definition\n\n"; mdContent += "## Role Definition\n\n";
mdContent += mdContent +=
"When the user types `@" + agentId + "`, adopt this persona and follow these guidelines:\n\n"; "When the user types `@" + agentId + "`, adopt this persona and follow these guidelines:\n\n";
@@ -400,9 +442,10 @@ class IdeSetup {
mdContent += `- Always maintain consistency with project documentation in .bmad-core/\n`; mdContent += `- Always maintain consistency with project documentation in .bmad-core/\n`;
mdContent += `- Follow the agent's specific guidelines and constraints\n`; mdContent += `- Follow the agent's specific guidelines and constraints\n`;
mdContent += `- Update relevant project files when making changes\n`; mdContent += `- Update relevant project files when making changes\n`;
mdContent += `- Reference the complete agent definition in [.bmad-core/agents/${agentId}.md](.bmad-core/agents/${agentId}.md)\n\n`; const relativePath = path.relative(installDir, agentPath).replace(/\\/g, '/');
mdContent += `- Reference the complete agent definition in [${relativePath}](${relativePath})\n\n`;
mdContent += "## Usage\n\n"; mdContent += "## Usage\n\n";
mdContent += `Type \`@${agentId}\` to activate this ${this.getAgentTitle(agentId)} persona.\n`; mdContent += `Type \`@${agentId}\` to activate this ${await this.getAgentTitle(agentId, installDir)} persona.\n`;
await fileManager.writeFile(mdPath, mdContent); await fileManager.writeFile(mdPath, mdContent);
console.log(chalk.green(`✓ Created rule: ${prefix}-${agentId}.md`)); console.log(chalk.green(`✓ Created rule: ${prefix}-${agentId}.md`));
@@ -426,12 +469,9 @@ class IdeSetup {
for (const agentId of agents) { for (const agentId of agents) {
// Find the source agent file // Find the source agent file
let agentPath = path.join(installDir, ".bmad-core", "agents", `${agentId}.md`); const agentPath = await this.findAgentPath(agentId, installDir);
if (!(await fileManager.pathExists(agentPath))) {
agentPath = path.join(installDir, "agents", `${agentId}.md`);
}
if (await fileManager.pathExists(agentPath)) { if (agentPath) {
const agentContent = await fileManager.readFile(agentPath); const agentContent = await fileManager.readFile(agentPath);
const contextFilePath = path.join(agentsContextDir, `${agentId}.md`); const contextFilePath = path.join(agentsContextDir, `${agentId}.md`);
@@ -447,6 +487,9 @@ class IdeSetup {
console.log(chalk.green(`\n✓ Created individual agent context files in ${agentsContextDir}`)); console.log(chalk.green(`\n✓ Created individual agent context files in ${agentsContextDir}`));
// Add GEMINI.md to the context files array
agentContextFiles.push("GEMINI.md");
// Create or update settings.json // Create or update settings.json
const settingsPath = path.join(geminiDir, "settings.json"); const settingsPath = path.join(geminiDir, "settings.json");
let settings = {}; let settings = {};
@@ -470,6 +513,213 @@ class IdeSetup {
return true; return true;
} }
async setupVsCodeCopilot(installDir, selectedAgent, spinner = null) {
await initializeModules();
// Configure VS Code workspace settings first to avoid UI conflicts with loading spinners
await this.configureVsCodeSettings(installDir, spinner);
const chatmodesDir = path.join(installDir, ".github", "chatmodes");
const agents = selectedAgent ? [selectedAgent] : await this.getAllAgentIds(installDir);
await fileManager.ensureDirectory(chatmodesDir);
for (const agentId of agents) {
// Find the agent file
const agentPath = await this.findAgentPath(agentId, installDir);
const chatmodePath = path.join(chatmodesDir, `${agentId}.chatmode.md`);
if (agentPath) {
// Create chat mode file with agent content
const agentContent = await fileManager.readFile(agentPath);
const agentTitle = await this.getAgentTitle(agentId, installDir);
// Extract whenToUse for the description
const yamlMatch = agentContent.match(/```ya?ml\n([\s\S]*?)```/);
let description = `Activates the ${agentTitle} agent persona.`;
if (yamlMatch) {
const whenToUseMatch = yamlMatch[1].match(/whenToUse:\s*"(.*?)"/);
if (whenToUseMatch && whenToUseMatch[1]) {
description = whenToUseMatch[1];
}
}
let chatmodeContent = `---
description: "${description.replace(/"/g, '\\"')}"
tools: ['changes', 'codebase', 'fetch', 'findTestFiles', 'githubRepo', 'problems', 'usages']
---
`;
chatmodeContent += agentContent;
await fileManager.writeFile(chatmodePath, chatmodeContent);
console.log(chalk.green(`✓ Created chat mode: ${agentId}.chatmode.md`));
}
}
console.log(chalk.green(`\n✓ VS Code Copilot setup complete!`));
console.log(chalk.dim(`You can now find the BMAD agents in the Chat view's mode selector.`));
return true;
}
async configureVsCodeSettings(installDir, spinner) {
await initializeModules(); // Ensure inquirer is loaded
const vscodeDir = path.join(installDir, ".vscode");
const settingsPath = path.join(vscodeDir, "settings.json");
await fileManager.ensureDirectory(vscodeDir);
// Read existing settings if they exist
let existingSettings = {};
if (await fileManager.pathExists(settingsPath)) {
try {
const existingContent = await fileManager.readFile(settingsPath);
existingSettings = JSON.parse(existingContent);
console.log(chalk.yellow("Found existing .vscode/settings.json. Merging BMAD settings..."));
} catch (error) {
console.warn(chalk.yellow("Could not parse existing settings.json. Creating new one."));
existingSettings = {};
}
}
// Clear any previous output and add spacing to avoid conflicts with loaders
console.log('\n'.repeat(2));
console.log(chalk.blue("🔧 VS Code Copilot Agent Settings Configuration"));
console.log(chalk.dim("BMAD works best with specific VS Code settings for optimal agent experience."));
console.log(''); // Add extra spacing
const { configChoice } = await inquirer.prompt([
{
type: 'list',
name: 'configChoice',
message: 'How would you like to configure VS Code Copilot settings?',
choices: [
{
name: 'Use recommended defaults (fastest setup)',
value: 'defaults'
},
{
name: 'Configure each setting manually (customize to your preferences)',
value: 'manual'
},
{
name: 'Skip settings configuration (I\'ll configure manually later)\n',
value: 'skip'
}
],
default: 'defaults'
}
]);
let bmadSettings = {};
if (configChoice === 'skip') {
console.log(chalk.yellow("⚠️ Skipping VS Code settings configuration."));
console.log(chalk.dim("You can manually configure these settings in .vscode/settings.json:"));
console.log(chalk.dim(" • chat.agent.enabled: true"));
console.log(chalk.dim(" • chat.agent.maxRequests: 15"));
console.log(chalk.dim(" • github.copilot.chat.agent.runTasks: true"));
console.log(chalk.dim(" • chat.mcp.discovery.enabled: true"));
console.log(chalk.dim(" • github.copilot.chat.agent.autoFix: true"));
console.log(chalk.dim(" • chat.tools.autoApprove: false"));
return true;
}
if (configChoice === 'defaults') {
// Use recommended defaults
bmadSettings = {
"chat.agent.enabled": true,
"chat.agent.maxRequests": 15,
"github.copilot.chat.agent.runTasks": true,
"chat.mcp.discovery.enabled": true,
"github.copilot.chat.agent.autoFix": true,
"chat.tools.autoApprove": false
};
console.log(chalk.green("✓ Using recommended BMAD defaults for VS Code Copilot settings"));
} else {
// Manual configuration
console.log(chalk.blue("\n📋 Let's configure each setting for your preferences:"));
// Pause spinner during manual configuration prompts
let spinnerWasActive = false;
if (spinner && spinner.isSpinning) {
spinner.stop();
spinnerWasActive = true;
}
const manualSettings = await inquirer.prompt([
{
type: 'input',
name: 'maxRequests',
message: 'Maximum requests per agent session (recommended: 15)?',
default: '15',
validate: (input) => {
const num = parseInt(input);
if (isNaN(num) || num < 1 || num > 50) {
return 'Please enter a number between 1 and 50';
}
return true;
}
},
{
type: 'confirm',
name: 'runTasks',
message: 'Allow agents to run workspace tasks (package.json scripts, etc.)?',
default: true
},
{
type: 'confirm',
name: 'mcpDiscovery',
message: 'Enable MCP (Model Context Protocol) server discovery?',
default: true
},
{
type: 'confirm',
name: 'autoFix',
message: 'Enable automatic error detection and fixing in generated code?',
default: true
},
{
type: 'confirm',
name: 'autoApprove',
message: 'Auto-approve ALL tools without confirmation? (⚠️ EXPERIMENTAL - less secure)',
default: false
}
]);
// Restart spinner if it was active before prompts
if (spinner && spinnerWasActive) {
spinner.start();
}
bmadSettings = {
"chat.agent.enabled": true, // Always enabled - required for BMAD agents
"chat.agent.maxRequests": parseInt(manualSettings.maxRequests),
"github.copilot.chat.agent.runTasks": manualSettings.runTasks,
"chat.mcp.discovery.enabled": manualSettings.mcpDiscovery,
"github.copilot.chat.agent.autoFix": manualSettings.autoFix,
"chat.tools.autoApprove": manualSettings.autoApprove
};
console.log(chalk.green("✓ Custom settings configured"));
}
// Merge settings (existing settings take precedence to avoid overriding user preferences)
const mergedSettings = { ...bmadSettings, ...existingSettings };
// Write the updated settings
await fileManager.writeFile(settingsPath, JSON.stringify(mergedSettings, null, 2));
console.log(chalk.green("✓ VS Code workspace settings configured successfully"));
console.log(chalk.dim(" Settings written to .vscode/settings.json:"));
Object.entries(bmadSettings).forEach(([key, value]) => {
console.log(chalk.dim(`${key}: ${value}`));
});
console.log(chalk.dim(""));
console.log(chalk.dim("You can modify these settings anytime in .vscode/settings.json"));
}
} }
module.exports = new IdeSetup(); module.exports = new IdeSetup();

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{ {
"name": "bmad-method", "name": "bmad-method",
"version": "4.15.0", "version": "4.23.0",
"description": "BMAD Method installer - AI-powered Agile development framework", "description": "BMAD Method installer - AI-powered Agile development framework",
"main": "lib/installer.js", "main": "lib/installer.js",
"bin": { "bin": {

View File

@@ -6,6 +6,7 @@ class DependencyResolver {
constructor(rootDir) { constructor(rootDir) {
this.rootDir = rootDir; this.rootDir = rootDir;
this.bmadCore = path.join(rootDir, 'bmad-core'); this.bmadCore = path.join(rootDir, 'bmad-core');
this.common = path.join(rootDir, 'common');
this.cache = new Map(); this.cache = new Map();
} }
@@ -123,6 +124,7 @@ class DependencyResolver {
let content = null; let content = null;
let filePath = null; let filePath = null;
// First try bmad-core
for (const ext of extensions) { for (const ext of extensions) {
try { try {
filePath = path.join(this.bmadCore, type, `${id}${ext}`); filePath = path.join(this.bmadCore, type, `${id}${ext}`);
@@ -132,6 +134,19 @@ class DependencyResolver {
// Try next extension // Try next extension
} }
} }
// If not found in bmad-core, try common folder
if (!content) {
for (const ext of extensions) {
try {
filePath = path.join(this.common, type, `${id}${ext}`);
content = await fs.readFile(filePath, 'utf8');
break;
} catch (e) {
// Try next extension
}
}
}
if (!content) { if (!content) {
console.warn(`Resource not found: ${type}/${id}`); console.warn(`Resource not found: ${type}/${id}`);

View File

@@ -0,0 +1,54 @@
#!/usr/bin/env node
const fs = require('fs');
const path = require('path');
const yaml = require('js-yaml');
const args = process.argv.slice(2);
if (args.length < 2) {
console.log('Usage: node update-expansion-version.js <expansion-pack-id> <new-version>');
console.log('Example: node update-expansion-version.js bmad-creator-tools 1.1.0');
process.exit(1);
}
const [packId, newVersion] = args;
// Validate version format
if (!/^\d+\.\d+\.\d+$/.test(newVersion)) {
console.error('Error: Version must be in format X.Y.Z (e.g., 1.2.3)');
process.exit(1);
}
async function updateVersion() {
try {
// Update in config.yml
const configPath = path.join(__dirname, '..', 'expansion-packs', packId, 'config.yml');
if (!fs.existsSync(configPath)) {
console.error(`Error: Expansion pack '${packId}' not found`);
process.exit(1);
}
const configContent = fs.readFileSync(configPath, 'utf8');
const config = yaml.load(configContent);
const oldVersion = config.version || 'unknown';
config.version = newVersion;
const updatedYaml = yaml.dump(config, { indent: 2 });
fs.writeFileSync(configPath, updatedYaml);
console.log(`✓ Updated ${packId}/config.yml: ${oldVersion}${newVersion}`);
console.log(`\n✓ Successfully updated ${packId} to version ${newVersion}`);
console.log('\nNext steps:');
console.log('1. Test the changes');
console.log('2. Commit: git add -A && git commit -m "chore: bump ' + packId + ' to v' + newVersion + '"');
} catch (error) {
console.error('Error updating version:', error.message);
process.exit(1);
}
}
updateVersion();