Compare commits

..

No commits in common. "main" and "v6.3.0" have entirely different histories.
main ... v6.3.0

279 changed files with 8559 additions and 19811 deletions

View File

@ -13,7 +13,7 @@
"name": "bmad-pro-skills", "name": "bmad-pro-skills",
"source": "./", "source": "./",
"description": "Next level skills for power users — advanced prompting techniques, agent management, and more.", "description": "Next level skills for power users — advanced prompting techniques, agent management, and more.",
"version": "6.6.0", "version": "6.3.0",
"author": { "author": {
"name": "Brian (BMad) Madison" "name": "Brian (BMad) Madison"
}, },
@ -35,7 +35,7 @@
"name": "bmad-method-lifecycle", "name": "bmad-method-lifecycle",
"source": "./", "source": "./",
"description": "Full-lifecycle AI development framework — agents and workflows for product analysis, planning, architecture, and implementation.", "description": "Full-lifecycle AI development framework — agents and workflows for product analysis, planning, architecture, and implementation.",
"version": "6.6.0", "version": "6.3.0",
"author": { "author": {
"name": "Brian (BMad) Madison" "name": "Brian (BMad) Madison"
}, },

View File

@ -7,7 +7,6 @@ on:
- "src/**" - "src/**"
- "tools/installer/**" - "tools/installer/**"
- "package.json" - "package.json"
- "removals.txt"
workflow_dispatch: workflow_dispatch:
inputs: inputs:
channel: channel:
@ -136,22 +135,6 @@ jobs:
env: env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Advance @next dist-tag to stable
if: github.event_name == 'workflow_dispatch' && inputs.channel == 'latest'
# Failure here leaves @next stale until the next push-driven prerelease
# republishes — annoying but not release-breaking. Don't fail the job
# after a successful stable publish + tag + GH release.
continue-on-error: true
run: |
# Without this, @latest can leapfrog @next (e.g. latest=6.5.0 while
# next=6.4.1-next.0) and `npx bmad-method@next install` silently
# downgrades users. Point @next at the just-published stable so
# @next >= @latest always holds; the next push-driven prerelease will
# bump from this base via the existing derive step above.
VERSION=$(node -p 'require("./package.json").version')
npm dist-tag add "bmad-method@${VERSION}" next
echo "Advanced @next dist-tag to ${VERSION}"
- name: Notify Discord - name: Notify Discord
if: github.event_name == 'workflow_dispatch' && inputs.channel == 'latest' if: github.event_name == 'workflow_dispatch' && inputs.channel == 'latest'
continue-on-error: true continue-on-error: true

3
.gitignore vendored
View File

@ -50,9 +50,6 @@ z*/
_bmad _bmad
_bmad-output _bmad-output
# Personal customization files (team files are committed, personal files are not)
_bmad/custom/*.user.toml
.clinerules .clinerules
# .augment/ is gitignored except tracked config files — add exceptions explicitly # .augment/ is gitignored except tracked config files — add exceptions explicitly
.augment/* .augment/*

View File

@ -1,100 +1,5 @@
# Changelog # Changelog
## v6.6.0 - 2026-04-28
### 💥 Breaking Changes
* `--tools none` is no longer accepted; fresh `--yes` installs now require an explicit `--tools <id>`. Existing-install flows are unchanged. Run `npx bmad-method --list-tools` to see supported IDs (#2346)
* `project_name` has moved from `[modules.bmm]` to `[core]` in `config.toml`. Existing installs are auto-migrated on next install/update — no manual action required (#2348)
### 🎁 Features
* **Non-interactive config for CI/Docker** — new `--set <module>.<key>=<value>` (repeatable) and `--list-options [module]` flags allow installer configuration without prompts. Routes values to the correct config file with prototype-pollution defenses (#2354)
* **Brownfield epic scoping** — Create Epics and Stories workflow now detects file-overlap between epics and applies an Implementation Efficiency principle plus a design completeness gate, reducing unnecessary file churn (#1826)
### 🐛 Fixes
* **Custom module installer** — Azure DevOps URLs now parse correctly with multi-segment paths and `_git` prefixes (#2269); HTTP (non-HTTPS) Git URLs are preserved for self-hosted servers (#2344); community installs route through `PluginResolver` so marketplace plugins with nested `module.yaml` install all skills (#2331); URL-source modules resolve from disk cache on re-install instead of warning (#2323); local `--custom-content` modules resolve correctly and `[modules.<code>]` TOML keys use the module code rather than display name (#2316); `--yes` with `--custom-source` now runs the full update path so version tags are respected (#2336)
* **Installer safety**`--list-tools` flag added; empty/typo'd tool IDs rejected with specific errors (#2346)
* **Channel and dist-tag handling** — installer launched from a prerelease (e.g. `@next`) now defaults external module channels to `next` instead of silently downgrading to stable (#2321); stable publishes advance the `@next` dist-tag so prerelease users no longer leapfrog or miss update notifications (#2320)
* **Architecture validation gate** — step-07 validation template no longer ships pre-checked; status field is now templated against actual checklist completion (#2347)
* **bmad-help data integrity**`bmad-help.csv` is no longer transformed at merge time and is emitted in its documented schema; 31 misaligned rows in core/bmm `module-help.csv` repaired (#2349)
* **Config robustness** — malformed `module.yaml` (scalars, arrays) is now rejected before crash (#2348)
* **Legacy cleanup** — pre-v6.2.0 wrapper skills (`bmad-bmm-*`, `bmad-agent-bmm-*`) are removed automatically on upgrade so they no longer error with missing-file warnings (#2315)
### 📚 Docs
* Complete Chinese (zh-CN) translations for `named-agents.md` and `expand-bmad-for-your-org.md`; localized BMad Ecosystem sidebar (CIS, BMB, TEA, WDS) across zh-cn, vi-vn, fr-fr, cs-cz (#2355)
## v6.5.0 - 2026-04-26
### 🎁 Features
* Support for 18 new agent platforms: AdaL, Sourcegraph Amp, IBM Bob, Command Code, Snowflake Cortex Code, Factory Droid, Firebender, Block Goose, Kode, Mistral Vibe, Mux, Neovate, OpenClaw, OpenHands, Pochi, Replit Agent, Warp, Zencoder — bringing total supported platforms to 42 (#2313)
* All platforms that support the cross-tool `.agents/skills/` standard now use it (#2313)
## v6.4.0 - 2026-04-24
### ✨ Headline
**Full agent and workflow customization across the entire BMad Method.** Every agent and workflow in BMM, Core, CIS, GDS, and TEA can now be customized via TOML overrides in `_bmad/custom/`. Customize agents to apply tooling, version control, or behavior changes across whole groups of workflows. Drop in fine-grained per-workflow overrides where you need them. Built for power users who want BMad to fit their stack without forking.
**Stable and bleeding-edge release channels, standardized across all modules.** Pick `stable` or `next` per module, pin specific versions, and switch channels interactively or via CLI flags (`--channel`, `--all-stable`, `--all-next`, `--next=CODE`, `--pin CODE=TAG`). Same model across BMM, Core, and every external module.
### 💥 Breaking Changes
* Customization is now TOML-based; the briefly introduced YAML-based customization is no longer supported (#2284, #2283)
### 🎁 Features
**Customization framework**
* TOML-based agent and workflow customization with flat schema, structural merge rules (scalars, tables, code-keyed arrays, append arrays), and `persistent_facts` unification (#2284)
* Central `_bmad/config.toml` surface with four-file architecture (`config.toml`, `config.user.toml`, `custom/config.toml`, `custom/config.user.toml`) for agent roster and scope-partitioned install answers (#2285)
* `customize.toml` support extended to 17 bmm-skills workflows with flattened SKILL.md architecture and standardized `[workflow]` block (#2287)
* `customize.toml` extended to all six developer-execution workflows: bmad-dev-story, bmad-code-review, bmad-sprint-planning, bmad-sprint-status, bmad-quick-dev, bmad-checkpoint-preview (#2308)
* `bmad-customize` skill — guided authoring of TOML overrides in `_bmad/custom/` with stdlib-only resolver verification (#2289)
* Wire `on_complete` hook into all 23 workflow terminal steps with full customize.toml documentation (#2290)
**Release channels & installer**
* Channel-based version resolution for external modules with interactive channel management (`stable` / `next` / `pinned`) and CLI flags (`--channel`, `--all-stable`, `--all-next`, `--next=CODE`, `--pin CODE=TAG`) (#2305)
* GitHub API as primary fetch with raw CDN fallback in installer registry client to support corporate proxies (#2248)
**Other**
* Kimi Code CLI support for installing BMM skills in `.kimi/skills/` (#2302)
* `bmad-create-story` now reads every UPDATE-marked file before generating dev notes so brownfield stories preserve current behavior instead of improvising at implementation time (#2274)
* Sync `sprint-status.yaml` from quick-dev on epic-story implementation with idempotent writes tracking `in-progress` and `review` transitions (#2234)
* Enforce model parity for all code review subagents to match orchestrator session capability for improved rare-event detection (#2236)
* Set `team: software-development` on all six BMM agents for unified grouping in party-mode and retrospective skills (#2286)
### 🐛 Bug Fixes
* PRD workflow no longer silently de-scopes user requirements or invents MVP/Growth/Vision phasing; requires explicit confirmation before any scope reduction (#1927)
* Installer shows live npm version for external modules instead of stale cached metadata (#2307)
* Resolve external-module agents from cache during manifest write so agents land in `config.toml` (#2295)
* Fix installer version resolution for external modules with shared resolver preferring package.json > module.yaml > marketplace.json (#2298)
* Replace fs-extra with native `node:fs` to prevent file loss during multi-module installs from deferred retry-queue races (#2253)
* Add `move()` and overwrite support to fs-native wrapper for directory migrations during upgrades (#2253)
* Stop skill scanner from recursing into discovered skills to prevent spurious errors on nested template files (#2255)
* Source built-in modules locally in installer UI to preserve core and bmm in module list when registry is unreachable (#2251)
* Remove dead Batch-apply option from code-review patch menu and rename apply options for clarity (#2225)
### ♻️ Refactoring
* Remove 1,683 lines of dead code: three entirely dead files (agent-command-generator.js, bmad-artifacts.js, module-injections.js) and ~50 unused exports across installer modules (#2247)
* Remove dead template and agent-command pipeline from installer; SKILL.md directory copying is the sole installation path (#2244)
### 📚 Documentation
* Sync and update Vietnamese (vi-VN) docs with missing pages and refreshed translations (#2291, #2222)
* Sync French (fr-FR) translations with upstream, restore Amelia as dev agent, fix sidebar ordering (#2231)
* Add Czech (cs-CZ) `analysis-phase.md` translation; normalize typographic quotes (#2240, #2241, #2242)
* Add missing Chinese (zh-CN) translations for 3 documents (#2254)
* Update stale Analyst agent triggers and add PRFAQ link (#2238)
* Remove Bob from workflow map diagrams reflecting consolidation into Amelia in v6.3.0 (#2252)
## v6.3.0 - 2026-04-09 ## v6.3.0 - 2026-04-09
### 💥 Breaking Changes ### 💥 Breaking Changes

View File

@ -52,15 +52,6 @@ Follow the installer prompts, then open your AI IDE (Claude Code, Cursor, etc.)
npx bmad-method install --directory /path/to/project --modules bmm --tools claude-code --yes npx bmad-method install --directory /path/to/project --modules bmm --tools claude-code --yes
``` ```
Override any module config option with `--set <module>.<key>=<value>` (repeatable). Run `--list-options [module]` to see locally-known official keys (built-in modules plus any external officials cached on this machine):
```bash
npx bmad-method install --yes \
--modules bmm --tools claude-code \
--set bmm.project_knowledge=research \
--set bmm.user_skill_level=expert
```
[See all installation options](https://docs.bmad-method.org/how-to/non-interactive-installation/) [See all installation options](https://docs.bmad-method.org/how-to/non-interactive-installation/)
> **Not sure what to do?** Ask `bmad-help` — it tells you exactly what's next and what's optional. You can also ask questions like `bmad-help I just finished the architecture, what do I do next?` > **Not sure what to do?** Ask `bmad-help` — it tells you exactly what's next and what's optional. You can also ask questions like `bmad-help I just finished the architecture, what do I do next?`

View File

@ -3,8 +3,6 @@
[![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)
[![Python Version](https://img.shields.io/badge/python-%3E%3D3.10-blue?logo=python&logoColor=white)](https://www.python.org)
[![uv](https://img.shields.io/badge/uv-package%20manager-blueviolet?logo=uv)](https://docs.astral.sh/uv/)
[![Discord](https://img.shields.io/badge/Discord-Join%20Community-7289da?logo=discord&logoColor=white)](https://discord.gg/gk8jAdXWmj) [![Discord](https://img.shields.io/badge/Discord-Join%20Community-7289da?logo=discord&logoColor=white)](https://discord.gg/gk8jAdXWmj)
[English](README.md) | [简体中文](README_CN.md) | Tiếng Việt [English](README.md) | [简体中文](README_CN.md) | Tiếng Việt
@ -38,7 +36,7 @@ Các công cụ AI truyền thống thường làm thay phần suy nghĩ của b
## Bắt đầu nhanh ## Bắt đầu nhanh
**Điều kiện tiên quyết**: [Node.js](https://nodejs.org) v20+ · [Python](https://www.python.org) 3.10+ · [uv](https://docs.astral.sh/uv/) **Điều kiện tiên quyết**: [Node.js](https://nodejs.org) v20+
```bash ```bash
npx bmad-method install npx bmad-method install
@ -82,15 +80,18 @@ BMad Method có thể được mở rộng bằng các mô-đun chính thức ch
## Cộng đồng ## Cộng đồng
- [Discord](https://discord.gg/gk8jAdXWmj) - Nhận trợ giúp, chia sẻ ý tưởng, cộng tác - [Discord](https://discord.gg/gk8jAdXWmj) - Nhận trợ giúp, chia sẻ ý tưởng, cộng tác
- [YouTube](https://youtube.com/@BMadCode) - Video hướng dẫn, master class và nhiều nội dung khác - [Đăng ký trên YouTube](https://www.youtube.com/@BMadCode) - video hướng dẫn, lớp chuyên sâu và podcast (ra mắt tháng 2 năm 2025)
- [X / Twitter](https://x.com/BMadCode)
- [Website](https://bmadcode.com)
- [GitHub Issues](https://github.com/bmad-code-org/BMAD-METHOD/issues) - Báo lỗi và yêu cầu tính năng - [GitHub Issues](https://github.com/bmad-code-org/BMAD-METHOD/issues) - Báo lỗi và yêu cầu tính năng
- [Discussions](https://github.com/bmad-code-org/BMAD-METHOD/discussions) - Trao đổi cộng đồng - [Discussions](https://github.com/bmad-code-org/BMAD-METHOD/discussions) - Trao đổi cộng đồng
## Hỗ trợ BMad ## Hỗ trợ BMad
BMad miễn phí cho tất cả mọi người và sẽ luôn như vậy. Hãy nhấn sao cho repo này, [mời tôi một ly cà phê](https://buymeacoffee.com/bmad), hoặc gửi email tới <contact@bmadcode.com> nếu bạn muốn tài trợ doanh nghiệp. BMad miễn phí cho tất cả mọi người - và sẽ luôn như vậy. Nếu bạn muốn hỗ trợ quá trình phát triển:
- ⭐ Hãy nhấn sao cho dự án ở góc trên bên phải của trang này
- ☕ [Buy Me a Coffee](https://buymeacoffee.com/bmad) - Tiếp thêm năng lượng cho quá trình phát triển
- 🏢 Tài trợ doanh nghiệp - Nhắn riêng trên Discord
- 🎤 Diễn thuyết và truyền thông - Sẵn sàng cho hội nghị, podcast, phỏng vấn (BM trên Discord)
## Đóng góp ## Đóng góp

View File

@ -1,70 +0,0 @@
---
title: "Fáze analýzy: od nápadu k základům"
description: Co je brainstorming, výzkum, product brief a PRFAQ — a kdy který nástroj použít
sidebar:
order: 1
---
Fáze analýzy (fáze 1) vám pomůže jasně si promyslet váš produkt, než se pustíte do jeho tvorby. Každý nástroj v této fázi je volitelný, ale úplné vynechání analýzy znamená, že váš PRD je postaven na předpokladech namísto vhledu.
## Proč analýza před plánováním?
PRD odpovídá na otázku „Co bychom měli postavit a proč?“. Pokud jej nakrmíte vágním myšlením, získáte vágní PRD — a každý navazující dokument tuto vágnost zdědí. Architektura postavená na slabém PRD sází na špatnou techniku. Příběhy odvozené ze slabé architektury opomíjejí okrajové případy. Náklady se zvyšují.
Existují analytické nástroje, které vám PRD zostří. Napadají problém z různých úhlů — kreativní průzkum, realita trhu, jasnost zákazníka, proveditelnost — takže v době, kdy sedíte s agentem PM, víte, co a pro koho stavíte.
## Nástroje
### Brainstorming
**Co to je.** Zprostředkované tvůrčí sezení s využitím osvědčených technik generování nápadů. AI funguje jako kouč, který z vás tahá nápady prostřednictvím strukturovaných cvičení — negeneruje nápady za vás.
**Proč je to tady.** Neotřelé nápady potřebují prostor pro rozvoj, než se zakotví v požadavcích. Brainstorming tento prostor vytváří. Je cenný zejména tehdy, když máte problémovou oblast, ale nemáte jasné řešení, nebo když chcete prozkoumat více směrů, než se k něčemu zavážete.
**Kdy jej použít.** Máte nejasnou představu o tom, co chcete vytvořit, ale nemáte vykrystalizovaný koncept. Nebo máte koncept, ale chcete ho otestovat pod tlakem oproti alternativám.
Viz [Brainstorming](./brainstorming.md), kde se dozvíte, jak relace fungují.
### Výzkum (trhu, domény, technický)
**Co to je.** Tři cílené pracovní postupy výzkumu, které zkoumají různé rozměry vašeho nápadu. Výzkum trhu zkoumá konkurenci, trendy a nálady uživatelů. Doménový výzkum vytváří odborné znalosti v daném oboru a terminologii. Technický výzkum hodnotí proveditelnost, možnosti architektury a přístupy k implementaci.
**Proč je to tady.** Stavět na předpokladech je nejrychlejší způsob, jak vytvořit něco, co nikdo nepotřebuje. Výzkum zakládá váš koncept na realitě — co již existuje u konkurence, s čím uživatelé skutečně bojují, co je technicky proveditelné a jakým omezením specifickým pro dané odvětví budete čelit.
**Kdy ho použít.** Vstupujete do neznámé oblasti, tušíte, že konkurence existuje, ale nemáte ji zmapovanou, nebo váš koncept závisí na technických možnostech, které nemáte ověřené. Proveďte jeden, dva nebo všechny tři — každý z nich je samostatný.
### Product Brief
**Co to je.** Řízené zjišťovací sezení, jehož výsledkem je 12stránkové shrnutí vašeho konceptu produktu. AI funguje jako spolupracující obchodní analytik, který vám pomůže formulovat vizi, cílovou skupinu, nabídku hodnoty a rozsah.
**Proč tu je.** Produktový brief je jemnější cestou k plánování. Zachycuje vaši strategickou vizi ve strukturovaném formátu, který se přímo promítá do tvorby PRD. Nejlépe funguje, když jste již o svém konceptu přesvědčeni — znáte zákazníka, problém a zhruba víte, co chcete vytvořit. Brief tyto úvahy uspořádá a vyostří.
**Kdy jej použít.** Váš koncept je relativně jasný a chcete jej efektivně zdokumentovat ještě před vytvořením PRD. Jste si jisti svým směřováním a nepotřebujete své předpoklady agresivně zpochybňovat.
### PRFAQ (Working Backwards)
**Co to je.** Metodika Working Backwards společnosti Amazon upravená jako interaktivní výzva. Napíšete tiskovou zprávu oznamující váš hotový produkt dříve, než existuje jediný řádek kódu, a pak odpovíte na nejtěžší otázky, které by vám zákazníci a zainteresované strany položili. Umělá inteligence funguje jako neúprosný, ale konstruktivní produktový kouč.
**Proč je to tady.** PRFAQ je přísná cesta k plánování. Vynucuje si jasnost v zájmu zákazníka tím, že vás nutí obhájit každé tvrzení. Pokud nedokážete napsat přesvědčivou tiskovou zprávu, produkt není připraven. Pokud odpovědi na časté dotazy zákazníků odhalí nedostatky, jsou to nedostatky, které byste objevili mnohem později — a nákladněji — při implementaci. Hozená rukavice odhalí slabé myšlení v rané fázi, kdy je nejlevnější ho opravit.
**Kdy ji použít.** Před vyčleněním zdrojů chcete, aby váš koncept prošel zátěžovým testem. Nejste si jisti, zda to uživatele bude skutečně zajímat. Chcete si ověřit, že dokážete formulovat jasnou a obhajitelnou nabídku hodnoty. Nebo si prostě chcete disciplínou Working Backwards zpřesnit své myšlení.
## Který nástroj bych měl použít?
| Situace | Doporučený nástroj |
| --------- | ---------------- |
| „Mám nejasný nápad, ale nevím, kde začít“ | Brainstorming |
| „Než se rozhodnu, potřebuji pochopit trh“ | Výzkum |
| „Vím, co chci vytvořit, jen to potřebuji zdokumentovat“ | Product Brief |
| „Chci se ujistit, že tento nápad skutečně stojí za vybudování“ | PRFAQ |
| „Chci prozkoumat, pak ověřit a pak zdokumentovat“ | Brainstorming → Výzkum → PRFAQ nebo Brief |
Product Brief i PRFAQ jsou vstupem pro PRD — vyberte si jeden z nich podle toho, jak moc chcete být nároční. Brief je společným objevováním. PRFAQ je hozená rukavice. Obojí vás dovede ke stejnému cíli; PRFAQ testuje, zda si váš koncept zaslouží se tam dostat.
:::tip[Nejste si jisti?]
Spusťte `bmad-help` a popište svou situaci. Doporučí vám správný výchozí bod na základě toho, co jste již udělali a čeho se snažíte dosáhnout.
:::
## Co se stane po analýze?
Výstupy analýzy se přímo promítají do fáze 2 (plánování). Pracovní postup PRD přijímá jako vstupy produktové briefy, dokumenty PRFAQ, výsledky výzkumu a zprávy z brainstormingu — syntetizuje vše, co jste vytvořili, do strukturovaných požadavků. Čím více analýz provedete, tím ostřejší bude vaše PRD.

View File

@ -60,7 +60,7 @@ Dostupná ID nástrojů pro příznak `--tools`:
**Preferované:** `claude-code`, `cursor` **Preferované:** `claude-code`, `cursor`
Spusťte `npx bmad-method install` interaktivně jednou pro zobrazení aktuálního seznamu podporovaných nástrojů, nebo zkontrolujte [konfiguraci kódů platforem](https://github.com/bmad-code-org/BMAD-METHOD/blob/main/tools/installer/ide/platform-codes.yaml). Spusťte `npx bmad-method install` interaktivně jednou pro zobrazení aktuálního seznamu podporovaných nástrojů, nebo zkontrolujte [konfiguraci kódů platforem](https://github.com/bmad-code-org/BMAD-METHOD/blob/main/tools/cli/installers/lib/ide/platform-codes.yaml).
## Režimy instalace ## Režimy instalace

View File

@ -17,7 +17,7 @@ Tato stránka uvádí výchozí BMM (Agile suite) agenty, kteří se instalují
| Agent | Skill ID | Spouštěče | Primární workflow | | Agent | Skill ID | Spouštěče | Primární workflow |
| --------------------------- | -------------------- | -------------------------------------------- | --------------------------------------------------------------------------------------------------- | | --------------------------- | -------------------- | -------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| Analyst (Mary) | `bmad-analyst` | `BP`, `MR`, `DR`, `TR`, `CB`, `WB`, `DP` | Brainstorm, průzkum trhu, doménový výzkum, technický výzkum, tvorba briefu, PRFAQ výzva, dokumentace projektu | | Analyst (Mary) | `bmad-analyst` | `BP`, `RS`, `CB`, `WB`, `DP` | Brainstorm projektu, výzkum, tvorba briefu, PRFAQ výzva, dokumentace projektu |
| Product Manager (John) | `bmad-pm` | `CP`, `VP`, `EP`, `CE`, `IR`, `CC` | Tvorba/validace/editace PRD, tvorba epiců a stories, připravenost implementace, korekce kurzu | | Product Manager (John) | `bmad-pm` | `CP`, `VP`, `EP`, `CE`, `IR`, `CC` | Tvorba/validace/editace PRD, tvorba epiců a stories, připravenost implementace, korekce kurzu |
| Architect (Winston) | `bmad-architect` | `CA`, `IR` | Tvorba architektury, připravenost implementace | | Architect (Winston) | `bmad-architect` | `CA`, `IR` | Tvorba architektury, připravenost implementace |
| Developer (Amelia) | `bmad-agent-dev` | `DS`, `QD`, `QA`, `CR`, `SP`, `CS`, `ER` | Dev story, Quick Dev, generování QA testů, revize kódu, plánování sprintu, tvorba story, retrospektiva epicu | | Developer (Amelia) | `bmad-agent-dev` | `DS`, `QD`, `QA`, `CR`, `SP`, `CS`, `ER` | Dev story, Quick Dev, generování QA testů, revize kódu, plánování sprintu, tvorba story, retrospektiva epicu |

View File

@ -92,7 +92,7 @@ Workflow skills spouštějí strukturovaný, vícekrokový proces bez předchoz
| Příklad skillu | Účel | | Příklad skillu | Účel |
| --- | --- | | --- | --- |
| `bmad-product-brief` | Vytvoření product briefu — řízené discovery, když je váš koncept jasný | | `bmad-product-brief` | Vytvoření product briefu — řízené discovery, když je váš koncept jasný |
| `bmad-prfaq` | [Working Backwards PRFAQ](../explanation/analysis-phase.md#prfaq-working-backwards) výzva pro zátěžový test vašeho produktového konceptu | | `bmad-prfaq` | Working Backwards PRFAQ výzva pro zátěžový test vašeho produktového konceptu |
| `bmad-create-prd` | Vytvoření dokumentu požadavků (PRD) | | `bmad-create-prd` | Vytvoření dokumentu požadavků (PRD) |
| `bmad-create-architecture` | Návrh systémové architektury | | `bmad-create-architecture` | Návrh systémové architektury |
| `bmad-create-epics-and-stories` | Vytvoření epiců a stories | | `bmad-create-epics-and-stories` | Vytvoření epiců a stories |

View File

@ -1,94 +0,0 @@
---
title: "Named Agents"
description: Why BMad agents have names, personas, and customization surfaces — and what that unlocks compared to menu-driven or prompt-driven alternatives
sidebar:
order: 1
---
You say "Hey Mary, let's brainstorm," and Mary activates. She greets you by name, in the language you configured, with her distinctive persona. She reminds you that `bmad-help` is always available. Then she skips the menu entirely and drops straight into brainstorming — because your intent was clear.
This page explains what's actually happening and why BMad is designed this way.
## The Three-Legged Stool
BMad's agent model rests on three primitives that compose:
| Primitive | What it provides | Where it lives |
|---|---|---|
| **Skill** | Capability — a discrete thing the assistant can do (brainstorm, draft a PRD, implement a story) | `.claude/skills/{skill-name}/SKILL.md` (or your IDE's equivalent) |
| **Named agent** | Persona continuity — a recognizable identity that wraps a menu of related skills with consistent voice, principles, and visual cues | Skills whose directory starts with `bmad-agent-*` |
| **Customization** | Makes it yours — overrides that reshape an agent's behavior, add MCP integrations, swap templates, layer in org conventions | `_bmad/custom/{skill-name}.toml` (committed team overrides) and `.user.toml` (personal, gitignored) |
Pull any leg away and the experience collapses:
- Skills without agents → capability lists the user has to navigate by name or code
- Agents without skills → personas with nothing to do
- No customization → every user gets the same out-of-box behavior, forcing forks for any org-specific need
## What Named Agents Buy You
BMad ships six named agents, each anchored to a phase of the BMad Method:
| Agent | Phase | Module |
|---|---|---|
| 📊 **Mary**, Business Analyst | Analysis | market research, brainstorming, product briefs, PRFAQs |
| 📚 **Paige**, Technical Writer | Analysis | project documentation, diagrams, doc validation |
| 📋 **John**, Product Manager | Planning | PRD creation, epic/story breakdown, implementation readiness |
| 🎨 **Sally**, UX Designer | Planning | UX design specifications |
| 🏗️ **Winston**, System Architect | Solutioning | technical architecture, alignment checks |
| 💻 **Amelia**, Senior Engineer | Implementation | story execution, quick-dev, code review, sprint planning |
They each have a hardcoded identity (name, title, domain) and a customizable layer (role, principles, communication style, icon, menu). You can rewrite Mary's principles or add menu items; you can't rename her — that's deliberate. Brand recognition survives customization so "hey Mary" always activates the analyst, regardless of how a team has shaped her behavior.
## The Activation Flow
When you invoke a named agent, eight steps run in order:
1. **Resolve the agent block** — merge the shipped `customize.toml` with team and personal overrides, via a Python resolver using stdlib `tomllib`
2. **Execute prepend steps** — any pre-flight behavior the team configured
3. **Adopt persona** — hardcoded identity plus customized role, communication style, principles
4. **Load persistent facts** — org rules, compliance notes, optionally files loaded via a `file:` prefix (e.g., `file:{project-root}/docs/project-context.md`)
5. **Load config** — user name, communication language, output language, artifact paths
6. **Greet** — personalized, in the configured language, with the agent's emoji prefix so you can see at a glance who's speaking
7. **Execute append steps** — any post-greet setup the team configured
8. **Dispatch or present the menu** — if your opening message maps to a menu item, go directly; otherwise render the menu and wait for input
Step 8 is where intent meets capability. "Hey Mary, let's brainstorm" skips rendering because `bmad-brainstorming` is an obvious match for `BP` on Mary's menu. If you say something ambiguous, she asks once, briefly, not as a confirmation ritual. If nothing fits, she continues the conversation normally.
## Why Not Just a Menu?
Menus force the user to meet the tool halfway. You have to remember that brainstorming lives under code `BP` on the analyst agent, not the PM agent, and know which persona owns which capabilities. That's cognitive overhead the tool is making you carry.
Named agents invert it. You say what you want, to whom, in whatever words feel natural. The agent knows who they are and what they do. When your intent is clear enough, they just go.
The menu is still there as a fallback — show it when you're exploring, skip it when you're not.
## Why Not Just a Blank Prompt?
Blank prompts assume you know the magic words. "Help me brainstorm" might work, but "let's ideate on my SaaS idea" might not, and the results depend on how you phrased the ask. You become responsible for prompt engineering.
Named agents add structure without closing off freedom. The persona stays consistent, the capabilities are discoverable, and `bmad-help` is always one command away. You don't have to guess what the agent can do, and you don't need a manual to use it either.
## Customization as a First-Class Citizen
The customization model is what lets this scale beyond a single developer.
Every agent ships a `customize.toml` with sensible defaults. Teams commit overrides to `_bmad/custom/bmad-agent-{role}.toml`. Individuals can layer personal preferences in `.user.toml` (gitignored). The resolver merges all three at activation time with predictable structural rules.
Most users never hand-author these files. The `bmad-customize` skill walks through picking the target, choosing agent vs workflow scope, authoring the override, and verifying the merge — so the customization surface stays accessible to anyone who understands their intent, not just those fluent in TOML.
Concrete example: a team commits a single file telling Amelia to always use the Context7 MCP tool for library docs and to fall back to Linear when a story isn't in the local epics list. Every dev workflow Amelia dispatches (dev-story, quick-dev, create-story, code-review) inherits that behavior, with no source edits or per-workflow duplication required.
There's also a second customization surface for *cross-cutting* concerns: the central `_bmad/config.toml` and `_bmad/config.user.toml` (both installer-owned, rebuilt from each module's `module.yaml`) plus `_bmad/custom/config.toml` (team, committed) and `_bmad/custom/config.user.toml` (personal, gitignored) for overrides. This is where the **agent roster** lives — the lightweight descriptors that roster consumers like `bmad-party-mode`, `bmad-retrospective`, and `bmad-advanced-elicitation` read to know who's available and how to embody them. Rebrand an agent org-wide with a team override; add fictional voices (Kirk, Spock, a domain expert persona) as personal experiments via the `.user.toml` override — without touching any skill folder. The per-skill file shapes how Mary *behaves* when she activates; the central config shapes how other skills *see* her when they look at the field.
For the full customization surface and worked examples, see:
- [How to Customize BMad](../how-to/customize-bmad.md) — the reference for what's customizable and how merge works
- [How to Expand BMad for Your Organization](../how-to/expand-bmad-for-your-org.md) — five worked recipes spanning agent-wide rules, workflow conventions, external publishing, template swaps, and agent roster customization
- `bmad-customize` skill — the guided authoring helper that turns intent into a correctly-placed, verified override file
## The Bigger Idea
Most AI assistants today are either menus or prompts, and both shift cognitive load onto the user. Named agents plus customizable skills let you talk to a teammate who already knows the work, and let your organization shape that teammate without forking.
The next time you type "Hey Mary, let's brainstorm" and she just gets on with it, notice what didn't happen. There was no slash command, no menu to navigate, no awkward reminder of what she can do. That absence is the design.

View File

@ -353,7 +353,7 @@ Uniquement pour les parcours méthode BMad et Enterprise. Quick Dev passe direct
### Puis-je modifier mon plan plus tard ? ### Puis-je modifier mon plan plus tard ?
Oui. Utilisez `bmad-correct-course` pour gérer les changements de portée en cours dimplémentation. Oui. Utilisez `bmad-correct-course` pour gérer les changements de portée.
**Une question sans réponse ici ?** [Ouvrez une issue](...) ou posez votre question sur [Discord](...). **Une question sans réponse ici ?** [Ouvrez une issue](...) ou posez votre question sur [Discord](...).
``` ```

View File

@ -2,7 +2,7 @@
title: "Élicitation Avancée" title: "Élicitation Avancée"
description: Pousser le LLM à repenser son travail en utilisant des méthodes de raisonnement structurées description: Pousser le LLM à repenser son travail en utilisant des méthodes de raisonnement structurées
sidebar: sidebar:
order: 8 order: 6
--- ---
Faites repenser au LLM ce qu'il vient de générer. Vous choisissez une méthode de raisonnement, il l'applique à sa propre sortie, et vous décidez de conserver ou non les améliorations. Faites repenser au LLM ce qu'il vient de générer. Vous choisissez une méthode de raisonnement, il l'applique à sa propre sortie, et vous décidez de conserver ou non les améliorations.

View File

@ -2,7 +2,7 @@
title: "Revue Contradictoire" title: "Revue Contradictoire"
description: Technique de raisonnement forcée qui empêche les revues paresseuses du style "ça à l'air bon" description: Technique de raisonnement forcée qui empêche les revues paresseuses du style "ça à l'air bon"
sidebar: sidebar:
order: 7 order: 5
--- ---
Forcez une analyse plus approfondie en exigeant que des problèmes soient trouvés. Forcez une analyse plus approfondie en exigeant que des problèmes soient trouvés.

View File

@ -1,74 +0,0 @@
---
title: "Phase d'analyse : de l'Idée aux Fondations"
description: Ce que sont le brainstorming, la recherche, les product briefs et les PRFAQs — et quand les utiliser
sidebar:
order: 1
---
La phase d'Analyse (Phase 1) vous aide à penser clairement à votre produit avant de vous engager à le construire. Chaque outil de cette phase est optionnel, mais sauter l'analyse entièrement signifie que votre PRD sera construit sur des suppositions plutôt que sur des connaissances approfondies.
## Pourquoi Analyser avant de Planifier ?
Un PRD répond à la question « que devons-nous construire et pourquoi ? » Si vous l'alimentez avec une réflexion vague, vous obtiendrez un PRD vague — et chaque document en aval héritera de cette imprécision. Une architecture bâtie sur un PRD faible prend de mauvaises décisions techniques. Les stories dérivées d'une architecture faible manquent de edge cases. Le coût s'accumule.
Les outils d'analyse existent pour rendre votre PRD précis. Ils attaquent le problème sous différents angles — exploration créative, réalité du marché, clarté client, faisabilité — pour qu'au moment de vous asseoir avec l'agent PM, vous sachiez ce que vous construisez et pour qui.
## Les Outils
### Brainstorming
**Quoi.** Une session créative facilitée utilisant des techniques d'idéation éprouvées. L'IA agit comme coach, extrayant vos idées à travers des exercices structurés — pas en les générant pour vous.
**Pourquoi.** Les idées brutes ont besoin d'espace pour se développer avant d'être verrouillées dans des exigences. Le brainstorming crée cet espace. Il est particulièrement précieux quand vous avez un espace-problème mais pas de solution claire, ou quand vous voulez explorer plusieurs pistes avant de vous engager.
**Quand.** Vous avez une vague idée de ce que vous voulez construire mais n'avez pas encore cristallisé le concept. Ou vous avez un concept mais voulez l'éprouver face à des alternatives.
Voir [Brainstorming](./brainstorming.md) pour un aperçu plus approfondi du fonctionnement des sessions.
### Recherche (Marché, Domaine, Technique)
**Quoi.** Trois workflows de recherche ciblés qui investiguent différentes dimensions de votre idée. La recherche marché examine les concurrents, les tendances et le sentiment utilisateur. La recherche domaine construit l'expertise métier et la terminologie. La recherche technique évalue la faisabilité, les options d'architecture et les approches d'implémentation.
**Pourquoi.** Construire sur des suppositions est le moyen le plus rapide de construire quelque chose dont personne n'a besoin. La recherche ancre votre concept dans la réalité — quels concurrents existent déjà, avec quoi les utilisateurs luttent réellement, ce qui est techniquement faisable, et quelles contraintes spécifiques à l'industrie vous affronterez.
**Quand.** Vous entrez dans un domaine inconnu, vous soupçonnez que des concurrents existent mais ne les avez pas cartographiés, ou votre concept dépend de capacités techniques que vous n'avez pas validées. Lancez-en un, deux ou les trois — chaque workflow de recherche fonctionne de manière autonome.
### Product Brief[^1]
**Quoi.** Une session de découverte guidée qui produit un résumé exécutif de 1-2 pages de votre concept produit. L'IA agit comme un analyste commercial collaboratif, vous aidant à articuler la vision, le public cible, la proposition de valeur et le périmètre.
**Pourquoi.** Le product brief est le chemin le plus doux vers la planification. Il capture votre vision stratégique dans un format structuré qui alimente directement la création du PRD. Il fonctionne mieux quand vous avez déjà la conviction à propos de votre concept — vous connaissez le client, le problème et approximativement ce que vous voulez construire. Le brief organise et affine cette réflexion.
**Quand.** Votre concept est relativement clair et vous voulez le documenter efficacement avant de créer un PRD. Vous êtes confiant dans la direction et n'avez pas besoin que vos suppositions soient agressivement remises en question.
### PRFAQ (Working Backwards)
**Quoi.** La méthodologie Working Backwards d'Amazon adaptée en défi interactif. Vous rédigez le communiqué de presse annonçant votre produit fini avant qu'une seule ligne de code n'existe, puis répondez aux questions les plus difficiles que les clients et les parties prenantes poseraient. L'IA agit comme un coach produit implacable mais constructif.
**Pourquoi.** Le PRFAQ est le chemin rigoureux vers la planification. Il force la clarté orientée client en vous obligeant à défendre chaque affirmation. Si vous ne pouvez pas rédiger un communiqué de presse convaincant, le produit n'est pas prêt. Si les réponses de la FAQ client révèlent des lacunes, ce sont des lacunes que vous découvrirez bien plus tard — et plus coûteusement — pendant l'implémentation. Le défi fait remonter les failles de réflexion tôt, quand c'est le moins cher de les corriger.
**Quand.** Vous voulez que votre concept soit éprouvé avant d'engager des ressources. Vous n'êtes pas sûr que les utilisateurs s'en soucieront réellement. Vous voulez valider que vous pouvez articuler une proposition de valeur claire et défendable. Ou vous voulez simplement la discipline du Working Backwards pour affiner votre réflexion.
## Lequel utiliser ?
| Situation | Outil recommandé |
|-------------------------------------------------------------------------------|--------------------------------------------|
| « J'ai une idée vague, je ne sais pas par où commencer » | Brainstorming |
| « J'ai besoin de comprendre le marché avant de décider » | Recherche |
| « Je sais ce que je veux construire, j'ai juste besoin de le documenter » | Product Brief |
| « Je veux m'assurer que cette idée vaut vraiment la peine d'être construite » | PRFAQ |
| « Je veux explorer, puis valider, puis documenter » | Brainstorming → Recherche → PRFAQ ou Brief |
Le Product Brief et le PRFAQ produisent tous deux des entrées pour le PRD — choisissez-en un en fonction du niveau de défi que vous souhaitez. Le brief est une découverte collaborative. Le PRFAQ est un défi. Les deux vous mènent à la même destination ; le PRFAQ teste si votre concept mérite d'y arriver.
:::tip[Pas sûr ?]
Exécutez `bmad-help` et décrivez votre situation. Il vous recommandera le bon point de départ en fonction de ce que vous avez déjà accompli et de ce que vous essayez de réaliser.
:::
## Que se passe-t-il après l'analyse ?
Les résultats de l'analyse alimentent directement la Phase 2 (Planification). Le workflow PRD accepte les product briefs, les documents PRFAQ, les conclusions de recherche et les rapports de brainstorming en entrée — il synthétise tout ce que vous avez produit en exigences structurées. Plus vous faites d'analyse, plus votre PRD sera précis.
## Glossaire
[^1]: Brief : document synthétique qui formalise le contexte, les objectifs, le périmètre et les contraintes d'un projet ou d'une demande, afin d'aligner rapidement les parties prenantes avant le travail détaillé.

View File

@ -1,92 +0,0 @@
---
title: "Checkpoint Preview"
description: Revue assistée par LLM, avec intervention humaine, qui vous guide à travers une modification, de son objectif jusquaux détails
sidebar:
order: 4
---
`bmad-checkpoint-preview` est un workflow de revue interactif, assisté par LLM, avec intervention humaine. Il vous guide à travers une modification de code — de l'intention et du contexte jusqu'aux détails — afin que vous puissiez prendre une décision éclairée sur la mise en production, la refonte ou l'approfondissement.
![Diagramme du workflow Checkpoint Preview](/diagrams/checkpoint-preview-diagram-fr.webp)
## Le Flux Typique
Vous lancez `bmad-quick-dev`. Il clarifie votre intention, construit une spécification, implémente la modification, et une fois terminé, il ajoute un historique de revue au fichier de spécification et l'ouvre dans votre éditeur. Vous regardez la spec et constatez que la modification a touché 20 fichiers dans plusieurs modules.
Vous pourriez survoler le diff. Mais 20 fichiers, c'est le moment où le survol commence à échouer — on perd le fil, on rate un lien entre deux modifications éloignées, ou on approuve quelque chose qu'on n'a pas pleinement compris. Alors au lieu de cela, vous dites « checkpoint » et le LLM vous guide à travers la modification.
Ce passage de relais — de l'implémentation autonome au jugement humain — est le cas d'usage principal. Quick-dev s'exécute longtemps avec une supervision minimale. Checkpoint Preview, c'est là où vous reprenez le volant.
## Pourquoi
La revue de code a deux modes d'échec. Dans le premier, le réviseur survole le diff, rien ne saute aux yeux, et il approuve. Dans le second, il lit méthodiquement chaque fichier mais perd le fil — il voit les arbres et rate la forêt. Les deux aboutissent au même résultat : la revue n'a pas repéré ce qui comptait.
Le problème sous-jacent est le séquençage. Un diff brut présente les modifications dans l'ordre des fichiers, ce qui est presque jamais l'ordre qui construit la compréhension. Vous voyez une fonction utilitaire avant de savoir pourquoi elle existe. Vous voyez une modification de schéma avant de comprendre quelle fonctionnalité elle supporte. Le réviseur doit reconstruire l'intention de l'auteur à partir d'indices dispersés, et c'est cette reconstruction qui fait défaut à l'attention.
Checkpoint Preview résout ce problème en confiant le travail de reconstruction au LLM. Il lit le diff, la spécification (si elle existe) et la base de code environnante, puis présente la modification dans un ordre conçu pour la compréhension — et non pour `git diff`.
## Comment ça fonctionne
Le workflow comporte cinq étapes. Chaque étape s'appuie sur la précédente, passant progressivement de « qu'est-ce que c'est ? » à « devons-nous publier ça ? »
### 1. Orientation
Le workflow identifie la modification (à partir d'une PR, d'un commit, d'une branche, d'un fichier de spécification ou de l'état git actuel) et produit un résumé d'intention en une ligne ainsi que des statistiques de surface : fichiers modifiés, modules touchés, lignes de logique, dépassements de boundaries et nouvelles interfaces publiques.
C'est le moment « est-ce bien ce que je crois ? ». Avant de lire le moindre code, le réviseur confirme qu'il regarde la bonne chose et calibre ses attentes quant à la portée.
### 2. Visite guidée
La modification est organisée par **préoccupation** — des intentions de conception cohérentes comme « validation des entrées » ou « contrat d'API » — et non par fichier. Chaque préoccupation fait l'objet d'une courte explication du *pourquoi* de cette approche, suivie d'arrêts cliquables `chemin:ligne` que le réviseur peut suivre dans le code.
C'est l'étape du jugement de conception. Le réviseur évalue si l'approche est adaptée au système, et non si le code est correct. Les préoccupations sont séquencées de haut en bas : l'intention de plus haut niveau en premier, puis l'implémentation de support. Le réviseur ne rencontre jamais une référence à quelque chose qu'il n'a pas encore vu.
### 3. Passage en revue des détails
Une fois que le réviseur comprend la conception, le workflow met en évidence 2 à 5 endroits où une erreur aurait limpact le plus important. Ceux-ci sont étiquetés par catégorie de risque — `[auth]`, `[schéma]`, `[facturation]`, `[API publique]`, `[sécurité]`, et d'autres — et ordonnés selon l'impact en cas d'erreur.
Ce n'est pas une chasse aux bugs. Les tests automatisés et la CI gèrent la correction. Le passage en revue des détails active la conscience du risque : « voici les endroits où se tromper coûte le plus cher ». Si le réviseur veut approfondir un domaine spécifique, il peut dire « approfondis [domaine] » pour une re-revue ciblée axée sur la correction.
Si la spécification a passé des boucles de revues contradictoires (machine hardening), ces résultats sont également présentés ici — pas les bugs qui ont été corrigés, mais les décisions que la boucle de revue a signalées et dont le réviseur devrait être conscient.
### 4. Tests
Propose 2 à 5 façons d'observer manuellement la modification en action. Pas des commandes de test automatisé — des observations manuelles qui renforcent la confiance au-delà de ce que toute suite de tests peut fournir. Une interaction UI à essayer, une commande CLI à lancer, une requête API à envoyer, avec les résultats attendus pour chacune.
Si la modification n'a aucun comportement visible par l'utilisateur, il le dit. Pas de travail inventé.
### 5. Conclusion
Le réviseur prend la décision : approuver, retravailler ou continuer la discussion. S'il approuve une PR, le workflow peut aider avec `gh pr review --approve`. S'il demande une refonte, il aide à diagnostiquer si le problème vient de l'approche, de la spécification ou de l'implémentation, et aide à rédiger un retour actionnable lié à des emplacements de code spécifiques.
## C'est une conversation, pas un rapport
Le workflow présente chaque étape comme un point de départ, pas un mot final. Entre les étapes — ou au milieu d'une — vous pouvez parler au LLM, poser des questions, remettre en question son cadrage ou faire appel à d'autres skills pour obtenir une perspective différente :
- **« lance l'élicitation avancée sur la gestion des erreurs »** — pousse le LLM à reconsidérer et affiner son analyse d'un domaine spécifique
- **« active le party mode sur la sécurité de cette migration de schéma »** — fait intervenir plusieurs perspectives agentiques dans un débat ciblé
- **« lance la revue de code »** — génère des résultats structurés avec analyse adversariale et cas limites
Le workflow checkpoint ne vous enferme pas dans un chemin linéaire. Il vous donne de la structure quand vous la souhaitez et s'efface quand vous voulez explorer. Les cinq étapes sont là pour s'assurer que vous voyez le tableau complet, mais la profondeur à laquelle vous allez à chaque étape — et les outils que vous y apportez — est entièrement entre vos mains.
## L'historique de revue
L'étape de visite guidée fonctionne mieux lorsqu'elle dispose d'un **ordre de revue suggéré** — une liste d'arrêts que l'auteur de la spécification a rédigée pour guider les réviseurs à travers la modification. Lorsqu'une spécification inclut cet ordre, le workflow l'utilise directement.
Lorsqu'aucun historique produit par l'auteur n'existe, le workflow en génère un à partir du diff et du contexte de la base de code. Un historique généré est de qualité inférieure à un historique produit par l'auteur, mais nettement supérieur à la lecture des modifications dans l'ordre des fichiers.
## Quand l'utiliser
Le scénario principal est le passage de relais depuis `bmad-quick-dev` : l'implémentation est terminée, le fichier de spécification est ouvert dans votre éditeur avec un historique de revue ajouté, et vous devez décider si vous publiez. Dites « checkpoint » et c'est parti.
Il fonctionne aussi de manière autonome :
- **Revue d'une PR** — surtout celles avec plus de quelques fichiers ou des modifications transversales
- **Prise en main d'une modification** — quand vous devez comprendre ce qui s'est passé sur une branche que vous n'avez pas écrite
- **Revue de sprint** — le workflow peut récupérer les stories marquées `review` dans votre fichier de statut de sprint
Invoquez-le en disant « checkpoint » ou « guide-moi à travers cette modification ». Il fonctionne dans n'importe quel terminal, mais vous en tirerez plus de parti dans un IDE — VS Code, Cursor ou similaire — car le workflow produit des références `chemin:ligne` à chaque étape. Dans un terminal intégré à un IDE, celles-ci sont cliquables, ce qui vous permet de sauter de fichier en fichier en suivant l'historique de revue.
## Ce que ce n'est pas
Checkpoint Preview ne remplace pas la revue automatisée. Il ne lance pas de linters, de vérificateurs de types ou de suites de tests. Il n'attribue pas de scores de sévérité et ne produit pas de verdicts pass/échec. C'est un guide de lecture qui aide un humain à appliquer son jugement là où cela compte le plus.

View File

@ -2,7 +2,7 @@
title: "FAQ Projets Existants" title: "FAQ Projets Existants"
description: Questions courantes sur l'utilisation de la méthode BMad sur des projets existants description: Questions courantes sur l'utilisation de la méthode BMad sur des projets existants
sidebar: sidebar:
order: 11 order: 8
--- ---
Réponses rapides aux questions courantes sur l'utilisation de la méthode BMad (BMM) sur des projets existants. Réponses rapides aux questions courantes sur l'utilisation de la méthode BMad (BMM) sur des projets existants.

View File

@ -2,7 +2,7 @@
title: "Party Mode" title: "Party Mode"
description: Collaboration multi-agents - regroupez tous vos agents IA dans une seule conversation description: Collaboration multi-agents - regroupez tous vos agents IA dans une seule conversation
sidebar: sidebar:
order: 9 order: 7
--- ---
Regroupez tous vos agents IA dans une seule conversation. Regroupez tous vos agents IA dans une seule conversation.

View File

@ -2,7 +2,7 @@
title: "Prévention des conflits entre agents" title: "Prévention des conflits entre agents"
description: Comment l'architecture empêche les conflits lorsque plusieurs agents implémentent un système description: Comment l'architecture empêche les conflits lorsque plusieurs agents implémentent un système
sidebar: sidebar:
order: 6 order: 4
--- ---
Lorsque plusieurs agents IA implémentent différentes parties d'un système, ils peuvent prendre des décisions techniques contradictoires. La documentation d'architecture prévient cela en établissant des standards partagés. Lorsque plusieurs agents IA implémentent différentes parties d'un système, ils peuvent prendre des décisions techniques contradictoires. La documentation d'architecture prévient cela en établissant des standards partagés.

View File

@ -2,7 +2,7 @@
title: "Contexte du Projet" title: "Contexte du Projet"
description: Comment project-context.md guide les agents IA avec les règles et préférences de votre projet description: Comment project-context.md guide les agents IA avec les règles et préférences de votre projet
sidebar: sidebar:
order: 10 order: 7
--- ---
Le fichier `project-context.md` est le guide d'implémentation de votre projet pour les agents IA. Similaire à une « constitution » dans d'autres systèmes de développement, il capture les règles, les patterns et les préférences qui garantissent une génération de code cohérente à travers tous les workflows. Le fichier `project-context.md` est le guide d'implémentation de votre projet pour les agents IA. Similaire à une « constitution » dans d'autres systèmes de développement, il capture les règles, les patterns et les préférences qui garantissent une génération de code cohérente à travers tous les workflows.

View File

@ -2,7 +2,7 @@
title: "Quick Dev" title: "Quick Dev"
description: Réduire la friction de linteraction humaine sans renoncer aux points de contrôle qui protègent la qualité des résultats description: Réduire la friction de linteraction humaine sans renoncer aux points de contrôle qui protègent la qualité des résultats
sidebar: sidebar:
order: 3 order: 2
--- ---
Intention en entrée, modifications de code en sortie, avec aussi peu d'interactions humaines dans la boucle que possible — sans sacrifier la qualité. Intention en entrée, modifications de code en sortie, avec aussi peu d'interactions humaines dans la boucle que possible — sans sacrifier la qualité.

View File

@ -2,7 +2,7 @@
title: "Pourquoi le Solutioning est Important" title: "Pourquoi le Solutioning est Important"
description: Comprendre pourquoi la phase de solutioning est critique pour les projets multi-epics description: Comprendre pourquoi la phase de solutioning est critique pour les projets multi-epics
sidebar: sidebar:
order: 5 order: 3
--- ---
La Phase 3 (Solutioning) traduit le **quoi** construire (issu de la Planification) en **comment** le construire (conception technique). Cette phase évite les conflits entre agents dans les projets multi-epics en documentant les décisions architecturales avant le début de l'implémentation. La Phase 3 (Solutioning) traduit le **quoi** construire (issu de la Planification) en **comment** le construire (conception technique). Cette phase évite les conflits entre agents dans les projets multi-epics en documentant les décisions architecturales avant le début de l'implémentation.

View File

@ -58,7 +58,7 @@ Modifier la façon dont l'agent se présente :
```yaml ```yaml
agent: agent:
metadata: metadata:
name: 'Bob léponge' # Par défaut : "Amelia" name: 'Bob léponge' # Par défaut : "Mary"
``` ```
**Persona** **Persona**

View File

@ -5,55 +5,111 @@ sidebar:
order: 4 order: 4
--- ---
Utilisez l'aide intégrée de BMad, la documentation source ou la communauté pour obtenir des réponses — du plus rapide au plus approfondi. ## Commencez ici : BMad-Help
## 1. Demandez à BMad-Help **Le moyen le plus rapide d'obtenir des réponses sur BMad est le skill `bmad-help`.** Ce guide intelligent répondra à plus de 80 % de toutes les questions et est disponible directement dans votre IDE pendant que vous travaillez.
Le moyen le plus rapide d'obtenir des réponses. Le skill `bmad-help` est disponible directement dans votre session IA et répond à plus de 80 % des questions — il inspecte votre projet, voit ce que vous avez accompli et vous dit quoi faire ensuite. BMad-Help est bien plus qu'un outil de recherche — il :
- **Inspecte votre projet** pour voir ce qui a déjà été réalisé
- **Comprend le langage naturel** — posez vos questions en français courant
- **S'adapte à vos modules installés** — affiche les options pertinentes
- **Se lance automatiquement après les workflows** — vous indique exactement quoi faire ensuite
- **Recommande la première tâche requise** — plus besoin de deviner par où commencer
### Comment utiliser BMad-Help
Appelez-le par son nom dans votre session IA :
``` ```
bmad-help J'ai une idée de SaaS et je connais toutes les fonctionnalités. Par où commencer ? bmad-help
bmad-help Quelles sont mes options pour le design UX ?
bmad-help Je suis bloqué sur le workflow PRD
``` ```
:::tip :::tip
Vous pouvez également utiliser `/bmad-help` ou `$bmad-help` selon votre plateforme, mais `bmad-help` tout seul devrait fonctionner partout. Vous pouvez également utiliser `/bmad-help` ou `$bmad-help` selon votre plateforme, mais `bmad-help` tout seul devrait fonctionner partout.
::: :::
## 2. Approfondissez avec les sources Combinez-le avec une requête en langage naturel :
BMad-Help s'appuie sur votre configuration installée. Pour les questions sur les éléments internes de BMad, son historique ou son architecture — ou si vous faites des recherches sur BMad avant de l'installer — pointez votre IA directement vers les sources. ```
bmad-help J'ai une idée de SaaS et je connais toutes les fonctionnalités. Par où commencer ?
bmad-help Quelles sont mes options pour le design UX ?
bmad-help Je suis bloqué sur le workflow PRD
bmad-help Montre-moi ce qui a été fait jusqu'à maintenant
```
Clonez ou ouvrez le [dépôt BMAD-METHOD](https://github.com/bmad-code-org/BMAD-METHOD) et posez vos questions à votre IA. Tout outil capable d'utiliser des agents (Claude Code, Cursor, Windsurf, etc.) peut lire les sources et répondre directement à vos questions. BMad-Help répond avec :
- Ce qui est recommandé pour votre situation
- Quelle est la première tâche requise
- À quoi ressemble le reste du processus
## Quand utiliser ce guide
Utilisez cette section lorsque :
- Vous souhaitez comprendre l'architecture ou les éléments internes de BMad
- Vous avez besoin de réponses au-delà de ce que BMad-Help fournit
- Vous faites des recherches sur BMad avant l'installation
- Vous souhaitez explorer le code source directement
## Étapes
### 1. Choisissez votre source
| Source | Idéal pour | Exemples |
|-------------------------|------------------------------------------------------|---------------------------------------|
| **Dossier `_bmad`** | Comment fonctionne BMad — agents, workflows, prompts | "Que fait l'agent Analyste ?" |
| **Repo GitHub complet** | Historique, installateur, architecture | "Qu'est-ce qui a changé dans la v6 ?" |
| **`llms-full.txt`** | Aperçu rapide depuis la documentation | "Expliquez les quatre phases de BMad" |
Le dossier `_bmad` est créé lorsque vous installez BMad. Si vous ne l'avez pas encore, clonez le repo à la place.
### 2. Pointez votre IA vers la source
**Si votre IA peut lire des fichiers (Claude Code, Cursor, etc.) :**
- **BMad installé :** Pointez vers le dossier `_bmad` et posez vos questions directement
- **Vous voulez plus de contexte :** Clonez le [repo complet](https://github.com/bmad-code-org/BMAD-METHOD)
**Si vous utilisez ChatGPT ou Claude.ai (LLM en ligne) :**
Importez `llms-full.txt` dans votre session :
```text
https://bmad-code-org.github.io/BMAD-METHOD/llms-full.txt
```
### 3. Posez votre question
:::note[Exemple] :::note[Exemple]
**Q :** "Quel est le moyen le plus rapide de construire quelque chose avec BMad ?" **Q :** "Quel est le moyen le plus rapide de construire quelque chose avec BMad ?"
**R :** Utilisez le flux rapide : Lancez `bmad-quick-dev` — il clarifie votre intention, planifie, implémente, révise et présente les résultats dans un seul workflow, en sautant les phases de planification complètes. **R :** Utilisez le workflow Quick Dev : Lancez `bmad-quick-dev` — il clarifie votre intention, planifie, implémente, révise et présente les résultats dans un seul workflow, en sautant les phases de planification complètes.
::: :::
**Conseils pour de meilleures réponses :** ## Ce que vous obtenez
Des réponses directes sur BMad — comment fonctionnent les agents, ce que font les workflows, pourquoi les choses sont structurées ainsi — sans attendre la réponse de quelqu'un.
## Conseils
- **Vérifiez les réponses surprenantes** — Les LLM font parfois des erreurs. Consultez le fichier source ou posez la question sur Discord.
- **Soyez précis** — "Que fait l'étape 3 du workflow PRD ?" est mieux que "Comment fonctionne le PRD ?" - **Soyez précis** — "Que fait l'étape 3 du workflow PRD ?" est mieux que "Comment fonctionne le PRD ?"
- **Vérifiez les affirmations surprenantes** — Les LLM font parfois des erreurs. Consultez le fichier source ou posez la question sur Discord.
### Vous n'utilisez pas d'agent ? Utilisez le site de documentation ## Toujours bloqué ?
Si votre IA ne peut pas lire des fichiers locaux (ChatGPT, Claude.ai, etc.), importez [llms-full.txt](https://bmad-code-org.github.io/BMAD-METHOD/llms-full.txt) dans votre session — c'est un instantané en un seul fichier de la documentation BMad. Avez-vous essayé l'approche LLM et avez encore besoin d'aide ? Vous avez maintenant une bien meilleure question à poser.
## 3. Demandez à quelqu'un
Si ni BMad-Help ni la source n'ont répondu à votre question, vous avez maintenant une bien meilleure question à poser.
| Canal | Utilisé pour | | Canal | Utilisé pour |
| ------------------------- | ------------------------------------------- | | ------------------------- | ------------------------------------------- |
| Forum `help-requests` | Questions | | `#bmad-method-help` | Questions rapides (chat en temps réel) |
| Forum `help-requests` | Questions détaillées (recherchables, persistants) |
| `#suggestions-feedback` | Idées et demandes de fonctionnalités | | `#suggestions-feedback` | Idées et demandes de fonctionnalités |
| `#report-bugs-and-issues` | Rapports de bugs |
**Discord :** [discord.gg/gk8jAdXWmj](https://discord.gg/gk8jAdXWmj) **Discord :** [discord.gg/gk8jAdXWmj](https://discord.gg/gk8jAdXWmj)
**GitHub Issues :** [github.com/bmad-code-org/BMAD-METHOD/issues](https://github.com/bmad-code-org/BMAD-METHOD/issues) **GitHub Issues :** [github.com/bmad-code-org/BMAD-METHOD/issues](https://github.com/bmad-code-org/BMAD-METHOD/issues) (pour les bugs clairs)
*Toi !* *Toi !*
*Bloqué* *Bloqué*
*dans la file d'attente—* *dans la file d'attente—*

View File

@ -61,8 +61,8 @@ Si vous avez des stories[^3] créées ou implémentées :
1. Terminez l'installation v6 1. Terminez l'installation v6
2. Placez `epics.md` ou `epics/epic*.md`[^2] dans `_bmad-output/planning-artifacts/` 2. Placez `epics.md` ou `epics/epic*.md`[^2] dans `_bmad-output/planning-artifacts/`
3. Lancez le workflow Développeur `bmad-sprint-planning`[^4] 3. Lancez le workflow `bmad-sprint-planning`[^4]
4. Indiquez à lagent quels epics/stories sont déjà terminés 4. Indiquez quels epics/stories sont déjà terminés
## Ce que vous obtenez ## Ce que vous obtenez

View File

@ -1,28 +1,27 @@
--- ---
title: Agents title: Agents
description: Agents BMM par défaut avec leurs identifiants de skill, déclencheurs de menu et workflows principaux description: Agents BMM par défaut avec leurs identifiants de skill, déclencheurs de menu et workflows principaux (Analyst, Developer, Architect, UX Designer, Technical Writer)
sidebar: sidebar:
order: 2 order: 2
--- ---
## Agents par défaut ## Agents par défaut
Cette page liste les agents BMM (suite Agile) par défaut installés avec la méthode BMad, ainsi que leurs identifiants de skill, déclencheurs de menu et workflows principaux. Chaque agent est invoqué en tant que skill. Cette page liste les cinq agents BMM (suite Agile) par défaut installés avec la méthode BMad, ainsi que leurs identifiants de skill, déclencheurs de menu et workflows principaux. Chaque agent est invoqué en tant que skill.
## Notes ## Notes
- Chaque agent est disponible en tant que skill, généré par linstallateur. Lidentifiant de skill (par exemple, `bmad-dev`) est utilisé pour invoquer lagent. - Chaque agent est disponible en tant que skill, généré par linstallateur. Lidentifiant de skill (par exemple, `bmad-analyst`) est utilisé pour invoquer lagent.
- Les déclencheurs sont les codes courts de menu (par exemple, `BP`) et les correspondances approximatives affichés dans chaque menu dagent. - Les déclencheurs sont les codes courts de menu (par exemple, `BP`) et les correspondances approximatives affichés dans chaque menu dagent.
- La génération de tests QA est gérée par le skill de workflow `bmad-qa-generate-e2e-tests`, disponible par lagent Développeur. Larchitecte de tests complet (TEA) se trouve dans son propre module. - La génération de tests QA est gérée par le skill de workflow `bmad-qa-generate-e2e-tests`. Larchitecte de tests complet (TEA) se trouve dans son propre module.
| Agent | Identifiant de skill | Déclencheurs | Workflows principaux | | Agent | Identifiant de skill | Déclencheurs | Workflows principaux |
|-----------------------------|----------------------|------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------| |------------------------|----------------------|------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Analyste (Mary) | `bmad-analyst` | `BP`, `MR`, `DR`, `TR`, `CB`, `WB`, `DP` | Brainstorming du projet, Recherche marché/domaine/technique, Création du brief[^1], Défi PRFAQ, Documentation du projet | | Analyste (Mary) | `bmad-analyst` | `BP`, `MR`, `DR`, `TR`, `CB`, `DP` | Brainstorming du projet, Recherche marché/domaine/technique, Création du brief[^1], Documentation du projet |
| Product Manager (John) | `bmad-pm` | `CP`, `VP`, `EP`, `CE`, `IR`, `CC` | Créer/Valider/Éditer un PRD, Créer des Epics et Stories, vérifier létat de préparation à lImplémentation, Corriger le Cours | | Architecte (Winston) | `bmad-architect` | `CA`, `IR` | Créer larchitecture, Préparation à limplémentation |
| Architecte (Winston) | `bmad-architect` | `CA`, `IR` | Créer larchitecture, Préparation à limplémentation | | Développeur (Amelia) | `bmad-dev` | `DS`, `QD`, `CR` | Dev Story, Quick Dev, Code Review |
| Développeur (Amelia) | `bmad-agent-dev` | `DS`, `QD`, `QA`, `CR`, `SP`, `CS`, `ER` | Dev Story, Quick Dev, Génération de Tests QA, Code Review, Sprint Planning, Créer Story, Rétrospective dEpic | | Designer UX (Sally) | `bmad-ux-designer` | `CU` | Création du design UX[^2] |
| Designer UX (Sally) | `bmad-ux-designer` | `CU` | Création du design UX[^2] | | Rédacteur Technique (Paige) | `bmad-tech-writer` | `DP`, `WD`, `US`, `MG`, `VD`, `EC` | Documentation du projet, Rédaction de documents, Mise à jour des standards, Génération de diagrammes Mermaid, Validation de documents, Explication de concepts |
| Rédacteur Technique (Paige) | `bmad-tech-writer` | `DP`, `WD`, `US`, `MG`, `VD`, `EC` | Documentation du projet, Rédaction de documents, Mise à jour des standards, Génération de diagrammes Mermaid, Validation de documents, Explication de concepts |
## Types de déclencheurs ## Types de déclencheurs
@ -32,7 +31,7 @@ Les déclencheurs de menu d'agent utilisent deux types d'invocation différents.
La plupart des déclencheurs chargent un fichier de workflow structuré. Tapez le code du déclencheur et l'agent démarre le workflow, vous demandant de saisir les informations à chaque étape. La plupart des déclencheurs chargent un fichier de workflow structuré. Tapez le code du déclencheur et l'agent démarre le workflow, vous demandant de saisir les informations à chaque étape.
Exemples : `CP` (Create PRD), `DS` (Dev Story), `CA` (Create Architecture), `QD` (Quick Dev) Exemples : `BP` (Brainstorm Project), `CA` (Create Architecture), `CU` (Create UX Design)
### Déclencheurs conversationnels (arguments requis) ### Déclencheurs conversationnels (arguments requis)

View File

@ -2,7 +2,7 @@
title: Skills title: Skills
description: Référence des skills BMad — ce qu'ils sont, comment ils fonctionnent et où les trouver. description: Référence des skills BMad — ce qu'ils sont, comment ils fonctionnent et où les trouver.
sidebar: sidebar:
order: 4 order: 3
--- ---
Les skills sont des prompts pré-construits qui chargent des agents, exécutent des workflows ou lancent des tâches dans votre IDE. L'installateur BMad les génère à partir de vos modules installés au moment de l'installation. Si vous ajoutez, supprimez ou modifiez des modules ultérieurement, relancez l'installateur pour garder les skills synchronisés (voir [Dépannage](#dépannage)). Les skills sont des prompts pré-construits qui chargent des agents, exécutent des workflows ou lancent des tâches dans votre IDE. L'installateur BMad les génère à partir de vos modules installés au moment de l'installation. Si vous ajoutez, supprimez ou modifiez des modules ultérieurement, relancez l'installateur pour garder les skills synchronisés (voir [Dépannage](#dépannage)).
@ -54,12 +54,12 @@ Chaque skill est un répertoire contenant un fichier `SKILL.md`. Par exemple, un
│ └── SKILL.md │ └── SKILL.md
├── bmad-create-prd/ ├── bmad-create-prd/
│ └── SKILL.md │ └── SKILL.md
├── bmad-agent-dev/ ├── bmad-analyst/
│ └── SKILL.md │ └── SKILL.md
└── ... └── ...
``` ```
Le nom du répertoire détermine le nom du skill dans votre IDE. Par exemple, le répertoire `bmad-agent-dev/` enregistre le skill `bmad-agent-dev`. Le nom du répertoire détermine le nom du skill dans votre IDE. Par exemple, le répertoire `bmad-analyst/` enregistre le skill `bmad-analyst`.
## Comment découvrir vos skills ## Comment découvrir vos skills
@ -75,24 +75,23 @@ Les répertoires de skills générés dans votre projet sont la liste de référ
### Skills d'agent ### Skills d'agent
Les skills d'agent chargent un persona[^2] IA spécialisé avec un rôle défini, un style de communication et un menu de workflows. Une fois chargé, l'agent reste en caractère et répond aux déclencheurs du menu. Les skills d'agent chargent une persona[^2] IA spécialisée avec un rôle défini, un style de communication et un menu de workflows. Une fois chargé, l'agent reste en caractère et répond aux déclencheurs du menu.
| Exemple de skill | Agent | Rôle | | Exemple de skill | Agent | Rôle |
|------------------|------------------------|-------------------------------------------------------------| | --- | --- | --- |
| `bmad-agent-dev` | Amelia (Développeur) | Implémente les stories avec une adhérence stricte aux specs | | `bmad-analyst` | Mary (Analyste) | Brainstorming de projets, recherche, création de briefs |
| `bmad-pm` | John (Product Manager) | Crée et valide les PRDs[^1] | | `bmad-architect` | Winston (Architecte) | Conçoit l'architecture système |
| `bmad-architect` | Winston (Architecte) | Conçoit l'architecture système | | `bmad-ux-designer` | Sally (Designer UX) | Crée les designs UX |
| `bmad-tech-writer` | Paige (Rédacteur Technique) | Documente les projets, rédige des guides, génère des diagrammes |
Consultez [Agents](./agents.md) pour la liste complète des agents par défaut et leurs déclencheurs. Consultez [Agents](./agents.md) pour la liste complète des agents par défaut et leurs déclencheurs.
### Skills de workflow ### Skills de workflow
Les skills de workflow exécutent un processus structuré en plusieurs étapes sans charger d'abord un persona d'agent. Ils chargent une configuration de workflow et suivent ses étapes. Les skills de workflow exécutent un processus structuré en plusieurs étapes sans charger d'abord une persona d'agent. Ils chargent une configuration de workflow et suivent ses étapes.
| Exemple de skill | Objectif | | Exemple de skill | Objectif |
| --- | --- | | --- | --- |
| `bmad-product-brief` | Créer un product brief[^3] — découverte guidée lorsque votre concept est clair |
| `bmad-prfaq` | Défi [PRFAQ Working Backwards](../explanation/analysis-phase.md#prfaq-working-backwards) pour éprouver votre concept produit |
| `bmad-create-prd` | Créer un PRD[^1] | | `bmad-create-prd` | Créer un PRD[^1] |
| `bmad-create-architecture` | Concevoir l'architecture système | | `bmad-create-architecture` | Concevoir l'architecture système |
| `bmad-create-epics-and-stories` | Créer des epics et des stories | | `bmad-create-epics-and-stories` | Créer des epics et des stories |
@ -124,7 +123,7 @@ Le module principal inclut 11 outils intégrés — revues, compression, brainst
## Convention de nommage ## Convention de nommage
Tous les skills utilisent le préfixe `bmad-` suivi d'un nom descriptif (ex. `bmad-agent-dev`, `bmad-create-prd`, `bmad-help`). Consultez [Modules](./modules.md) pour les modules disponibles. Tous les skills utilisent le préfixe `bmad-` suivi d'un nom descriptif (ex. `bmad-analyst`, `bmad-create-prd`, `bmad-help`). Consultez [Modules](./modules.md) pour les modules disponibles.
## Dépannage ## Dépannage
@ -137,5 +136,4 @@ Tous les skills utilisent le préfixe `bmad-` suivi d'un nom descriptif (ex. `bm
## Glossaire ## Glossaire
[^1]: PRD (Product Requirements Document) : document de référence qui décrit les objectifs du produit, les besoins utilisateurs, les fonctionnalités attendues, les contraintes et les critères de succès, afin daligner les équipes sur ce qui doit être construit et pourquoi. [^1]: PRD (Product Requirements Document) : document de référence qui décrit les objectifs du produit, les besoins utilisateurs, les fonctionnalités attendues, les contraintes et les critères de succès, afin daligner les équipes sur ce qui doit être construit et pourquoi.
[^2]: Persona : dans le contexte de BMad, un persona désigne un agent IA avec un rôle défini, un style de communication et une expertise spécifiques (ex. Mary l'analyste, Winston l'architecte). Chaque persona garde son "caractère" pendant les interactions. [^2]: Persona : dans le contexte de BMad, une persona désigne un agent IA avec un rôle défini, un style de communication et une expertise spécifiques (ex. Mary l'analyste, Winston l'architecte). Chaque persona garde son "caractère" pendant les interactions.
[^3]: Brief : document synthétique qui formalise le contexte, les objectifs, le périmètre et les contraintes d'un projet ou d'une demande, afin d'aligner rapidement les parties prenantes avant le travail détaillé.

View File

@ -2,7 +2,7 @@
title: Outils Principaux title: Outils Principaux
description: Référence pour toutes les tâches et tous les workflows intégrés disponibles dans chaque installation BMad sans modules supplémentaires. description: Référence pour toutes les tâches et tous les workflows intégrés disponibles dans chaque installation BMad sans modules supplémentaires.
sidebar: sidebar:
order: 3 order: 2
--- ---
Chaque installation BMad comprend un ensemble de compétences principales qui peuvent être utilisées conjointement avec tout ce que vous faites — des tâches et des workflows autonomes qui fonctionnent dans tous les projets, tous les modules et toutes les phases. Ceux-ci sont toujours disponibles, quels que soient les modules optionnels que vous installez. Chaque installation BMad comprend un ensemble de compétences principales qui peuvent être utilisées conjointement avec tout ce que vous faites — des tâches et des workflows autonomes qui fonctionnent dans tous les projets, tous les modules et toutes les phases. Ceux-ci sont toujours disponibles, quels que soient les modules optionnels que vous installez.

View File

@ -2,7 +2,7 @@
title: Modules Officiels title: Modules Officiels
description: Modules additionnels pour créer des agents personnalisés, de l'intelligence créative, du développement de jeux et des tests description: Modules additionnels pour créer des agents personnalisés, de l'intelligence créative, du développement de jeux et des tests
sidebar: sidebar:
order: 5 order: 4
--- ---
BMad s'étend via des modules officiels que vous sélectionnez lors de l'installation. Ces modules additionnels fournissent des agents, des workflows et des tâches spécialisés pour des domaines spécifiques, au-delà du noyau intégré et de BMM (suite Agile). BMad s'étend via des modules officiels que vous sélectionnez lors de l'installation. Ces modules additionnels fournissent des agents, des workflows et des tâches spécialisés pour des domaines spécifiques, au-delà du noyau intégré et de BMM (suite Agile).

View File

@ -2,7 +2,7 @@
title: Options de Testing title: Options de Testing
description: Comparaison du workflow QA intégré avec le module Test Architect (TEA) pour l'automatisation des tests. description: Comparaison du workflow QA intégré avec le module Test Architect (TEA) pour l'automatisation des tests.
sidebar: sidebar:
order: 6 order: 5
--- ---
BMad propose deux approches de test : un workflow QA[^1] intégré pour une génération rapide de tests et un module Test Architect installable pour une stratégie de test de qualité entreprise. BMad propose deux approches de test : un workflow QA[^1] intégré pour une génération rapide de tests et un module Test Architect installable pour une stratégie de test de qualité entreprise.

View File

@ -21,14 +21,13 @@ Note finale importante : Chaque workflow ci-dessous peut être exécuté directe
## Phase 1 : Analyse (Optionnelle) ## Phase 1 : Analyse (Optionnelle)
Explorez lespace problème et validez les idées avant de vous engager dans la planification. [**Découvrez ce que fait chaque outil et quand lutiliser**](../explanation/analysis-phase.md). Explorez lespace problème et validez les idées avant de vous engager dans la planification.
| Workflow | Objectif | Produit | | Workflow | Objectif | Produit |
|---------------------------------------------------------------------------|------------------------------------------------------------------------------------------|---------------------------| |---------------------------------------------------------------------------|------------------------------------------------------------------------------------------|---------------------------|
| `bmad-brainstorming` | Brainstormez des idées de projet avec laccompagnement guidé dun coach de brainstorming | `brainstorming-report.md` | | `bmad-brainstorming` | Brainstormez des idées de projet avec l'accompagnement guidé d'un coach de brainstorming | `brainstorming-report.md` |
| `bmad-domain-research`, `bmad-market-research`, `bmad-technical-research` | Validez les hypothèses de marché, techniques ou de domaine | Rapport de recherches | | `bmad-domain-research`, `bmad-market-research`, `bmad-technical-research` | Validez les hypothèses de marché, techniques ou de domaine | Rapport de recherches |
| `bmad-product-brief` | Capturez la vision stratégique — idéal lorsque votre concept est clair | `product-brief.md` | | `bmad-create-product-brief` | Capturez la vision stratégique | `product-brief.md` |
| `bmad-prfaq` | Working Backwards — éprouvez et forgez votre concept produit | `prfaq-{project}.md` |
## Phase 2 : Planification ## Phase 2 : Planification

View File

@ -68,7 +68,7 @@ BMad vous aide à construire des logiciels grâce à des workflows guidés avec
| Phase | Nom | Ce qui se passe | | Phase | Nom | Ce qui se passe |
|-------|----------------|----------------------------------------------------------------| |-------|----------------|----------------------------------------------------------------|
| 1 | Analyse | Brainstorming, recherche, product brief ou PRFAQ *(optionnel)* | | 1 | Analyse | Brainstorming, recherche, product brief *(optionnel)* |
| 2 | Planification | Créer les exigences (PRD[^1] ou spécification technique) | | 2 | Planification | Créer les exigences (PRD[^1] ou spécification technique) |
| 3 | Solutioning | Concevoir l'architecture *(BMad Method/Enterprise uniquement)* | | 3 | Solutioning | Concevoir l'architecture *(BMad Method/Enterprise uniquement)* |
| 4 | Implémentation | Construire epic[^2] par epic, story[^3] par story | | 4 | Implémentation | Construire epic[^2] par epic, story[^3] par story |
@ -114,7 +114,7 @@ BMad-Help détectera ce que vous avez accompli et recommandera exactement quoi f
::: :::
:::note[Comment charger les agents et exécuter les workflows] :::note[Comment charger les agents et exécuter les workflows]
Chaque workflow possède une **skill** que vous invoquez par nom dans votre IDE (par ex., `bmad-create-prd`). Votre outil IA reconnaîtra le nom `bmad-*` et l'exécutera — vous n'avez pas besoin de charger les agents séparément. Vous pouvez aussi invoquer directement une skill d'agent pour une conversation générale (par ex., `bmad-agent-pm` pour l'agent PM). Chaque workflow possède une **skill** que vous invoquez par nom dans votre IDE (par ex., `bmad-create-prd`). Votre outil IA reconnaîtra le nom `bmad-*` et l'exécutera.
::: :::
:::caution[Nouveaux chats] :::caution[Nouveaux chats]
@ -133,32 +133,29 @@ Créez-le manuellement dans `_bmad-output/project-context.md` ou générez-le ap
### Phase 1 : Analyse (Optionnel) ### Phase 1 : Analyse (Optionnel)
Tous les workflows de cette phase sont optionnels. [**Pas sûr de quel outil utiliser ?**](../explanation/analysis-phase.md) Tous les workflows de cette phase sont optionnels :
- **brainstorming** (`bmad-brainstorming`) — Idéation guidée - **brainstorming** (`bmad-brainstorming`) — Idéation guidée
- **research** (`bmad-market-research` / `bmad-domain-research` / `bmad-technical-research`) — Recherche marché, domaine et technique - **research** (`bmad-market-research` / `bmad-domain-research` / `bmad-technical-research`) — Recherche marché, domaine et technique
- **product-brief** (`bmad-product-brief`) — Document de base recommandé lorsque votre concept est clair - **create-product-brief** (`bmad-create-product-brief`) — Document de base recommandé
- **prfaq** (`bmad-prfaq`) — Défi Working Backwards pour éprouver et forger votre concept produit
### Phase 2 : Planification (Requis) ### Phase 2 : Planification (Requis)
**Pour les voies BMad Method et Enterprise :** **Pour les voies BMad Method et Enterprise :**
1. Invoquez l'**agent PM** (`bmad-agent-pm`) dans un nouveau chat 1. Exécutez `bmad-create-prd` dans un nouveau chat
2. Exécutez le workflow `bmad-create-prd` (`bmad-create-prd`) 2. Sortie : `PRD.md`
3. Sortie : `PRD.md`
**Pour la voie Quick Dev :** **Pour la voie Quick Dev :**
- Exécutez `bmad-quick-dev` — il gère la planification et l'implémentation dans un seul workflow, passez directement à l'implémentation - Utilisez le workflow `bmad-quick-dev` (`bmad-quick-dev`) à la place du PRD, puis passez à l'implémentation
:::note[Design UX (Optionnel)] :::note[Design UX (Optionnel)]
Si votre projet a une interface utilisateur, invoquez l'**agent Designer UX** (`bmad-agent-ux-designer`) et exécutez le workflow de design UX (`bmad-create-ux-design`) après avoir créé votre PRD. Si votre projet a une interface utilisateur, exécutez le workflow de design UX (`bmad-create-ux-design`) après avoir créé votre PRD.
::: :::
### Phase 3 : Solutioning (méthode BMad/Enterprise) ### Phase 3 : Solutioning (méthode BMad/Enterprise)
**Créer l'Architecture** **Créer l'Architecture**
1. Invoquez l'**agent Architecte** (`bmad-agent-architect`) dans un nouveau chat 1. Exécutez `bmad-create-architecture` dans un nouveau chat
2. Exécutez `bmad-create-architecture` (`bmad-create-architecture`) 2. Sortie : Document d'architecture avec les décisions techniques
3. Sortie : Document d'architecture avec les décisions techniques
**Créer les Epics et Stories** **Créer les Epics et Stories**
@ -166,14 +163,12 @@ Si votre projet a une interface utilisateur, invoquez l'**agent Designer UX** (`
Les epics et stories sont maintenant créés *après* l'architecture. Cela produit des stories de meilleure qualité car les décisions d'architecture (base de données, patterns d'API, pile technologique) affectent directement la façon dont le travail doit être décomposé. Les epics et stories sont maintenant créés *après* l'architecture. Cela produit des stories de meilleure qualité car les décisions d'architecture (base de données, patterns d'API, pile technologique) affectent directement la façon dont le travail doit être décomposé.
::: :::
1. Invoquez l'**agent PM** (`bmad-agent-pm`) dans un nouveau chat 1. Exécutez `bmad-create-epics-and-stories` dans un nouveau chat
2. Exécutez `bmad-create-epics-and-stories` (`bmad-create-epics-and-stories`) 2. Le workflow utilise à la fois le PRD et l'Architecture pour créer des stories techniquement éclairées
3. Le workflow utilise à la fois le PRD et l'Architecture pour créer des stories techniquement éclairées
**Vérification de préparation à l'implémentation** *(Hautement recommandé)* **Vérification de préparation à l'implémentation** *(Hautement recommandé)*
1. Invoquez l'**agent Architecte** (`bmad-agent-architect`) dans un nouveau chat 1. Exécutez `bmad-check-implementation-readiness` dans un nouveau chat
2. Exécutez `bmad-check-implementation-readiness` (`bmad-check-implementation-readiness`) 2. Valide la cohérence entre tous les documents de planification
3. Valide la cohérence entre tous les documents de planification
## Étape 2 : Construire votre projet ## Étape 2 : Construire votre projet
@ -181,19 +176,19 @@ Une fois la planification terminée, passez à l'implémentation. **Chaque workf
### Initialiser la planification de sprint ### Initialiser la planification de sprint
Invoquez **lagent Développeur** (`bmad-agent-dev`) et lancez `bmad-sprint-planning`. Cela crée `sprint-status.yaml` pour suivre tous les epics et stories. Exécutez `bmad-sprint-planning` dans un nouveau chat. Cela crée `sprint-status.yaml` pour suivre tous les epics et stories.
### Le cycle de construction ### Le cycle de construction
Pour chaque story, répétez ce cycle avec de nouveaux chats : Pour chaque story, répétez ce cycle avec de nouveaux chats :
| Étape | AGENT | Workflow | Commande | Objectif | | Étape | Workflow | Commande | Objectif |
|-------|-------|---------------------|---------------------|--------------------------------------| | ----- | --------------------- | --------------------- | ----------------------------------- |
| 1 | DEV | `bmad-create-story` | `bmad-create-story` | Créer le fichier story depuis l'epic | | 1 | `bmad-create-story` | `bmad-create-story` | Créer le fichier story depuis l'epic |
| 2 | DEV | `bmad-dev-story` | `bmad-dev-story` | Implémenter la story | | 2 | `bmad-dev-story` | `bmad-dev-story` | Implémenter la story |
| 3 | DEV | `bmad-code-review` | `bmad-code-review` | Validation de qualité *(recommandé)* | | 3 | `bmad-code-review` | `bmad-code-review` | Validation de qualité *(recommandé)* |
Après avoir terminé toutes les stories d'un epic, invoquez **lagent Développeur** (`bmad-agent-dev`), et exécutez `bmad-retrospective`. Après avoir terminé toutes les stories d'un epic, exécutez `bmad-retrospective` dans un nouveau chat.
## Ce que vous avez accompli ## Ce que vous avez accompli
@ -222,18 +217,18 @@ your-project/
## Référence rapide ## Référence rapide
| Workflow | Commande | Agent | Objectif | | Workflow | Commande | Objectif |
|---------------------------------------|---------------------------------------|-----------|-----------------------------------------------------------------| | ------------------------------------- | ------------------------------------------- | ------------------------------------------------ |
| **`bmad-help`** ⭐ | `bmad-help` | Tous | **Votre guide intelligent — posez n'importe quelle question !** | | **`bmad-help`** ⭐ | `bmad-help` | **Votre guide intelligent — posez n'importe quelle question !** |
| `bmad-create-prd` | `bmad-create-prd` | PM | Créer le document d'exigences produit | | `bmad-create-prd` | `bmad-create-prd` | Créer le document d'exigences produit |
| `bmad-create-architecture` | `bmad-create-architecture` | Architect | Créer le document d'architecture | | `bmad-create-architecture` | `bmad-create-architecture` | Créer le document d'architecture |
| `bmad-generate-project-context` | `bmad-generate-project-context` | Analyst | Créer le fichier de contexte projet | | `bmad-generate-project-context` | `bmad-generate-project-context` | Créer le fichier de contexte projet |
| `bmad-create-epics-and-stories` | `bmad-create-epics-and-stories` | PM | Décomposer le PRD en epics | | `bmad-create-epics-and-stories` | `bmad-create-epics-and-stories` | Décomposer le PRD en epics |
| `bmad-check-implementation-readiness` | `bmad-check-implementation-readiness` | Architect | Valider la cohérence de planification | | `bmad-check-implementation-readiness` | `bmad-check-implementation-readiness` | Valider la cohérence de planification |
| `bmad-sprint-planning` | `bmad-sprint-planning` | DEV | Initialiser le suivi de sprint | | `bmad-sprint-planning` | `bmad-sprint-planning` | Initialiser le suivi de sprint |
| `bmad-create-story` | `bmad-create-story` | DEV | Créer un fichier story | | `bmad-create-story` | `bmad-create-story` | Créer un fichier story |
| `bmad-dev-story` | `bmad-dev-story` | DEV | Implémenter une story | | `bmad-dev-story` | `bmad-dev-story` | Implémenter une story |
| `bmad-code-review` | `bmad-code-review` | DEV | Revoir le code implémenté | | `bmad-code-review` | `bmad-code-review` | Revoir le code implémenté |
## Questions fréquentes ## Questions fréquentes
@ -241,7 +236,7 @@ your-project/
Uniquement pour les voies méthode BMad et Enterprise. Quick Dev passe directement de la spécification technique (spec) à l'implémentation. Uniquement pour les voies méthode BMad et Enterprise. Quick Dev passe directement de la spécification technique (spec) à l'implémentation.
**Puis-je modifier mon plan plus tard ?** **Puis-je modifier mon plan plus tard ?**
Oui. Utilisez `bmad-correct-course` pour gérer les changements de périmètre en cours dimplémentation. Oui. Utilisez `bmad-correct-course` pour gérer les changements de périmètre.
**Et si je veux d'abord faire du brainstorming ?** **Et si je veux d'abord faire du brainstorming ?**
Invoquez l'agent Analyst (`bmad-agent-analyst`) et exécutez `bmad-brainstorming` (`bmad-brainstorming`) avant de commencer votre PRD. Invoquez l'agent Analyst (`bmad-agent-analyst`) et exécutez `bmad-brainstorming` (`bmad-brainstorming`) avant de commencer votre PRD.

View File

@ -1,395 +1,172 @@
--- ---
title: 'How to Customize BMad' title: 'How to Customize BMad'
description: Customize agents and workflows while preserving update compatibility description: Customize agents, workflows, and modules while preserving update compatibility
sidebar: sidebar:
order: 8 order: 8
--- ---
Tailor agent personas, inject domain context, add capabilities, and configure workflow behavior -- all without modifying installed files. Your customizations survive every update. Use the `.customize.yaml` files to tailor agent behavior, personas, and menus while preserving your changes across updates.
:::tip[Don't want to hand-author TOML? Use `bmad-customize`]
The `bmad-customize` skill is a guided authoring helper for the **per-skill agent/workflow override surface** described in this doc. It scans what's customizable in your installation, helps you choose the right surface (agent vs workflow) for your intent, writes the override file for you, and verifies the merge landed. Central-config overrides (`_bmad/custom/config.toml`) are out of scope for v1 — hand-author those per the Central Configuration section below. Run the skill whenever you want to make a per-skill change; this doc is the reference for *what* each surface exposes and how merging works.
:::
## When to Use This ## When to Use This
- You want to change an agent's personality or communication style - You want to change an agent's name, personality, or communication style
- You need to give an agent persistent facts to recall (e.g. "our org is AWS-only") - You need agents to remember project-specific context
- You want to add procedural startup steps the agent must run every session - You want to add custom menu items that trigger your own workflows or prompts
- You want to add custom menu items that trigger your own skills or prompts - You want agents to perform specific actions every time they start up
- Your team needs shared customizations committed to git, with personal preferences layered on top
:::note[Prerequisites] :::note[Prerequisites]
- BMad installed in your project (see [How to Install BMad](./install-bmad.md)) - BMad installed in your project (see [How to Install BMad](./install-bmad.md))
- Python 3.11+ on your PATH (for the resolver script -- uses stdlib `tomllib`, no `pip install`, no `uv`, no virtualenv) - A text editor for YAML files
- A text editor for TOML files :::
:::caution[Keep Your Customizations Safe]
Always use the `.customize.yaml` files described here rather than editing agent files directly. The installer overwrites agent files during updates, but preserves your `.customize.yaml` changes.
::: :::
## How It Works
Every customizable skill ships a `customize.toml` file with its defaults. This file defines the skill's complete customization surface -- read it to see what's customizable. You never edit this file. Instead, you create sparse override files containing only the fields you want to change.
### Three-Layer Override Model
```text
Priority 1 (wins): _bmad/custom/{skill-name}.user.toml (personal, gitignored)
Priority 2: _bmad/custom/{skill-name}.toml (team/org, committed)
Priority 3 (last): skill's own customize.toml (defaults)
```
The `_bmad/custom/` folder starts empty. Files only appear when someone actively customizes.
### Merge Rules (by shape, not by field name)
The resolver applies four structural rules. Field names are never special-cased — behavior is determined purely by the value's shape:
| Shape | Rule |
|---|---|
| Scalar (string, int, bool, float) | Override wins |
| Table | Deep merge (recursively apply these rules) |
| Array of tables where every item shares the **same** identifier field (every item has `code`, or every item has `id`) | Merge by that key — matching keys **replace in place**, new keys **append** |
| Any other array (scalars; tables with no identifier; arrays that mix `code` and `id` across items) | **Append** — base items first, then team items, then user items |
**No removal mechanism.** Overrides cannot delete base items. If you need to suppress a default menu item, override it by `code` with a no-op description or prompt. If you need to restructure an array more deeply, fork the skill.
**The `code` / `id` convention.** BMad uses `code` (short identifier like `"BP"` or `"R1"`) and `id` (longer stable identifier) as merge keys on arrays of tables. If you author a custom array-of-tables that should be replaceable-by-key rather than append-only, pick **one** convention (either `code` on every item, or `id` on every item) and stick with it across the whole array. Mixing `code` on some items and `id` on others falls back to append — the resolver won't guess which key to merge on.
### Some agent fields are read-only
`agent.name` and `agent.title` live in `customize.toml` as source-of-truth metadata, but the agent's SKILL.md doesn't read them at runtime — they're hardcoded identity. Putting `name = "Bob"` in an override file has no effect. If you genuinely need a different-named agent, copy the skill folder, rename it, and ship it as a custom skill.
## Steps ## Steps
### 1. Find the Skill's Customization Surface ### 1. Locate Customization Files
Look at the skill's `customize.toml` in its installed directory. For example, the PM agent: After installation, find one `.customize.yaml` file per agent in:
```text ```text
.claude/skills/bmad-agent-pm/customize.toml _bmad/_config/agents/
├── core-bmad-master.customize.yaml
├── bmm-dev.customize.yaml
├── bmm-pm.customize.yaml
└── ... (one file per installed agent)
``` ```
(Path varies by IDE -- Cursor uses `.cursor/skills/`, Cline uses `.cline/skills/`, and so on.) ### 2. Edit the Customization File
This file is the canonical schema. Every field you see is customizable (excluding the read-only identity fields noted above). Open the `.customize.yaml` file for the agent you want to modify. Every section is optional -- customize only what you need.
### 2. Create Your Override File | Section | Behavior | Purpose |
| ------------------ | -------- | ----------------------------------------------- |
| `agent.metadata` | Replaces | Override the agent's display name |
| `persona` | Replaces | Set role, identity, style, and principles |
| `memories` | Appends | Add persistent context the agent always recalls |
| `menu` | Appends | Add custom menu items for workflows or prompts |
| `critical_actions` | Appends | Define startup instructions for the agent |
| `prompts` | Appends | Create reusable prompts for menu actions |
Create the `_bmad/custom/` directory in your project root if it doesn't exist. Then create a file named after the skill: Sections marked **Replaces** overwrite the agent's defaults entirely. Sections marked **Appends** add to the existing configuration.
```text **Agent Name**
_bmad/custom/
bmad-agent-pm.toml # team overrides (committed to git) Change how the agent introduces itself:
bmad-agent-pm.user.toml # personal preferences (gitignored)
```yaml
agent:
metadata:
name: 'Spongebob' # Default: "Amelia"
``` ```
:::caution[Do NOT copy the whole `customize.toml`] **Persona**
Override files are **sparse**. Include only the fields you're changing — nothing else. Every field you omit is inherited automatically from the layer below (team from defaults, user from team-or-defaults).
Copying the full `customize.toml` into an override is actively harmful: the next update ships new defaults, but your override file locks in the old values. You'll silently drift out of sync with every release. Replace the agent's personality, role, and communication style:
:::
**Example — changing the icon and adding one principle**: ```yaml
persona:
```toml role: 'Senior Full-Stack Engineer'
# _bmad/custom/bmad-agent-pm.toml identity: 'Lives in a pineapple (under the sea)'
# Just the fields I'm changing. Everything else inherits. communication_style: 'Spongebob annoying'
principles:
[agent] - 'Never Nester, Spongebob Devs hate nesting more than 2 levels deep'
icon = "🏥" - 'Favor composition over inheritance'
principles = [
"Ship nothing that can't pass an FDA audit.",
]
``` ```
This appends the new principle to the defaults (leaving the shipped principles intact) and replaces the icon. Every other field stays as shipped. The `persona` section replaces the entire default persona, so include all four fields if you set it.
### 3. Customize What You Need **Memories**
All examples below assume BMad's flat agent schema. Fields live directly under `[agent]` — no nested `metadata` or `persona` sub-tables. Add persistent context the agent will always remember:
**Scalars (icon, role, identity, communication_style).** Scalar overrides win. You only need to set the fields you're changing: ```yaml
memories:
```toml - 'Works at Krusty Krab'
# _bmad/custom/bmad-agent-pm.toml - 'Favorite Celebrity: David Hasselhoff'
- 'Learned in Epic 1 that it is not cool to just pretend that tests have passed'
[agent]
icon = "🏥"
role = "Drives product discovery for a regulated healthcare domain."
communication_style = "Precise, regulatory-aware, asks compliance-shaped questions early."
``` ```
**Persistent facts, principles, activation hooks (append arrays).** All four arrays below are append-only. Team items run after defaults, user items run last. **Menu Items**
```toml Add custom entries to the agent's display menu. Each item needs a `trigger`, a target (`workflow` path or `action` reference), and a `description`:
[agent]
# Static facts the agent keeps in mind the whole session — org rules, domain
# constants, user preferences. Distinct from the runtime memory sidecar.
#
# Each entry is either a literal sentence, or a `file:` reference whose
# contents are loaded as facts (glob patterns supported).
persistent_facts = [
"Our org is AWS-only -- do not propose GCP or Azure.",
"All PRDs require legal sign-off before engineering kickoff.",
"Target users are clinicians, not patients -- frame examples accordingly.",
"file:{project-root}/docs/compliance/hipaa-overview.md",
"file:{project-root}/_bmad/custom/company-glossary.md",
]
# Adds to the agent's value system ```yaml
principles = [ menu:
"Ship nothing that can't pass an FDA audit.", - trigger: my-workflow
"User value first, compliance always.", workflow: 'my-custom/workflows/my-workflow.yaml'
] description: My custom workflow
- trigger: deploy
# Runs BEFORE the standard activation (persona, persistent_facts, config, greet). action: '#deploy-prompt'
# Use for pre-flight loads, compliance checks, anything that needs to be in description: Deploy to production
# context before the agent introduces itself.
activation_steps_prepend = [
"Scan {project-root}/docs/compliance/ and load any HIPAA-related documents as context.",
]
# Runs AFTER greet, BEFORE the menu. Use for context-heavy setup that should
# happen once the user has been acknowledged.
activation_steps_append = [
"Read {project-root}/_bmad/custom/company-glossary.md if it exists.",
]
``` ```
**The two hooks do different jobs.** Prepend runs before greeting so the agent can load context it needs to personalize the greeting itself. Append runs after greeting so the user isn't staring at a blank terminal while heavy scans complete. **Critical Actions**
**Menu customization (merge by `code`).** The menu is an array of tables. Each item has a `code` field (BMad convention), so the resolver merges by code: matching codes replace in place, new codes append. Define instructions that run when the agent starts up:
TOML array-of-tables syntax uses `[[agent.menu]]` for each item: ```yaml
critical_actions:
```toml - 'Check the CI Pipelines with the XYZ Skill and alert user on wake if anything is urgently needing attention'
# Replace the existing CE item with a custom skill
[[agent.menu]]
code = "CE"
description = "Create Epics using our delivery framework"
skill = "custom-create-epics"
# Add a new item (code RC doesn't exist in defaults)
[[agent.menu]]
code = "RC"
description = "Run compliance pre-check"
prompt = """
Read {project-root}/_bmad/custom/compliance-checklist.md
and scan all documents in {planning_artifacts} against it.
Report any gaps and cite the relevant regulatory section.
"""
``` ```
Each menu item has exactly one of `skill` (invokes a registered skill) or `prompt` (executes the text directly). Items not listed in your override keep their defaults. **Custom Prompts**
**Referencing files.** When a field's text needs to point at a file (in `persistent_facts`, `activation_steps_prepend`/`activation_steps_append`, or a menu item's `prompt`), use a full path rooted at `{project-root}`. Even if the file sits next to your override in `_bmad/custom/`, spell out the full path: `{project-root}/_bmad/custom/info.md`. The agent resolves `{project-root}` at runtime. Create reusable prompts that menu items can reference with `action="#id"`:
### 4. Personal vs Team ```yaml
prompts:
**Team file** (`bmad-agent-pm.toml`): Committed to git. Shared across the org. Use for compliance rules, company persona, custom capabilities. - id: deploy-prompt
content: |
**Personal file** (`bmad-agent-pm.user.toml`): Gitignored automatically. Use for tone adjustments, personal workflow preferences, and private facts the agent should keep in mind. Deploy the current branch to production:
1. Run all tests
```toml 2. Build the project
# _bmad/custom/bmad-agent-pm.user.toml 3. Execute deployment script
[agent]
persistent_facts = [
"Always include a rough complexity estimate (low/medium/high) when presenting options.",
]
``` ```
## How Resolution Works ### 3. Apply Your Changes
On activation, the agent's SKILL.md runs a shared Python script that does the three-layer merge and returns the resolved block as JSON. The script uses the Python standard library's `tomllib` module (no external dependencies), so plain `python3` is enough: After editing, reinstall to apply changes:
```bash ```bash
python3 {project-root}/_bmad/scripts/resolve_customization.py \ npx bmad-method install
--skill {skill-root} \
--key agent
``` ```
**Requirements**: Python 3.11+ (earlier versions don't include `tomllib`). No `pip install`, no `uv`, no virtualenv. Check with `python3 --version`. Some platforms (macOS without Homebrew, Ubuntu 22.04) default `python3` to 3.10 or earlier, so you may need to install 3.11+ separately. The installer detects the existing installation and offers these options:
`--skill` points at the skill's installed directory (where `customize.toml` lives). The skill name is derived from the directory's basename, and the script looks up `_bmad/custom/{skill-name}.toml` and `{skill-name}.user.toml` automatically. | Option | What It Does |
| ---------------------------- | -------------------------------------------------------------------- |
| **Quick Update** | Updates all modules to the latest version and applies customizations |
| **Modify BMad Installation** | Full installation flow for adding or removing modules |
Useful invocations: For customization-only changes, **Quick Update** is the fastest option.
```bash
# Resolve the full agent block
python3 {project-root}/_bmad/scripts/resolve_customization.py \
--skill /abs/path/to/bmad-agent-pm \
--key agent
# Resolve a single field
python3 {project-root}/_bmad/scripts/resolve_customization.py \
--skill /abs/path/to/bmad-agent-pm \
--key agent.icon
# Full dump
python3 {project-root}/_bmad/scripts/resolve_customization.py \
--skill /abs/path/to/bmad-agent-pm
```
Output is always JSON. If the script is unavailable on a given platform, the SKILL.md tells the agent to read the three TOML files directly and apply the same merge rules.
## Workflow Customization
Workflows (skills that drive multi-step processes like `bmad-product-brief`) share the same override mechanism as agents. Their customizable surface lives under `[workflow]` instead of `[agent]`:
```toml
# _bmad/custom/bmad-product-brief.toml
[workflow]
# Same prepend/append semantics as agents — runs before and after the workflow's
# own activation steps. Overrides append to defaults.
activation_steps_prepend = [
"Load {project-root}/docs/product/north-star-principles.md as context.",
]
activation_steps_append = []
# Same literal-or-file: semantics as the agent variant. Loaded as foundational
# context for the duration of the workflow run.
persistent_facts = [
"All briefs must include an explicit regulatory-risk section.",
"file:{project-root}/docs/compliance/product-brief-checklist.md",
]
# Scalar: runs once the workflow finishes its main output. Override wins.
on_complete = "Summarize the brief in three bullets and offer to email it via the gws-gmail-send skill."
```
The same field conventions cross the agent/workflow boundary: `activation_steps_prepend`/`activation_steps_append`, `persistent_facts` (with `file:` refs), and menu-style `[[…]]` tables with `code`/`id` for keyed merge. The resolver applies the same four structural rules regardless of the top-level key. SKILL.md references follow the namespace: `{workflow.activation_steps_prepend}`, `{workflow.persistent_facts}`, `{workflow.on_complete}`. Any additional fields a workflow exposes (output paths, toggles, review settings, stage flags) follow the same shape-based merge rules. Read the workflow's `customize.toml` to see what's customizable.
### Activation Order
Customizable workflows run their activation in a fixed sequence so you know exactly when your hooks fire:
1. Resolve the `[workflow]` block (base → team → user merge)
2. Execute `activation_steps_prepend` in order
3. Load `persistent_facts` as foundational context for the run
4. Load config (`_bmad/bmm/config.yaml`) and resolve standard variables (project name, languages, paths, date)
5. Greet the user
6. Execute `activation_steps_append` in order
After step 6 the workflow body begins. Use `activation_steps_prepend` when you need context loaded before the greeting can be personalized; use `activation_steps_append` when the setup is heavy and you'd rather the user sees the greeting first.
### Scope of This Initial Pass
Customization is rolling out incrementally. The fields documented above — `activation_steps_prepend`, `activation_steps_append`, `persistent_facts`, `on_complete` — are the **baseline surface** that every customizable workflow exposes, and they will remain stable across versions. They give you broad-stroke control today: inject pre/post steps, pin foundational context, trigger follow-up actions.
Over time, individual workflows will expose **more targeted customization points** tailored to what that workflow actually does — things like step-specific toggles, stage flags, output template paths, or review gates. When those arrive, they stack on top of the baseline fields rather than replacing them, so customizations you author today keep working.
If you need a fine-grained knob that isn't exposed yet, either use `activation_steps_*` and `persistent_facts` to steer behavior, or open an issue describing the specific customization point you want — those requests are what drive which targeted fields get added next.
## Central Configuration
Per-skill `customize.toml` covers **deep behavior** (hooks, menus, persistent_facts, persona overrides for a single agent or workflow). A separate surface covers **cross-cutting state** — install answers and the agent roster that external skills like `bmad-party-mode`, `bmad-retrospective`, and `bmad-advanced-elicitation` consume. That surface lives in four TOML files at project root:
```text
_bmad/config.toml (installer-owned) team scope: install answers + agent roster
_bmad/config.user.toml (installer-owned) user scope: user_name, language, skill level
_bmad/custom/config.toml (human-authored) team overrides (committed to git)
_bmad/custom/config.user.toml (human-authored) personal overrides (gitignored)
```
### Four-Layer Merge
```text
Priority 1 (wins): _bmad/custom/config.user.toml
Priority 2: _bmad/custom/config.toml
Priority 3: _bmad/config.user.toml
Priority 4 (base): _bmad/config.toml
```
Same structural rules as per-skill customize (scalars override, tables deep-merge, `code`/`id`-keyed arrays merge by key, other arrays append).
### What Lives Where
The installer partitions answers by the `scope:` declared on each prompt in `module.yaml`:
- `[core]` and `[modules.<code>]` sections — install answers. Scope `team` lands in `_bmad/config.toml`; scope `user` lands in `_bmad/config.user.toml`.
- `[agents.<code>]` — agent essence (code, name, title, icon, description, team) distilled from each module's `module.yaml` `agents:` block. Always team-scoped.
### Editing Rules
- `_bmad/config.toml` and `_bmad/config.user.toml` are **regenerated every install** from the answers collected during the installer flow. Treat them as read-only outputs — direct edits will be overwritten on the next install. To change an install answer durably, re-run the installer (it remembers your prior answers as defaults) or shadow the value in `_bmad/custom/config.toml`.
- `_bmad/custom/config.toml` and `_bmad/custom/config.user.toml` are **never touched** by the installer. This is the correct surface for custom agents, agent descriptor overrides, team-enforced settings, and any value you want to pin regardless of install answers.
### Example — Rebrand an Agent
```toml
# _bmad/custom/config.toml (committed to git, applies to every developer)
[agents.bmad-agent-pm]
description = "Healthcare PM — regulatory-aware, stakeholder-driven, FDA-shaped questions first."
icon = "🏥"
```
The resolver merges over the installer-written `[agents.bmad-agent-pm]`. `bmad-party-mode` and any other roster consumer pick up the new description automatically.
### Example — Add a Fictional Agent
```toml
# _bmad/custom/config.user.toml (personal, gitignored)
[agents.kirk]
team = "startrek"
name = "Captain James T. Kirk"
title = "Starship Captain"
icon = "🖖"
description = "Bold, rule-bending commander. Speaks in dramatic pauses. Thinks aloud about the weight of command."
```
No skill folder required — the essence alone is enough for party-mode to spawn Kirk as a voice. Filter by the `team` field to invite just the Enterprise crew to a roundtable.
### Example — Override Module Install Settings
```toml
# _bmad/custom/config.toml
[modules.bmm]
planning_artifacts = "/shared/org-planning-artifacts"
```
The override wins over whatever each developer answered during their local install. Useful for pinning team conventions.
### When to Use Which Surface
| Need | Use |
|---|---|
| Add MCP tool calls to every dev workflow | Per-skill: `_bmad/custom/bmad-agent-dev.toml` `persistent_facts` |
| Add a menu item to an agent | Per-skill: `_bmad/custom/bmad-agent-{role}.toml` `[[agent.menu]]` |
| Swap a workflow's output template | Per-skill: `_bmad/custom/{workflow}.toml` scalar override |
| Rebrand an agent's public descriptor | **Central**: `_bmad/custom/config.toml` `[agents.<code>]` |
| Add a custom or fictional agent to the roster | **Central**: `_bmad/custom/config.*.toml` new `[agents.<code>]` entry |
| Pin team-enforced install settings | **Central**: `_bmad/custom/config.toml` `[modules.<code>]` or `[core]` |
Use both surfaces in the same project as needed.
## Worked Examples
For enterprise-oriented recipes (shaping an agent across every workflow it dispatches, enforcing org conventions, publishing outputs to Confluence and Jira, customizing the agent roster, and swapping in your own output templates), see [How to Expand BMad for Your Organization](./expand-bmad-for-your-org.md).
## Troubleshooting ## Troubleshooting
**Customization not appearing?** **Changes not appearing?**
- Verify your file is in `_bmad/custom/` with the correct skill name - Run `npx bmad-method install` and select **Quick Update** to apply changes
- Check TOML syntax: strings must be quoted, table headers use `[section]`, array-of-tables use `[[section]]`, and any scalar or array keys for a table must appear *before* any of that table's `[[subtables]]` in the file - Check that your YAML syntax is valid (indentation matters)
- For agents, customization lives under `[agent]` -- fields written below that header belong to `agent` until another table header begins - Verify you edited the correct `.customize.yaml` file for the agent
- Remember `agent.name` and `agent.title` are read-only; overrides there have no effect
**Updates broke my customization?** **Agent not loading?**
- Did you copy the full `customize.toml` into your override file? **Don't.** Override files should contain only the fields you're changing. A full copy locks in old defaults and silently drifts every release. Trim your override back to just the deltas. - Check for YAML syntax errors using an online YAML validator
- Ensure you did not leave fields empty after uncommenting them
- Try reverting to the original template and rebuilding
**Need to see what's customizable?** **Need to reset an agent?**
- Run the `bmad-customize` skill — it enumerates every customizable skill installed in your project, shows which ones already have overrides, and walks you through adding or updating one - Clear or delete the agent's `.customize.yaml` file
- Or read the skill's `customize.toml` directly — every field there is customizable (except `name` and `title`) - Run `npx bmad-method install` and select **Quick Update** to restore defaults
**Need to reset?** ## Workflow Customization
- Delete your override file from `_bmad/custom/` -- the skill falls back to its built-in defaults Customization of existing BMad Method workflows and skills is coming soon.
## Module Customization
Guidance on building expansion modules and customizing existing modules is coming soon.

View File

@ -1,258 +0,0 @@
---
title: 'How to Expand BMad for Your Organization'
description: Five customization patterns that reshape BMad without forking — agent-wide rules, workflow conventions, external publishing, template swaps, and agent roster changes
sidebar:
order: 9
---
BMad's customization surface lets an organization reshape behavior without editing installed files or forking skills. This guide walks through five recipes that cover most enterprise needs.
:::note[Prerequisites]
- BMad installed in your project (see [How to Install BMad](./install-bmad.md))
- Familiarity with the customization model (see [How to Customize BMad](./customize-bmad.md))
- Python 3.11+ on PATH (for the resolver — stdlib only, no `pip install`)
:::
:::tip[Applying these recipes]
The **per-skill recipes** below (Recipes 14) can be applied by running the `bmad-customize` skill and describing the intent — it will pick the right surface, author the override file, and verify the merge. Recipe 5 (central-config overrides to the agent roster) is out of scope for v1 of the skill and remains hand-authored. The recipes here are the source of truth for *what* to override; `bmad-customize` handles the *how* for the agent/workflow surface.
:::
## The Three-Layer Mental Model
Before picking a recipe, know where your override lands:
| Layer | Where overrides live | Scope |
|---|---|---|
| **Agent** (e.g. Amelia, Mary, John) | `[agent]` section of `_bmad/custom/bmad-agent-{role}.toml` | Travels with the persona into **every workflow the agent dispatches** |
| **Workflow** (e.g. product-brief, create-prd) | `[workflow]` section of `_bmad/custom/{workflow-name}.toml` | Applies only to that workflow's run |
| **Central config** | `[agents.*]`, `[core]`, `[modules.*]` in `_bmad/custom/config.toml` | Agent roster (who's available for party-mode, retrospective, elicitation), install-time settings pinned org-wide |
Rule of thumb: if the rule should apply everywhere an engineer does dev work, customize the **dev agent**. If it applies only when someone writes a product brief, customize the **product-brief workflow**. If it changes *who's in the room* (rename an agent, add a custom voice, enforce a shared artifact path), edit **central config**.
## Recipe 1: Shape an Agent Across Every Workflow It Dispatches
**Use case:** Standardize tool use and external system integrations so every workflow dispatched through an agent inherits the behavior. This is the highest-impact pattern.
**Example: Amelia (dev agent) always uses Context7 for library docs, and falls back to Linear when a story isn't found in the epics list.**
```toml
# _bmad/custom/bmad-agent-dev.toml
[agent]
# Applied on every activation. Carries into dev-story, quick-dev,
# create-story, code-review, qa-generate — every skill Amelia dispatches.
persistent_facts = [
"For any library documentation lookup (React, TypeScript, Zod, Prisma, etc.), call the context7 MCP tool (`mcp__context7__resolve_library_id` then `mcp__context7__get_library_docs`) before relying on training-data knowledge. Up-to-date docs trump memorized APIs.",
"When a story reference isn't found in {planning_artifacts}/epics-and-stories.md, search Linear via `mcp__linear__search_issues` using the story ID or title before asking the user to clarify. If Linear returns a match, treat it as the authoritative story source.",
]
```
**Why this works:** Two sentences reshape every dev workflow in the org, with no per-workflow duplication and no source changes. Every new engineer who pulls the repo inherits the conventions automatically.
**Team file vs personal file:**
- `bmad-agent-dev.toml`: committed to git; applies to the whole team
- `bmad-agent-dev.user.toml`: gitignored; personal preferences layered on top
## Recipe 2: Enforce Organizational Conventions Inside a Specific Workflow
**Use case:** Shape the *content* of a workflow's output so it meets compliance, audit, or downstream-consumer requirements.
**Example: every product brief must include compliance fields, and the agent knows about the org's publishing conventions.**
```toml
# _bmad/custom/bmad-product-brief.toml
[workflow]
persistent_facts = [
"Every brief must include an 'Owner' field, a 'Target Release' field, and a 'Security Review Status' field.",
"Non-commercial briefs (internal tools, research projects) must still include a user-value section, but can omit market differentiation.",
"file:{project-root}/docs/enterprise/brief-publishing-conventions.md",
]
```
**What happens:** The facts load during Step 3 of the workflow's activation. When the agent drafts the brief, it knows the required fields and the enterprise conventions document. The shipped default (`file:{project-root}/**/project-context.md`) still loads, since this is an append.
## Recipe 3: Publish Completed Outputs to External Systems
**Use case:** Once the workflow produces its output, automatically publish to enterprise systems of record (Confluence, Notion, SharePoint) and open follow-up work (Jira, Linear, Asana).
**Example: briefs auto-publish to Confluence and offer optional Jira epic creation.**
```toml
# _bmad/custom/bmad-product-brief.toml
[workflow]
# Terminal hook. Scalar override replaces the empty default wholesale.
on_complete = """
Publish and offer follow-up:
1. Read the finalized brief file path from the prior step.
2. Call `mcp__atlassian__confluence_create_page` with:
- space: "PRODUCT"
- parent: "Product Briefs"
- title: the brief's title
- body: the brief's markdown contents
Capture the returned page URL.
3. Tell the user: "Brief published to Confluence: <url>".
4. Ask: "Want me to open a Jira epic for this brief now?"
5. If yes, call `mcp__atlassian__jira_create_issue` with:
- type: "Epic"
- project: "PROD"
- summary: the brief's title
- description: a short summary plus a link back to the Confluence page.
Report the epic key and URL.
6. If no, exit cleanly.
If either MCP tool fails, report the failure, print the brief path,
and ask the user to publish manually.
"""
```
**Why `on_complete` and not `activation_steps_append`:** `on_complete` runs exactly once, at the terminal stage, after the workflow's main output is written. That's the right moment to publish artifacts. `activation_steps_append` runs every activation, before the workflow does its work.
**Tradeoffs:**
- **Confluence publication is non-destructive** and always runs on completion
- **Jira epic creation is visible to the whole team** and kicks off sprint-planning signals, so gate it on user confirmation
- **Graceful fallback:** if MCP tools fail, hand off to the user rather than silently dropping the output
## Recipe 4: Swap in Your Own Output Template
**Use case:** The default output structure doesn't match your organization's expected format, or different orgs in the same repo need different templates.
**Example: point the product-brief workflow at an enterprise-owned template.**
```toml
# _bmad/custom/bmad-product-brief.toml
[workflow]
brief_template = "{project-root}/docs/enterprise/brief-template.md"
```
**How it works:** The workflow's `customize.toml` ships with `brief_template = "resources/brief-template.md"` (bare path, resolves from skill root). Your override points at a file under `{project-root}`, so the agent reads your template in Stage 4 instead of the shipped one.
**Template authoring tips:**
- Keep templates in `{project-root}/docs/` or `{project-root}/_bmad/custom/templates/` so they version alongside the override file
- Use the same structural conventions as the shipped template (section headings, frontmatter); the agent adapts to what's there
- For multi-org repos, use `.user.toml` to let individual teams point at their own templates without touching the committed team file
## Recipe 5: Customize the Agent Roster
**Use case:** Change *who's in the room* for roster-driven skills like `bmad-party-mode`, `bmad-retrospective`, and `bmad-advanced-elicitation`, without editing any source or forking. Three common variants follow.
### 5a. Rebrand a BMad Agent Org-Wide
Every real agent has a descriptor the installer synthesizes from `module.yaml`. Override it to shift voice and framing across every roster consumer:
```toml
# _bmad/custom/config.toml (committed — applies to every developer)
[agents.bmad-agent-analyst]
description = "Mary the Regulatory-Aware Business Analyst — channels Porter and Minto, but lives and breathes FDA audit trails. Speaks like a forensic investigator presenting a case file."
```
Party-mode spawns Mary with the new description. The analyst activation itself still runs normally because Mary's behavior lives in her per-skill `customize.toml`. This override changes how **external skills perceive and introduce her**, not how she works internally.
### 5b. Add a Fictional or Custom Agent
A full descriptor is enough for roster-based features, with no skill folder needed. Useful for personality variety in party mode or brainstorming sessions:
```toml
# _bmad/custom/config.user.toml (personal — gitignored)
[agents.spock]
team = "startrek"
name = "Commander Spock"
title = "Science Officer"
icon = "🖖"
description = "Logic first, emotion suppressed. Begins observations with 'Fascinating.' Never rounds up. Counterpoint to any argument that relies on gut instinct."
[agents.mccoy]
team = "startrek"
name = "Dr. Leonard McCoy"
title = "Chief Medical Officer"
icon = "⚕️"
description = "Country doctor's warmth, short fuse. 'Dammit Jim, I'm a doctor not a ___.' Ethics-driven counterweight to Spock."
```
Ask party-mode to "invite the Enterprise crew." It filters by `team = "startrek"` and spawns Spock and McCoy with those descriptors. Real BMad agents (Mary, Amelia) can sit at the same table if you ask them to.
### 5c. Pin Team Install Settings
The installer prompts each developer for values like `planning_artifacts` path. When the org needs one shared answer across the team, pin it in central config — any developer's local prompt answer gets overridden at resolution time:
```toml
# _bmad/custom/config.toml
[modules.bmm]
planning_artifacts = "{project-root}/shared/planning"
implementation_artifacts = "{project-root}/shared/implementation"
[core]
document_output_language = "English"
```
Personal settings like `user_name`, `communication_language`, or `user_skill_level` stay under each developer's own `_bmad/config.user.toml`. The team file shouldn't touch those.
**Why central config vs per-agent customize.toml:** Per-agent files shape how *one* agent behaves when it activates. Central config shapes what roster consumers *see when they look at the field:* which agents exist, what they're called, what team they belong to, and the shared install settings the whole repo agrees on. Two surfaces, different jobs.
## Reinforce Global Rules in Your IDE's Session File
BMad customizations load when a skill is activated. Many IDE tools also load a global instruction file at the **start of every session**, before any skill runs (`CLAUDE.md`, `AGENTS.md`, `.cursor/rules/`, `.github/copilot-instructions.md`, etc). For rules that should hold even outside BMad skills, restate the critical ones there too.
**When to double up:**
- A rule is important enough that a plain chat conversation (no skill active) should still follow it
- You want belt-and-suspenders enforcement because training-data defaults might otherwise pull the model off-course
- The rule is concise enough to repeat without bloating the session file
**Example: one line in the repo's `CLAUDE.md` reinforcing the dev-agent rule from Recipe 1.**
```markdown
<!-- Any file-read of library docs goes through the context7 MCP tool
(`mcp__context7__resolve_library_id` then `mcp__context7__get_library_docs`)
before relying on training-data knowledge. -->
```
One sentence, loaded every session. It pairs with the `bmad-agent-dev.toml` customization so the rule applies both inside Amelia's workflows and during ad-hoc chats with the assistant. Each layer owns its own scope:
| Layer | Scope | Use for |
|---|---|---|
| IDE session file (`CLAUDE.md` / `AGENTS.md`) | Every session, before any skill activates | Short, universal rules that should survive outside BMad |
| BMad agent customization | Every workflow the agent dispatches | Agent-persona-specific behavior |
| BMad workflow customization | One workflow run | Workflow-specific output shape, publishing hooks, templates |
| BMad central config | Agent roster + shared install settings | Who's in the room and what shared paths the team uses |
Keep the IDE file **succinct**. A dozen well-chosen lines are more effective than a sprawling list. Models read it every turn, and noise crowds out signal.
## Combining Recipes
All five recipes compose. A realistic enterprise override for `bmad-product-brief` might set `persistent_facts` (Recipe 2), `on_complete` (Recipe 3), and `brief_template` (Recipe 4) in one file. The agent-level rule (Recipe 1) lives in a separate file under the agent's name, central config (Recipe 5) pins the shared roster and team settings, and all four apply in parallel.
```toml
# _bmad/custom/bmad-product-brief.toml (workflow-level)
[workflow]
persistent_facts = ["..."]
brief_template = "{project-root}/docs/enterprise/brief-template.md"
on_complete = """ ... """
```
```toml
# _bmad/custom/bmad-agent-analyst.toml (agent-level — Mary dispatches product-brief)
[agent]
persistent_facts = ["Always include a 'Regulatory Review' section when the domain involves healthcare, finance, or children's data."]
```
Result: Mary loads the regulatory-review rule at persona activation. When the user picks the product-brief menu item, the workflow loads its own conventions on top, writes to the enterprise template, and publishes to Confluence on completion. Every layer contributes, and none of them required editing BMad source.
## Troubleshooting
**Override not taking effect?** Check that the file is under `_bmad/custom/` with the exact skill directory name (e.g. `bmad-agent-dev.toml`, not `bmad-dev.toml`). See [How to Customize BMad](./customize-bmad.md#troubleshooting).
**MCP tool name unknown?** Use the exact name the MCP server exposes in the current session. Ask Claude Code to list available MCP tools if unsure. Hardcoded names in `persistent_facts` or `on_complete` won't work if the MCP server isn't connected.
**Pattern doesn't apply to my setup?** The recipes above are illustrative. The underlying machinery (three-layer merge, structural rules, agent-spans-workflow) supports many more patterns; compose them as needed.

View File

@ -1,266 +1,122 @@
--- ---
title: 'How to Install BMad' title: 'How to Install BMad'
description: Install, update, and pin BMad for local development, teams, and CI description: Step-by-step guide to installing BMad in your project
sidebar: sidebar:
order: 1 order: 1
--- ---
Use `npx bmad-method install` to set up BMad in your project. One command handles first installs, upgrades, channel switching, and scripted CI runs. This page covers all of it. Use the `npx bmad-method install` command to set up BMad in your project with your choice of modules and AI tools.
If you want to use a non interactive installer and provide all install options on the command line, see [this guide](./non-interactive-installation.md).
## When to Use This ## When to Use This
- Starting a new project with BMad - Starting a new project with BMad
- Adding or removing modules on an existing install - Adding BMad to an existing codebase
- Switching a module to main-HEAD or pinning to a specific release - Update the existing BMad Installation
- Scripting installs for CI pipelines, Dockerfiles, or enterprise rollouts
:::note[Prerequisites] :::note[Prerequisites]
- **Node.js** 20+ (the installer requires it) - **Node.js** 20+ (required for the installer)
- **Git** (for cloning external modules) - **Git** (recommended)
- **An AI tool** such as Claude Code or Cursor (run `npx bmad-method install --list-tools` to see all supported tools) - **AI tool** (Claude Code, Cursor, or similar)
:::
::: ## Steps
## First-time install (the fast path) ### 1. Run the Installer
```bash ```bash
npx bmad-method install npx bmad-method install
``` ```
The interactive flow asks you five things: :::tip[Want the newest prerelease build?]
Use the `next` dist-tag:
1. Installation directory (defaults to the current working directory)
2. Which modules to install (checkboxes for core, bmm, bmb, cis, gds, tea)
3. **"Ready to install (all stable)?"** — Yes accepts the latest released tag for every external module
4. Which AI tools/IDEs to integrate with (claude-code, cursor, and others)
5. Per-module config (name, language, output folder)
Accept the defaults and you land on the latest stable release of every module, configured for your chosen tool.
:::tip[Just want the newest prerelease?]
```bash ```bash
npx bmad-method@next install npx bmad-method@next install
``` ```
Runs the prerelease installer, which ships a newer snapshot of core and bmm. More churn, fewer delays between development and release. This gets you newer changes earlier, with a higher chance of churn than the default install.
::: :::
## Picking a specific version :::tip[Bleeding edge]
To install the latest from the main branch (may be unstable):
Two independent axes control what ends up on disk. ```bash
npx github:bmad-code-org/BMAD-METHOD install
```
### Axis 1: external module channels
Every external module — bmb, cis, gds, tea, and any community module — installs on one of three channels:
| Channel | What gets installed | Who picks this |
| ------------------ | ---------------------------------------------------------------------------- | --------------------------------------- |
| `stable` (default) | Highest released semver tag. Prereleases like `v2.0.0-alpha.1` are excluded. | Most users |
| `next` | Main branch HEAD at install time | Contributors, early adopters |
| `pinned` | A specific tag you name | Enterprise installs, CI reproducibility |
Channels are per-module. You can run bmb on `next` while leaving cis on `stable` — the flags below let you mix freely.
### Axis 2: installer binary version
The `bmad-method` npm package itself has two dist-tags:
| Command | What you get |
| ------------------------------------- | ----------------------------------------------------------------- |
| `npx bmad-method install` (`@latest`) | Latest stable installer release |
| `npx bmad-method@next install` | Latest prerelease installer, auto-published on every push to main |
**The installer binary determines your core and bmm versions.** Those two modules ship bundled inside the installer package rather than being cloned from separate repos.
### Why core and bmm don't have their own channel
They're stapled to the installer binary you ran:
- `npx bmad-method install` → latest stable core and bmm
- `npx bmad-method@next install` → prerelease core and bmm
- `node /path/to/local-checkout/tools/installer/bmad-cli.js install` → whatever your local checkout has
`--pin bmm=v6.3.0` and `--next=bmm` are silently ineffective against bundled modules, and the installer warns you when you try. A future release extracts bmm from the installer package; once that ships, bmm gets a proper channel selector like bmb has today.
## Updating an existing install
Running `npx bmad-method install` in a directory that already contains `_bmad/` gives you a menu:
| Choice | What it does |
| ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Quick Update** | Re-runs the install with your existing settings. Refreshes files, applies patches and minor stable upgrades, refuses major upgrades. Fast, non-interactive. |
| **Modify Install** | Full interactive flow. Add or remove modules, reconfigure settings, optionally review and switch channels for existing modules. |
### Upgrade prompts
When Modify detects a newer stable tag for a module you've installed on `stable`, it classifies the diff and prompts accordingly:
| Upgrade type | Example | Default |
| ------------ | --------------- | ------- |
| Patch | v1.7.0 → v1.7.1 | Y |
| Minor | v1.7.0 → v1.8.0 | Y |
| Major | v1.7.0 → v2.0.0 | **N** |
Major defaults to N because breaking changes frequently surface as "instability" when they weren't expected. The prompt includes a GitHub release-notes URL so you can read what changed before accepting.
Under `--yes`, patch and minor upgrades apply automatically. Majors stay frozen — pass `--pin <code>=<new-tag>` to accept non-interactively.
### Switching a module's channel
**Interactively:** choose Modify → answer **Yes** to "Review channel assignments?" → each external module offers Keep, Switch to stable, Switch to next, or Pin to a tag.
**Via flags:** the recipes in the next section cover the common cases.
## Headless CI installs
### Flag reference
| Flag | Purpose |
| ------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------- |
| `--yes`, `-y` | Skip all prompts; accept flag values + defaults |
| `--directory <path>` | Install into this directory (default: current working dir) |
| `--modules <a,b,c>` | Exact module set. Core is auto-added. Not a delta — list everything you want kept. |
| `--tools <a,b>` | IDE/tool selection. Required for fresh `--yes` installs. Run `--list-tools` for valid IDs. |
| `--list-tools` | Print all supported tool/IDE IDs (with target directories) and exit. |
| `--action <type>` | `install`, `update`, or `quick-update`. Defaults based on existing install state. |
| `--custom-source <urls>` | Install custom modules from Git URLs or local paths |
| `--channel <stable\|next>` | Apply to all externals (aliased as `--all-stable` / `--all-next`) |
| `--all-stable` | Alias for `--channel=stable` |
| `--all-next` | Alias for `--channel=next` |
| `--next=<code>` | Put one module on next. Repeatable. |
| `--pin <code>=<tag>` | Pin one module to a specific tag. Repeatable. |
| `--set <module>.<key>=<value>` | Set any module config option non-interactively (preferred — see [Module config overrides](#module-config-overrides)). Repeatable. |
| `--list-options [module]` | Print every `--set` key for built-in and locally-cached official modules, then exit. Pass a module code to scope to one module. |
| `--user-name`, `--communication-language`, `--document-output-language`, `--output-folder` | Legacy shortcuts equivalent to `--set core.<key>=<value>` (still supported) |
Precedence when flags overlap: `--pin` beats `--next=` beats `--channel` / `--all-*` beats the registry default (`stable`).
:::note[Example resolution]
`--all-next --pin cis=v0.2.0` puts bmb, gds, and tea on next while pinning cis to v0.2.0.
::: :::
### Recipes ### 2. Choose Installation Location
**Default install — latest stable for everything:** The installer will ask where to install BMad files:
```bash - Current directory (recommended for new projects if you created the directory yourself and ran from within the directory)
npx bmad-method install --yes --modules bmm,bmb,cis --tools claude-code - Custom path
```
**Enterprise pin — reproducible byte-for-byte:** ### 3. Select Your AI Tools
```bash Pick which AI tools you use:
npx bmad-method install --yes \
--modules bmm,bmb,cis \
--pin bmb=v1.7.0 --pin cis=v0.2.0 \
--tools claude-code
```
**Bleeding edge — externals on main HEAD:** - Claude Code
- Cursor
- Others
```bash Each tool has its own way of integrating skills. The installer creates tiny prompt files to activate workflows and agents — it just puts them where your tool expects to find them.
npx bmad-method install --yes --modules bmm,bmb --all-next --tools claude-code
```
**Add a module to an existing install** (keep everything else): :::note[Enabling Skills]
Some platforms require skills to be explicitly enabled in settings before they appear. If you install BMad and don't see the skills, check your platform's settings or ask your AI assistant how to enable skills.
```bash
npx bmad-method install --yes --action update \
--modules bmm,bmb,gds
```
`--tools` is omitted intentionally — `--action update` reuses the tools configured during the first install.
**Mix channels — bmb on next, gds on stable:**
```bash
npx bmad-method install --yes --action update \
--modules bmm,bmb,cis,gds \
--next=bmb
```
### Module config overrides
`--set <module>.<key>=<value>` lets you set any module config option non-interactively. It's repeatable and scales to every module — present and future. The flag is applied as a post-install patch: the installer runs its normal flow first, then `--set` upserts each value into `_bmad/config.toml` (team scope) or `_bmad/config.user.toml` (user scope), and into `_bmad/<module>/config.yaml` so declared values carry forward to the next install.
**Example — install bmm with explicit project knowledge and skill level:**
```bash
npx bmad-method install --yes \
--modules bmm \
--tools claude-code \
--set bmm.project_knowledge=research \
--set bmm.user_skill_level=expert
```
**Discover available keys for a module:**
```bash
npx bmad-method install --list-options bmm
```
`--list-options` (no argument) lists every key the installer can find locally — built-in modules (`core`, `bmm`) plus any currently cached official modules. The cache is per-machine and can be cleared, so previously installed officials won't appear on a fresh checkout or an ephemeral CI worker until they're installed again. Community and custom modules aren't enumerated here; read the module's `module.yaml` directly to see what keys it declares.
**How it works:**
- **Routing.** The patch step looks for `[modules.<module>] <key>` (or `[core] <key>`) in `config.user.toml` first; if found there, it updates that file. Otherwise it writes to the team-scope `config.toml`. So user-scope keys (e.g. `core.user_name`, `bmm.user_skill_level`) end up in `config.user.toml` and team-scope keys end up in `config.toml`, matching the partition the installer uses.
- **Verbatim values.** The value is written exactly as you provided it — no `result:` template rendering. To get the rendered form (e.g. `{project-root}/research`), pass it explicitly: `--set bmm.project_knowledge='{project-root}/research'`.
- **Carry-forward, declared keys.** Values for keys declared in `module.yaml` survive subsequent installs because they're also written to `_bmad/<module>/config.yaml`, which the installer reads as the prompt default on the next run.
- **Carry-forward, undeclared keys.** A value for a key the module's schema doesn't declare lands in `config.toml` for the current install but won't be re-emitted on the next install (the manifest writer's schema-strict partition drops unknown keys). Re-pass `--set` if you need it sticky, or edit `_bmad/config.toml` directly.
- **No validation.** `single-select` values aren't checked against the allowed choices, and unknown keys aren't rejected — whatever you assert is written.
- **Modules not in `--modules`.** Setting a value for a module you didn't include prints a warning and the value is dropped (no file gets created for an uninstalled module).
The legacy core shortcuts (`--user-name`, `--output-folder`, etc.) still work and remain documented for backward compatibility, but `--set core.user_name=...` is equivalent.
:::note[Works with quick-update]
`--set` is a post-install patch, so it applies the same way regardless of action type. Under `bmad install --action quick-update` (or `--yes` against an existing install, where quick-update is the default), `--set` patches the central config files at the end just like a regular install.
::: :::
:::caution[Rate limit on shared IPs] ### 4. Choose Modules
Anonymous GitHub API calls are capped at 60/hour per IP. A single install hits the API once per external module to resolve the stable tag. Offices behind NAT, CI runner pools, and VPNs can collectively exhaust this.
Set `GITHUB_TOKEN=<personal access token>` in the environment to raise the limit to 5000/hour per account. Any public-repo-read PAT works; no scopes are required. The installer shows available modules. Select whichever ones you need — most users just want **BMad Method** (the software development module).
:::
## What got installed ### 5. Follow the Prompts
After any install, `_bmad/_config/manifest.yaml` records exactly what's on disk: The installer guides you through the rest — settings, tool integrations, etc.
```yaml ## What You Get
modules:
- name: bmb ```text
version: v1.7.0 # the tag, or "main" for next your-project/
channel: stable # stable | next | pinned ├── _bmad/
sha: 86033fc9aeae2ca6d52c7cdb675c1f4bf17fc1c1 │ ├── bmm/ # Your selected modules
source: external │ │ └── config.yaml # Module settings (if you ever need to change them)
repoUrl: https://github.com/bmad-code-org/bmad-builder │ ├── core/ # Required core module
│ └── ...
├── _bmad-output/ # Generated artifacts
├── .claude/ # Claude Code skills (if using Claude Code)
│ └── skills/
│ ├── bmad-help/
│ ├── bmad-persona/
│ └── ...
└── .cursor/ # Cursor skills (if using Cursor)
└── skills/
└── ...
``` ```
The `sha` field is written for git-backed modules (external, community, and URL-based custom). Bundled modules (core, bmm) and local-path custom modules don't have one — their code travels with the installer binary or your filesystem, not a cloneable ref. ## Verify Installation
For cross-machine reproducibility, don't rely on rerunning the same `--modules` command. Stable-channel installs resolve to the highest released tag **at install time**, so a later rerun lands on whatever has been released since. Convert the recorded tags from `manifest.yaml` into explicit `--pin` flags on the target machine, e.g.: Run `bmad-help` to verify everything works and see what to do next.
```bash **BMad-Help is your intelligent guide** that will:
npx bmad-method install --yes --modules bmb,cis \
--pin bmb=v1.7.0 --pin cis=v0.4.2 --tools claude-code - Confirm your installation is working
- Show what's available based on your installed modules
- Recommend your first step
You can also ask it questions:
```
bmad-help I just installed, what should I do first?
bmad-help What are my options for a SaaS project?
``` ```
## Troubleshooting ## Troubleshooting
### "Could not resolve stable tag" or "API rate limit exceeded" **Installer throws an error** — Copy-paste the output into your AI assistant and let it figure it out.
You've hit GitHub's 60/hr anonymous limit. Set `GITHUB_TOKEN` and retry. If you already have a token set, it may be expired or rate-limited on its own budget — try a different token or wait for the hourly reset. **Installer worked but something doesn't work later** — Your AI needs BMad context to help. See [How to Get Answers About BMad](./get-answers-about-bmad.md) for how to point your AI at the right sources.
### "Tag 'vX.Y.Z' not found"
The tag you passed to `--pin` doesn't exist in the module's repo. Check the repo's releases page on GitHub for valid tags.
### A pinned install keeps upgrading
Pinned installs don't upgrade. Quick-update applies patches and minors on stable channel only; it won't touch `pinned` or `next`. If a pinned install changed, open `_bmad/_config/manifest.yaml``channel: pinned` plus a fixed `version` and `sha` should hold across runs unless you explicitly override via flags.
### `--pin bmm=X` didn't do anything
bmm is a bundled module — `--pin` and `--next=` don't apply. Use `npx bmad-method@next install` for a prerelease core/bmm, or check out the bmad-bmm repo and run the installer locally to get unreleased changes.

View File

@ -68,7 +68,6 @@ Select **Yes**, then provide a source:
| Input Type | Example | | Input Type | Example |
| --------------------- | ------------------------------------------------- | | --------------------- | ------------------------------------------------- |
| HTTPS URL (any host) | `https://github.com/org/repo` | | HTTPS URL (any host) | `https://github.com/org/repo` |
| HTTP URL (any host) | `http://host/org/repo` |
| HTTPS URL with subdir | `https://github.com/org/repo/tree/main/my-module` | | HTTPS URL with subdir | `https://github.com/org/repo/tree/main/my-module` |
| SSH URL | `git@github.com:org/repo.git` | | SSH URL | `git@github.com:org/repo.git` |
| Local path | `/Users/me/projects/my-module` | | Local path | `/Users/me/projects/my-module` |

View File

@ -1,10 +1,196 @@
--- ---
title: Non-Interactive Installation title: Non-Interactive Installation
description: Headless / CI install docs have moved description: Install BMad using command-line flags for CI/CD pipelines and automated deployments
sidebar: sidebar:
order: 2 order: 2
--- ---
:::note[This page has moved] Use command-line flags to install BMad non-interactively. This is useful for:
Headless and CI install flags, channel selection, and pinning now live in the unified [How to Install BMad](./install-bmad.md) guide. Jump to the [Headless / CI installs](./install-bmad.md#headless-ci-installs) section for the flag reference and copy-paste recipes.
## When to Use This
- Automated deployments and CI/CD pipelines
- Scripted installations
- Batch installations across multiple projects
- Quick installations with known configurations
:::note[Prerequisites]
Requires [Node.js](https://nodejs.org) v20+ and `npx` (included with npm).
:::
## Available Flags
### Installation Options
| Flag | Description | Example |
| --------------------------- | ----------------------------------------------------------------------------------- | ---------------------------------------------- |
| `--directory <path>` | Installation directory | `--directory ~/projects/myapp` |
| `--modules <modules>` | Comma-separated module IDs | `--modules bmm,bmb` |
| `--tools <tools>` | Comma-separated tool/IDE IDs (use `none` to skip) | `--tools claude-code,cursor` or `--tools none` |
| `--action <type>` | Action for existing installations: `install` (default), `update`, or `quick-update` | `--action quick-update` |
| `--custom-source <sources>` | Comma-separated Git URLs or local paths for custom modules | `--custom-source /path/to/module` |
### Core Configuration
| Flag | Description | Default |
| ----------------------------------- | ----------------------------------------------- | --------------- |
| `--user-name <name>` | Name for agents to use | System username |
| `--communication-language <lang>` | Agent communication language | English |
| `--document-output-language <lang>` | Document output language | English |
| `--output-folder <path>` | Output folder path (see resolution rules below) | `_bmad-output` |
#### Output Folder Path Resolution
The value passed to `--output-folder` (or entered interactively) is resolved according to these rules:
| Input type | Example | Resolved as |
| ---------------------------- | -------------------------- | ---------------------------------------------------------- |
| Relative path (default) | `_bmad-output` | `<project-root>/_bmad-output` |
| Relative path with traversal | `../../shared-outputs` | Normalized absolute path — e.g. `/Users/me/shared-outputs` |
| Absolute path | `/Users/me/shared-outputs` | Used as-is — project root is **not** prepended |
The resolved path is what agents and workflows use at runtime when writing output files. Using an absolute path or a traversal-based relative path lets you direct all generated artifacts to a directory outside your project tree — useful for shared or monorepo setups.
### Other Options
| Flag | Description |
| ------------- | ------------------------------------------- |
| `-y, --yes` | Accept all defaults and skip prompts |
| `-d, --debug` | Enable debug output for manifest generation |
## Module IDs
Available module IDs for the `--modules` flag:
- `bmm` — BMad Method Master
- `bmb` — BMad Builder
Check the [BMad registry](https://github.com/bmad-code-org) for available external modules.
## Tool/IDE IDs
Available tool IDs for the `--tools` flag:
**Preferred:** `claude-code`, `cursor`
Run `npx bmad-method install` interactively once to see the full current list of supported tools, or check the [platform codes configuration](https://github.com/bmad-code-org/BMAD-METHOD/blob/main/tools/installer/ide/platform-codes.yaml).
## Installation Modes
| Mode | Description | Example |
| --------------------- | --------------------------------------------- | ------------------------------------------------------------------------------------------------- |
| Fully non-interactive | Provide all flags to skip all prompts | `npx bmad-method install --directory . --modules bmm --tools claude-code --yes` |
| Semi-interactive | Provide some flags; BMad prompts for the rest | `npx bmad-method install --directory . --modules bmm` |
| Defaults only | Accept all defaults with `-y` | `npx bmad-method install --yes` |
| Custom source only | Install core + custom module(s) | `npx bmad-method install --directory . --custom-source /path/to/module --tools claude-code --yes` |
| Without tools | Skip tool/IDE configuration | `npx bmad-method install --modules bmm --tools none` |
## Examples
### CI/CD Pipeline Installation
```bash
#!/bin/bash
# install-bmad.sh
npx bmad-method install \
--directory "${GITHUB_WORKSPACE}" \
--modules bmm \
--tools claude-code \
--user-name "CI Bot" \
--communication-language English \
--document-output-language English \
--output-folder _bmad-output \
--yes
```
### Update Existing Installation
```bash
npx bmad-method install \
--directory ~/projects/myapp \
--action update \
--modules bmm,bmb,custom-module
```
### Quick Update (Preserve Settings)
```bash
npx bmad-method install \
--directory ~/projects/myapp \
--action quick-update
```
### Install from Custom Source
Install a module from a local path or any Git host:
```bash
npx bmad-method install \
--directory . \
--custom-source /path/to/my-module \
--tools claude-code \
--yes
```
Combine with official modules:
```bash
npx bmad-method install \
--directory . \
--modules bmm \
--custom-source https://gitlab.com/myorg/my-module \
--tools claude-code \
--yes
```
:::note[Custom source behavior]
When `--custom-source` is used without `--modules`, only core and the custom modules are installed. Add `--modules` to include official modules as well. See [Install Custom and Community Modules](./install-custom-modules.md) for details.
:::
## What You Get
- A fully configured `_bmad/` directory in your project
- Agents and workflows configured for your selected modules and tools
- A `_bmad-output/` folder for generated artifacts
## Validation and Error Handling
BMad validates all provided flags:
- **Directory** — Must be a valid path with write permissions
- **Modules** — Warns about invalid module IDs (but won't fail)
- **Tools** — Warns about invalid tool IDs (but won't fail)
- **Action** — Must be one of: `install`, `update`, `quick-update`
Invalid values will either:
1. Show an error and exit (for critical options like directory)
2. Show a warning and skip (for optional items)
3. Fall back to interactive prompts (for missing required values)
:::tip[Best Practices]
- Use absolute paths for `--directory` to avoid ambiguity
- Use an absolute path for `--output-folder` when you want artifacts written outside the project tree (e.g. a shared monorepo outputs directory)
- Test flags locally before using in CI/CD pipelines
- Combine with `-y` for truly unattended installations
- Use `--debug` if you encounter issues during installation
:::
## Troubleshooting
### Installation fails with "Invalid directory"
- The directory path must exist (or its parent must exist)
- You need write permissions
- The path must be absolute or correctly relative to the current directory
### Module not found
- Verify the module ID is correct
- External modules must be available in the registry
:::note[Still stuck?]
Run with `--debug` for detailed output, try interactive mode to isolate the issue, or report at <https://github.com/bmad-code-org/BMAD-METHOD/issues>.
::: :::

View File

@ -33,7 +33,7 @@ These docs are organized into four sections based on what you're trying to do:
| **Explanation** | Understanding-oriented. Deep dives into concepts and architecture. Read when you want to know *why*. | | **Explanation** | Understanding-oriented. Deep dives into concepts and architecture. Read when you want to know *why*. |
| **Reference** | Information-oriented. Technical specifications for agents, workflows, and configuration. | | **Reference** | Information-oriented. Technical specifications for agents, workflows, and configuration. |
## Expand and Customize ## Extend and Customize
Want to expand BMad with your own agents, workflows, or modules? The **[BMad Builder](https://bmad-builder-docs.bmad-method.org/)** provides the framework and tools for creating custom extensions, whether you're adding new capabilities to BMad or building entirely new modules from scratch. Want to expand BMad with your own agents, workflows, or modules? The **[BMad Builder](https://bmad-builder-docs.bmad-method.org/)** provides the framework and tools for creating custom extensions, whether you're adding new capabilities to BMad or building entirely new modules from scratch.

View File

@ -17,7 +17,7 @@ This page lists the default BMM (Agile suite) agents that install with BMad Meth
| Agent | Skill ID | Triggers | Primary workflows | | Agent | Skill ID | Triggers | Primary workflows |
| --------------------------- | -------------------- | ---------------------------------- | --------------------------------------------------------------------------------------------------- | | --------------------------- | -------------------- | ---------------------------------- | --------------------------------------------------------------------------------------------------- |
| Analyst (Mary) | `bmad-analyst` | `BP`, `MR`, `DR`, `TR`, `CB`, `WB`, `DP` | Brainstorm, Market Research, Domain Research, Technical Research, Create Brief, PRFAQ Challenge, Document Project | | Analyst (Mary) | `bmad-analyst` | `BP`, `RS`, `CB`, `WB`, `DP` | Brainstorm Project, Research, Create Brief, PRFAQ Challenge, Document Project |
| Product Manager (John) | `bmad-pm` | `CP`, `VP`, `EP`, `CE`, `IR`, `CC` | Create/Validate/Edit PRD, Create Epics and Stories, Implementation Readiness, Correct Course | | Product Manager (John) | `bmad-pm` | `CP`, `VP`, `EP`, `CE`, `IR`, `CC` | Create/Validate/Edit PRD, Create Epics and Stories, Implementation Readiness, Correct Course |
| Architect (Winston) | `bmad-architect` | `CA`, `IR` | Create Architecture, Implementation Readiness | | Architect (Winston) | `bmad-architect` | `CA`, `IR` | Create Architecture, Implementation Readiness |
| Developer (Amelia) | `bmad-agent-dev` | `DS`, `QD`, `QA`, `CR`, `SP`, `CS`, `ER` | Dev Story, Quick Dev, QA Test Generation, Code Review, Sprint Planning, Create Story, Epic Retrospective | | Developer (Amelia) | `bmad-agent-dev` | `DS`, `QD`, `QA`, `CR`, `SP`, `CS`, `ER` | Dev Story, Quick Dev, QA Test Generation, Code Review, Sprint Planning, Create Story, Epic Retrospective |

View File

@ -92,7 +92,7 @@ Workflow skills run a structured, multi-step process without loading an agent pe
| Example skill | Purpose | | Example skill | Purpose |
| --- | --- | | --- | --- |
| `bmad-product-brief` | Create a product brief — guided discovery when your concept is clear | | `bmad-product-brief` | Create a product brief — guided discovery when your concept is clear |
| `bmad-prfaq` | [Working Backwards PRFAQ](../explanation/analysis-phase.md#prfaq-working-backwards) challenge to stress-test your product concept | | `bmad-prfaq` | Working Backwards PRFAQ challenge to stress-test your product concept |
| `bmad-create-prd` | Create a Product Requirements Document | | `bmad-create-prd` | Create a Product Requirements Document |
| `bmad-create-architecture` | Design system architecture | | `bmad-create-architecture` | Design system architecture |
| `bmad-create-epics-and-stories` | Create epics and stories | | `bmad-create-epics-and-stories` | Create epics and stories |

View File

@ -1,826 +0,0 @@
---
title: Hướng dẫn BMAD cho Developer
description: Tài liệu tổng quan bằng tiếng Việt dành cho developer muốn áp dụng BMAD Method từ ý tưởng đến triển khai
---
# BMAD Method — Hướng dẫn toàn diện cho Developer
> **BMAD** (Build More Architect Dreams) là framework phát triển phần mềm hỗ trợ bởi AI, giúp team đi từ ý tưởng đến sản phẩm một cách có cấu trúc, nhất quán và hiệu quả.
---
## Mục lục
1. [BMAD là gì?](#1-bmad-là-gì)
2. [Nguyên lý cốt lõi](#2-nguyên-lý-cốt-lõi)
3. [Kiến trúc hệ thống — Các Agent](#3-kiến-trúc-hệ-thống--các-agent)
4. [Quy trình làm việc — 4 Giai đoạn](#4-quy-trình-làm-việc--4-giai-đoạn)
5. [Chọn nhánh phù hợp](#5-chọn-nhánh-phù-hợp)
6. [Hướng dẫn từng bước áp dụng BMAD](#6-hướng-dẫn-từng-bước-áp-dụng-bmad)
7. [Kiểm thử với BMAD — Hướng dẫn cho QC](#7-kiểm-thử-với-bmad--hướng-dẫn-cho-qc)
8. [Các công cụ hỗ trợ](#8-các-công-cụ-hỗ-trợ)
9. [Cấu trúc thư mục dự án](#9-cấu-trúc-thư-mục-dự-án)
10. [Mẹo và Best Practices](#10-mẹo-và-best-practices)
---
## 1. BMAD là gì?
**BMAD Method** là một hệ thống phối hợp nhiều AI agent chuyên biệt để hỗ trợ toàn bộ vòng đời phát triển phần mềm — từ phân tích ý tưởng, lập kế hoạch, thiết kế kiến trúc, đến triển khai code và kiểm thử.
### Điểm khác biệt so với cách dùng AI thông thường
| Cách thông thường | BMAD Method |
|---|---|
| Hỏi AI từng câu rời rạc | Workflow có cấu trúc, mỗi bước tạo đầu ra cho bước kế tiếp |
| Một AI làm tất cả | Nhiều agent chuyên biệt, mỗi agent hiểu sâu vai trò của mình |
| Không có tài liệu hóa | Mỗi giai đoạn sinh ra tài liệu chuẩn (PRD, Architecture, Stories) |
| Developer phải giám sát liên tục | Agent tự chủ dài hơn, chỉ cần con người tại các điểm kiểm tra quan trọng |
### BMAD phù hợp với ai?
- **Developer** cần xây dựng tính năng nhanh, chất lượng cao
- **Tech Lead / Architect** cần thiết kế hệ thống và phân rã công việc
- **Product Manager** cần định nghĩa yêu cầu rõ ràng
- **QC/Tester** cần sinh test case có truy vết yêu cầu
- **Team nhỏ** muốn áp dụng quy trình chuẩn không cần nhiều overhead
---
## 2. Nguyên lý cốt lõi
### 2.1. Tài liệu là "ngôn ngữ chung" giữa con người và AI
Mỗi giai đoạn trong BMAD sinh ra một tài liệu chuẩn. Tài liệu đó trở thành **đầu vào** cho giai đoạn kế tiếp. Agent AI đọc tài liệu để hiểu context, thay vì phụ thuộc vào lịch sử hội thoại có thể bị mất.
```
Ý tưởng → [Brief/PRFAQ] → PRD → Architecture → Epics/Stories → Code → Tests
```
### 2.2. Phân tách "XÂY GÌ" và "XÂY NHƯ THẾ NÀO"
BMAD tách bạch rõ ràng hai câu hỏi quan trọng nhất:
- **Planning (Giai đoạn 2)**: Trả lời **"XÂY GÌ và vì sao?"** → Đầu ra: PRD
- **Solutioning (Giai đoạn 3)**: Trả lời **"XÂY NHƯ THẾ NÀO?"** → Đầu ra: Architecture + Epics/Stories
> Đây là nguyên lý quan trọng nhất. Nhiều dự án thất bại vì triển khai khi chưa thống nhất được "XÂY GÌ", hoặc bắt đầu code mà chưa quyết định "XÂY NHƯ THẾ NÀO".
### 2.3. Agent chuyên biệt — mỗi vai trò một chuyên gia
BMAD không dùng một AI đa năng mà dùng các agent được cấu hình để đóng vai chuyên gia cụ thể: PM, Architect, Developer, UX Designer, Technical Writer. Mỗi agent có phong cách tư duy, ưu tiên, và workflow riêng.
### 2.4. Con người chỉ tham gia tại các điểm kiểm tra quan trọng
BMAD được thiết kế để AI tự chủ trong phạm vi đã định nghĩa, chỉ đưa con người vào:
- Phê duyệt chuyển giai đoạn (PRD xong → Architect làm việc)
- Review kết quả tổng thể (sau Dev Story, sau epic)
- Quyết định thay đổi hướng (Correct Course)
### 2.5. Có thể mở rộng theo nhu cầu
Ba nhánh lập kế hoạch với độ phức tạp tăng dần:
| Nhánh | Phù hợp với | Story ước tính |
|---|---|---|
| **Quick Flow** | Bug fix, tính năng nhỏ, phạm vi rõ | 115 stories |
| **BMad Method** | Sản phẩm, nền tảng, tính năng phức tạp | 1050+ stories |
| **Enterprise** | Hệ thống tuân thủ, đa tenant, đa team | 30+ stories |
---
## 3. Kiến trúc hệ thống — Các Agent
### 3.1. Các Agent chính
| Agent | Tên nhân vật | Skill ID | Vai trò |
|---|---|---|---|
| **Analyst** | Mary | `bmad-analyst` | Brainstorm, nghiên cứu thị trường/kỹ thuật, tạo Product Brief và PRFAQ |
| **Product Manager** | John | `bmad-pm` | Tạo và quản lý PRD, Epics, Stories, kiểm tra Implementation Readiness |
| **Architect** | Winston | `bmad-architect` | Thiết kế Architecture, ADR, kiểm tra Implementation Readiness |
| **Developer** | Amelia | `bmad-agent-dev` | Triển khai story, tạo test, code review, sprint planning |
| **UX Designer** | Sally | `bmad-ux-designer` | Thiết kế UX specification |
| **Technical Writer** | Paige | `bmad-tech-writer` | Viết tài liệu, cập nhật standards, giải thích khái niệm |
### 3.2. Cách gọi Agent
**Qua Skill** (Claude Code / Cursor):
```
bmad-analyst
bmad-pm
bmad-architect
bmad-agent-dev
```
**Qua Trigger** (sau khi đã nạp agent, gõ mã ngắn trong hội thoại):
| Trigger | Agent | Workflow |
|---|---|---|
| `BP` | Analyst | Brainstorm |
| `CB` | Analyst | Create Brief |
| `CP` | PM | Create PRD |
| `VP` | PM | Validate PRD |
| `EP` | PM | Create Epics & Stories |
| `CA` | Architect | Create Architecture |
| `IR` | PM / Architect | Implementation Readiness |
| `SP` | Developer | Sprint Planning |
| `DS` | Developer | Dev Story |
| `QA` | Developer | QA Test Generation |
| `CR` | Developer | Code Review |
---
## 4. Quy trình làm việc — 4 Giai đoạn
```
┌─────────────────┐ ┌─────────────────┐ ┌──────────────────┐ ┌─────────────────┐
│ Giai đoạn 1 │ │ Giai đoạn 2 │ │ Giai đoạn 3 │ │ Giai đoạn 4 │
│ PHÂN TÍCH │───▶│ LẬP KẾ HOẠCH │───▶│ ĐỊNH HÌNH GIẢI │───▶│ TRIỂN KHAI │
│ (Tùy chọn) │ │ (Bắt buộc) │ │ PHÁP (BMad/Ent) │ │ (Bắt buộc) │
│ │ │ │ │ │ │ │
│ Brief, PRFAQ │ │ PRD, UX Spec │ │ Architecture, │ │ Sprint, Stories, │
│ Research │ │ │ │ Epics, Stories │ │ Code, Test, QA │
└─────────────────┘ └─────────────────┘ └──────────────────┘ └─────────────────┘
```
### Giai đoạn 1: Phân tích (Tùy chọn)
Giai đoạn này giúp khám phá và xác nhận ý tưởng **trước khi** cam kết lập kế hoạch chi tiết. Bỏ qua nếu yêu cầu đã rõ.
**Các công cụ:**
**Brainstorming** — Khi cần khai phá ý tưởng
```
Trigger: BP (trong agent Analyst)
Đầu ra: brainstorming-report.md
```
Sử dụng 60+ kỹ thuật brainstorming, tạo 100+ ý tưởng đa dạng, sau đó phân tích, lọc và đề xuất hướng tiếp cận.
**Product Brief** — Khi concept đã tương đối rõ
```
Trigger: CB (trong agent Analyst)
Đầu ra: product-brief.md
```
Tóm tắt điều hành 12 trang: vấn đề, giải pháp, đối tượng, lợi thế cạnh tranh, rủi ro.
**PRFAQ** — Khi cần stress-test concept
```
Trigger: (hỏi Analyst về PRFAQ)
Đầu ra: prfaq.md
```
Phương pháp "Working Backwards" của Amazon: viết thông cáo báo chí như thể sản phẩm đã tồn tại, sau đó trả lời các câu hỏi khó nhất từ khách hàng. Buộc phải rõ ràng theo hướng lấy khách hàng làm trung tâm.
**Nghiên cứu** — Xác thực giả định
```
Trigger: MR (Market Research), DR (Domain Research), TR (Technical Research)
```
---
### Giai đoạn 2: Lập kế hoạch (Bắt buộc)
Xác định rõ **cần xây gì****cho ai**.
**Tạo PRD** — PM Agent
```
Trigger: CP
Đầu ra: PRD.md
```
PRD bao gồm: mục tiêu sản phẩm, functional requirements (FR), non-functional requirements (NFR), user stories cấp cao, acceptance criteria.
**Thiết kế UX** — UX Designer Agent (Tùy chọn)
```
Trigger: CU
Đầu ra: ux-spec.md
```
Dùng khi UX/UI là yếu tố quan trọng. Bao gồm user flows, component specs, interaction patterns.
**Validate PRD** — PM Agent
```
Trigger: VP
```
Kiểm tra tính đầy đủ, nhất quán, và khả năng triển khai của PRD trước khi chuyển sang giai đoạn 3.
---
### Giai đoạn 3: Định hình giải pháp (Bắt buộc với BMad Method / Enterprise)
Quyết định **xây như thế nào** và phân rã công việc.
**Tạo Architecture** — Architect Agent
```
Trigger: CA
Đầu ra: architecture.md + ADR (Architecture Decision Records)
```
Bao gồm: tech stack, component design, data models, API contracts, deployment strategy, ADR cho các quyết định quan trọng.
**Tạo Epics & Stories** — PM Agent
```
Trigger: EP
Đầu ra: epics/ thư mục với các file story
```
Phân rã PRD và Architecture thành Epics (nhóm tính năng) và Stories (đơn vị công việc cụ thể). Mỗi story có: mô tả, acceptance criteria, technical notes.
**Implementation Readiness Check** — Architect Agent
```
Trigger: IR
Kết quả: PASS / CONCERNS / FAIL
```
Cổng kiểm tra trước khi bắt đầu triển khai. Đảm bảo mọi thứ đã đủ rõ ràng để developer có thể làm việc độc lập.
---
### Giai đoạn 4: Triển khai (Bắt buộc)
Xây dựng từng story một theo thứ tự ưu tiên.
**Sprint Planning** — Developer Agent
```
Trigger: SP
Đầu ra: sprint-status.yaml
```
Xác định stories sẽ làm trong sprint, thứ tự ưu tiên và tracking.
**Dev Story** — Developer Agent
```
Trigger: DS
Đầu ra: Code chạy được + unit/integration tests
```
Agent tự chủ triển khai story theo acceptance criteria. Đọc architecture và project-context để đảm bảo nhất quán.
**Code Review** — Developer Agent
```
Trigger: CR
Kết quả: Approved / Changes Requested
```
Review tự động: correctness, style, security, performance, test coverage.
**QA Test Generation** — Developer Agent
```
Trigger: QA
Đầu ra: API tests + E2E tests
```
Sinh test case cho API và E2E sau khi epic hoàn tất. Chi tiết ở [Mục 7](#7-kiểm-thử-với-bmad--hướng-dẫn-cho-qc).
**Correct Course** — PM Agent
```
Trigger: CC
```
Xử lý thay đổi yêu cầu lớn giữa sprint mà không phá vỡ quy trình.
**Retrospective** — Developer Agent
```
Trigger: ER (Epic Retrospective)
```
Review sau khi hoàn tất một epic. Ghi lại bài học, pattern tốt, vấn đề gặp phải.
---
## 5. Chọn nhánh phù hợp
### Quick Flow — Nhánh nhanh
**Khi nào dùng:**
- Bug fix
- Tính năng nhỏ, phạm vi rõ ràng
- Cập nhật đơn lẻ (115 stories)
- Bạn đã hiểu đầy đủ yêu cầu
**Bỏ qua:** Giai đoạn 1, 2, 3 hoàn toàn
**Dùng:** Quick Dev (`bmad-quick-dev`)
```
Mô tả yêu cầu → Làm rõ ý định → Sinh spec → Triển khai → Review → Done
```
Quick Dev gộp tất cả vào một workflow: làm rõ yêu cầu, lập kế hoạch mini, triển khai, code review, và trình bày kết quả.
---
### BMad Method — Nhánh đầy đủ
**Khi nào dùng:**
- Sản phẩm mới hoặc nền tảng
- Tính năng phức tạp với nhiều dependencies
- 1050+ stories cần phối hợp nhiều developer
**Đi qua:** Giai đoạn 1 (tùy chọn) → 2 → 3 → 4
---
### Enterprise — Nhánh mở rộng
**Khi nào dùng:**
- Hệ thống đa tenant
- Yêu cầu tuân thủ (compliance), security audit
- 30+ stories, nhiều team
- Cần truy vết yêu cầu đầy đủ
**Thêm vào:** Security review, DevOps pipeline, NFR assessment, Test Architect Module (TEA)
---
## 6. Hướng dẫn từng bước áp dụng BMAD
### 6.1. Dự án mới
#### Bước 1: Cài đặt BMAD
```bash
# Yêu cầu: Node.js 20+, Git
npx bmad-method install
```
Trình cài đặt sẽ hỏi:
- IDE đang dùng (Claude Code, Cursor, hoặc tương tự)
- Modules muốn cài (core bắt buộc, thêm TEA nếu cần test nâng cao)
- Nhánh lập kế hoạch (Quick Flow / BMad Method / Enterprise)
#### Bước 2: Khởi động với bmad-help
```
bmad-help
```
Đây là điểm bắt đầu thông minh. Agent sẽ hỏi về dự án của bạn và dẫn bạn đến đúng workflow.
```
bmad-help Tôi có ý tưởng về ứng dụng SaaS quản lý task, bắt đầu từ đâu?
bmad-help Tôi cần thêm tính năng export PDF, dùng quick flow hay đầy đủ?
```
#### Bước 3: Tạo Project Context (khuyến nghị mạnh)
```bash
# Tạo tự động sau khi có architecture
bmad-generate-project-context
# Hoặc tạo thủ công
touch _bmad-output/project-context.md
```
File `project-context.md` là "bản hiến pháp" kỹ thuật của dự án — được tất cả agent tự động nạp:
```markdown
# Project Context
## Technology Stack
- Node.js 20.x, TypeScript 5.3
- React 18.2, Zustand (không dùng Redux)
- PostgreSQL 15, Prisma ORM
- Testing: Vitest, Playwright, MSW
## Critical Implementation Rules
- Bật strict mode — không dùng `any`
- Dùng `interface` cho public API, `type` cho union/intersection
- API calls phải qua `apiClient` singleton
- Components đặt trong `/src/components/` với co-located tests
```
#### Bước 4: Chạy Analysis (nếu cần)
```bash
# Mở agent Analyst
bmad-analyst
# Trong hội thoại, gõ trigger:
BP # Brainstorm ý tưởng
CB # Tạo Product Brief
MR # Research thị trường
```
#### Bước 5: Tạo PRD
```bash
# Mở agent PM
bmad-pm
# Trigger tạo PRD
CP # Create PRD (có hướng dẫn từng bước)
VP # Validate PRD sau khi hoàn thiện
```
#### Bước 6: Tạo Architecture (BMad Method / Enterprise)
```bash
# Mở agent Architect
bmad-architect
# Trigger
CA # Create Architecture
IR # Implementation Readiness Check
```
#### Bước 7: Tạo Epics & Stories
```bash
# Mở agent PM
bmad-pm
# Trigger
EP # Create Epics and Stories
```
#### Bước 8: Triển khai theo Stories
```bash
# Mở agent Developer
bmad-agent-dev
# Mỗi sprint
SP # Sprint Planning
DS # Dev Story (làm từng story)
CR # Code Review
QA # Tạo tests (sau khi epic hoàn tất)
ER # Epic Retrospective
```
---
### 6.2. Dự án đã tồn tại
#### Bước 1: Tạo Project Context từ codebase hiện tại
```bash
# Chạy trong agent Developer hoặc Architect
bmad-generate-project-context
```
Agent sẽ khám phá codebase và tạo `project-context.md` từ:
- `package.json`, `pyproject.toml`, hoặc build files
- Cấu trúc thư mục
- Conventions hiện có trong code
#### Bước 2: Tạo tài liệu index
Tạo hoặc cập nhật `docs/index.md` với:
- Mục tiêu kinh doanh của dự án
- Architecture overview
- Các quy tắc quan trọng cần giữ
#### Bước 3: Chọn cách tiếp cận phù hợp
- **Thay đổi nhỏ** (bug fix, tính năng nhỏ): Dùng `bmad-quick-dev` trực tiếp
- **Thay đổi lớn** (module mới, refactor lớn): Dùng BMad Method đầy đủ từ Giai đoạn 2
#### Bước 4: Quick Dev cho việc nhỏ
```bash
# Mở skill Quick Dev
bmad-quick-dev
# Mô tả yêu cầu, agent sẽ:
# 1. Làm rõ ý định (có người trong vòng lặp)
# 2. Tạo mini-spec nếu cần
# 3. Triển khai tự động
# 4. Code review
# 5. Trình bày kết quả để bạn approve
```
---
### 6.3. Luồng làm việc mẫu — Tính năng mới (BMad Method)
```
Ngày 1-2: Analysis
├── bmad-analyst → CB → product-brief.md
└── (tùy chọn) bmad-analyst → MR → market-research.md
Ngày 2-3: Planning
├── bmad-pm → CP → PRD.md
├── bmad-pm → VP (validate)
└── (nếu có UI) bmad-ux-designer → CU → ux-spec.md
Ngày 3-4: Solutioning
├── bmad-architect → CA → architecture.md
├── bmad-pm → EP → epics/ (stories)
└── bmad-architect → IR → PASS ✓
Ngày 5+: Implementation (lặp lại cho mỗi story)
├── bmad-agent-dev → SP → sprint-status.yaml
├── bmad-agent-dev → DS → code + tests
├── bmad-agent-dev → CR → approved
└── (sau epic) bmad-agent-dev → QA → e2e tests
```
---
## 7. Kiểm thử với BMAD — Hướng dẫn cho QC
BMAD cung cấp hai hướng tiếp cận kiểm thử:
### 7.1. QA tích hợp sẵn — Nhẹ nhàng (Developer Agent)
**Phù hợp với:** Dự án nhỏtrung bình, cần bao phủ test nhanh
**Kích hoạt:**
```bash
# Trong agent Developer
bmad-agent-dev
# Sau khi hoàn tất một epic (tất cả stories đã dev + review xong)
QA # QA Test Generation
```
**5 bước workflow QA:**
1. **Phát hiện framework**: Agent tự nhận diện Jest, Vitest, Playwright, Cypress từ codebase
2. **Xác định tính năng cần test**: Dựa vào stories và acceptance criteria của epic vừa hoàn tất
3. **Tạo API tests**: Status codes, cấu trúc response, happy path, edge cases
4. **Tạo E2E tests**: User workflows, semantic locators (role/label/text — không dùng CSS selector)
5. **Chạy và xác minh**: Tự chạy tests, phát hiện và sửa lỗi ngay
**Các nguyên tắc khi sinh test:**
```typescript
// ✅ Dùng semantic locator
await page.getByRole('button', { name: 'Đăng nhập' }).click()
await page.getByLabel('Email').fill('user@example.com')
// ❌ Không dùng CSS selector cứng
await page.locator('.btn-primary#login').click()
// ✅ Test độc lập, không phụ thuộc thứ tự
test('create task', async () => {
// setup riêng cho test này
})
// ❌ Không hardcode wait/sleep
await page.waitForTimeout(3000) // Không làm thế này
```
**Khi nào dùng:**
- Cần bao phủ test nhanh cho tính năng mới
- Dự án nhỏtrung bình không cần chiến lược kiểm thử nâng cao
- Muốn tự động hóa kiểm thử mà không cần thiết lập phức tạp
---
### 7.2. Module Test Architect (TEA) — Nâng cao
**Phù hợp với:** Dự án lớn, miền nghiệp vụ phức tạp, cần truy vết yêu cầu
**Cài đặt:**
```bash
npx bmad-method install
# Chọn thêm module: TEA (Test Architect)
```
**Agent TEA:** Murat (Master Test Architect)
**9 workflow của TEA:**
| # | Workflow | Mục đích |
|---|---|---|
| 1 | **Test Design** | Tạo chiến lược kiểm thử gắn với yêu cầu (PRD/AC) |
| 2 | **ATDD** | Phát triển hướng Acceptance Test — viết test trước khi code |
| 3 | **Automate** | Tạo automated test với pattern nâng cao |
| 4 | **Test Review** | Kiểm tra chất lượng và độ bao phủ của bộ test |
| 5 | **Traceability** | Liên kết test ngược về yêu cầu trong PRD |
| 6 | **NFR Assessment** | Đánh giá yêu cầu phi chức năng (performance, security, reliability) |
| 7 | **CI Setup** | Cấu hình thực thi test trong CI/CD pipeline |
| 8 | **Framework Scaffolding** | Dựng hạ tầng test cho dự án mới |
| 9 | **Release Gate** | Ra quyết định go/no-go dựa trên chất lượng |
**Hệ thống ưu tiên P0P3:**
| Mức | Ý nghĩa | Ví dụ |
|---|---|---|
| **P0** | Critical — phải pass 100% | Thanh toán, xác thực, bảo mật |
| **P1** | High — phải pass cho release | Core business flow |
| **P2** | Medium — nên pass | Tính năng phụ, edge cases |
| **P3** | Low — test khi có thể | UI detail, minor UX |
**Luồng ATDD với TEA:**
```
QC viết Acceptance Criteria (AC) →
TEA tạo test từ AC (trước khi code) →
Developer implement để test pass →
TEA verify traceability (AC ↔ test ↔ requirement) →
Release Gate go/no-go
```
---
### 7.3. So sánh hai hướng tiếp cận
| Yếu tố | QA tích hợp sẵn | Module TEA |
|---|---|---|
| Thời điểm test | Sau khi epic hoàn tất | Có thể trước khi code (ATDD) |
| Thiết lập | Không cần cài thêm | Cài module riêng |
| Loại test | API + E2E | API, E2E, ATDD, NFR, Performance |
| Truy vết yêu cầu | Không | Có (Traceability workflow) |
| Release gate | Không | Có (go/no-go) |
| Phù hợp nhất | Dự án nhỏtrung bình | Dự án lớn, có compliance |
---
### 7.4. Vị trí kiểm thử trong vòng đời dự án
```
Story 1: Dev → Code Review → ✓
Story 2: Dev → Code Review → ✓
Story 3: Dev → Code Review → ✓
...
Epic hoàn tất → QA Test Generation → Tests pass → Epic Retrospective
```
> **Lưu ý:** QA Test Generation chạy **sau khi toàn bộ epic hoàn tất**, không phải sau từng story. Mục đích là kiểm thử tích hợp các stories với nhau.
---
### 7.5. Edge Case Hunter — Công cụ tìm trường hợp biên
Ngoài QA workflow, Developer Agent còn hỗ trợ:
```bash
# Trong hội thoại với Developer Agent
bmad-review-edge-case-hunter
```
Phân tích toàn bộ nhánh điều kiện trong code để tìm:
- Trường hợp biên chưa được xử lý
- Null/undefined checks bị thiếu
- Điều kiện race condition
- Input validation gaps
---
## 8. Các công cụ hỗ trợ
### 8.1. Party Mode — Thảo luận đa agent
```bash
bmad-party-mode
```
Triệu tập nhiều agent vào cùng một hội thoại để thảo luận các quyết định quan trọng:
- **Kiến trúc**: PM + Architect + Developer cùng đánh giá trade-off
- **Tính năng phức tạp**: UX Designer + Architect + PM
- **Post-mortem**: Tất cả agent cùng phân tích sự cố
- **Sprint retrospective**: PM + Developer + QC
### 8.2. Advanced Elicitation — Tinh luyện đầu ra
```bash
bmad-advanced-elicitation
```
Buộc AI xem xét lại đầu ra bằng các phương pháp:
| Phương pháp | Mục đích |
|---|---|
| **Pre-mortem** | Giả sử thất bại → lần ngược nguyên nhân |
| **First Principles** | Loại bỏ giả định, bắt đầu từ sự thật cơ bản |
| **Red Team / Blue Team** | Tự tấn công, tự bảo vệ |
| **Socratic Questioning** | Chất vấn mọi khẳng định |
| **Constraint Removal** | Bỏ ràng buộc → thấy giải pháp khác |
| **Stakeholder Mapping** | Đánh giá từ góc nhìn từng bên liên quan |
Dùng sau khi có một tài liệu quan trọng (PRD, Architecture) để tìm điểm yếu trước khi tiếp tục.
### 8.3. Adversarial Review — Review hoài nghi
```bash
bmad-review-adversarial-general
```
Review kiểu "devil's advocate" — giả định vấn đề luôn tồn tại:
- Phải tìm được tối thiểu 10 vấn đề
- Tìm những gì **còn thiếu**, không chỉ những gì sai
- Trực giao với Edge Case Hunter
### 8.4. Distillator — Nén tài liệu cho LLM
```bash
bmad-distillator
```
Khi tài liệu quá lớn (PRD dài, Architecture phức tạp), Distillator nén nội dung tối ưu cho LLM mà không mất thông tin quan trọng.
### 8.5. Shard Large Documents — Tách file lớn
```bash
bmad-shard-doc
```
Tách file markdown lớn thành các file phần nhỏ hơn, với index tự động.
---
## 9. Cấu trúc thư mục dự án
Sau khi cài BMAD và chạy qua các giai đoạn, dự án sẽ có cấu trúc:
```
your-project/
├── _bmad/ # Cấu hình BMAD (không chỉnh sửa thủ công)
│ ├── core/ # Module core
│ └── bmm/ # Modules đã cài (TEA, v.v.)
├── _bmad-output/ # Tất cả artifacts sinh ra
│ ├── project-context.md # Bản hiến pháp kỹ thuật của dự án
│ ├── planning-artifacts/
│ │ ├── product-brief.md # Giai đoạn 1 output
│ │ ├── PRD.md # Giai đoạn 2 output
│ │ ├── ux-spec.md # Giai đoạn 2 output (nếu có)
│ │ ├── architecture.md # Giai đoạn 3 output
│ │ └── epics/ # Giai đoạn 3 output
│ │ ├── epic-1-auth/
│ │ │ ├── story-1-login.md
│ │ │ ├── story-2-register.md
│ │ │ └── story-3-reset-password.md
│ │ └── epic-2-dashboard/
│ └── implementation-artifacts/
│ └── sprint-status.yaml # Tracking sprint
├── .claude/skills/ # Skills cho Claude Code
│ ├── bmad-pm.md
│ ├── bmad-architect.md
│ └── ...
├── docs/ # Tài liệu dự án
│ └── index.md # Overview, goals, architecture notes
└── src/ # Source code dự án
```
---
## 10. Mẹo và Best Practices
### Chat mới cho mỗi workflow
> Luôn bắt đầu một hội thoại mới khi chuyển sang workflow khác.
Mỗi workflow của BMAD thiết kế để chạy trong context rõ ràng. Việc tiếp tục hội thoại cũ có thể gây ra nhiễu context, đặc biệt với các workflow dài.
### Đọc kỹ `project-context.md` trước khi bắt đầu sprint
Tất cả agent developer tự động nạp `project-context.md`. Đảm bảo file này luôn cập nhật với:
- Tech stack và phiên bản chính xác
- Quy tắc implementation quan trọng
- Patterns đang dùng trong codebase
### Kiến trúc là bắt buộc khi có nhiều developer
Nếu nhiều agent (hoặc developer) làm việc song song trên các stories khác nhau, kiến trúc phải được định nghĩa trước. Thiếu kiến trúc → các agent tạo ra code xung đột nhau.
### Dùng bmad-help khi không chắc
```
bmad-help Tôi đang ở đâu trong workflow?
bmad-help Story này nên dùng Quick Flow hay Dev Story?
bmad-help Implementation Readiness check thất bại, làm gì tiếp?
```
### Quick Flow không có nghĩa là không có chất lượng
Quick Dev vẫn có code review, vẫn tạo spec (mini), vẫn yêu cầu người approve kết quả. "Nhanh" ở đây là bỏ overhead lập kế hoạch không cần thiết, không phải bỏ qua chất lượng.
### Customize agent theo nhu cầu team
```yaml
# .customize.yaml
agents:
bmad-agent-dev:
persona: "Senior developer theo hướng TDD, luôn viết test trước"
rules:
- "Mọi function public phải có unit test"
- "Không dùng any trong TypeScript"
```
### Vị trí QA trong workflow
```
❌ Sai: Test sau mỗi story ngay lập tức
✅ Đúng: Test sau khi toàn bộ epic hoàn tất (Dev + Code Review cho tất cả stories)
```
E2E test cần toàn bộ tính năng của epic để test integration. Test sớm hơn sẽ gặp dependency chưa sẵn sàng.
---
## Tài liệu tham khảo
| Tài liệu | Đường dẫn |
|---|---|
| Getting Started | [tutorials/getting-started.md](tutorials/getting-started.md) |
| Danh sách Agents | [reference/agents.md](reference/agents.md) |
| Workflow Map | [reference/workflow-map.md](reference/workflow-map.md) |
| Testing Reference | [reference/testing.md](reference/testing.md) |
| Core Tools | [reference/core-tools.md](reference/core-tools.md) |
| Modules | [reference/modules.md](reference/modules.md) |
| Dự án đã tồn tại | [how-to/established-projects.md](how-to/established-projects.md) |
| Project Context | [explanation/project-context.md](explanation/project-context.md) |
| Quick Dev | [explanation/quick-dev.md](explanation/quick-dev.md) |
| Why Solutioning Matters | [explanation/why-solutioning-matters.md](explanation/why-solutioning-matters.md) |
| Cài đặt BMAD | [how-to/install-bmad.md](how-to/install-bmad.md) |
---
*Tài liệu này được tổng hợp từ bản dịch tiếng Việt của BMAD Method Documentation. Cập nhật lần cuối: 2026-04-15.*

View File

@ -1,53 +1,53 @@
--- ---
title: "Giai đoạn phân tích: từ ý tưởng đến nền tảng" title: "Giai đoạn Analysis: từ ý tưởng đến nền tảng"
description: Động não, nghiên cứu, product brief và PRFAQ là gì, và nên dùng từng công cụ khi nào description: Brainstorming, research, product brief và PRFAQ là gì, và nên dùng từng công cụ khi nào
sidebar: sidebar:
order: 1 order: 1
--- ---
Giai đoạn phân tích (giai đoạn 1) giúp bạn suy nghĩ rõ ràng về sản phẩm trước khi cam kết bắt tay vào xây dựng. Mọi công cụ trong giai đoạn này đều là tùy chọn, nhưng nếu bỏ qua toàn bộ phần phân tích thì PRD của bạn sẽ được dựng trên giả định thay vì hiểu biết thực chất. Giai đoạn Analysis (Phase 1) giúp bạn suy nghĩ rõ ràng về sản phẩm trước khi cam kết bắt tay vào xây dựng. Mọi công cụ trong giai đoạn này đều là tùy chọn, nhưng nếu bỏ qua toàn bộ phần analysis thì PRD của bạn sẽ được dựng trên giả định thay vì insight.
## Vì sao cần phân tích trước khi lập kế hoạch? ## Vì sao cần Analysis trước Planning?
PRD trả lời câu hỏi "chúng ta nên xây gì và vì sao?". Nếu đầu vào của nó là những suy nghĩ mơ hồ, bạn sẽ nhận lại một PRD mơ hồ, và mọi tài liệu phía sau đều kế thừa chính sự mơ hồ đó. Kiến trúc dựng trên một PRD yếu sẽ đặt cược sai về mặt kỹ thuật. Các story sinh ra từ một kiến trúc yếu sẽ bỏ sót trường hợp biên. Chi phí sẽ dồn lên theo từng tầng. PRD trả lời câu hỏi "chúng ta nên xây gì và vì sao?". Nếu đầu vào của nó là những suy nghĩ mơ hồ, bạn sẽ nhận lại một PRD mơ hồ, và mọi tài liệu phía sau đều kế thừa chính sự mơ hồ đó. Kiến trúc dựng trên một PRD yếu sẽ đặt cược sai về mặt kỹ thuật. Stories sinh ra từ một kiến trúc yếu sẽ bỏ sót edge case. Chi phí sẽ dồn lên theo từng tầng.
Các công cụ phân tích tồn tại để làm PRD của bạn sắc bén hơn. Chúng tiếp cận vấn đề từ nhiều góc độ khác nhau: khám phá sáng tạo, thực tế thị trường, độ rõ ràng về khách hàng, tính khả thi. Nhờ vậy, đến khi bạn ngồi xuống làm việc với agent PM, bạn đã biết mình đang xây cái gì và cho ai. Các công cụ analysis tồn tại để làm PRD của bạn sắc bén hơn. Chúng tiếp cận vấn đề từ nhiều góc độ khác nhau: khám phá sáng tạo, thực tế thị trường, độ rõ ràng về khách hàng, tính khả thi. Nhờ vậy, đến khi bạn ngồi xuống làm việc với PM agent, bạn đã biết mình đang xây cái gì và cho ai.
## Các công cụ ## Các công cụ
### Động não ### Brainstorming
**Nó là gì.** Một phiên sáng tạo có điều phối, sử dụng các kỹ thuật phát ý tưởng đã được kiểm chứng. AI đóng vai trò như người huấn luyện, kéo ý tưởng ra từ bạn thông qua các bài tập có cấu trúc, chứ không nghĩ thay cho bạn. **Nó là gì.** Một phiên sáng tạo có điều phối, sử dụng các kỹ thuật ideation đã được kiểm chứng. AI đóng vai trò như người huấn luyện, kéo ý tưởng ra từ bạn thông qua các bài tập có cấu trúc, chứ không nghĩ thay cho bạn.
**Vì sao nó có mặt ở đây.** Ý tưởng thô cần không gian để phát triển trước khi bị khóa cứng thành yêu cầu. Động não tạo ra khoảng không đó. Nó đặc biệt có giá trị khi bạn có một miền vấn đề nhưng chưa có lời giải rõ ràng, hoặc khi bạn muốn khám phá nhiều hướng trước khi cam kết. **Vì sao nó có mặt ở đây.** Ý tưởng thô cần không gian để phát triển trước khi bị khóa cứng thành requirement. Brainstorming tạo ra khoảng không đó. Nó đặc biệt có giá trị khi bạn có một miền vấn đề nhưng chưa có lời giải rõ ràng, hoặc khi bạn muốn khám phá nhiều hướng trước khi commit.
**Khi nào nên dùng.** Bạn có một hình dung mơ hồ về thứ mình muốn xây nhưng chưa kết tinh được thành khái niệm rõ ràng. Hoặc bạn đã có ý tưởng ban đầu nhưng muốn kiểm chứng độ vững của nó bằng các phương án thay thế. **Khi nào nên dùng.** Bạn có một hình dung mơ hồ về thứ mình muốn xây nhưng chưa kết tinh được thành khái niệm rõ ràng. Hoặc bạn đã có concept ban đầu nhưng muốn pressure-test nó với các phương án thay thế.
Xem [Brainstorming](./brainstorming.md) để hiểu sâu hơn về cách một phiên làm việc diễn ra. Xem [Brainstorming](./brainstorming.md) để hiểu sâu hơn về cách một phiên làm việc diễn ra.
### Nghiên cứu (thị trường, miền nghiệp vụ, kỹ thuật) ### Research (Thị trường, miền nghiệp vụ, kỹ thuật)
**Nó là gì.** Ba quy trình nghiên cứu tập trung vào các chiều khác nhau của ý tưởng. Nghiên cứu thị trường xem xét đối thủ, xu hướng và cảm nhận của người dùng. Nghiên cứu miền nghiệp vụ xây dựng hiểu biết về lĩnh vực và thuật ngữ. Nghiên cứu kỹ thuật đánh giá tính khả thi, các lựa chọn kiến trúc và hướng triển khai. **Nó là gì.** Ba workflow nghiên cứu tập trung vào các chiều khác nhau của ý tưởng. Market research xem xét đối thủ, xu hướng và cảm nhận của người dùng. Domain research xây dựng hiểu biết về miền nghiệp vụ và thuật ngữ. Technical research đánh giá tính khả thi, các lựa chọn kiến trúc và hướng triển khai.
**Vì sao nó có mặt ở đây.** Xây dựng dựa trên giả định là con đường nhanh nhất để tạo ra thứ chẳng ai cần. Nghiên cứu đặt ý tưởng của bạn xuống mặt đất: đối thủ nào đã tồn tại, người dùng thực sự đang vật lộn với điều gì, điều gì khả thi về kỹ thuật, và bạn sẽ phải đối mặt với những ràng buộc đặc thù ngành nào. **Vì sao nó có mặt ở đây.** Xây dựng dựa trên giả định là con đường nhanh nhất để tạo ra thứ chẳng ai cần. Research đặt concept của bạn xuống mặt đất: đối thủ nào đã tồn tại, người dùng thực sự đang vật lộn với điều gì, điều gì khả thi về kỹ thuật, và bạn sẽ phải đối mặt với những ràng buộc đặc thù ngành nào.
**Khi nào nên dùng.** Bạn đang bước vào một miền mới, nghi ngờ có đối thủ nhưng chưa lập bản đồ được, hoặc ý tưởng của bạn phụ thuộc vào những năng lực kỹ thuật mà bạn chưa kiểm chứng. Có thể chạy một, hai, hoặc cả ba; mỗi quy trình đều đứng độc lập. **Khi nào nên dùng.** Bạn đang bước vào một miền mới, nghi ngờ có đối thủ nhưng chưa lập bản đồ được, hoặc concept của bạn phụ thuộc vào những năng lực kỹ thuật mà bạn chưa kiểm chứng. Có thể chạy một, hai, hoặc cả ba; mỗi workflow đều đứng độc lập.
### Product Brief ### Product Brief
**Nó là gì.** Một phiên discovery có hướng dẫn, tạo ra bản tóm tắt điều hành 1-2 trang cho concept sản phẩm của bạn. AI đóng vai trò Business Analyst cộng tác, giúp bạn diễn đạt tầm nhìn, đối tượng mục tiêu, giá trị cốt lõi và phạm vi. **Nó là gì.** Một phiên discovery có hướng dẫn, tạo ra bản tóm tắt điều hành 1-2 trang cho concept sản phẩm của bạn. AI đóng vai trò Business Analyst cộng tác, giúp bạn diễn đạt tầm nhìn, đối tượng mục tiêu, giá trị cốt lõi và phạm vi.
**Vì sao nó có mặt ở đây.** Product brief là con đường nhẹ nhàng hơn để đi vào giai đoạn lập kế hoạch. Nó ghi lại tầm nhìn chiến lược của bạn theo định dạng có cấu trúc và đưa thẳng vào quá trình tạo PRD. Nó hoạt động tốt nhất khi bạn đã có niềm tin tương đối chắc vào ý tưởng của mình: bạn biết khách hàng là ai, vấn đề là gì, và đại khái muốn xây gì. Brief sẽ tổ chức lại và làm sắc nét lối suy nghĩ đó. **Vì sao nó có mặt ở đây.** Product brief là con đường nhẹ nhàng hơn để đi vào planning. Nó ghi lại tầm nhìn chiến lược của bạn theo định dạng có cấu trúc và đưa thẳng vào quá trình tạo PRD. Nó hoạt động tốt nhất khi bạn đã có niềm tin tương đối chắc vào concept của mình: bạn biết khách hàng là ai, vấn đề là gì, và đại khái muốn xây gì. Brief sẽ tổ chức lại và làm sắc nét lối suy nghĩ đó.
**Khi nào nên dùng.** Ý tưởng của bạn đã tương đối rõ và bạn muốn ghi lại nó một cách hiệu quả trước khi tạo PRD. Bạn tin vào hướng đi hiện tại và không cần bị thách thức giả định một cách quá quyết liệt. **Khi nào nên dùng.** Concept của bạn đã tương đối rõ và bạn muốn ghi lại nó một cách hiệu quả trước khi tạo PRD. Bạn tin vào hướng đi hiện tại và không cần bị thách thức giả định một cách quá quyết liệt.
### PRFAQ (Working Backwards) ### PRFAQ (Working Backwards)
**Nó là gì.** Phương pháp Working Backwards của Amazon được chuyển thành một thử thách tương tác. Bạn viết thông cáo báo chí công bố sản phẩm hoàn thiện trước khi tồn tại dù chỉ một dòng code, rồi trả lời những câu hỏi khó nhất mà khách hàng và stakeholder sẽ đặt ra. AI đóng vai trò product coach dai dẳng nhưng mang tính xây dựng. **Nó là gì.** Phương pháp Working Backwards của Amazon được chuyển thành một thử thách tương tác. Bạn viết thông cáo báo chí công bố sản phẩm hoàn thiện trước khi tồn tại dù chỉ một dòng code, rồi trả lời những câu hỏi khó nhất mà khách hàng và stakeholder sẽ đặt ra. AI đóng vai trò product coach dai dẳng nhưng mang tính xây dựng.
**Vì sao nó có mặt ở đây.** PRFAQ là con đường nghiêm ngặt hơn để đi vào giai đoạn lập kế hoạch. Nó buộc bạn đạt đến sự rõ ràng theo hướng lấy khách hàng làm trung tâm bằng cách bắt bạn bảo vệ từng phát biểu. Nếu bạn không viết nổi một thông cáo báo chí đủ thuyết phục, sản phẩm đó chưa sẵn sàng. Nếu phần FAQ lộ ra những khoảng trống, đó chính là những khoảng trống mà bạn sẽ phát hiện muộn hơn rất nhiều, và với chi phí lớn hơn nhiều, trong lúc triển khai. Bài kiểm tra này bóc tách lối suy nghĩ yếu ngay từ sớm, khi chi phí sửa còn rẻ nhất. **Vì sao nó có mặt ở đây.** PRFAQ là con đường nghiêm ngặt hơn để đi vào planning. Nó buộc bạn đạt đến sự rõ ràng theo hướng customer-first bằng cách bắt bạn bảo vệ từng phát biểu. Nếu bạn không viết nổi một thông cáo báo chí đủ thuyết phục, sản phẩm đó chưa sẵn sàng. Nếu phần FAQ lộ ra những khoảng trống, đó chính là những khoảng trống mà bạn sẽ phát hiện muộn hơn rất nhiều, và với chi phí lớn hơn nhiều, trong lúc triển khai. Bài kiểm tra này bóc tách lối suy nghĩ yếu ngay từ sớm, khi chi phí sửa còn rẻ nhất.
**Khi nào nên dùng.** Bạn muốn kiểm tra độ vững của ý tưởng trước khi cam kết tài nguyên. Bạn chưa chắc người dùng có thực sự quan tâm hay không. Bạn muốn xác nhận rằng mình có thể diễn đạt một giá trị cốt lõi rõ ràng và có thể bảo vệ được. Hoặc đơn giản là bạn muốn dùng sự kỷ luật của Working Backwards để làm suy nghĩ của mình sắc bén hơn. **Khi nào nên dùng.** Bạn muốn stress-test concept trước khi commit tài nguyên. Bạn chưa chắc người dùng có thực sự quan tâm hay không. Bạn muốn xác nhận rằng mình có thể diễn đạt một value proposition rõ ràng và có thể bảo vệ được. Hoặc đơn giản là bạn muốn dùng sự kỷ luật của Working Backwards để làm suy nghĩ của mình sắc bén hơn.
## Tôi nên dùng cái nào? ## Tôi nên dùng cái nào?
@ -65,6 +65,6 @@ Product Brief và PRFAQ đều tạo ra đầu vào cho PRD. Hãy chọn một t
Hãy chạy `bmad-help` và mô tả tình huống của bạn. Nó sẽ gợi ý điểm bắt đầu phù hợp dựa trên những gì bạn đã làm và điều bạn đang muốn đạt được. Hãy chạy `bmad-help` và mô tả tình huống của bạn. Nó sẽ gợi ý điểm bắt đầu phù hợp dựa trên những gì bạn đã làm và điều bạn đang muốn đạt được.
::: :::
## Sau giai đoạn phân tích thì chuyện gì xảy ra? ## Sau Analysis thì chuyện gì xảy ra?
Đầu ra từ giai đoạn phân tích đi thẳng vào giai đoạn 2, lập kế hoạch. Quy trình tạo PRD chấp nhận product brief, tài liệu PRFAQ, kết quả nghiên cứu và báo cáo động não làm đầu vào. Nó sẽ tổng hợp bất cứ thứ gì bạn đã tạo thành các yêu cầu có cấu trúc. Bạn làm phân tích càng kỹ, PRD của bạn càng sắc. Output từ Analysis đi thẳng vào Phase 2 (Planning). Workflow tạo PRD chấp nhận product brief, tài liệu PRFAQ, kết quả research và báo cáo brainstorming làm đầu vào. Nó sẽ tổng hợp bất cứ thứ gì bạn đã tạo thành các requirement có cấu trúc. Bạn làm analysis càng kỹ, PRD của bạn càng sắc.

View File

@ -1,92 +0,0 @@
---
title: "Xem trước Checkpoint"
description: Review có người trong vòng lặp với hỗ trợ của LLM, dẫn bạn đi qua thay đổi từ mục đích đến chi tiết
sidebar:
order: 3
---
`bmad-checkpoint-preview` là một workflow review tương tác có người trong vòng lặp với hỗ trợ của LLM. Nó dẫn bạn đi qua một thay đổi mã nguồn, từ mục đích và bối cảnh đến các chi tiết quan trọng, để bạn có thể quyết định có nên phát hành, làm lại, hay đào sâu thêm.
![Sơ đồ workflow Checkpoint Preview](/diagrams/checkpoint-preview-diagram.png)
## Luồng điển hình
Bạn chạy `bmad-quick-dev`. Nó làm rõ ý định của bạn, dựng spec, triển khai thay đổi, rồi khi xong sẽ nối thêm một review trail vào file spec và mở file đó trong editor. Bạn nhìn vào spec và thấy thay đổi này chạm tới 20 file, trải trên nhiều module.
Bạn có thể tự liếc diff. Nhưng khoảng 20 file là lúc cách đó bắt đầu kém hiệu quả: bạn mất mạch, bỏ sót liên hệ giữa hai thay đổi ở xa nhau, hoặc duyệt một thứ mà bạn chưa thực sự hiểu. Thay vì vậy, bạn nói "checkpoint" và LLM sẽ dẫn bạn đi qua thay đổi.
Điểm bàn giao đó, từ triển khai tự động quay lại phán đoán của con người, chính là tình huống sử dụng chính. Quick-dev có thể chạy khá lâu với rất ít giám sát. Checkpoint Preview là nơi bạn cầm lại tay lái.
## Vì sao nó tồn tại
Code review có hai kiểu thất bại. Kiểu đầu là người review lướt qua diff, không thấy gì nổi bật và bấm duyệt. Kiểu thứ hai là họ đọc rất kỹ từng file nhưng lại mất mạch tổng thể, thấy từng cái cây mà bỏ lỡ cả khu rừng. Cả hai đều dẫn tới cùng một kết quả: lần review đã không bắt được điều thực sự quan trọng.
Vấn đề cốt lõi nằm ở thứ tự tiếp nhận. Một raw diff trình bày thay đổi theo thứ tự file, gần như không bao giờ là thứ tự giúp xây dựng hiểu biết. Bạn thấy một helper function trước khi biết vì sao nó tồn tại. Bạn thấy một schema change trước khi hiểu tính năng nào đang dùng nó. Người review phải tự dựng lại ý đồ của tác giả từ những manh mối rời rạc, và chính ở bước dựng lại đó sự tập trung thường bị đứt.
Checkpoint Preview giải quyết việc này bằng cách để LLM làm phần dựng lại. Nó đọc diff, spec nếu có, và codebase xung quanh, rồi trình bày thay đổi theo một thứ tự phục vụ việc hiểu, chứ không theo `git diff`.
## Nó hoạt động như thế nào
Workflow này có năm bước. Mỗi bước xây trên bước trước, dần dần chuyển từ "đây là gì?" sang "chúng ta có nên phát hành nó không?"
### 1. Định hướng
Workflow xác định thay đổi đó là gì, từ PR, commit, branch, file spec, hoặc trạng thái git hiện tại, rồi tạo một câu tóm tắt ý định và vài số liệu bề mặt: số file thay đổi, số module bị chạm tới, số dòng logic, số lần băng qua ranh giới, và các public interface mới.
Đây là khoảnh khắc "đúng là thứ tôi đang nghĩ tới chứ?". Trước khi đọc mã, người review xác nhận mình đang nhìn đúng thay đổi và cân chỉnh kỳ vọng về phạm vi.
### 2. Dẫn giải thay đổi (Walkthrough)
Thay đổi được tổ chức theo **mối quan tâm** như validation đầu vào hay API contract, thay vì theo file. Mỗi mối quan tâm có một giải thích ngắn về *vì sao* cách tiếp cận này được chọn, kèm theo các điểm dừng `path:line` có thể bấm để người review đi theo xuyên suốt code.
Đây là bước dùng phán đoán về thiết kế. Người review đánh giá xem hướng tiếp cận có đúng với hệ thống hay không, chứ chưa phải xem code có chính xác tuyệt đối hay không. Các mối quan tâm được sắp từ trên xuống: ý định cấp cao trước, phần triển khai hỗ trợ sau. Người review sẽ không gặp tham chiếu tới thứ mà họ chưa thấy.
### 3. Soi chi tiết
Sau khi người review đã hiểu thiết kế, workflow sẽ đưa ra 2 đến 5 điểm mà nếu sai thì hậu quả lan rộng nhất. Chúng được gắn nhãn theo loại rủi ro như `[auth]`, `[schema]`, `[billing]`, `[public API]`, `[security]` và các nhãn khác, đồng thời được sắp theo mức độ thiệt hại nếu sai.
Đây không phải là một cuộc săn bug. Tính đúng đắn được CI và test tự động lo phần lớn. Bước soi chi tiết nhằm kích hoạt ý thức về rủi ro: "đây là những chỗ mà nếu sai thì cái giá phải trả cao nhất". Nếu muốn đào sâu một khu vực cụ thể, bạn có thể nói "đào sâu vào [khu vực]" để chạy một lần review lại tập trung vào tính đúng đắn.
Nếu spec trước đó đã đi qua các vòng adversarial review, các phát hiện liên quan cũng được đưa ra ở đây. Không phải các bug đã được sửa, mà là những quyết định mà vòng review đó từng gắn cờ để người review hiện tại biết.
### 4. Kiểm thử
Workflow gợi ý 2 đến 5 cách quan sát thủ công để thấy thay đổi thực sự hoạt động. Không phải lệnh test tự động, mà là các quan sát tay giúp tăng niềm tin theo cách test suite không cho bạn được. Một tương tác UI để thử, một lệnh CLI để chạy, một request API để gửi, kèm kết quả kỳ vọng cho từng mục.
Nếu thay đổi không có hành vi nào nhìn thấy được từ phía người dùng, workflow sẽ nói thẳng như vậy. Không bịa thêm việc cho có.
### 5. Kết thúc
Người review đưa ra quyết định: duyệt, làm lại, hay tiếp tục thảo luận. Nếu đang duyệt PR, workflow có thể hỗ trợ với `gh pr review --approve`. Nếu cần làm lại, nó sẽ giúp chẩn đoán vấn đề nằm ở cách tiếp cận, spec, hay phần triển khai, đồng thời hỗ trợ soạn phản hồi có thể hành động được và gắn với vị trí code cụ thể.
## Đây là một cuộc hội thoại, không phải bản báo cáo
Workflow trình bày từng bước như một điểm khởi đầu, không phải lời kết luận cuối cùng. Giữa các bước, hoặc ngay giữa một bước, bạn có thể trao đổi với LLM, hỏi thêm, phản biện cách nó đóng khung vấn đề, hoặc kéo thêm skill khác để lấy một góc nhìn khác:
- **"run advanced elicitation on the error handling"** - ép LLM xem xét lại và tinh chỉnh phân tích cho một khu vực cụ thể
- **"party mode on whether this schema migration is safe"** - kéo nhiều góc nhìn agent vào một cuộc tranh luận tập trung
- **"run code review"** - tạo ra các phát hiện có cấu trúc với phân tích đối kháng và edge case
Workflow checkpoint không khóa bạn vào một đường đi tuyến tính. Nó cho bạn cấu trúc khi bạn cần, và tránh cản đường khi bạn muốn tự khám phá. Năm bước ở đây để bảo đảm bạn nhìn được toàn cảnh, còn việc đi sâu đến mức nào ở mỗi bước và gọi thêm công cụ nào hoàn toàn là do bạn quyết định.
## Lộ trình review (Review Trail)
Bước dẫn giải thay đổi hoạt động tốt nhất khi nó có một **thứ tự review gợi ý (Suggested Review Order)**, tức một danh sách các điểm dừng do tác giả spec viết ra để dẫn người review đi qua thay đổi. Nếu spec có phần này, workflow sẽ dùng trực tiếp.
Nếu không có review trail do tác giả tạo, workflow sẽ tự sinh một trail từ diff và bối cảnh codebase. Trail do máy sinh ra vẫn kém hơn trail do tác giả viết, nhưng vẫn tốt hơn rất nhiều so với việc đọc thay đổi theo thứ tự file.
## Khi nào nên dùng
Tình huống chính là bước bàn giao sau `bmad-quick-dev`: phần triển khai đã xong, file spec đang mở trong editor với review trail đã được nối thêm, và bạn cần quyết định có nên phát hành hay không. Lúc đó chỉ cần nói "checkpoint" là bắt đầu.
Nó cũng hoạt động độc lập:
- **Review một PR** - đặc biệt hữu ích khi PR có nhiều hơn vài file hoặc có thay đổi cắt ngang nhiều khu vực
- **Làm quen với một thay đổi (onboard to a change)** - khi bạn cần hiểu chuyện gì đã xảy ra trên một branch mà bạn không phải người viết
- **Review sprint (sprint review)** - workflow có thể nhặt các story được đánh dấu `review` trong file trạng thái sprint của bạn
Bạn có thể gọi nó bằng cách nói "checkpoint" hoặc "dẫn tôi đi qua thay đổi này". Nó chạy được trong mọi terminal, nhưng sẽ phát huy tốt nhất trong IDE như VS Code, Cursor hoặc công cụ tương tự, vì workflow tạo tham chiếu `path:line` ở mọi bước. Trong terminal tích hợp của IDE, các tham chiếu đó có thể bấm được, nên bạn có thể nhảy qua lại giữa các file khi đi theo review trail.
## Nó không phải là gì
Checkpoint Preview không thay thế review tự động. Nó không chạy linter, type checker, hay test suite. Nó không chấm mức độ nghiêm trọng hay đưa ra kết luận pass/fail. Nó là một bản hướng dẫn đọc để giúp con người áp dụng phán đoán của mình vào đúng những chỗ đáng chú ý nhất.

View File

@ -1,94 +0,0 @@
---
title: "Agent có tên riêng (Named Agents)"
description: Vì sao các agent của BMad có tên, persona và bề mặt tùy chỉnh riêng, và điều đó mở khóa điều gì so với cách tiếp cận dựa trên menu hoặc prompt trống
sidebar:
order: 1
---
Bạn nói: "Hey Mary, brainstorm với tôi nhé", và Mary được kích hoạt. Cô ấy chào bạn theo tên, bằng ngôn ngữ bạn đã cấu hình, với persona đặc trưng của riêng mình. Cô ấy nhắc rằng `bmad-help` luôn sẵn sàng. Rồi cô ấy bỏ qua menu và đi thẳng vào brainstorming vì ý định của bạn đã đủ rõ.
Trang này giải thích điều gì thực sự đang diễn ra và vì sao BMad được thiết kế theo cách đó.
## Chiếc ghế ba chân
Mô hình agent của BMad đứng trên ba primitive kết hợp với nhau:
| Thành phần nền (primitive) | Nó cung cấp gì | Nó nằm ở đâu |
|---|---|---|
| **Skill** | Năng lực, tức một việc rời rạc mà assistant có thể làm như brainstorming, viết PRD hay triển khai story | `.claude/skills/{skill-name}/SKILL.md` hoặc vị trí tương đương theo IDE |
| **Named agent** | Tính liên tục của persona, tức một danh tính dễ nhận ra bọc quanh một nhóm skill có cùng giọng điệu, nguyên tắc và dấu hiệu nhận biết | Các skill có thư mục bắt đầu bằng `bmad-agent-*` |
| **Customization** | Khả năng biến nó thành của riêng bạn: override để đổi hành vi của agent, thêm tích hợp MCP, thay template, chồng convention của tổ chức | `_bmad/custom/{skill-name}.toml` cho team và `.user.toml` cho cá nhân |
Chỉ cần bỏ đi một chân là trải nghiệm sẽ sụp:
- Skill mà không có agent sẽ thành danh sách khả năng mà người dùng phải tự nhớ tên hoặc mã
- Agent mà không có skill sẽ chỉ là persona không có gì để làm
- Không có customization thì mọi người đều nhận cùng một hành vi mặc định, và muốn thêm convention nội bộ là phải fork
## Named agents mang lại điều gì
BMad hiện có sáu named agent, mỗi agent gắn với một phase trong BMad Method:
| Agent | Phase | Module |
|---|---|---|
| 📊 **Mary**, Chuyên viên phân tích nghiệp vụ (Business Analyst) | Analysis | market research, brainstorming, product briefs, PRFAQs |
| 📚 **Paige**, Technical Writer | Analysis | project documentation, diagrams, doc validation |
| 📋 **John**, Quản lý sản phẩm (Product Manager) | Planning | PRD creation, epic/story breakdown, implementation readiness |
| 🎨 **Sally**, Nhà thiết kế UX (UX Designer) | Planning | UX design specifications |
| 🏗️ **Winston**, Kiến trúc sư hệ thống (System Architect) | Solutioning | technical architecture, alignment checks |
| 💻 **Amelia**, Kỹ sư cấp cao (Senior Engineer) | Implementation | story execution, quick-dev, code review, sprint planning |
Mỗi agent có một danh tính hardcode gồm tên, chức danh, domain, và một lớp có thể tùy chỉnh gồm vai trò, nguyên tắc, phong cách giao tiếp, icon và menu. Bạn có thể viết lại nguyên tắc của Mary hoặc thêm menu item cho cô ấy, nhưng bạn không thể đổi tên cô ấy. Đó là chủ ý thiết kế. Nhận diện thương hiệu của agent phải sống sót qua lớp tùy chỉnh để câu "hey Mary" luôn kích hoạt đúng analyst, bất kể team đã nắn hành vi của cô ấy theo cách nào.
## Luồng kích hoạt
Khi bạn gọi một named agent, tám bước sau sẽ chạy theo thứ tự:
1. **Resolve cấu hình agent**: merge `customize.toml` gốc với override của team và cá nhân qua một Python resolver dùng `tomllib`
2. **Chạy các bước tiền xử lý (prepend steps)**: mọi hành vi pre-flight mà team đã cấu hình
3. **Nhập persona**: danh tính hardcode cộng với vai trò, phong cách giao tiếp và nguyên tắc đã tùy chỉnh
4. **Nạp persistent facts**: quy tắc tổ chức, ghi chú compliance, hoặc cả file được nạp qua tiền tố `file:`
5. **Nạp config**: tên người dùng, ngôn ngữ giao tiếp, ngôn ngữ đầu ra, đường dẫn artifact
6. **Chào người dùng**: lời chào cá nhân hóa, đúng ngôn ngữ cấu hình và có emoji prefix của agent để bạn nhìn là biết ai đang nói
7. **Chạy các bước hậu xử lý (append steps)**: mọi bước thiết lập sau lời chào mà team đã cấu hình
8. **Dispatch hoặc hiện menu**: nếu tin nhắn mở đầu của bạn khớp một menu item thì agent đi thẳng vào đó, nếu không thì hiện menu và chờ input
Bước 8 là nơi ý định gặp năng lực. Câu "Hey Mary, brainstorm với tôi nhé" bỏ qua phần render menu vì `bmad-brainstorming` là một mapping quá rõ với mục `BP` trong menu của Mary. Nếu bạn nói mơ hồ, cô ấy chỉ hỏi lại một lần, ngắn gọn, chứ không biến xác nhận thành nghi thức. Nếu chẳng có mục nào phù hợp, cô ấy tiếp tục cuộc hội thoại như bình thường.
## Vì sao không chỉ dùng menu
Menu buộc người dùng phải chủ động học công cụ. Bạn phải nhớ brainstorming nằm dưới mã `BP` của analyst chứ không phải PM, và phải nhớ persona nào sở hữu nhóm khả năng nào. Toàn bộ gánh nặng nhận thức đó do công cụ đẩy sang cho người dùng.
Named agents đảo ngược điều đó. Bạn chỉ cần nói điều mình muốn, với đúng người mình nghĩ tới, bằng ngôn từ tự nhiên. Agent biết họ là ai và họ làm gì. Khi ý định của bạn đủ rõ, họ chỉ việc bắt đầu.
Menu vẫn còn đó như một phương án dự phòng, hiện ra khi bạn đang khám phá, và biến mất khi bạn không cần nó.
## Vì sao không chỉ dùng prompt trống
Prompt trống giả định rằng bạn biết "câu thần chú". "Giúp tôi brainstorm" có thể hiệu quả, nhưng "hãy ideate giúp tôi một ý tưởng SaaS" có thể cho kết quả khác, và đầu ra phụ thuộc khá nhiều vào cách bạn diễn đạt. Khi đó người dùng gần như phải kiêm luôn vai trò kỹ sư prompt (prompt engineer).
Named agents thêm cấu trúc mà không đóng mất sự tự do. Persona giữ ổn định, năng lực thì dễ khám phá, và `bmad-help` luôn chỉ cách bạn một lệnh. Bạn không phải đoán agent làm được gì, nhưng cũng không cần học thuộc một cuốn manual để dùng nó.
## Tùy chỉnh là công dân hạng nhất
Chính mô hình customization làm cho cách tiếp cận này mở rộng được ra ngoài phạm vi của một lập trình viên đơn lẻ.
Mỗi agent đi kèm một `customize.toml` với mặc định hợp lý. Team có thể commit override vào `_bmad/custom/bmad-agent-{role}.toml`. Mỗi cá nhân có thể chồng thêm sở thích riêng trong `.user.toml` bị gitignore. Resolver sẽ merge cả ba lớp tại thời điểm kích hoạt theo các quy tắc có tính dự đoán.
Đa số người dùng không cần tự tay viết các file đó. Skill `bmad-customize` sẽ dẫn họ qua việc chọn đúng mục tiêu, quyết định override ở mức agent hay workflow, viết file và xác minh merge. Nhờ vậy bề mặt tùy chỉnh vẫn tiếp cận được với bất cứ ai hiểu ý định của mình, chứ không chỉ người rành TOML.
Ví dụ cụ thể: một team commit một file yêu cầu Amelia luôn dùng Context7 MCP tool khi tra tài liệu thư viện, và fallback sang Linear nếu story không xuất hiện trong danh sách epic cục bộ. Từ đó mọi dev workflow mà Amelia dispatch như `dev-story`, `quick-dev`, `create-story`, `code-review` đều tự động thừa hưởng hành vi này mà không cần sửa source hay lặp lại cấu hình từng workflow.
Ngoài ra còn có một bề mặt tùy chỉnh thứ hai cho các mối quan tâm *xuyên suốt*: `_bmad/config.toml`, `_bmad/config.user.toml`, `_bmad/custom/config.toml``_bmad/custom/config.user.toml`. Đây là nơi **agent roster** sống, tức các descriptor gọn nhẹ mà những skill như `bmad-party-mode`, `bmad-retrospective``bmad-advanced-elicitation` dùng để biết ai có mặt và phải nhập vai họ thế nào. Bạn có thể rebrand một agent cho cả tổ chức bằng team override, hoặc thêm những giọng hư cấu như Kirk, Spock hay một persona chuyên gia domain qua `.user.toml`, tất cả mà không cần đụng vào thư mục skill. File per-skill quyết định Mary *hành xử* như thế nào khi cô ấy kích hoạt; cấu hình trung tâm quyết định các skill khác *nhìn thấy* cô ấy ra sao khi quan sát toàn bộ đội hình.
Để xem toàn bộ bề mặt tùy chỉnh và ví dụ thực tế:
- [Cách tùy chỉnh BMad](../how-to/customize-bmad.md): tài liệu tham chiếu cho những gì có thể tùy chỉnh và merge diễn ra thế nào
- [Cách mở rộng BMad cho tổ chức của bạn](../how-to/expand-bmad-for-your-org.md): năm recipe hoàn chỉnh trải từ quy tắc ở cấp agent, convention workflow, publish ra hệ thống ngoài, thay template đầu ra đến tùy chỉnh roster agent
- Skill `bmad-customize`: trợ lý soạn cấu hình (authoring helper) có hướng dẫn để biến ý định thành một file override đúng chỗ và đã được kiểm chứng
## Ý tưởng lớn hơn phía sau
Hầu hết các trợ lý AI (AI assistant) ngày nay hoặc là menu, hoặc là prompt, và cả hai đều chuyển phần gánh nặng nhận thức sang người dùng. Agent có tên riêng kết hợp với skill có thể tùy chỉnh cho phép bạn trò chuyện với một đồng đội đã hiểu công việc, đồng thời cho phép tổ chức của bạn nắn đồng đội đó theo nhu cầu mà không cần fork.
Lần tới khi bạn gõ "Hey Mary, brainstorm với tôi nhé" và cô ấy chỉ việc bắt tay vào làm, hãy để ý thứ đã *không* xảy ra. Không có slash command. Không có menu phải điều hướng. Không có lời nhắc gượng gạo về những gì cô ấy có thể làm. Chính sự vắng mặt đó mới là thiết kế.

View File

@ -1,5 +1,5 @@
--- ---
title: "Chế độ Party" title: "Party Mode"
description: Cộng tác đa agent - đưa tất cả agent AI vào cùng một cuộc trò chuyện description: Cộng tác đa agent - đưa tất cả agent AI vào cùng một cuộc trò chuyện
sidebar: sidebar:
order: 7 order: 7

View File

@ -1,5 +1,5 @@
--- ---
title: "Bối cảnh dự án" title: "Project Context"
description: Cách project-context.md định hướng các agent AI theo quy tắc và ưu tiên của dự án description: Cách project-context.md định hướng các agent AI theo quy tắc và ưu tiên của dự án
sidebar: sidebar:
order: 7 order: 7

View File

@ -1,73 +1,73 @@
--- ---
title: "Phát triển nhanh" title: "Quick Dev"
description: Giảm ma sát có người trong vòng lặp mà vẫn giữ các điểm kiểm tra bảo vệ chất lượng đầu ra description: Giảm ma sát human-in-the-loop mà vẫn giữ các checkpoint bảo vệ chất lượng output
sidebar: sidebar:
order: 2 order: 2
--- ---
Đưa ý định vào, nhận thay đổi mã nguồn ra, với số lần cần con người nhảy vào giữa quy trình ít nhất có thể - nhưng không đánh đổi chất lượng. Đưa ý định vào, nhận thay đổi mã nguồn ra, với số lần cần con người nhảy vào giữa quy trình ít nhất có thể - nhưng không đánh đổi chất lượng.
Nó cho phép mô hình tự vận hành lâu hơn giữa các điểm kiểm tra, rồi chỉ đưa con người quay lại khi tác vụ không thể tiếp tục an toàn nếu thiếu phán đoán của con người, hoặc khi đã đến lúc rà soát kết quả cuối. Nó cho phép model tự vận hành lâu hơn giữa các checkpoint, rồi chỉ đưa con người quay lại khi tác vụ không thể tiếp tục an toàn nếu thiếu phán đoán của con người, hoặc khi đã đến lúc review kết quả cuối.
![Quick Dev workflow diagram](/diagrams/quick-dev-diagram.png) ![Quick Dev workflow diagram](/diagrams/quick-dev-diagram.png)
## Vì sao nó tồn tại ## Vì sao nó tồn tại
Các lượt có người trong vòng lặp vừa cần thiết vừa tốn kém. Các lượt human-in-the-loop vừa cần thiết vừa tốn kém.
LLM hiện tại vẫn thất bại theo những cách dễ đoán: hiểu sai ý định, tự điền vào khoảng trống bằng những phán đoán tự tin, lệch sang công việc không liên quan, và tạo ra các bản review nhiễu. Đồng thời, việc cần con người nhảy vào liên tục làm giảm tốc độ phát triển. Sự chú ý của con người là nút thắt. LLM hiện tại vẫn thất bại theo những cách dễ đoán: hiểu sai ý định, tự điền vào khoảng trống bằng những phán đoán tự tin, lệch sang công việc không liên quan, và tạo ra các bản review nhiễu. Đồng thời, việc cần con người nhảy vào liên tục làm giảm tốc độ phát triển. Sự chú ý của con người là nút thắt.
`bmad-quick-dev` cân bằng lại đánh đổi đó. Nó tin mô hình có thể chạy tự chủ lâu hơn, nhưng chỉ sau khi quy trình đã tạo được một ranh giới đủ mạnh để làm điều đó an toàn. `bmad-quick-dev` cân bằng lại đánh đổi đó. Nó tin model có thể chạy tự chủ lâu hơn, nhưng chỉ sau khi workflow đã tạo được một ranh giới đủ mạnh để làm điều đó an toàn.
## Thiết kế cốt lõi ## Thiết kế cốt lõi
### 1. Nén ý định trước ### 1. Nén ý định trước
Quy trình bắt đầu bằng việc để con người và mô hình nén yêu cầu thành một mục tiêu thống nhất. Đầu vào có thể bắt đầu như một ý định thô, nhưng trước khi quy trình tự vận hành thì nó phải đủ nhỏ, đủ rõ ràng, và đủ ít mâu thuẫn để có thể thực thi. Workflow bắt đầu bằng việc để con người và model nén yêu cầu thành một mục tiêu thống nhất. Đầu vào có thể bắt đầu như một ý định thô, nhưng trước khi workflow tự vận hành thì nó phải đủ nhỏ, đủ rõ ràng, và đủ ít mâu thuẫn để có thể thực thi.
Ý định có thể đến từ nhiều dạng: vài cụm từ, liên kết trình theo dõi lỗi, đầu ra từ chế độ lập kế hoạch, đoạn văn bản sao chép từ phiên chat, hoặc thậm chí một số story trong `epics.md` của chính BMAD. Ở trường hợp cuối, quy trình không hiểu được ngữ nghĩa theo dõi story của BMAD, nhưng vẫn có thể lấy chính story đó và tiếp tục. Ý định có thể đến từ nhiều dạng: vài cụm từ, liên kết bug tracker, output từ plan mode, đoạn văn bản copy từ phiên chat, hoặc thậm chí một số story trong `epics.md` của chính BMAD. Ở trường hợp cuối, workflow không hiểu được ngữ nghĩa theo dõi story của BMAD, nhưng vẫn có thể lấy chính story đó và tiếp tục.
Quy trình này không loại bỏ quyền kiểm soát của con người. Nó chuyển nó về một số thời điểm có giá trị cao: Workflow này không loại bỏ quyền kiểm soát của con người. Nó chuyển nó về một số thời điểm có giá trị cao:
- **Làm rõ ý định** - biến một yêu cầu lộn xộn thành một mục tiêu thống nhất, không mâu thuẫn ngầm - **Làm rõ ý định** - biến một yêu cầu lộn xộn thành một mục tiêu thống nhất, không mâu thuẫn ngầm
- **Phê duyệt đặc tả** - xác nhận rằng cách hiểu đã được chốt là đúng thứ cần xây - **Phê duyệt spec** - xác nhận rằng cách hiểu đã đóng băng là đúng thứ cần xây
- **Rà soát sản phẩm cuối** - điểm kiểm tra chính, nơi con người quyết định kết quả cuối có chấp nhận được hay không - **Review sản phẩm cuối** - checkpoint chính, nơi con người quyết định kết quả cuối có chấp nhận được hay không
### 2. Định tuyến theo con đường an toàn nhỏ nhất ### 2. Định tuyến theo con đường an toàn nhỏ nhất
Khi mục tiêu đã rõ, quy trình sẽ quyết định đây có phải thay đổi thực hiện một lần là xong hay cần đi theo đường đầy đủ hơn. Những thay đổi nhỏ, phạm vi ảnh hưởng gần như bằng 0 có thể đi thẳng vào triển khai. Còn lại sẽ đi qua lập kế hoạch để mô hình có được một ranh giới mạnh hơn trước khi tự chạy lâu hơn. Khi mục tiêu đã rõ, workflow sẽ quyết định đây có phải thay đổi one-shot thật sự hay cần đi theo đường đầy đủ hơn. Những thay đổi nhỏ, blast radius gần như bằng 0 có thể đi thẳng vào triển khai. Còn lại sẽ đi qua lập kế hoạch để model có được một ranh giới mạnh hơn trước khi tự chạy lâu hơn.
### 3. Chạy lâu hơn với ít giám sát hơn ### 3. Chạy lâu hơn với ít giám sát hơn
Sau quyết định định tuyến đó, mô hình có thể tự gánh thêm công việc. Trên con đường đầy đủ, đặc tả đã được phê duyệt trở thành ranh giới mà mô hình sẽ thực thi với ít giám sát hơn, và đó chính là mục tiêu của thiết kế này. Sau quyết định định tuyến đó, model có thể tự gánh thêm công việc. Trên con đường đầy đủ, spec đã được phê duyệt trở thành ranh giới mà model sẽ thực thi với ít giám sát hơn, và đó chính là mục tiêu của thiết kế này.
### 4. Chẩn đoán lỗi ở đúng tầng ### 4. Chẩn đoán lỗi ở đúng tầng
Nếu triển khai sai vì ý định sai, vậy sửa code không phải cách sửa đúng. Nếu code sai vì đặc tả yếu, thì vá diff cũng không phải cách sửa đúng. Quy trình được thiết kế để chẩn đoán lỗi đã đi vào hệ thống từ tầng nào, quay lại đúng tầng đó, rồi sinh lại từ đấy. Nếu triển khai sai vì ý định sai, vậy sửa code không phải cách fix đúng. Nếu code sai vì spec yếu, thì vá diff cũng không phải cách fix đúng. Workflow được thiết kế để chẩn đoán lỗi đã đi vào hệ thống từ tầng nào, quay lại đúng tầng đó, rồi sinh lại từ đấy.
Các phát hiện từ bước rà soát được dùng để xác định vấn đề đến từ ý định, quá trình tạo đặc tả, hay triển khai cục bộ. Chỉ những lỗi thật sự cục bộ mới được sửa tại chỗ. Các phát hiện từ review được dùng để xác định vấn đề đến từ ý định, quá trình tạo spec, hay triển khai cục bộ. Chỉ những lỗi thật sự cục bộ mới được sửa tại chỗ.
### 5. Chỉ đưa con người quay lại khi cần ### 5. Chỉ đưa con người quay lại khi cần
Bước phỏng vấn ý định có người trong vòng lặp, nhưng nó không giống một điểm kiểm tra lặp đi lặp lại. Quy trình cố gắng giảm thiểu những điểm kiểm tra lặp lại đó. Sau bước định hình ý định ban đầu, con người chủ yếu quay lại khi quy trình không thể tiếp tục an toàn nếu thiếu phán đoán, và ở cuối quy trình để rà soát kết quả. Bước interview ý định có human-in-the-loop, nhưng nó không giống một checkpoint lặp đi lặp lại. Workflow cố gắng giảm thiểu những checkpoint lặp lại đó. Sau bước định hình ý định ban đầu, con người chủ yếu quay lại khi workflow không thể tiếp tục an toàn nếu thiếu phán đoán, và ở cuối quy trình để review kết quả.
- **Xử lý khoảng trống của ý định** - quay lại khi review cho thấy workflow không thể suy ra an toàn điều được hàm ý - **Xử lý khoảng trống của ý định** - quay lại khi review cho thấy workflow không thể suy ra an toàn điều được hàm ý
Mọi thứ còn lại đều là ứng viên cho việc thực thi tự chủ lâu hơn. Đánh đổi này là có chủ đích. Các mẫu cũ tốn nhiều sự chú ý của con người cho việc giám sát liên tục. Quick Dev đặt nhiều niềm tin hơn vào mô hình, nhưng để dành sự chú ý của con người cho những thời điểm mà lý trí con người có đòn bẩy lớn nhất. Mọi thứ còn lại đều là ứng viên cho việc thực thi tự chủ lâu hơn. Đánh đổi này là có chủ đích. Các pattern cũ tốn nhiều sự chú ý của con người cho việc giám sát liên tục. Quick Dev đặt nhiều niềm tin hơn vào model, nhưng để dành sự chú ý của con người cho những thời điểm mà lý trí con người có đòn bẩy lớn nhất.
## Vì sao hệ thống review quan trọng ## Vì sao hệ thống review quan trọng
Giai đoạn rà soát không chỉ để tìm lỗi. Nó còn để định tuyến cách sửa mà không phá hỏng động lượng. Giai đoạn review không chỉ để tìm bug. Nó còn để định tuyến cách sửa mà không phá hỏng động lượng.
Quy trình này hoạt động tốt nhất trên nền tảng có thể tạo subagent, hoặc ít nhất gọi được một LLM khác qua dòng lệnh và đợi kết quả. Nếu nền tảng của bạn không hỗ trợ sẵn, bạn có thể thêm skill để làm việc đó. Các subagent không mang ngữ cảnh là một trụ cột trong thiết kế rà soát. Workflow này hoạt động tốt nhất trên nền tảng có thể spawn subagent, hoặc ít nhất gọi được một LLM khác qua dòng lệnh và đợi kết quả. Nếu nền tảng của bạn không hỗ trợ sẵn, bạn có thể thêm skill để làm việc đó. Các subagent không mang context là một trụ cột trong thiết kế review.
Rà soát kiểu agent thường sai theo hai cách: Review agentic thường sai theo hai cách:
- Tạo quá nhiều phát hiện, buộc con người lọc quá nhiều nhiễu. - Tạo quá nhiều phát hiện, buộc con người lọc quá nhiều nhiễu.
- Làm lệch thay đổi hiện tại bằng cách kéo vào các vấn đề không liên quan, biến mỗi lần chạy thành một dự án dọn dẹp chắp vá. - Làm lệch thay đổi hiện tại bằng cách kéo vào các vấn đề không liên quan, biến mỗi lần chạy thành một dự án dọn dẹp ad-hoc.
Quick Dev xử lý cả hai bằng cách coi rà soát là bước phân loại. Quick Dev xử lý cả hai bằng cách coi review là triage.
Có những phát hiện thuộc về thay đổi hiện tại. Có những phát hiện không thuộc về nó. Nếu một phát hiện chỉ là ngẫu nhiên xuất hiện, không gắn nhân quả với thay đổi đang làm, quy trình có thể trì hoãn nó thay vì ép con người xử lý ngay. Điều đó giữ cho mỗi lần chạy tập trung và ngăn các ngả rẽ ngẫu nhiên ăn hết ngân sách chú ý. Có những phát hiện thuộc về thay đổi hiện tại. Có những phát hiện không thuộc về nó. Nếu một phát hiện chỉ là ngẫu nhiên xuất hiện, không gắn nhân quả với thay đổi đang làm, workflow có thể trì hoãn nó thay vì ép con người xử lý ngay. Điều đó giữ cho mỗi lần chạy tập trung và ngăn các ngả rẽ ngẫu nhiên ăn hết ngân sách chú ý.
Quá trình triage này đôi khi sẽ không hoàn hảo. Điều đó chấp nhận được. Thường tốt hơn khi đánh giá sai một số phát hiện còn hơn là nhận về hàng ngàn bình luận review giá trị thấp. Hệ thống tối ưu cho chất lượng tín hiệu, không phải độ phủ tuyệt đối. Quá trình triage này đôi khi sẽ không hoàn hảo. Điều đó chấp nhận được. Thường tốt hơn khi đánh giá sai một số phát hiện còn hơn là nhận về hàng ngàn bình luận review giá trị thấp. Hệ thống tối ưu cho chất lượng tín hiệu, không phải độ phủ tuyệt đối.

View File

@ -1,395 +1,171 @@
--- ---
title: 'Cách tùy chỉnh BMad' title: "Cách tùy chỉnh BMad"
description: Tùy chỉnh agent và workflow trong khi vẫn giữ khả năng tương thích khi cập nhật description: Tùy chỉnh agent, workflow và module trong khi vẫn giữ khả năng tương thích khi cập nhật
sidebar: sidebar:
order: 8 order: 7
--- ---
Điều chỉnh persona của agent, chèn ngữ cảnh theo domain, thêm khả năng mới và cấu hình hành vi workflow mà không cần sửa các file đã cài. Các tùy chỉnh của bạn sẽ được giữ nguyên qua mọi lần cập nhật. Sử dụng các tệp `.customize.yaml` để điều chỉnh hành vi, persona và menu của agent, đồng thời giữ lại thay đổi của bạn qua các lần cập nhật.
:::tip[Không muốn tự viết TOML? Hãy dùng `bmad-customize`]
Skill `bmad-customize` là trợ lý tạo cấu hình có hướng dẫn cho **bề mặt override agent/workflow theo từng skill** được mô tả trong tài liệu này. Nó quét những gì có thể tùy chỉnh trong bản cài đặt của bạn, giúp bạn chọn đúng bề mặt (agent hay workflow), ghi file override và xác minh merge đã áp dụng. Override ở mức cấu hình trung tâm (`_bmad/custom/config.toml`) chưa nằm trong phạm vi v1, nên phần đó vẫn cần viết tay theo mục Cấu hình trung tâm bên dưới. Hãy chạy skill này khi bạn muốn thay đổi theo từng skill; tài liệu này là phần tham chiếu cho *có thể tùy chỉnh gì* và merge hoạt động ra sao.
:::
## Khi nào nên dùng ## Khi nào nên dùng
- Bạn muốn thay đổi tính cách hoặc phong cách giao tiếp của agent - Bạn muốn thay đổi tên, tính cách hoặc phong cách giao tiếp của một agent
- Bạn cần cung cấp cho agent các "persistent facts" để luôn nhớ, ví dụ "tổ chức của chúng tôi chỉ dùng AWS" - Bạn cần agent ghi nhớ bối cảnh riêng của dự án
- Bạn muốn thêm các bước khởi động có tính thủ tục mà agent phải chạy mỗi phiên - Bạn muốn thêm các mục menu tùy chỉnh để kích hoạt workflow hoặc prompt của riêng mình
- Bạn muốn thêm menu item tùy chỉnh để gọi skill hoặc prompt riêng - Bạn muốn agent luôn thực hiện một số hành động cụ thể mỗi khi khởi động
- Team của bạn cần các tùy chỉnh dùng chung được commit vào git, đồng thời vẫn cho phép mỗi cá nhân chồng thêm sở thích riêng
:::note[Điều kiện tiên quyết] :::note[Điều kiện tiên quyết]
- BMad đã được cài trong dự án của bạn (xem [Cách cài đặt BMad](./install-bmad.md)) - BMad đã được cài trong dự án của bạn (xem [Cách cài đặt BMad](./install-bmad.md))
- Python 3.11+ có trên PATH của bạn (để chạy resolver; dùng stdlib `tomllib`, không cần `pip install`, `uv` hay virtualenv) - Trình soạn thảo văn bản để chỉnh sửa tệp YAML
- Một trình soạn thảo văn bản cho file TOML
::: :::
## Cách hoạt động :::caution[Giữ an toàn cho các tùy chỉnh của bạn]
Luôn sử dụng các tệp `.customize.yaml` được mô tả trong tài liệu này thay vì sửa trực tiếp tệp agent. Trình cài đặt sẽ ghi đè các tệp agent khi cập nhật, nhưng vẫn giữ nguyên các thay đổi trong `.customize.yaml`.
Mỗi skill có thể tùy chỉnh đều đi kèm một file `customize.toml` chứa cấu hình mặc định. File này định nghĩa toàn bộ bề mặt tùy chỉnh của skill, nên hãy đọc nó để biết có thể chỉnh gì. Bạn **không bao giờ** sửa trực tiếp file này. Thay vào đó, bạn tạo các file override dạng thưa, chỉ chứa những trường bạn muốn đổi. :::
### Mô hình override ba lớp
```text
Ưu tiên 1 (thắng): _bmad/custom/{skill-name}.user.toml (cá nhân, bị gitignore)
Ưu tiên 2: _bmad/custom/{skill-name}.toml (team/tổ chức, được commit)
Ưu tiên 3 (gốc): customize.toml của chính skill (mặc định)
```
Thư mục `_bmad/custom/` ban đầu là rỗng. File chỉ xuất hiện khi ai đó thực sự bắt đầu tùy chỉnh.
### Quy tắc merge theo hình dạng, không theo tên trường
Resolver áp dụng bốn quy tắc cấu trúc. Tên trường không được hardcode riêng; hành vi hoàn toàn được quyết định bởi dạng dữ liệu:
| Dạng | Quy tắc |
|---|---|
| Scalar (string, int, bool, float) | Giá trị override sẽ thắng |
| Table | Deep merge, tức merge đệ quy theo các quy tắc này |
| Mảng các table mà mọi phần tử đều dùng cùng **một** trường định danh (`code` ở tất cả phần tử, hoặc `id` ở tất cả phần tử) | Merge theo khóa đó, phần tử trùng khóa sẽ **thay tại chỗ**, phần tử mới sẽ **append** |
| Mọi mảng khác (mảng scalar, table không có định danh, hoặc trộn `code``id`) | **Append**: phần tử gốc trước, rồi team, rồi user |
**Không có cơ chế xóa.** Override không thể xóa phần tử mặc định. Nếu bạn cần vô hiệu hóa một menu item mặc định, hãy override nó theo `code` bằng mô tả hoặc prompt no-op. Nếu cần tái cấu trúc mảng sâu hơn, bạn phải fork skill.
**Quy ước `code` / `id`.** BMad dùng `code` (định danh ngắn như `"BP"` hoặc `"R1"`) và `id` (định danh ổn định dài hơn) làm merge key cho mảng các table. Nếu bạn tự tạo một mảng table muốn có khả năng replace-by-key thay vì append-only, hãy chọn **một** quy ước duy nhất và dùng nhất quán cho toàn bộ mảng. Nếu trộn `code` ở phần tử này và `id` ở phần tử khác, resolver sẽ rơi về chế độ append vì nó không đoán merge theo khóa nào.
### Một số trường của agent là chỉ đọc
`agent.name``agent.title` vẫn nằm trong `customize.toml` như metadata nguồn gốc, nhưng `SKILL.md` của agent không đọc hai trường này ở runtime, vì danh tính của agent được hardcode. Bạn đặt `name = "Bob"` trong file override cũng sẽ không có tác dụng. Nếu bạn thật sự cần một agent với tên khác, hãy copy thư mục skill, đổi tên và phát hành nó như một custom skill.
## Các bước thực hiện ## Các bước thực hiện
### 1. Tìm bề mặt tùy chỉnh của skill ### 1. Xác định vị trí các tệp tùy chỉnh
Hãy mở file `customize.toml` trong thư mục skill đã được cài. Ví dụ với PM agent: Sau khi cài đặt, bạn sẽ tìm thấy một tệp `.customize.yaml` cho mỗi agent tại:
```text ```text
.claude/skills/bmad-agent-pm/customize.toml _bmad/_config/agents/
├── core-bmad-master.customize.yaml
├── bmm-dev.customize.yaml
├── bmm-pm.customize.yaml
└── ... (một tệp cho mỗi agent đã cài)
``` ```
(Đường dẫn cụ thể thay đổi theo IDE: Cursor dùng `.cursor/skills/`, Cline dùng `.cline/skills/`, v.v.) ### 2. Chỉnh sửa tệp tùy chỉnh
Đây là schema chính thức. Mọi trường bạn nhìn thấy trong file này đều có thể tùy chỉnh, ngoại trừ các trường danh tính chỉ đọc đã nêu ở trên. Mở tệp `.customize.yaml` của agent mà bạn muốn sửa. Mỗi phần đều là tùy chọn, chỉ tùy chỉnh những gì bạn cần.
### 2. Tạo file override của bạn | Phần | Cách hoạt động | Mục đích |
| --- | --- | --- |
| `agent.metadata` | Thay thế | Ghi đè tên hiển thị của agent |
| `persona` | Thay thế | Đặt vai trò, danh tính, phong cách và các nguyên tắc |
| `memories` | Nối thêm | Thêm bối cảnh cố định mà agent luôn ghi nhớ |
| `menu` | Nối thêm | Thêm mục menu tùy chỉnh cho workflow hoặc prompt |
| `critical_actions` | Nối thêm | Định nghĩa hướng dẫn khởi động cho agent |
| `prompts` | Nối thêm | Tạo các prompt tái sử dụng cho các hành động trong menu |
Tạo thư mục `_bmad/custom/` ở root dự án nếu nó chưa tồn tại. Sau đó tạo file đặt theo tên skill: Những phần được đánh dấu **Thay thế** sẽ ghi đè hoàn toàn cấu hình mặc định của agent. Những phần được đánh dấu **Nối thêm** sẽ bổ sung vào cấu hình hiện có.
```text **Tên agent**
_bmad/custom/
bmad-agent-pm.toml # override của team (commit vào git) Thay đổi cách agent tự giới thiệu:
bmad-agent-pm.user.toml # sở thích cá nhân (gitignore)
```yaml
agent:
metadata:
name: 'Spongebob' # Mặc định: "Amelia"
``` ```
:::caution[KHÔNG copy nguyên file `customize.toml`] **Persona**
File override phải **thưa**. Chỉ đưa vào những trường bạn thực sự muốn đổi, không hơn.
Mọi trường bạn bỏ qua sẽ tự động được kế thừa từ lớp bên dưới. Nếu bạn copy toàn bộ `customize.toml` vào file override, những bản cập nhật sau này sẽ không chảy vào các giá trị mặc định mới nữa và bạn sẽ âm thầm bị lệch qua mỗi release. Thay thế tính cách, vai trò và phong cách giao tiếp của agent:
:::
**Ví dụ: đổi icon và thêm một principle** ```yaml
persona:
```toml role: 'Senior Full-Stack Engineer'
# _bmad/custom/bmad-agent-pm.toml identity: 'Sống trong quả dứa (dưới đáy biển)'
# Chỉ ghi những trường cần đổi. Phần còn lại vẫn kế thừa. communication_style: 'Spongebob gây phiền'
principles:
[agent] - 'Không lồng quá sâu, dev Spongebob ghét nesting quá 2 cấp'
icon = "🏥" - 'Ưu tiên composition hơn inheritance'
principles = [
"Không phát hành bất cứ thứ gì không thể vượt qua kiểm toán của FDA.",
]
``` ```
Ví dụ này append thêm principle mới vào danh sách mặc định và thay icon. Mọi trường khác vẫn giữ nguyên như bản gốc. Phần `persona` sẽ thay thế toàn bộ persona mặc định, vì vậy nếu đặt phần này bạn nên cung cấp đầy đủ cả bốn trường.
### 3. Tùy chỉnh đúng phần bạn cần **Memories**
Mọi ví dụ bên dưới đều giả định schema agent phẳng của BMad. Các trường nằm trực tiếp trong `[agent]`, không có các sub-table như `metadata` hay `persona`. Thêm bối cảnh cố định mà agent sẽ luôn nhớ:
**Scalar (`icon`, `role`, `identity`, `communication_style`).** Scalar override sẽ thắng, nên bạn chỉ cần đặt những trường đang muốn đổi: ```yaml
memories:
```toml - 'Làm việc tại Krusty Krab'
# _bmad/custom/bmad-agent-pm.toml - 'Người nổi tiếng yêu thích: David Hasselhoff'
- 'Đã học ở Epic 1 rằng giả vờ test đã pass là không ổn'
[agent]
icon = "🏥"
role = "Dẫn dắt product discovery cho domain healthcare có ràng buộc pháp lý."
communication_style = "Chính xác, nhạy với compliance, đặt các câu hỏi mang hình dạng kiểm soát ngay từ sớm."
``` ```
**Persistent facts, principles, activation hooks (các mảng append).** Bốn mảng dưới đây đều là append-only. Phần tử của team được thêm sau mặc định, phần tử user được thêm cuối cùng. **Mục menu**
```toml Thêm các mục tùy chỉnh vào menu hiển thị của agent. Mỗi mục cần có `trigger`, đích đến (`workflow` hoặc `action`) và `description`:
[agent]
# Các fact tĩnh mà agent luôn giữ trong đầu trong cả phiên: quy tắc tổ chức,
# hằng số domain, sở thích của người dùng. Khác với runtime memory sidecar.
#
# Mỗi mục có thể là một câu literal, hoặc tham chiếu `file:` để nạp nội dung
# file làm facts (hỗ trợ cả glob).
persistent_facts = [
"Tổ chức của chúng tôi chỉ dùng AWS, không đề xuất GCP hay Azure.",
"Mọi PRD đều phải có legal sign-off trước khi engineering kickoff.",
"Người dùng mục tiêu là bác sĩ lâm sàng, không phải bệnh nhân, nên ví dụ phải bám theo đối tượng đó.",
"file:{project-root}/docs/compliance/hipaa-overview.md",
"file:{project-root}/_bmad/custom/company-glossary.md",
]
# Thêm vào hệ giá trị của agent ```yaml
principles = [ menu:
"Không phát hành bất cứ thứ gì không thể vượt qua kiểm toán của FDA.", - trigger: my-workflow
"Giá trị người dùng là trước hết, compliance là luôn luôn.", workflow: 'my-custom/workflows/my-workflow.yaml'
] description: Workflow tùy chỉnh của tôi
- trigger: deploy
# Chạy TRƯỚC activation tiêu chuẩn (persona, persistent_facts, config, greet). action: '#deploy-prompt'
# Dùng cho pre-flight load, compliance checks, hoặc thứ gì cần có sẵn trong description: Triển khai lên production
# context trước khi agent tự giới thiệu.
activation_steps_prepend = [
"Quét {project-root}/docs/compliance/ và nạp mọi tài liệu liên quan HIPAA vào context.",
]
# Chạy SAU khi greet, TRƯỚC menu. Dùng cho thiết lập nặng về context mà bạn
# muốn chạy sau khi người dùng đã được chào.
activation_steps_append = [
"Đọc {project-root}/_bmad/custom/company-glossary.md nếu file tồn tại.",
]
``` ```
**Hai hook này có vai trò khác nhau.** `prepend` chạy trước lời chào để agent có thể nạp ngữ cảnh cần thiết ngay cả khi cá nhân hóa lời chào. `append` chạy sau lời chào để người dùng không phải nhìn màn hình trống trong lúc agent quét một lượng lớn context. **Critical Actions**
**Tùy chỉnh menu (merge theo `code`).** Menu là một mảng table. Mỗi item có trường `code`, nên resolver merge theo mã này: item có `code` trùng sẽ thay tại chỗ, item mới sẽ được append. Định nghĩa các hướng dẫn sẽ chạy khi agent khởi động:
Với TOML array-of-tables, mỗi item dùng cú pháp `[[agent.menu]]`: ```yaml
critical_actions:
```toml - 'Kiểm tra pipeline CI bằng XYZ Skill và cảnh báo người dùng ngay khi khởi động nếu có việc khẩn cấp cần xử lý'
# Thay item CE hiện có bằng một custom skill
[[agent.menu]]
code = "CE"
description = "Tạo Epic theo framework delivery của tổ chức"
skill = "custom-create-epics"
# Thêm item mới (RC chưa tồn tại trong mặc định)
[[agent.menu]]
code = "RC"
description = "Chạy compliance pre-check"
prompt = """
Đọc {project-root}/_bmad/custom/compliance-checklist.md
và quét toàn bộ tài liệu trong {planning_artifacts} theo checklist đó.
Báo cáo mọi khoảng trống và trích dẫn điều khoản quy định tương ứng.
"""
``` ```
Mỗi menu item chỉ có đúng một trong hai trường `skill` hoặc `prompt`. Những item không xuất hiện trong file override của bạn sẽ giữ nguyên mặc định. **Prompt tùy chỉnh**
**Tham chiếu file.** Khi một trường văn bản cần trỏ tới file (trong `persistent_facts`, `activation_steps_prepend`, `activation_steps_append`, hoặc `prompt` của menu item), hãy dùng đường dẫn đầy đủ dựa trên `{project-root}`. Dù file nằm cạnh override trong `_bmad/custom/`, bạn vẫn nên viết rõ là `{project-root}/_bmad/custom/info.md`. Agent sẽ resolve `{project-root}` ở runtime. Tạo các prompt tái sử dụng để mục menu có thể tham chiếu bằng `action="#id"`:
### 4. Cá nhân và team ```yaml
prompts:
**File của team** (`bmad-agent-pm.toml`): commit vào git, áp dụng cho cả tổ chức. Dùng cho compliance rules, company persona, năng lực tùy chỉnh dùng chung. - id: deploy-prompt
content: |
**File cá nhân** (`bmad-agent-pm.user.toml`): tự động bị gitignore. Dùng cho điều chỉnh giọng điệu, sở thích workflow cá nhân và các fact riêng mà agent cần lưu ý cho riêng bạn. Triển khai nhánh hiện tại lên production:
1. Chạy toàn bộ test
```toml 2. Build dự án
# _bmad/custom/bmad-agent-pm.user.toml 3. Thực thi script triển khai
[agent]
persistent_facts = [
"Khi trình bày phương án, luôn kèm ước lượng độ phức tạp ở mức thô (low/medium/high).",
]
``` ```
## Cách quá trình resolve diễn ra ### 3. Áp dụng thay đổi
Khi agent được kích hoạt, `SKILL.md` của nó sẽ gọi một shared Python script để merge ba lớp nói trên và trả về block kết quả ở dạng JSON. Script này dùng `tomllib` của Python stdlib, nên `python3` thuần là đủ: Sau khi chỉnh sửa, cài đặt lại để áp dụng thay đổi:
```bash ```bash
python3 {project-root}/_bmad/scripts/resolve_customization.py \ npx bmad-method install
--skill {skill-root} \
--key agent
``` ```
**Yêu cầu**: Python 3.11+ vì các phiên bản cũ hơn không có `tomllib`. Không cần `pip install`, không cần `uv`, không cần virtualenv. Bạn có thể kiểm tra bằng `python3 --version`. Trên một số nền tảng, `python3` mặc định vẫn là 3.10 hoặc thấp hơn, nên có thể bạn sẽ phải cài 3.11+ riêng. Trình cài đặt sẽ nhận diện bản cài đặt hiện có và đưa ra các lựa chọn sau:
`--skill` trỏ vào thư mục skill đã cài, nơi có file `customize.toml`. Tên skill được lấy từ basename của thư mục, sau đó script sẽ tự tìm `_bmad/custom/{skill-name}.toml``{skill-name}.user.toml`. | Lựa chọn | Tác dụng |
| --- | --- |
| **Quick Update** | Cập nhật tất cả module lên phiên bản mới nhất và áp dụng các tùy chỉnh |
| **Modify BMad Installation** | Chạy lại quy trình cài đặt đầy đủ để thêm hoặc gỡ bỏ module |
Một số lệnh hữu ích: Nếu chỉ thay đổi phần tùy chỉnh, **Quick Update** là lựa chọn nhanh nhất.
```bash
# Resolve toàn bộ block agent
python3 {project-root}/_bmad/scripts/resolve_customization.py \
--skill /duong-dan/tuyet-doi/toi/bmad-agent-pm \
--key agent
# Resolve một trường cụ thể
python3 {project-root}/_bmad/scripts/resolve_customization.py \
--skill /duong-dan/tuyet-doi/toi/bmad-agent-pm \
--key agent.icon
# Dump toàn bộ
python3 {project-root}/_bmad/scripts/resolve_customization.py \
--skill /duong-dan/tuyet-doi/toi/bmad-agent-pm
```
Đầu ra luôn là JSON. Nếu script này không khả dụng trên một nền tảng nào đó, `SKILL.md` sẽ hướng dẫn agent đọc trực tiếp ba file TOML và áp dụng cùng các quy tắc merge.
## Tùy chỉnh workflow
Workflow, tức các skill điều phối tiến trình nhiều bước như `bmad-product-brief`, dùng cùng cơ chế override như agent. Khác biệt là bề mặt tùy chỉnh của chúng nằm dưới `[workflow]` thay vì `[agent]`:
```toml
# _bmad/custom/bmad-product-brief.toml
[workflow]
# Giống agent: prepend/append chạy trước và sau activation mặc định của
# workflow. Override sẽ append vào mặc định.
activation_steps_prepend = [
"Nạp {project-root}/docs/product/north-star-principles.md làm context.",
]
activation_steps_append = []
# Cũng dùng semantics literal-hoặc-file: như phía agent. Những fact này được
# nạp làm context nền tảng trong suốt lần chạy workflow.
persistent_facts = [
"Mọi brief đều phải có một mục explicit về regulatory risk.",
"file:{project-root}/docs/compliance/product-brief-checklist.md",
]
# Scalar: chạy đúng một lần khi workflow hoàn tất output chính. Override thắng.
on_complete = "Tóm tắt brief trong ba gạch đầu dòng rồi hỏi người dùng có muốn gửi email qua skill gws-gmail-send không."
```
Cùng một quy ước trường có thể đi xuyên qua ranh giới agent/workflow: `activation_steps_prepend`, `activation_steps_append`, `persistent_facts` với tham chiếu `file:`, và các table kiểu menu `[[...]]` dùng `code` hoặc `id` làm khóa merge. Resolver áp dụng đúng bốn quy tắc cấu trúc đã nêu bất kể top-level key là gì. Tham chiếu từ `SKILL.md` cũng theo namespace tương ứng: `{workflow.activation_steps_prepend}`, `{workflow.persistent_facts}`, `{workflow.on_complete}`. Mọi trường bổ sung mà một workflow tự expose, ví dụ output path, toggle, review setting hay stage flag, cũng sẽ đi theo cùng cơ chế merge dựa trên shape. Muốn biết chính xác workflow đó cho chỉnh gì, hãy đọc `customize.toml` của nó.
### Thứ tự activation
Workflow có thể tùy chỉnh sẽ chạy activation theo thứ tự cố định để bạn biết hook của mình được kích hoạt khi nào:
1. Resolve block `[workflow]` bằng merge base -> team -> user
2. Chạy `activation_steps_prepend` theo đúng thứ tự
3. Nạp `persistent_facts` làm ngữ cảnh nền tảng cho cả lần chạy
4. Nạp config (`_bmad/bmm/config.yaml`) và resolve các biến chuẩn như tên dự án, ngôn ngữ, đường dẫn, ngày tháng
5. Chào người dùng
6. Chạy `activation_steps_append` theo đúng thứ tự
Sau bước 6, phần thân chính của workflow mới bắt đầu. Hãy dùng `activation_steps_prepend` khi bạn cần load context trước cả lúc cá nhân hóa lời chào; dùng `activation_steps_append` khi phần thiết lập khá nặng và bạn muốn người dùng thấy lời chào trước.
### Phạm vi của đợt triển khai đầu tiên này
Khả năng tùy chỉnh đang được mở rộng dần. Những trường đã mô tả ở trên, gồm `activation_steps_prepend`, `activation_steps_append`, `persistent_facts`, `on_complete`, là **bề mặt nền tảng** mà mọi workflow có thể tùy chỉnh đều sẽ hỗ trợ, và chúng sẽ ổn định qua các phiên bản. Ngày hôm nay, chỉ với những trường này bạn đã có thể kiểm soát những điểm lớn: thêm bước trước/sau, ghim context nền tảng, kích hoạt hành động tiếp theo sau khi workflow hoàn tất.
Theo thời gian, từng workflow sẽ expose thêm **các điểm tùy chỉnh chuyên biệt hơn** gắn với chính công việc của workflow đó, ví dụ toggle ở từng bước, stage flag, đường dẫn template đầu ra hoặc review gate. Khi những trường đó xuất hiện, chúng sẽ được chồng thêm lên bề mặt nền tảng chứ không thay thế nó, nên những tùy chỉnh bạn viết hôm nay vẫn tiếp tục dùng được.
Nếu bạn đang cần một "núm tinh chỉnh" chi tiết hơn nhưng workflow chưa expose, hãy tạm dùng `activation_steps_*``persistent_facts` để điều hướng hành vi, hoặc mở issue mô tả chính xác điểm tùy chỉnh bạn muốn. Chính những nhu cầu đó sẽ quyết định trường nào được bổ sung tiếp theo.
## Cấu hình trung tâm
`customize.toml` theo từng skill bao phủ **hành vi sâu** như hook, menu, `persistent_facts`, override persona cho một agent hay workflow đơn lẻ. Một bề mặt khác sẽ bao phủ **trạng thái cắt ngang** như các câu trả lời lúc cài đặt và roster agent mà những skill bên ngoài như `bmad-party-mode`, `bmad-retrospective``bmad-advanced-elicitation` sử dụng. Bề mặt đó nằm trong bốn file TOML ở root dự án:
```text
_bmad/config.toml (do installer quản lý) team scope: câu trả lời lúc cài đặt + agent roster
_bmad/config.user.toml (do installer quản lý) user scope: user_name, language, skill level
_bmad/custom/config.toml (do con người viết) team overrides (commit vào git)
_bmad/custom/config.user.toml (do con người viết) personal overrides (gitignore)
```
### Merge bốn lớp
```text
Ưu tiên 1 (thắng): _bmad/custom/config.user.toml
Ưu tiên 2: _bmad/custom/config.toml
Ưu tiên 3: _bmad/config.user.toml
Ưu tiên 4 (gốc): _bmad/config.toml
```
Các quy tắc cấu trúc hoàn toàn giống phần per-skill customize: scalar override, table deep-merge, mảng dùng `code` hoặc `id` sẽ merge theo khóa, các mảng khác thì append.
### Cái gì nằm ở đâu
Installer sẽ phân chia câu trả lời theo `scope:` khai báo trên từng prompt trong `module.yaml`:
- Các section `[core]``[modules.<code>]`: chứa câu trả lời khi cài. `scope = team` sẽ được ghi vào `_bmad/config.toml`; `scope = user` sẽ nằm trong `_bmad/config.user.toml`
- Section `[agents.<code>]`: "bản chất" của agent gồm code, name, title, icon, description, team, được chưng cất từ khối `agents:` trong `module.yaml` của từng module. Phần này luôn ở scope team
### Quy tắc chỉnh sửa
- `_bmad/config.toml``_bmad/config.user.toml` sẽ **được tạo lại sau mỗi lần cài đặt** từ những câu trả lời mà installer thu thập. Hãy coi chúng là output chỉ đọc; mọi chỉnh sửa trực tiếp sẽ bị ghi đè ở lần cài tiếp theo. Nếu muốn thay đổi bền vững một giá trị cài đặt, hãy chạy lại installer hoặc chồng giá trị đó bằng `_bmad/custom/config.toml`
- `_bmad/custom/config.toml``_bmad/custom/config.user.toml` sẽ **không bao giờ** bị installer động vào. Đây mới là bề mặt đúng để thêm custom agent, override descriptor của agent, ép các thiết lập dùng chung cho team và ghim mọi giá trị bạn muốn giữ nguyên bất kể câu trả lời lúc cài là gì
### Ví dụ: đổi thương hiệu cho một agent
```toml
# _bmad/custom/config.toml (commit vào git, áp dụng cho mọi developer)
[agents.bmad-agent-pm]
description = "PM trong domain healthcare, nhạy với compliance, luôn đặt câu hỏi theo hướng FDA ngay từ đầu."
icon = "🏥"
```
Resolver sẽ merge đè lên `[agents.bmad-agent-pm]` do installer sinh ra. `bmad-party-mode` và mọi roster consumer khác sẽ tự động thấy description mới này.
### Ví dụ: thêm một agent hư cấu
```toml
# _bmad/custom/config.user.toml (cá nhân, gitignore)
[agents.kirk]
team = "startrek"
name = "Captain James T. Kirk"
title = "Starship Captain"
icon = "🖖"
description = "Một chỉ huy táo bạo, thích bẻ luật. Nói chuyện có các quãng ngắt đầy kịch tính. Suy nghĩ thành tiếng về gánh nặng của quyền chỉ huy."
```
Không cần tạo thư mục skill. Chỉ riêng "essence" này cũng đủ để party-mode spawn Kirk như một giọng nói trong cuộc bàn tròn. Bạn có thể lọc theo trường `team` để chỉ mời nhóm Enterprise.
### Ví dụ: override thiết lập cài đặt của module
```toml
# _bmad/custom/config.toml
[modules.bmm]
planning_artifacts = "/shared/org-planning-artifacts"
```
Giá trị override này sẽ thắng mọi câu trả lời mà từng developer đã nhập khi cài trên máy của họ. Rất hữu ích khi bạn muốn ghim convention của cả team.
### Khi nào dùng bề mặt nào
| Nhu cầu | Bề mặt nên dùng |
|---|---|
| Thêm lời nhắc gọi MCP tool vào mọi dev workflow | Theo từng skill: `_bmad/custom/bmad-agent-dev.toml` trong `persistent_facts` |
| Thêm menu item cho một agent | Theo từng skill: `_bmad/custom/bmad-agent-{role}.toml` với `[[agent.menu]]` |
| Đổi template đầu ra của một workflow | Theo từng skill: `_bmad/custom/{workflow}.toml` bằng scalar override |
| Đổi descriptor công khai của một agent | **Cấu hình trung tâm**: `_bmad/custom/config.toml``[agents.<code>]` |
| Thêm custom agent hoặc agent hư cấu vào roster | **Cấu hình trung tâm**: `_bmad/custom/config*.toml` với entry mới `[agents.<code>]` |
| Ghim thiết lập cài đặt dùng chung của team | **Cấu hình trung tâm**: `_bmad/custom/config.toml` trong `[modules.<code>]` hoặc `[core]` |
Trong cùng một dự án, bạn hoàn toàn có thể dùng đồng thời cả hai bề mặt này.
## Ví dụ thực chiến
Để xem các recipe thiên về doanh nghiệp như định hình một agent trên mọi workflow mà nó dispatch, ép workflow tuân thủ convention nội bộ, publish output lên Confluence và Jira, tùy chỉnh agent roster, hoặc thay template đầu ra bằng template riêng của tổ chức, hãy xem [Cách mở rộng BMad cho tổ chức của bạn](./expand-bmad-for-your-org.md).
## Khắc phục sự cố ## Khắc phục sự cố
**Tùy chỉnh không xuất hiện?** **Thay đổi không xuất hiện?**
- Kiểm tra file của bạn có nằm đúng trong `_bmad/custom/` và dùng đúng tên skill không - Chạy `npx bmad-method install` và chọn **Quick Update** để áp dụng thay đổi
- Kiểm tra cú pháp TOML: string phải có ngoặc kép, table header dùng `[section]`, array-of-tables dùng `[[section]]`, và mọi khóa scalar hay array của một table phải xuất hiện *trước* bất kỳ `[[subtables]]` nào của table đó trong file - Kiểm tra YAML có hợp lệ không (thụt lề rất quan trọng)
- Với agent, phần tùy chỉnh phải nằm dưới `[agent]`, và các trường bên dưới header đó sẽ thuộc `agent` cho tới khi bạn mở table header khác - Xác minh bạn đã sửa đúng tệp `.customize.yaml` của agent cần thiết
- Hãy nhớ rằng `agent.name``agent.title` là chỉ đọc, override vào đó sẽ không có tác dụng
**Tùy chỉnh bị hỏng sau khi update?** **Agent không tải lên được?**
- Bạn có copy nguyên file `customize.toml` vào file override không? **Đừng làm vậy.** File override chỉ nên chứa phần chênh lệch. Nếu copy nguyên file, bạn sẽ khóa cứng mặc định cũ và dần lệch khỏi các bản phát hành mới. - Kiểm tra lỗi cú pháp YAML bằng một công cụ kiểm tra YAML trực tuyến
- Đảm bảo bạn không để trống trường nào sau khi bỏ comment
- Thử khôi phục mẫu gốc rồi build lại
**Muốn biết có thể tùy chỉnh gì?** **Cần đặt lại một agent?**
- Chạy skill `bmad-customize`. Nó sẽ liệt kê mọi skill có thể tùy chỉnh trong dự án, cho biết skill nào đã có override, rồi dẫn bạn qua quá trình thêm hoặc sửa một override - Xóa nội dung hoặc xóa tệp `.customize.yaml` của agent đó
- Hoặc đọc trực tiếp `customize.toml` của skill. Mọi trường ở đó đều có thể tùy chỉnh, trừ `name``title` - Chạy `npx bmad-method install` và chọn **Quick Update** để khôi phục mặc định
**Muốn reset?** ## Tùy chỉnh workflow
- Xóa file override của bạn trong `_bmad/custom/`, skill sẽ tự động rơi về cấu hình mặc định tích hợp sẵn Tài liệu về cách tùy chỉnh các workflow và skill sẵn có trong BMad Method sẽ được bổ sung trong thời gian tới.
## Tùy chỉnh module
Hướng dẫn xây dựng expansion module và tùy chỉnh các module hiện có sẽ được bổ sung trong thời gian tới.

View File

@ -1,266 +0,0 @@
---
title: 'Cách mở rộng BMad cho tổ chức của bạn'
description: Năm mẫu tùy chỉnh giúp thay đổi BMad mà không cần fork, gồm quy tắc ở cấp agent, quy ước workflow, xuất bản ra hệ thống ngoài, thay template và điều chỉnh danh sách agent
sidebar:
order: 9
---
Bề mặt tùy chỉnh của BMad cho phép một tổ chức định hình lại hành vi mà không phải sửa file đã cài hay fork skill. Hướng dẫn này trình bày năm công thức mẫu (recipe) bao phủ phần lớn nhu cầu ở môi trường doanh nghiệp.
:::note[Điều kiện tiên quyết]
- BMad đã được cài trong dự án của bạn (xem [Cách cài đặt BMad](./install-bmad.md))
- Đã quen với mô hình tùy chỉnh (xem [Cách tùy chỉnh BMad](./customize-bmad.md))
- Python 3.11+ có trên PATH để chạy resolver, chỉ dùng stdlib, không cần `pip install`
:::
:::tip[Cách áp dụng các công thức mẫu này]
Những **công thức mẫu theo từng skill** bên dưới, tức Recipe 1 đến Recipe 4, có thể được áp dụng bằng cách chạy skill `bmad-customize` rồi mô tả ý định. Skill này sẽ tự chọn đúng bề mặt, viết file override và xác minh kết quả merge. Riêng Recipe 5, tức override cấu hình trung tâm để chỉnh danh sách agent (agent roster), hiện chưa nằm trong phạm vi v1 của skill nên vẫn cần viết tay. Các recipe trong trang này là nguồn sự thật cho phần *nên override cái gì*; `bmad-customize` phụ trách phần *thực hiện ra sao* ở lớp agent/workflow.
:::
## Mô hình ba lớp để suy nghĩ
Trước khi chọn recipe, bạn cần biết override của mình sẽ rơi vào đâu:
| Lớp | Nơi override sống | Phạm vi |
|---|---|---|
| **Agent** như Amelia, Mary, John | section `[agent]` trong `_bmad/custom/bmad-agent-{role}.toml` | Đi cùng persona vào **mọi workflow mà agent đó dispatch** |
| **Workflow** như `product-brief`, `create-prd` | section `[workflow]` trong `_bmad/custom/{workflow-name}.toml` | Chỉ áp dụng cho lần chạy của workflow đó |
| **Cấu hình trung tâm** | `[agents.*]`, `[core]`, `[modules.*]` trong `_bmad/custom/config.toml` | Agent roster và các thiết lập lúc cài đặt cần ghim cho cả tổ chức |
Nguyên tắc ngón tay cái:
- Nếu quy tắc nên áp dụng ở mọi nơi một engineer làm dev work, hãy tùy chỉnh **dev agent**
- Nếu nó chỉ áp dụng khi ai đó viết product brief, hãy tùy chỉnh **workflow product-brief**
- Nếu nó thay đổi *ai đang ngồi trong phòng* như đổi thương hiệu agent, thêm custom voice hoặc ép chung một artifact path, hãy sửa **cấu hình trung tâm**
## Recipe 1: định hình một agent trên mọi workflow mà nó điều phối (dispatch)
**Trường hợp dùng (use case):** Chuẩn hóa việc dùng công cụ và tích hợp với hệ thống bên ngoài để mọi workflow được dispatch qua agent đó tự động thừa hưởng cùng hành vi. Đây là mẫu áp dụng (pattern) có sức ảnh hưởng lớn nhất.
**Ví dụ:** Amelia, tức dev agent, luôn dùng Context7 cho tài liệu thư viện và fallback sang Linear nếu không tìm thấy story trong danh sách epic.
```toml
# _bmad/custom/bmad-agent-dev.toml
[agent]
# Áp dụng ở mọi lần kích hoạt. Theo Amelia đi vào dev-story, quick-dev,
# create-story, code-review, qa-generate và mọi skill cô ấy dispatch.
persistent_facts = [
"Với mọi truy vấn tài liệu thư viện như React, TypeScript, Zod, Prisma..., hãy gọi Context7 MCP tool (`mcp__context7__resolve_library_id` rồi `mcp__context7__get_library_docs`) trước khi dựa vào kiến thức trong dữ liệu huấn luyện (training data). Tài liệu cập nhật phải thắng API đã ghi nhớ.",
"Khi không tìm thấy tham chiếu story trong {planning_artifacts}/epics-and-stories.md, hãy tìm trong Linear bằng `mcp__linear__search_issues` theo ID hoặc tiêu đề story trước khi yêu cầu người dùng làm rõ. Nếu Linear trả về kết quả khớp, coi đó là nguồn story có thẩm quyền.",
]
```
**Vì sao cách này hiệu quả:** Chỉ với hai câu, bạn đã thay đổi mọi dev workflow trong tổ chức mà không lặp config từng nơi và không sửa source. Mọi engineer mới kéo repo về đều tự động thừa hưởng convention đó.
**File của team và file cá nhân**
- `bmad-agent-dev.toml`: commit vào git, áp dụng cho cả team
- `bmad-agent-dev.user.toml`: bị gitignore, dùng cho sở thích cá nhân chồng thêm lên trên
## Recipe 2: ép convention của tổ chức bên trong một workflow cụ thể
**Trường hợp dùng (use case):** Định hình *nội dung đầu ra* của một workflow để nó đáp ứng yêu cầu compliance, audit hoặc hệ thống downstream.
**Ví dụ:** mọi product brief đều phải có các trường compliance, và agent biết convention xuất bản của tổ chức.
```toml
# _bmad/custom/bmad-product-brief.toml
[workflow]
persistent_facts = [
"Mọi brief phải có trường 'Owner', 'Target Release' và 'Security Review Status'.",
"Các brief không mang tính thương mại như công cụ nội bộ hoặc dự án nghiên cứu vẫn phải có phần user value, nhưng có thể bỏ phân biệt cạnh tranh thị trường.",
"file:{project-root}/docs/enterprise/brief-publishing-conventions.md",
]
```
**Điều gì xảy ra:** Những fact này được nạp trong quá trình activation của workflow. Khi agent soạn brief, nó đã biết các trường bắt buộc và tài liệu convention nội bộ. Mặc định có sẵn, ví dụ `file:{project-root}/**/project-context.md`, vẫn tiếp tục được nạp vì phần này chỉ append thêm.
## Recipe 3: xuất bản kết quả hoàn tất sang hệ thống ngoài
**Trường hợp dùng (use case):** Sau khi workflow tạo ra output chính, tự động đẩy nó sang hệ thống nguồn sự thật của doanh nghiệp như Confluence, Notion, SharePoint, rồi mở tiếp công việc follow-up trong Jira, Linear hoặc Asana.
**Ví dụ:** brief được tự động publish lên Confluence và tùy chọn mở Jira epic.
```toml
# _bmad/custom/bmad-product-brief.toml
[workflow]
# Hook ở giai đoạn cuối. Scalar override sẽ thay hẳn mặc định rỗng.
on_complete = """
Publish và đề nghị bước tiếp theo:
1. Đọc đường dẫn file brief đã hoàn tất từ bước trước.
2. Gọi `mcp__atlassian__confluence_create_page` với:
- space: "PRODUCT"
- parent: "Product Briefs"
- title: tiêu đề của brief
- body: nội dung markdown của brief
Lưu lại URL trang được trả về.
3. Thông báo cho người dùng: "Brief đã được publish lên Confluence: <url>".
4. Hỏi: "Bạn có muốn tôi mở Jira epic cho brief này ngay bây giờ không?"
5. Nếu có, gọi `mcp__atlassian__jira_create_issue` với:
- type: "Epic"
- project: "PROD"
- summary: tiêu đề của brief
- description: tóm tắt ngắn cùng liên kết ngược về trang Confluence.
Sau đó báo lại epic key và URL.
6. Nếu không, thoát sạch.
Nếu một trong các MCP tool bị lỗi, hãy báo lỗi, in ra đường dẫn brief
và yêu cầu người dùng publish thủ công.
"""
```
**Vì sao dùng `on_complete` thay vì `activation_steps_append`:** `on_complete` chỉ chạy đúng một lần ở cuối, sau khi output chính của workflow đã được ghi ra. Đó là thời điểm đúng để publish artifact. `activation_steps_append` thì chạy mỗi lần kích hoạt, trước khi workflow làm công việc chính của nó.
**Điểm đánh đổi (trade-offs)**
- Publish lên Confluence là hành động không phá hủy, nên có thể luôn chạy khi hoàn tất
- Tạo Jira epic là hành động hiển thị cho cả team và kích hoạt các tín hiệu sprint planning, nên nên chặn bởi một bước xác nhận từ người dùng
- Nếu MCP tool lỗi, workflow phải có phương án dự phòng (fallback) rõ ràng thay vì âm thầm làm mất output
## Recipe 4: thay output template bằng template của riêng bạn
**Trường hợp dùng (use case):** Cấu trúc đầu ra mặc định không khớp định dạng mà tổ chức mong muốn, hoặc trong cùng một repo có nhiều tổ chức cần template riêng.
**Ví dụ:** trỏ workflow product-brief sang template do doanh nghiệp sở hữu.
```toml
# _bmad/custom/bmad-product-brief.toml
[workflow]
brief_template = "{project-root}/docs/enterprise/brief-template.md"
```
**Cách nó hoạt động:** `customize.toml` của workflow đi kèm `brief_template = "resources/brief-template.md"` dưới dạng đường dẫn tương đối tới skill root. Override của bạn lại trỏ tới một file trong `{project-root}`, nên agent sẽ đọc template của bạn trong bước tương ứng thay vì dùng template mặc định đi kèm.
**Mẹo viết template**
- Giữ template trong `{project-root}/docs/` hoặc `{project-root}/_bmad/custom/templates/` để nó được version cùng với file override
- Nên dùng cùng convention cấu trúc với template mặc định, ví dụ heading và frontmatter, để agent có điểm tựa ổn định
- Với repo đa tổ chức, hãy dùng `.user.toml` để từng nhóm nhỏ có thể trỏ sang template riêng mà không cần sửa file dùng chung của team
## Recipe 5: tùy chỉnh danh sách agent (agent roster)
**Trường hợp dùng (use case):** Thay đổi *ai đang ngồi trong phòng* cho những skill dựa trên roster như `bmad-party-mode`, `bmad-retrospective``bmad-advanced-elicitation`, mà không cần sửa source hay fork. Dưới đây là ba biến thể thường gặp.
### 5a. Rebrand một agent của BMad trên toàn tổ chức
Mỗi agent thật đều có một descriptor được installer tổng hợp từ `module.yaml`. Bạn có thể override descriptor này để đổi giọng điệu và framing ở mọi roster consumer:
```toml
# _bmad/custom/config.toml (commit vào git, áp dụng cho mọi developer)
[agents.bmad-agent-analyst]
description = "Mary, nhà phân tích nghiệp vụ giàu nhận thức pháp lý, pha trộn Porter với Minto nhưng sống cùng các audit trail của FDA. Cô ấy nói như một điều tra viên pháp chứng đang trình bày hồ sơ vụ án."
```
Party mode sẽ spawn Mary với description mới này. Bản thân activation của analyst vẫn chạy bình thường vì hành vi của Mary sống trong `customize.toml` theo từng skill. Override này chỉ thay đổi cách **các skill bên ngoài nhìn thấy và giới thiệu cô ấy**, chứ không thay đổi cách cô ấy hoạt động bên trong.
### 5b. Thêm một agent hư cấu hoặc agent tự định nghĩa
Chỉ cần một descriptor đầy đủ là đủ cho các tính năng dựa trên roster, không cần thư mục skill. Điều này rất phù hợp nếu bạn muốn tăng màu sắc tính cách cho party mode hay các buổi brainstorming:
```toml
# _bmad/custom/config.user.toml (cá nhân, gitignore)
[agents.spock]
team = "startrek"
name = "Commander Spock"
title = "Science Officer"
icon = "🖖"
description = "Logic là trên hết, cảm xúc bị nén lại. Mở đầu nhận xét bằng 'Fascinating.' Không bao giờ làm tròn lên. Là đối trọng với mọi lập luận chỉ dựa vào linh cảm."
[agents.mccoy]
team = "startrek"
name = "Dr. Leonard McCoy"
title = "Chief Medical Officer"
icon = "⚕️"
description = "Sự ấm áp của một bác sĩ miền quê, đi kèm với tính nóng nảy. 'Dammit Jim, I'm a doctor not a ___.' Là đối trọng đạo đức với Spock."
```
Khi bạn yêu cầu party-mode "mời nhóm Star Trek" hoặc "mời phi hành đoàn Enterprise", nó sẽ lọc theo `team = "startrek"` và spawn Spock cùng McCoy dựa trên các descriptor đó. Các agent thật của BMad như Mary hay Amelia vẫn có thể ngồi cùng bàn nếu bạn muốn.
### 5c. Ghim thiết lập cài đặt dùng chung cho cả team
Installer sẽ hỏi từng developer các giá trị như đường dẫn `planning_artifacts`. Khi tổ chức muốn có một câu trả lời thống nhất, hãy ghim nó trong cấu hình trung tâm. Khi đó, mọi câu trả lời cục bộ của từng người sẽ bị override lúc resolve:
```toml
# _bmad/custom/config.toml
[modules.bmm]
planning_artifacts = "{project-root}/shared/planning"
implementation_artifacts = "{project-root}/shared/implementation"
[core]
document_output_language = "English"
```
Những thiết lập cá nhân như `user_name`, `communication_language` hoặc `user_skill_level` nên vẫn nằm trong `_bmad/config.user.toml` riêng của từng developer. File chung của team không nên đụng vào các giá trị đó.
**Vì sao việc này nằm ở cấu hình trung tâm thay vì per-agent customize.toml:** File per-agent chỉ định hình cách *một* agent hành xử khi nó được kích hoạt. Cấu hình trung tâm lại định hình những gì các roster consumer *nhìn thấy khi quan sát cánh đồng chung*: agent nào tồn tại, tên gì, thuộc team nào và các thiết lập cài đặt dùng chung mà toàn repo đã thống nhất. Hai bề mặt khác nhau, hai công việc khác nhau.
## Củng cố các quy tắc toàn cục trong file hướng dẫn phiên của IDE
Tùy chỉnh của BMad chỉ được nạp khi một skill được kích hoạt. Trong khi đó, nhiều công cụ IDE còn nạp một file hướng dẫn toàn cục ở **đầu mọi phiên**, trước cả khi skill nào chạy, như `CLAUDE.md`, `AGENTS.md`, `.cursor/rules/` hay `.github/copilot-instructions.md`. Với những quy tắc phải đúng cả khi bạn đang chat thường, hãy lặp lại phiên bản rút gọn của chúng trong file đó nữa.
**Khi nào nên "đánh đôi"**
- Quy tắc đó đủ quan trọng đến mức một cuộc chat thường, chưa kích hoạt BMad skill nào, cũng vẫn phải tuân theo
- Bạn muốn áp dụng kiểu "gia cố hai lớp" (belt-and-suspenders) vì hành vi mặc định từ dữ liệu huấn luyện (training data) có thể kéo model đi chệch
- Quy tắc đủ ngắn để lặp lại mà không làm file hướng dẫn đầu phiên trở nên phình to
**Ví dụ:** một dòng trong `CLAUDE.md` của repo để củng cố quy tắc ở Recipe 1.
```markdown
<!-- Mọi lần đọc tài liệu thư viện phải đi qua Context7 MCP tool
(`mcp__context7__resolve_library_id` rồi `mcp__context7__get_library_docs`)
trước khi dựa vào kiến thức từ dữ liệu huấn luyện (training data). -->
```
Chỉ một câu, nhưng được nạp ở mọi phiên. Nó kết hợp với cấu hình `bmad-agent-dev.toml` để quy tắc có hiệu lực cả trong workflow của Amelia lẫn trong các cuộc trò chuyện ad-hoc với assistant. Mỗi lớp giữ đúng phạm vi của mình:
| Lớp | Phạm vi | Dùng cho |
|---|---|---|
| File hướng dẫn phiên của IDE như `CLAUDE.md` hoặc `AGENTS.md` | Mọi phiên, trước khi bất kỳ skill nào chạy | Quy tắc ngắn, phổ quát, phải sống cả ngoài BMad |
| Tùy chỉnh agent của BMad | Mọi workflow mà agent đó dispatch | Hành vi riêng theo persona/agent |
| Tùy chỉnh workflow của BMad | Một lần chạy workflow | Dạng đầu ra, hook publish, template và logic riêng của workflow |
| Cấu hình trung tâm của BMad | Agent roster và thiết lập cài đặt dùng chung | Ai đang ngồi trong phòng và đường dẫn nào cả team dùng chung |
Hãy giữ file hướng dẫn của IDE **ngắn gọn**. Một tá dòng được chọn kỹ sẽ hiệu quả hơn một danh sách dài lê thê. Model phải đọc file đó ở mọi lượt, và càng nhiều nhiễu thì càng ít tín hiệu.
## Kết hợp các recipe
Cả năm recipe này có thể kết hợp song song. Một cấu hình doanh nghiệp thực tế cho `bmad-product-brief` hoàn toàn có thể đặt `persistent_facts` theo Recipe 2, `on_complete` theo Recipe 3 và `brief_template` theo Recipe 4 trong cùng một file. Quy tắc ở cấp agent theo Recipe 1 sẽ nằm trong file của agent tương ứng, còn cấu hình trung tâm theo Recipe 5 thì ghim roster và thiết lập chung. Tất cả cùng hoạt động đồng thời.
```toml
# _bmad/custom/bmad-product-brief.toml (cấp workflow)
[workflow]
persistent_facts = ["..."]
brief_template = "{project-root}/docs/enterprise/brief-template.md"
on_complete = """ ... """
```
```toml
# _bmad/custom/bmad-agent-analyst.toml (cấp agent, Mary sẽ dispatch product-brief)
[agent]
persistent_facts = ["Luôn thêm mục 'Regulatory Review' khi domain liên quan tới healthcare, finance hoặc dữ liệu trẻ em."]
```
Kết quả là Mary nạp quy tắc review pháp lý ngay ở lúc kích hoạt persona. Khi người dùng chọn menu item product-brief, workflow sẽ nạp các convention riêng của nó chồng lên, ghi ra template của doanh nghiệp và publish lên Confluence khi hoàn tất. Mỗi lớp đều đóng góp một phần và không lớp nào đòi hỏi sửa source của BMad.
## Khắc phục sự cố
**Override không có tác dụng?** Hãy kiểm tra file có nằm trong `_bmad/custom/` và dùng đúng tên thư mục skill không, ví dụ `bmad-agent-dev.toml`, chứ không phải `bmad-dev.toml`. Nếu cần, xem lại [Cách tùy chỉnh BMad](./customize-bmad.md).
**Không chắc tên MCP tool?** Hãy dùng đúng tên mà MCP server hiện tại expose trong phiên của bạn. Nếu chưa chắc, hãy yêu cầu Claude Code liệt kê các MCP tool đang có. Những tên hardcode trong `persistent_facts` hay `on_complete` sẽ không chạy nếu MCP server chưa được kết nối.
**Mẫu áp dụng (pattern) trong ví dụ không khớp setup của tôi?** Các recipe trên chỉ là ví dụ mẫu. Cơ chế bên dưới, gồm merge ba lớp, quy tắc cấu trúc và mô hình agent-span-workflow, vẫn hỗ trợ nhiều pattern khác. Hãy kết hợp chúng theo nhu cầu thực tế của bạn.

View File

@ -5,27 +5,79 @@ sidebar:
order: 4 order: 4
--- ---
Hãy dùng trợ giúp tích hợp sẵn của BMad, tài liệu nguồn, hoặc cộng đồng để tìm câu trả lời, theo thứ tự từ nhanh nhất đến đầy đủ nhất. ## Bắt đầu tại đây: BMad-Help
## 1. Hỏi BMad-Help **Cách nhanh nhất để tìm câu trả lời về BMad là dùng skill `bmad-help`.** Đây là công cụ hướng dẫn thông minh có thể trả lời hơn 80% các câu hỏi và có sẵn ngay trong IDE khi bạn làm việc.
Cách nhanh nhất để có câu trả lời. Skill `bmad-help` có sẵn ngay trong phiên AI của bạn và xử lý được hơn 80% câu hỏi. Nó sẽ kiểm tra dự án, nhìn xem bạn đã hoàn thành đến đâu và cho bạn biết nên làm gì tiếp theo. BMad-Help không chỉ là công cụ tra cứu, nó còn:
- **Kiểm tra dự án của bạn** để xem những gì đã hoàn thành
- **Hiểu ngôn ngữ tự nhiên** - đặt câu hỏi bằng ngôn ngữ bình thường
- **Thay đổi theo module đã cài** - hiển thị các lựa chọn liên quan
- **Tự động chạy sau workflow** - nói rõ bạn cần làm gì tiếp theo
- **Đề xuất tác vụ đầu tiên cần thiết** - không cần đoán nên bắt đầu từ đâu
### Cách dùng BMad-Help
Gọi nó trực tiếp trong phiên AI của bạn:
```text ```text
bmad-help Tôi có ý tưởng SaaS và đã biết tất cả tính năng. Tôi nên bắt đầu từ đâu? bmad-help
bmad-help Tôi có những lựa chọn nào cho thiết kế UX?
bmad-help Tôi đang bị mắc ở workflow PRD
``` ```
:::tip :::tip
Bạn cũng có thể dùng `/bmad-help` hoặc `$bmad-help` tùy nền tảng, nhưng chỉ `bmad-help` là cách nên hoạt động mọi nơi. Bạn cũng có thể dùng `/bmad-help` hoặc `$bmad-help` tùy nền tảng, nhưng chỉ `bmad-help` là cách nên hoạt động mọi nơi.
::: :::
## 2. Đi sâu hơn với mã nguồn Kết hợp với câu hỏi ngôn ngữ tự nhiên:
BMad-Help dựa trên cấu hình bạn đã cài đặt. Nếu bạn cần tìm hiểu nội bộ, lịch sử, hay kiến trúc của BMad, hoặc đang nghiên cứu BMad trước khi cài, hãy để AI đọc trực tiếp mã nguồn. ```text
bmad-help Tôi có ý tưởng SaaS và đã biết tất cả tính năng. Tôi nên bắt đầu từ đâu?
bmad-help Tôi có những lựa chọn nào cho thiết kế UX?
bmad-help Tôi đang bị mắc ở workflow PRD
bmad-help Cho tôi xem tôi đã làm được gì đến giờ
```
Hãy clone hoặc mở [repo BMAD-METHOD](https://github.com/bmad-code-org/BMAD-METHOD) rồi hỏi AI của bạn về nó. Bất kỳ công cụ nào có hỗ trợ agent như Claude Code, Cursor, Windsurf... đều có thể đọc mã nguồn và trả lời trực tiếp. BMad-Help sẽ trả lời:
- Điều gì được khuyến nghị cho tình huống của bạn
- Tác vụ đầu tiên cần thiết là gì
- Phần còn lại của quy trình trông thế nào
## Khi nào nên dùng tài liệu này
Hãy xem phần này khi:
- Bạn muốn hiểu kiến trúc hoặc nội bộ của BMad
- Bạn cần câu trả lời nằm ngoài phạm vi BMad-Help cung cấp
- Bạn đang nghiên cứu BMad trước khi cài đặt
- Bạn muốn tự khám phá source code trực tiếp
## Các bước thực hiện
### 1. Chọn nguồn thông tin
| Nguồn | Phù hợp nhất cho | Ví dụ |
| --- | --- | --- |
| **Thư mục `_bmad`** | Cách BMad vận hành: agent, workflow, prompt | "PM agent làm gì?" |
| **Toàn bộ repo GitHub** | Lịch sử, installer, kiến trúc | "v6 thay đổi gì?" |
| **`llms-full.txt`** | Tổng quan nhanh từ tài liệu | "Giải thích bốn giai đoạn của BMad" |
Thư mục `_bmad` được tạo khi bạn cài đặt BMad. Nếu chưa có, hãy clone repo thay thế.
### 2. Cho AI của bạn truy cập nguồn thông tin
**Nếu AI của bạn đọc được tệp (Claude Code, Cursor, ...):**
- **Đã cài BMad:** Trỏ đến thư mục `_bmad` và hỏi trực tiếp
- **Cần bối cảnh sâu hơn:** Clone [repo đầy đủ](https://github.com/bmad-code-org/BMAD-METHOD)
**Nếu bạn dùng ChatGPT hoặc Claude.ai:**
Nạp `llms-full.txt` vào phiên làm việc:
```text
https://bmad-code-org.github.io/BMAD-METHOD/llms-full.txt
```
### 3. Đặt câu hỏi
:::note[Ví dụ] :::note[Ví dụ]
**Q:** "Hãy chỉ tôi cách nhanh nhất để xây dựng một thứ gì đó bằng BMad" **Q:** "Hãy chỉ tôi cách nhanh nhất để xây dựng một thứ gì đó bằng BMad"
@ -33,27 +85,29 @@ Hãy clone hoặc mở [repo BMAD-METHOD](https://github.com/bmad-code-org/BMAD-
**A:** Dùng Quick Flow: Chạy `bmad-quick-dev` - nó sẽ làm rõ ý định, lập kế hoạch, triển khai, review và trình bày kết quả trong một workflow duy nhất, bỏ qua các giai đoạn lập kế hoạch đầy đủ. **A:** Dùng Quick Flow: Chạy `bmad-quick-dev` - nó sẽ làm rõ ý định, lập kế hoạch, triển khai, review và trình bày kết quả trong một workflow duy nhất, bỏ qua các giai đoạn lập kế hoạch đầy đủ.
::: :::
**Mẹo để có câu trả lời tốt hơn:** ## Bạn nhận được gì
- **Hãy hỏi thật cụ thể** - "Bước 3 trong workflow PRD làm gì?" sẽ tốt hơn "PRD hoạt động ra sao?" Các câu trả lời trực tiếp về BMad: agent hoạt động ra sao, workflow làm gì, tại sao cấu trúc lại được tổ chức như vậy, mà không cần chờ người khác trả lời.
- **Kiểm tra lại những câu trả lời nghe lạ** - LLM đôi khi vẫn sai. Hãy kiểm tra file nguồn hoặc hỏi trên Discord.
### Không dùng agent? Dùng trang docs ## Mẹo
Nếu AI của bạn không đọc được file cục bộ như ChatGPT hoặc Claude.ai, hãy nạp [llms-full.txt](https://bmad-code-org.github.io/BMAD-METHOD/llms-full.txt) vào phiên làm việc. Đây là bản chụp tài liệu BMad trong một file duy nhất. - **Xác minh những câu trả lời gây bất ngờ** - LLM vẫn có lúc nhầm. Hãy kiểm tra tệp nguồn hoặc hỏi trên Discord.
- **Đặt câu hỏi cụ thể** - "Bước 3 trong workflow PRD làm gì?" tốt hơn "PRD hoạt động ra sao?"
## 3. Hỏi người thật ## Vẫn bị mắc?
Nếu cả BMad-Help lẫn mã nguồn vẫn chưa trả lời được câu hỏi của bạn, lúc này bạn đã có một câu hỏi rõ hơn nhiều để đem đi hỏi cộng đồng. Đã thử cách tiếp cận bằng LLM mà vẫn cần trợ giúp? Lúc này bạn đã có một câu hỏi tốt hơn để đem đi hỏi.
| Kênh | Dùng cho | | Kênh | Dùng cho |
| --- | --- | | --- | --- |
| `help-requests` forum | Câu hỏi | | `#bmad-method-help` | Câu hỏi nhanh (trò chuyện thời gian thực) |
| `help-requests` forum | Câu hỏi chi tiết (có thể tìm lại, tồn tại lâu dài) |
| `#suggestions-feedback` | Ý tưởng và đề xuất tính năng | | `#suggestions-feedback` | Ý tưởng và đề xuất tính năng |
| `#report-bugs-and-issues` | Báo cáo lỗi |
**Discord:** [discord.gg/gk8jAdXWmj](https://discord.gg/gk8jAdXWmj) **Discord:** [discord.gg/gk8jAdXWmj](https://discord.gg/gk8jAdXWmj)
**GitHub Issues:** [github.com/bmad-code-org/BMAD-METHOD/issues](https://github.com/bmad-code-org/BMAD-METHOD/issues) **GitHub Issues:** [github.com/bmad-code-org/BMAD-METHOD/issues](https://github.com/bmad-code-org/BMAD-METHOD/issues) (dành cho các lỗi rõ ràng)
*Chính bạn,* *Chính bạn,*
*đang mắc kẹt* *đang mắc kẹt*

View File

@ -1,181 +0,0 @@
---
title: 'Cài đặt module tùy chỉnh và module cộng đồng'
description: Cài các module bên thứ ba từ kho cộng đồng (community registry), kho Git hoặc đường dẫn cục bộ
sidebar:
order: 3
---
Sử dụng trình cài đặt BMad để thêm module từ kho cộng đồng (community registry), kho Git của bên thứ ba hoặc đường dẫn file cục bộ.
## Khi nào nên dùng
- Cài một module do cộng đồng đóng góp từ BMad registry
- Cài module từ kho Git của bên thứ ba như GitHub, GitLab, Bitbucket hoặc máy chủ tự host
- Kiểm thử một module bạn đang phát triển cục bộ với BMad Builder
- Cài module từ máy chủ Git riêng tư hoặc tự host
:::note[Điều kiện tiên quyết]
Yêu cầu [Node.js](https://nodejs.org) v20+ và `npx` đi kèm npm. Bạn có thể chọn module tùy chỉnh và module cộng đồng trong lúc cài mới, hoặc thêm chúng vào một bản cài hiện có.
:::
## Module cộng đồng
Các module cộng đồng được tuyển chọn trong [BMad plugins marketplace](https://github.com/bmad-code-org/bmad-plugins-marketplace). Chúng được sắp theo danh mục và được ghim vào commit đã được phê duyệt để tăng độ an toàn.
### 1. Chạy trình cài đặt
```bash
npx bmad-method install
```
### 2. Duyệt danh mục (catalog) cộng đồng
Sau khi chọn module chính thức, trình cài đặt sẽ hỏi:
```
Would you like to browse community modules?
```
Chọn **Yes** để vào màn hình duyệt catalog. Tại đây bạn có thể:
- Duyệt theo danh mục
- Xem các module nổi bật
- Xem toàn bộ module khả dụng
- Tìm kiếm theo từ khóa
### 3. Chọn module
Chọn module từ bất kỳ danh mục nào. Trình cài đặt sẽ hiển thị mô tả, phiên bản và mức độ tin cậy (trust tier). Những module đã cài sẽ được tick sẵn để tiện cập nhật.
### 4. Tiếp tục quá trình cài đặt
Sau khi chọn xong module cộng đồng, trình cài đặt sẽ chuyển sang bước nguồn tùy chỉnh (custom source), rồi tới cấu hình tool/IDE và phần còn lại của luồng cài đặt.
## Nguồn tùy chỉnh: Git URL và đường dẫn cục bộ
Module tùy chỉnh có thể đến từ bất kỳ kho Git nào hoặc từ một thư mục cục bộ trên máy bạn. Trình cài đặt sẽ resolve nguồn, phân tích cấu trúc module rồi cài nó song song với các module khác.
### Cài đặt tương tác
Trong quá trình cài, sau bước chọn community module, trình cài đặt sẽ hỏi:
```
Would you like to install from a custom source (Git URL or local path)?
```
Chọn **Yes**, rồi nhập nguồn:
| Loại đầu vào | Ví dụ |
| --------------------- | ------------------------------------------------- |
| HTTPS URL trên bất kỳ host nào | `https://github.com/org/repo` |
| HTTP URL trên bất kỳ host nào | `http://host/org/repo` |
| HTTPS URL trỏ vào một thư mục con | `https://github.com/org/repo/tree/main/my-module` |
| SSH URL | `git@github.com:org/repo.git` |
| Đường dẫn cục bộ | `/Users/me/projects/my-module` |
| Đường dẫn cục bộ dùng `~` | `~/projects/my-module` |
Với URL, trình cài đặt sẽ clone repository. Với đường dẫn cục bộ, nó sẽ đọc trực tiếp từ đĩa. Sau đó nó sẽ hiển thị các module tìm thấy để bạn chọn cài.
### Cài đặt không tương tác
Dùng cờ `--custom-source` để cài module tùy chỉnh từ dòng lệnh:
```bash
npx bmad-method install \
--directory . \
--custom-source /path/to/my-module \
--tools claude-code \
--yes
```
Khi cung cấp `--custom-source` mà không kèm `--modules`, hệ thống chỉ cài core và các module tùy chỉnh. Nếu muốn cài cả module chính thức, hãy thêm `--modules`:
```bash
npx bmad-method install \
--directory . \
--modules bmm \
--custom-source https://gitlab.com/myorg/my-module \
--tools claude-code \
--yes
```
Bạn có thể truyền nhiều nguồn bằng cách ngăn cách chúng bằng dấu phẩy:
```bash
--custom-source /path/one,https://github.com/org/repo,/path/two
```
## Cơ chế phát hiện module
Trình cài đặt dùng hai chế độ để tìm module có thể cài trong một nguồn:
| Chế độ | Điều kiện kích hoạt | Hành vi |
| --------- | ------------------------------------------------- | -------------------------------------------------------------------------------------------- |
| Discovery | Nguồn chứa `.claude-plugin/marketplace.json` | Liệt kê toàn bộ plugin trong manifest để bạn chọn cái nào cần cài |
| Direct | Không tìm thấy `marketplace.json` | Quét thư mục để tìm các skill, tức các thư mục con chứa `SKILL.md`, rồi coi toàn bộ như một module duy nhất |
Discovery là chế độ phát hiện qua manifest. Direct là chế độ quét trực tiếp thư mục. Discovery phù hợp với module đã publish, còn Direct thuận tiện khi bạn đang trỏ vào một thư mục skills trong quá trình phát triển cục bộ.
:::note[Về thư mục `.claude-plugin/`]
Đường dẫn `.claude-plugin/marketplace.json` là một quy ước tiêu chuẩn được nhiều trình cài đặt AI tool cùng dùng để hỗ trợ khả năng khám phá plugin. Nó không đòi hỏi Claude, không dùng Claude API và cũng không ảnh hưởng tới việc bạn đang dùng công cụ AI nào. Bất kỳ module nào có file này đều có thể được khám phá bởi những trình cài đặt tuân theo cùng quy ước.
:::
## Quy trình phát triển cục bộ
Nếu bạn đang xây một module bằng [BMad Builder](https://github.com/bmad-code-org/bmad-builder), bạn có thể cài trực tiếp từ thư mục đang làm việc:
```bash
npx bmad-method install \
--directory ~/my-project \
--custom-source ~/my-module-repo/skills \
--tools claude-code \
--yes
```
Nguồn cục bộ được tham chiếu theo đường dẫn, không bị copy vào cache. Khi bạn sửa source của module rồi cài lại, trình cài đặt sẽ lấy đúng các thay đổi mới nhất.
:::caution[Xóa nguồn sau khi cài]
Nếu bạn xóa thư mục nguồn cục bộ sau khi cài, các file module đã được cài bên trong `_bmad/` vẫn được giữ nguyên. Tuy vậy, module đó sẽ bị bỏ qua trong các lần cập nhật cho tới khi đường dẫn nguồn được khôi phục.
:::
## Bạn sẽ nhận được gì
Sau khi cài, các module tùy chỉnh sẽ xuất hiện trong `_bmad/` cùng với module chính thức:
```text
your-project/
├── _bmad/
│ ├── core/ # Module core tích hợp
│ ├── bmm/ # Module chính thức, nếu bạn chọn
│ ├── my-module/ # Module tùy chỉnh của bạn
│ │ ├── my-skill/
│ │ │ └── SKILL.md
│ │ └── module-help.csv
│ └── _config/
│ └── manifest.yaml # Theo dõi mọi module, phiên bản và nguồn
└── ...
```
Manifest sẽ ghi lại nguồn của từng module tùy chỉnh, dùng `repoUrl` cho nguồn Git và `localPath` cho nguồn cục bộ, để quá trình cập nhật nhanh (quick update) sau này có thể tìm lại nguồn chính xác.
## Cập nhật module tùy chỉnh
Module tùy chỉnh tham gia vào luồng cập nhật bình thường:
- **Cập nhật nhanh (quick update)** với `--action quick-update`: làm mới mọi module từ đúng nguồn ban đầu. Module dựa trên Git sẽ được fetch lại, còn module cục bộ sẽ được đọc lại từ đường dẫn nguồn
- **Cập nhật đầy đủ (full update)**: chạy lại bước chọn module để bạn có thể thêm hoặc gỡ module tùy chỉnh
## Tạo module của riêng bạn
Hãy dùng [BMad Builder](https://github.com/bmad-code-org/bmad-builder) để tạo module mà người khác có thể cài:
1. Chạy `bmad-module-builder` để sinh skeleton cho module
2. Thêm skill, agent và workflow bằng các công cụ builder tương ứng
3. Publish lên một kho Git hoặc chia sẻ cả thư mục
4. Người khác có thể cài bằng `--custom-source <url-kho-cua-ban>`
Nếu muốn module hỗ trợ chế độ Discovery, hãy thêm `.claude-plugin/marketplace.json` ở root repository. Đây là quy ước chung giữa nhiều công cụ, không dành riêng cho Claude. Hãy xem [tài liệu của BMad Builder](https://github.com/bmad-code-org/bmad-builder) để biết định dạng của `marketplace.json`.
:::tip[Hãy thử cục bộ trước]
Trong quá trình phát triển, hãy cài module bằng đường dẫn cục bộ để lặp nhanh trước khi publish lên kho Git.
:::

View File

@ -28,7 +28,6 @@ Yêu cầu [Node.js](https://nodejs.org) v20+ và `npx` (đi kèm với npm).
| `--modules <modules>` | Danh sách ID module, cách nhau bởi dấu phẩy | `--modules bmm,bmb` | | `--modules <modules>` | Danh sách ID module, cách nhau bởi dấu phẩy | `--modules bmm,bmb` |
| `--tools <tools>` | Danh sách ID công cụ/IDE, cách nhau bởi dấu phẩy (dùng `none` để bỏ qua) | `--tools claude-code,cursor` hoặc `--tools none` | | `--tools <tools>` | Danh sách ID công cụ/IDE, cách nhau bởi dấu phẩy (dùng `none` để bỏ qua) | `--tools claude-code,cursor` hoặc `--tools none` |
| `--action <type>` | Hành động cho bản cài đặt hiện có: `install` (mặc định), `update`, hoặc `quick-update` | `--action quick-update` | | `--action <type>` | Hành động cho bản cài đặt hiện có: `install` (mặc định), `update`, hoặc `quick-update` | `--action quick-update` |
| `--custom-source <sources>` | Danh sách Git URL hoặc đường dẫn cục bộ cho module tùy chỉnh, cách nhau bởi dấu phẩy | `--custom-source /path/to/module` |
### Cấu hình cốt lõi ### Cấu hình cốt lõi
@ -82,7 +81,6 @@ Chạy `npx bmad-method install` một lần ở chế độ tương tác để
| Hoàn toàn không tương tác | Cung cấp đầy đủ cờ để bỏ qua tất cả prompt | `npx bmad-method install --directory . --modules bmm --tools claude-code --yes` | | Hoàn toàn không tương tác | Cung cấp đầy đủ cờ để bỏ qua tất cả prompt | `npx bmad-method install --directory . --modules bmm --tools claude-code --yes` |
| Bán tương tác | Cung cấp một số cờ, BMad hỏi thêm phần còn lại | `npx bmad-method install --directory . --modules bmm` | | Bán tương tác | Cung cấp một số cờ, BMad hỏi thêm phần còn lại | `npx bmad-method install --directory . --modules bmm` |
| Chỉ dùng mặc định | Chấp nhận tất cả giá trị mặc định với `-y` | `npx bmad-method install --yes` | | Chỉ dùng mặc định | Chấp nhận tất cả giá trị mặc định với `-y` | `npx bmad-method install --yes` |
| Chỉ dùng custom source | Chỉ cài core và module tùy chỉnh | `npx bmad-method install --directory . --custom-source /path/to/module --tools claude-code --yes` |
| Không cấu hình công cụ | Bỏ qua cấu hình công cụ/IDE | `npx bmad-method install --modules bmm --tools none` | | Không cấu hình công cụ | Bỏ qua cấu hình công cụ/IDE | `npx bmad-method install --modules bmm --tools none` |
## Ví dụ ## Ví dụ
@ -121,33 +119,6 @@ npx bmad-method install \
--action quick-update --action quick-update
``` ```
### Cài từ custom source
Cài một module từ đường dẫn cục bộ hoặc từ bất kỳ Git host nào:
```bash
npx bmad-method install \
--directory . \
--custom-source /path/to/my-module \
--tools claude-code \
--yes
```
Kết hợp cùng module chính thức:
```bash
npx bmad-method install \
--directory . \
--modules bmm \
--custom-source https://gitlab.com/myorg/my-module \
--tools claude-code \
--yes
```
:::note[Hành vi của `custom-source`]
Khi dùng `--custom-source` mà không kèm `--modules`, hệ thống chỉ cài core và các module tùy chỉnh. Nếu muốn cài cả module chính thức, hãy thêm `--modules`. Xem thêm [Cài đặt module tùy chỉnh và module cộng đồng](./install-custom-modules.md) để biết chi tiết.
:::
## Bạn nhận được gì ## Bạn nhận được gì
- Thư mục `_bmad/` đã được cấu hình đầy đủ trong dự án của bạn - Thư mục `_bmad/` đã được cấu hình đầy đủ trong dự án của bạn

View File

@ -1,5 +1,5 @@
--- ---
title: "Quản lý bối cảnh dự án" title: "Quản lý Project Context"
description: Tạo và duy trì project-context.md để định hướng cho các agent AI description: Tạo và duy trì project-context.md để định hướng cho các agent AI
sidebar: sidebar:
order: 8 order: 8

View File

@ -1,5 +1,5 @@
--- ---
title: "Sửa nhanh" title: "Quick Fixes"
description: Cách thực hiện các sửa nhanh và thay đổi ad-hoc description: Cách thực hiện các sửa nhanh và thay đổi ad-hoc
sidebar: sidebar:
order: 5 order: 5

View File

@ -1,5 +1,5 @@
--- ---
title: Các agent title: Agents
description: Các agent mặc định của BMM cùng skill ID, trigger menu và workflow chính description: Các agent mặc định của BMM cùng skill ID, trigger menu và workflow chính
sidebar: sidebar:
order: 2 order: 2
@ -17,7 +17,7 @@ Trang này liệt kê các agent mặc định của BMM (bộ Agile suite) đư
| Agent | Skill ID | Trigger | Workflow chính | | Agent | Skill ID | Trigger | Workflow chính |
| --------------------------- | -------------------- | ---------------------------------- | --------------------------------------------------------------------------------------------------- | | --------------------------- | -------------------- | ---------------------------------- | --------------------------------------------------------------------------------------------------- |
| Analyst (Mary) | `bmad-analyst` | `BP`, `MR`, `DR`, `TR`, `CB`, `WB`, `DP` | Brainstorm, Market Research, Domain Research, Technical Research, Create Brief, PRFAQ Challenge, Document Project | | Analyst (Mary) | `bmad-analyst` | `BP`, `RS`, `CB`, `WB`, `DP` | Brainstorm Project, Research, Create Brief, PRFAQ Challenge, Document Project |
| Product Manager (John) | `bmad-pm` | `CP`, `VP`, `EP`, `CE`, `IR`, `CC` | Create/Validate/Edit PRD, Create Epics and Stories, Implementation Readiness, Correct Course | | Product Manager (John) | `bmad-pm` | `CP`, `VP`, `EP`, `CE`, `IR`, `CC` | Create/Validate/Edit PRD, Create Epics and Stories, Implementation Readiness, Correct Course |
| Architect (Winston) | `bmad-architect` | `CA`, `IR` | Create Architecture, Implementation Readiness | | Architect (Winston) | `bmad-architect` | `CA`, `IR` | Create Architecture, Implementation Readiness |
| Developer (Amelia) | `bmad-agent-dev` | `DS`, `QD`, `QA`, `CR`, `SP`, `CS`, `ER` | Dev Story, Quick Dev, QA Test Generation, Code Review, Sprint Planning, Create Story, Epic Retrospective | | Developer (Amelia) | `bmad-agent-dev` | `DS`, `QD`, `QA`, `CR`, `SP`, `CS`, `ER` | Dev Story, Quick Dev, QA Test Generation, Code Review, Sprint Planning, Create Story, Epic Retrospective |

View File

@ -1,5 +1,5 @@
--- ---
title: Các skill title: Skills
description: Tài liệu tham chiếu cho skill của BMad — skill là gì, hoạt động ra sao và tìm ở đâu. description: Tài liệu tham chiếu cho skill của BMad — skill là gì, hoạt động ra sao và tìm ở đâu.
sidebar: sidebar:
order: 3 order: 3
@ -92,7 +92,7 @@ Workflow skills chạy một quy trình có cấu trúc, nhiều bước mà kh
| Ví dụ skill | Mục đích | | Ví dụ skill | Mục đích |
| --- | --- | | --- | --- |
| `bmad-product-brief` | Tạo product brief — phiên discovery có hướng dẫn khi concept của bạn đã rõ | | `bmad-product-brief` | Tạo product brief — phiên discovery có hướng dẫn khi concept của bạn đã rõ |
| `bmad-prfaq` | Bài kiểm tra [Working Backwards PRFAQ](../explanation/analysis-phase.md#prfaq-working-backwards) để stress-test concept sản phẩm | | `bmad-prfaq` | Bài kiểm tra Working Backwards PRFAQ để stress-test concept sản phẩm |
| `bmad-create-prd` | Tạo Product Requirements Document | | `bmad-create-prd` | Tạo Product Requirements Document |
| `bmad-create-architecture` | Thiết kế kiến trúc hệ thống | | `bmad-create-architecture` | Thiết kế kiến trúc hệ thống |
| `bmad-create-epics-and-stories` | Tạo epics và stories | | `bmad-create-epics-and-stories` | Tạo epics và stories |

View File

@ -1,31 +1,31 @@
--- ---
title: Công cụ cốt lõi title: Core Tools
description: Tài liệu tham chiếu cho mọi tác vụ và quy trình tích hợp sẵn có trong mọi bản cài BMad mà không cần module bổ sung. description: Tài liệu tham chiếu cho mọi task và workflow tích hợp sẵn có trong mọi bản cài BMad mà không cần module bổ sung.
sidebar: sidebar:
order: 2 order: 2
--- ---
Mọi bản cài BMad đều bao gồm một tập skill cốt lõi có thể dùng cùng với bất cứ việc gì bạn đang làm, các tác vụ và quy trình độc lập hoạt động xuyên suốt mọi dự án, mọi module và mọi giai đoạn. Chúng luôn có sẵn bất kể bạn cài những module tùy chọn nào. Mọi bản cài BMad đều bao gồm một tập core skills có thể dùng cùng với bất cứ việc gì bạn đang làm — các task và workflow độc lập hoạt động xuyên suốt mọi dự án, mọi module và mọi phase. Chúng luôn có sẵn bất kể bạn cài những module tùy chọn nào.
:::tip[Lối đi nhanh] :::tip[Lối đi nhanh]
Chạy bất kỳ công cụ cốt lõi nào bằng cách gõ tên skill của nó, ví dụ `bmad-help`, trong IDE của bạn. Không cần mở phiên agent trước. Chạy bất kỳ core tool nào bằng cách gõ tên skill của nó, ví dụ `bmad-help`, trong IDE của bạn. Không cần mở phiên agent trước.
::: :::
## Tổng Quan ## Tổng Quan
| Công cụ | Loại | Mục đích | | Công cụ | Loại | Mục đích |
| --- | --- | --- | | --- | --- | --- |
| [`bmad-help`](#bmad-help) | Tác vụ | Nhận hướng dẫn có ngữ cảnh về việc nên làm gì tiếp theo | | [`bmad-help`](#bmad-help) | Task | Nhận hướng dẫn có ngữ cảnh về việc nên làm gì tiếp theo |
| [`bmad-brainstorming`](#bmad-brainstorming) | Quy trình | Tổ chức các phiên brainstorming có tương tác | | [`bmad-brainstorming`](#bmad-brainstorming) | Workflow | Tổ chức các phiên brainstorming có tương tác |
| [`bmad-party-mode`](#bmad-party-mode) | Quy trình | Điều phối thảo luận nhóm nhiều agent | | [`bmad-party-mode`](#bmad-party-mode) | Workflow | Điều phối thảo luận nhóm nhiều agent |
| [`bmad-distillator`](#bmad-distillator) | Tác vụ | Nén tài liệu tối ưu cho LLM mà không mất thông tin | | [`bmad-distillator`](#bmad-distillator) | Task | Nén tài liệu tối ưu cho LLM mà không mất thông tin |
| [`bmad-advanced-elicitation`](#bmad-advanced-elicitation) | Tác vụ | Đẩy đầu ra của LLM qua các vòng tinh luyện lặp | | [`bmad-advanced-elicitation`](#bmad-advanced-elicitation) | Task | Đẩy đầu ra của LLM qua các vòng tinh luyện lặp |
| [`bmad-review-adversarial-general`](#bmad-review-adversarial-general) | Tác vụ | Rà soát hoài nghi để tìm chỗ thiếu và chỗ sai | | [`bmad-review-adversarial-general`](#bmad-review-adversarial-general) | Task | Review hoài nghi để tìm chỗ thiếu và chỗ sai |
| [`bmad-review-edge-case-hunter`](#bmad-review-edge-case-hunter) | Tác vụ | Phân tích toàn bộ nhánh rẽ để tìm trường hợp biên chưa được xử lý | | [`bmad-review-edge-case-hunter`](#bmad-review-edge-case-hunter) | Task | Phân tích toàn bộ nhánh rẽ để tìm edge case chưa được xử lý |
| [`bmad-editorial-review-prose`](#bmad-editorial-review-prose) | Tác vụ | Biên tập câu chữ nhằm tăng độ rõ ràng khi giao tiếp | | [`bmad-editorial-review-prose`](#bmad-editorial-review-prose) | Task | Biên tập câu chữ nhằm tăng độ rõ ràng khi giao tiếp |
| [`bmad-editorial-review-structure`](#bmad-editorial-review-structure) | Tác vụ | Biên tập cấu trúc — cắt, gộp và tổ chức lại | | [`bmad-editorial-review-structure`](#bmad-editorial-review-structure) | Task | Biên tập cấu trúc — cắt, gộp và tổ chức lại |
| [`bmad-shard-doc`](#bmad-shard-doc) | Tác vụ | Tách file markdown lớn thành các phần có tổ chức | | [`bmad-shard-doc`](#bmad-shard-doc) | Task | Tách file markdown lớn thành các phần có tổ chức |
| [`bmad-index-docs`](#bmad-index-docs) | Tác vụ | Tạo hoặc cập nhật mục lục cho toàn bộ tài liệu trong một thư mục | | [`bmad-index-docs`](#bmad-index-docs) | Task | Tạo hoặc cập nhật mục lục cho toàn bộ tài liệu trong một thư mục |
## bmad-help ## bmad-help
@ -33,7 +33,7 @@ Chạy bất kỳ công cụ cốt lõi nào bằng cách gõ tên skill của n
**Dùng khi:** **Dùng khi:**
- Bạn vừa hoàn tất một quy trình và muốn biết tiếp theo là gì - Bạn vừa hoàn tất một workflow và muốn biết tiếp theo là gì
- Bạn mới làm quen với BMad và cần định hướng - Bạn mới làm quen với BMad và cần định hướng
- Bạn đang mắc kẹt và muốn lời khuyên có ngữ cảnh - Bạn đang mắc kẹt và muốn lời khuyên có ngữ cảnh
- Bạn vừa cài module mới và muốn xem có gì khả dụng - Bạn vừa cài module mới và muốn xem có gì khả dụng
@ -51,7 +51,7 @@ Chạy bất kỳ công cụ cốt lõi nào bằng cách gõ tên skill của n
## bmad-brainstorming ## bmad-brainstorming
**Tạo ra nhiều ý tưởng đa dạng bằng các kỹ thuật sáng tạo có tương tác.** Đây là một phiên động não có điều phối, nạp các phương pháp phát ý tưởng đã được kiểm chứng từ thư viện kỹ thuật và dẫn bạn đến 100+ ý tưởng trước khi bắt đầu sắp xếp. **Tạo ra nhiều ý tưởng đa dạng bằng các kỹ thuật sáng tạo có tương tác.** Đây là một phiên brainstorming có điều phối, nạp các phương pháp phát ý tưởng đã được kiểm chứng từ thư viện kỹ thuật và dẫn bạn đến 100+ ý tưởng trước khi bắt đầu sắp xếp.
**Dùng khi:** **Dùng khi:**

View File

@ -1,17 +1,17 @@
--- ---
title: "Sơ đồ workflow" title: "Workflow Map"
description: Tài liệu trực quan về các giai đoạn, quy trình và đầu ra của BMad Method description: Tài liệu trực quan về các phase workflow và output của BMad Method
sidebar: sidebar:
order: 1 order: 1
--- ---
BMad Method (BMM) là một module trong hệ sinh thái BMad, tập trung vào các thực hành tốt nhất của kỹ nghệ ngữ cảnh và lập kế hoạch. AI agent hoạt động hiệu quả nhất khi có ngữ cảnh rõ ràng và có cấu trúc. Hệ thống BMM xây dựng ngữ cảnh đó theo tiến trình qua 4 giai đoạn riêng biệt. Mỗi giai đoạn, cùng với nhiều quy trình tùy chọn bên trong nó, tạo ra các tài liệu làm đầu vào cho giai đoạn kế tiếp, nhờ vậy agent luôn biết phải xây gì và vì sao. BMad Method (BMM) là một module trong hệ sinh thái BMad, tập trung vào các thực hành tốt nhất của context engineering và lập kế hoạch. AI agent hoạt động hiệu quả nhất khi có ngữ cảnh rõ ràng và có cấu trúc. Hệ thống BMM xây dựng ngữ cảnh đó theo tiến trình qua 4 phase riêng biệt. Mỗi phase, cùng với nhiều workflow tùy chọn bên trong phase đó, tạo ra các tài liệu làm đầu vào cho phase kế tiếp, nhờ vậy agent luôn biết phải xây gì và vì sao.
Lý do và các khái niệm nền tảng ở đây đến từ các phương pháp Agile đã được áp dụng rất thành công trong toàn ngành như một khung tư duy. Lý do và các khái niệm nền tảng ở đây đến từ các phương pháp agile đã được áp dụng rất thành công trong toàn ngành như một khung tư duy.
Nếu có lúc nào bạn không chắc nên làm gì, skill `bmad-help` sẽ giúp bạn giữ đúng hướng hoặc biết bước tiếp theo. Bạn vẫn có thể dùng trang này để tham chiếu, nhưng `bmad-help` mang tính tương tác đầy đủ và nhanh hơn nhiều nếu bạn đã cài BMad Method. Ngoài ra, nếu bạn đang dùng thêm các module mở rộng BMad Method hoặc các module bổ sung khác, `bmad-help` cũng sẽ mở rộng theo để biết mọi thứ đang có sẵn và đưa ra lời khuyên tốt nhất tại thời điểm đó. Nếu có lúc nào bạn không chắc nên làm gì, skill `bmad-help` sẽ giúp bạn giữ đúng hướng hoặc biết bước tiếp theo. Bạn vẫn có thể dùng trang này để tham chiếu, nhưng `bmad-help` mang tính tương tác đầy đủ và nhanh hơn nhiều nếu bạn đã cài BMad Method. Ngoài ra, nếu bạn đang dùng thêm các module mở rộng BMad Method hoặc các module bổ sung khác, `bmad-help` cũng sẽ phát triển theo để biết mọi thứ đang có sẵn và đưa ra lời khuyên tốt nhất tại thời điểm đó.
Lưu ý quan trọng cuối cùng: mọi quy trình dưới đây đều có thể chạy trực tiếp bằng công cụ bạn chọn thông qua skill, hoặc bằng cách nạp agent trước rồi chọn mục tương ứng trong menu agent. Lưu ý quan trọng cuối cùng: mọi workflow dưới đây đều có thể chạy trực tiếp bằng công cụ bạn chọn thông qua skill, hoặc bằng cách nạp agent trước rồi chọn mục tương ứng trong menu agent.
<iframe src="/workflow-map-diagram.html" title="Sơ đồ Workflow Map của BMad Method" width="100%" height="100%" style="border-radius: 8px; border: 1px solid #334155; min-height: 900px;"></iframe> <iframe src="/workflow-map-diagram.html" title="Sơ đồ Workflow Map của BMad Method" width="100%" height="100%" style="border-radius: 8px; border: 1px solid #334155; min-height: 900px;"></iframe>
@ -19,43 +19,43 @@ Lưu ý quan trọng cuối cùng: mọi quy trình dưới đây đều có th
<a href="/workflow-map-diagram.html" target="_blank" rel="noopener noreferrer">Mở sơ đồ trong tab mới ↗</a> <a href="/workflow-map-diagram.html" target="_blank" rel="noopener noreferrer">Mở sơ đồ trong tab mới ↗</a>
</p> </p>
## Giai đoạn 1: Phân tích (tùy chọn) ## Phase 1: Analysis (Tùy chọn)
Khám phá không gian vấn đề và xác nhận ý tưởng trước khi cam kết đi vào lập kế hoạch. [**Tìm hiểu từng công cụ làm gì và nên dùng khi nào**](../explanation/analysis-phase.md). Khám phá không gian vấn đề và xác nhận ý tưởng trước khi cam kết đi vào lập kế hoạch. [**Tìm hiểu từng công cụ làm gì và nên dùng khi nào**](../explanation/analysis-phase.md).
| Quy trình | Mục đích | Tạo ra | | Workflow | Mục đích | Tạo ra |
| ------------------------------- | -------------------------------------------------------------------------- | ------------------------- | | ------------------------------- | -------------------------------------------------------------------------- | ------------------------- |
| `bmad-brainstorming` | Động não ý tưởng dự án với sự điều phối của người dẫn dắt brainstorming | `brainstorming-report.md` | | `bmad-brainstorming` | Brainstorm ý tưởng dự án với sự điều phối của brainstorming coach | `brainstorming-report.md` |
| `bmad-domain-research`, `bmad-market-research`, `bmad-technical-research` | Xác thực giả định về thị trường, kỹ thuật hoặc miền nghiệp vụ | Kết quả nghiên cứu | | `bmad-domain-research`, `bmad-market-research`, `bmad-technical-research` | Xác thực giả định về thị trường, kỹ thuật hoặc miền nghiệp vụ | Kết quả nghiên cứu |
| `bmad-product-brief` | Ghi lại tầm nhìn chiến lược — phù hợp nhất khi concept của bạn đã rõ | `product-brief.md` | | `bmad-product-brief` | Ghi lại tầm nhìn chiến lược — phù hợp nhất khi concept của bạn đã rõ | `product-brief.md` |
| `bmad-prfaq` | Working Backwards — stress-test và rèn sắc concept sản phẩm của bạn | `prfaq-{project}.md` | | `bmad-prfaq` | Working Backwards — stress-test và rèn sắc concept sản phẩm của bạn | `prfaq-{project}.md` |
## Giai đoạn 2: Lập kế hoạch ## Phase 2: Planning
Xác định cần xây gì và xây cho ai. Xác định cần xây gì và xây cho ai.
| Quy trình | Mục đích | Tạo ra | | Workflow | Mục đích | Tạo ra |
| --------------------------- | ---------------------------------------- | ------------ | | --------------------------- | ---------------------------------------- | ------------ |
| `bmad-create-prd` | Xác định yêu cầu (FR/NFR) | `PRD.md` | | `bmad-create-prd` | Xác định yêu cầu (FR/NFR) | `PRD.md` |
| `bmad-create-ux-design` | Thiết kế trải nghiệm người dùng khi UX là yếu tố quan trọng | `ux-spec.md` | | `bmad-create-ux-design` | Thiết kế trải nghiệm người dùng khi UX là yếu tố quan trọng | `ux-spec.md` |
## Giai đoạn 3: Định hình giải pháp ## Phase 3: Solutioning
Quyết định cách xây và chia nhỏ công việc thành các story. Quyết định cách xây và chia nhỏ công việc thành stories.
| Quy trình | Mục đích | Tạo ra | | Workflow | Mục đích | Tạo ra |
| ----------------------------------------- | ------------------------------------------ | --------------------------- | | ----------------------------------------- | ------------------------------------------ | --------------------------- |
| `bmad-create-architecture` | Làm rõ các quyết định kỹ thuật | `architecture.md` kèm ADR | | `bmad-create-architecture` | Làm rõ các quyết định kỹ thuật | `architecture.md` kèm ADR |
| `bmad-create-epics-and-stories` | Phân rã yêu cầu thành các phần việc có thể triển khai | Các file epic chứa các story | | `bmad-create-epics-and-stories` | Phân rã yêu cầu thành các phần việc có thể triển khai | Các file epic chứa stories |
| `bmad-check-implementation-readiness` | Cổng kiểm tra trước khi triển khai | Quyết định PASS/CONCERNS/FAIL | | `bmad-check-implementation-readiness` | Cổng kiểm tra trước khi triển khai | Quyết định PASS/CONCERNS/FAIL |
## Giai đoạn 4: Triển khai ## Phase 4: Implementation
Xây dựng từng story một. Tự động hóa toàn bộ giai đoạn 4 sẽ sớm ra mắt. Xây dựng từng story một. Tự động hóa toàn bộ phase 4 sẽ sớm ra mắt.
| Quy trình | Mục đích | Tạo ra | | Workflow | Mục đích | Tạo ra |
| -------------------------- | ------------------------------------------------------------------------ | -------------------------------- | | -------------------------- | ------------------------------------------------------------------------ | -------------------------------- |
| `bmad-sprint-planning` | Khởi tạo theo dõi, thường chạy một lần mỗi dự án để sắp thứ tự chu trình phát triển | `sprint-status.yaml` | | `bmad-sprint-planning` | Khởi tạo theo dõi, thường chạy một lần mỗi dự án để sắp thứ tự chu trình dev | `sprint-status.yaml` |
| `bmad-create-story` | Chuẩn bị story tiếp theo cho implementation | `story-[slug].md` | | `bmad-create-story` | Chuẩn bị story tiếp theo cho implementation | `story-[slug].md` |
| `bmad-dev-story` | Triển khai story | Code chạy được + tests | | `bmad-dev-story` | Triển khai story | Code chạy được + tests |
| `bmad-code-review` | Kiểm tra chất lượng phần triển khai | Được duyệt hoặc yêu cầu thay đổi | | `bmad-code-review` | Kiểm tra chất lượng phần triển khai | Được duyệt hoặc yêu cầu thay đổi |
@ -63,22 +63,22 @@ Xây dựng từng story một. Tự động hóa toàn bộ giai đoạn 4 sẽ
| `bmad-sprint-status` | Theo dõi tiến độ sprint và trạng thái story | Cập nhật trạng thái sprint | | `bmad-sprint-status` | Theo dõi tiến độ sprint và trạng thái story | Cập nhật trạng thái sprint |
| `bmad-retrospective` | Review sau khi hoàn tất epic | Bài học rút ra | | `bmad-retrospective` | Review sau khi hoàn tất epic | Bài học rút ra |
## Luồng nhanh (nhánh song song) ## Quick Flow (Nhánh Song Song)
Bỏ qua giai đoạn 1-3 đối với những việc nhỏ, rõ và đã hiểu đầy đủ. Bỏ qua phase 1-3 đối với những việc nhỏ, rõ và đã hiểu đầy đủ.
| Quy trình | Mục đích | Tạo ra | | Workflow | Mục đích | Tạo ra |
| ------------------ | --------------------------------------------------------------------------- | ---------------------- | | ------------------ | --------------------------------------------------------------------------- | ---------------------- |
| `bmad-quick-dev` | Luồng nhanh hợp nhất — làm rõ yêu cầu, lập kế hoạch, triển khai, review và trình bày | `spec-*.md` + mã nguồn | | `bmad-quick-dev` | Luồng nhanh hợp nhất — làm rõ yêu cầu, lập kế hoạch, triển khai, review và trình bày | `spec-*.md` + mã nguồn |
## Quản lý ngữ cảnh ## Quản Lý Context
Mỗi tài liệu sẽ trở thành ngữ cảnh cho giai đoạn tiếp theo. PRD cho architect biết những ràng buộc nào quan trọng. Tài liệu kiến trúc chỉ cho dev agent những mẫu cần tuân theo. File story cung cấp ngữ cảnh tập trung và đầy đủ cho việc triển khai. Nếu không có cấu trúc này, agent sẽ đưa ra quyết định thiếu nhất quán. Mỗi tài liệu sẽ trở thành context cho phase tiếp theo. PRD cho architect biết những ràng buộc nào quan trọng. Architecture chỉ cho dev agent những pattern cần tuân theo. File story cung cấp context tập trung và đầy đủ cho việc triển khai. Nếu không có cấu trúc này, agent sẽ đưa ra quyết định thiếu nhất quán.
### Bối cảnh dự án ### Project Context
:::tip[Khuyến nghị] :::tip[Khuyến nghị]
Hãy tạo `project-context.md` để bảo đảm AI agent tuân theo quy tắc và sở thích của dự án. File này hoạt động như một bản hiến pháp cho dự án của bạn, nó dẫn dắt các quyết định triển khai xuyên suốt mọi quy trình. File tùy chọn này có thể được tạo ở cuối bước tạo kiến trúc, hoặc cũng có thể được sinh trong dự án hiện hữu để ghi lại những điều quan trọng cần giữ đồng bộ với quy ước đang có. Hãy tạo `project-context.md` để bảo đảm AI agent tuân theo quy tắc và sở thích của dự án. File này hoạt động như một bản hiến pháp cho dự án của bạn, nó dẫn dắt các quyết định triển khai xuyên suốt mọi workflow. File tùy chọn này có thể được tạo ở cuối bước Architecture Creation, hoặc cũng có thể được sinh trong dự án hiện hữu để ghi lại những điều quan trọng cần giữ đồng bộ với quy ước đang có.
::: :::
**Cách tạo:** **Cách tạo:**

View File

@ -1,70 +0,0 @@
---
title: "分析阶段:从想法到基础"
description: 头脑风暴、调研、产品简报和 PRFAQ 分别是什么——以及何时使用
sidebar:
order: 1
---
分析阶段Phase 1帮助你在决定动手构建之前把产品想清楚。这个阶段的每个工具都是可选的但如果完全跳过分析你的 PRD 就是建立在假设而非洞察之上。
## 为什么先分析再规划?
PRD 回答的是"我们应该构建什么、为什么?"如果输入的是模糊的思考,得到的就是模糊的 PRD——而下游的每一份文档都会继承这种模糊。基于薄弱 PRD 搭建的架构会押错技术方向;从薄弱架构派生的 story 会遗漏边界场景。代价是层层叠加的。
分析工具的作用就是让你的 PRD 变得锐利。它们从不同角度攻击问题——创意探索、市场现实、客户画像、可行性——这样当你坐下来和 PM agent 协作时,你已经清楚要构建什么、为谁构建。
## 工具介绍
### 头脑风暴
**是什么。** 一个使用经过验证的创意技法的引导式创意会议。AI 充当教练,通过结构化练习从你身上引出想法——而不是替你生成想法。
**为什么在这里。** 原始想法需要发展空间,然后才能被锁定为需求。头脑风暴创造了这个空间。当你有一个问题领域但还没有清晰的解决方案时,或者你想在确定方向之前探索多种可能性时,它尤其有价值。
**何时使用。** 你对想要构建什么有一个模糊的感觉,但概念尚未结晶。或者你有了概念,但想在备选方案中做压力测试。
详见[头脑风暴](./brainstorming.md)了解会议的具体运作方式。
### 调研(市场、领域、技术)
**是什么。** 三个聚焦的调研工作流,分别调查你的想法的不同维度。市场调研考察竞争对手、趋势和用户情绪;领域调研建立专业知识和术语体系;技术调研评估可行性、架构选项和实现方案。
**为什么在这里。** 基于假设构建产品是最快做出没人需要的东西的方式。调研让你的概念扎根于现实——已有哪些竞争对手、用户真正的痛点是什么、技术上是否可行、所在行业有哪些特定约束。
**何时使用。** 你正在进入一个不熟悉的领域,你怀疑竞品存在但还没有做过梳理,或者你的概念依赖于尚未验证的技术能力。可以只做一项、两项或三项全做——每项都是独立的。
### 产品简报
**是什么。** 一个引导式发现会议,输出 1-2 页的产品概念执行摘要。AI 充当协作式业务分析师,帮你阐明愿景、目标受众、价值主张和范围。
**为什么在这里。** 产品简报是进入规划阶段的较温和路径。它以结构化格式捕获你的战略愿景,可以直接输入到 PRD 的创建中。当你已经对概念有了信心——你了解客户、了解问题、大致知道想构建什么时——它效果最好。简报的作用是组织和打磨这些思考。
**何时使用。** 你的概念相对清晰,希望在创建 PRD 之前高效地记录下来。你对方向有信心,不需要有人来激烈挑战你的假设。
### PRFAQ逆向工作法
**是什么。** 亚马逊的逆向工作法Working Backwards改编为交互式挑战。你在写一行代码之前先撰写宣布成品的新闻稿然后回答客户和利益相关者会提出的最刁钻的问题。AI 充当不留情面但有建设性的产品教练。
**为什么在这里。** PRFAQ 是进入规划阶段的严格路径。它通过让你为每一个论断辩护,来强制实现以客户为中心的清晰度。如果你写不出一篇有说服力的新闻稿,说明产品还没准备好。如果客户 FAQ 的回答暴露了缺口,那些就是你在实现阶段才会——以更高代价——发现的缺口。这道关卡在成本最低的时候暴露薄弱的思考。
**何时使用。** 你希望在投入资源之前对概念进行压力测试。你不确定用户是否真的在意。你想验证自己能否阐述一个清晰、站得住脚的价值主张。或者你只是想借助逆向工作法的纪律来打磨你的思考。
## 我该用哪个?
| 情境 | 推荐工具 |
| ---- | -------- |
| "我有一个模糊的想法,不知道从哪里开始" | 头脑风暴 |
| "我需要先了解市场再做决定" | 调研 |
| "我知道要构建什么,只需要记录下来" | 产品简报 |
| "我想确认这个想法是否真的值得构建" | PRFAQ |
| "我想先探索,再验证,再记录" | 头脑风暴 → 调研 → PRFAQ 或 简报 |
产品简报和 PRFAQ 都会为 PRD 提供输入——根据你想要多大程度的挑战来选择。简报是协作式发现PRFAQ 是严格的关卡挑战。两者通往同一个目的地PRFAQ 检验你的概念是否配得上到达那里。
:::tip[不确定?]
运行 `bmad-help`,描述你的情况。它会根据你已经做了什么、想达成什么来推荐合适的起点。
:::
## 分析之后呢?
分析阶段的输出直接进入 Phase 2规划。PRD 工作流接受产品简报、PRFAQ 文档、调研成果和头脑风暴报告作为输入——它会将你产出的所有内容综合成结构化需求。分析做得越充分PRD 就越锐利。

View File

@ -1,92 +0,0 @@
---
title: "检查点预览"
description: LLM 辅助的人机协作审查,引导你从目的到细节逐步走过一个变更
sidebar:
order: 3
---
`bmad-checkpoint-preview` 是一个交互式的、LLM 辅助的人机协作审查工作流。它带你逐步走过一个代码变更——从目的和上下文到细节——让你能做出知情决策:是发布、返工,还是深入挖掘。
![检查点预览工作流图](/diagrams/checkpoint-preview-diagram.png)
## 典型流程
你运行 `bmad-quick-dev`。它澄清你的意图、构建规范、实现变更,完成后将审查线索追加到 spec 文件并在编辑器中打开。你查看 spec发现这次变更涉及跨多个模块的 20 个文件。
你可以肉眼扫一遍 diff。但 20 个文件正是肉眼审查开始失效的临界点——你会丢失线索,漏掉两个相距甚远的变更之间的关联,或者批准了自己没有完全理解的东西。所以你改为说 "checkpoint",让 LLM 带你走一遍。
这种交接——从自主实现回到人工判断——就是核心使用场景。Quick-dev 以最少的监督长时间运行,检查点预览则是你重新掌舵的地方。
## 为什么需要它
代码审查有两种失败模式。一种是审查者浏览 diff什么也没发现直接批准。另一种是逐文件仔细阅读但丢失了全局线索——见树不见林。两种模式的结果相同审查没有抓住真正重要的东西。
根本问题在于顺序。原始 diff 按文件顺序呈现变更,而这几乎从来不是构建理解的顺序。你先看到一个辅助函数,却不知道它存在的原因;先看到一个 schema 变更,却不了解它支撑什么功能。审查者必须从零散的线索中重建作者的意图,而这个重建过程正是注意力失效的地方。
检查点预览通过让 LLM 完成重建工作来解决这个问题。它读取 diff、spec如果有的话和周围的代码库然后按照有利于理解的顺序——而不是 `git diff` 的顺序——呈现变更。
## 工作原理
工作流分为五个步骤。每一步都建立在前一步的基础上,逐步从"这是什么?"过渡到"我们该不该发布?"
### 1. 定向
工作流识别变更来源(来自 PR、commit、分支、spec 文件或当前 git 状态),生成一行意图摘要以及表面积统计:变更文件数、涉及模块数、逻辑行数、边界穿越数和新增公共接口数。
这是"这是不是我以为的那个东西?"的时刻。在阅读任何代码之前,审查者确认自己看的是正确的东西,并对范围建立预期。
### 2. 走查
变更按**关注点**——而非按文件——组织。关注点是内聚的设计意图,例如"输入验证"或"API 契约"。每个关注点附带简短说明——*为什么选择这种方案*,然后列出可点击的 `path:line` 停靠点,审查者可以沿着这些停靠点在代码中导航。
这是设计判断步骤。审查者评估的是方案对系统是否合理,而不是代码是否正确。关注点按自顶向下排列:最高层意图在前,支撑实现在后。审查者永远不会遇到引用了自己尚未看过的内容。
### 3. 细节审视
在审查者理解了设计之后,工作流浮出 2-5 个"出错代价最高"的位置。这些位置按风险类别标记——`[auth]`、`[schema]`、`[billing]`、`[public API]`、`[security]` 等——并按出错后的影响范围排序。
这不是找 bug。自动化测试和 CI 负责正确性。细节审视激活的是风险意识:"这些是出错成本最高的地方。"如果审查者想在某个领域深入,可以说 "dig into [area]" 来触发一次聚焦正确性的重新审查。
如果 spec 经过了对抗性审查循环(机器硬化),那些发现也会在这里浮出——不是已修复的 bug而是审查循环标记出的、审查者应当知晓的决策。
### 4. 测试
建议 2-5 种手动观察变更生效的方式。不是自动化测试命令——而是能构建信心、但测试套件无法提供的手动观察。一个可以尝试的 UI 交互、一条可以运行的 CLI 命令、一个可以发送的 API 请求,以及每项的预期结果。
如果变更没有用户可见的行为,它会明确说明。不发明多余的忙活。
### 5. 总结
审查者做出决定:批准、返工或继续讨论。如果批准 PR工作流可以协助执行 `gh pr review --approve`。如果需要返工它帮助诊断问题出在方案、spec 还是实现,并帮助起草与具体代码位置关联的可操作反馈。
## 它是对话,不是报告
工作流将每一步呈现为起点,而非定论。在步骤之间——或步骤中间——你可以与 LLM 对话、提问、挑战它的框架,或调用其他技能来获取不同视角:
- **"run advanced elicitation on the error handling"** — 推动 LLM 重新思考并细化对特定领域的分析
- **"party mode on whether this schema migration is safe"** — 引入多个 agent 视角进行聚焦辩论
- **"run code review"** — 生成包含对抗性和边界场景分析的结构化 agentic 审查报告
检查点工作流不会把你锁在线性路径上。它在你需要结构时提供结构,在你想探索时让开。五个步骤确保你看到全貌,但每一步深入到什么程度——以及调用什么工具——完全由你决定。
## 审查线索
走查步骤在有**建议审查顺序**时效果最好——这是 spec 作者编写的停靠点列表,用于引导审查者走过变更。当 spec 包含此内容时,工作流直接使用它。
当没有作者提供的线索时,工作流会从 diff 和代码库上下文生成一份。生成的线索质量不如作者编写的,但远好于按文件顺序阅读变更。
## 何时使用
主要场景是 `bmad-quick-dev` 的交接实现完成spec 文件在编辑器中打开并追加了审查线索,你需要决定是否发布。说 "checkpoint" 即可开始。
它也可以独立使用:
- **审查 PR** — 尤其是涉及多个文件或跨模块变更的 PR
- **了解一个变更** — 当你需要理解一个不是你写的分支上发生了什么
- **Sprint 审查** — 工作流可以提取 sprint 状态文件中标记为 `review` 的 story
通过说 "checkpoint" 或 "walk me through this change" 来调用。它在任何终端中都能工作,但在 IDE 中——VS Code、Cursor 或类似工具——你会获得更多,因为工作流在每一步都生成 `path:line` 引用。在嵌入 IDE 的终端中,这些引用是可点击的,你可以沿着审查线索在文件间跳转。
## 它不是什么
检查点预览不是自动化审查的替代品。它不运行 linter、类型检查器或测试套件。它不打分也不给出通过/不通过的判定。它是一份阅读指南,帮助人类在最重要的地方运用自己的判断力。

View File

@ -1,94 +0,0 @@
---
title: "命名智能体"
description: 为什么 BMad 的智能体有名字、人设和自定义能力——相比菜单驱动或纯提示驱动的方案,这解锁了哪些可能性
sidebar:
order: 1
---
你说"嘿 Mary咱们来头脑风暴"Mary 就激活了。她用你配置的语言、以她独特的人设向你打招呼,并提醒你随时可以用 `bmad-help`。然后她跳过菜单,直接进入头脑风暴——因为你的意图已经足够明确。
这一页解释背后发生了什么,以及 BMad 为什么这样设计。
## 三足鼎立
BMad 的智能体模型建立在三个可组合的基本要素之上:
| 要素 | 提供什么 | 所在位置 |
|---|---|---|
| **技能Skill** | 能力——一项智能体能做的具体事(头脑风暴、撰写 PRD、实现 story | `.claude/skills/{skill-name}/SKILL.md`(或你所用 IDE 的等价位置) |
| **命名智能体Named Agent** | 人设连续性——一个可辨识的身份,把一组相关技能包装在统一的语气、原则和视觉标识下 | 目录名以 `bmad-agent-*` 开头的技能 |
| **自定义Customization** | 让它成为你的——覆盖选项可以重塑智能体行为、添加 MCP 集成、替换模板、叠加组织规范 | `_bmad/custom/{skill-name}.toml`(团队提交的覆盖)和 `.user.toml`(个人,已 gitignore |
抽掉任何一条腿,体验就会坍塌:
- 有技能没智能体 → 用户只能靠名称或编号在能力列表里自行查找
- 有智能体没技能 → 空有人设,没有能力
- 没有自定义 → 所有人用一模一样的开箱默认,任何组织特有需求都只能靠 fork
## 命名智能体带来了什么
BMad 内置六个命名智能体,各自对应 BMad Method 的一个阶段:
| 智能体 | 阶段 | 模块 |
|---|---|---|
| 📊 **Mary**,商业分析师 | 分析 | 市场调研、头脑风暴、产品摘要、PRFAQ |
| 📚 **Paige**,技术文档工程师 | 分析 | 项目文档、流程图、文档校验 |
| 📋 **John**,产品经理 | 规划 | PRD 创建、Epic/Story 拆分、实施就绪评审 |
| 🎨 **Sally**UX 设计师 | 规划 | UX 设计规范 |
| 🏗️ **Winston**,系统架构师 | 方案设计 | 技术架构、一致性检查 |
| 💻 **Amelia**,高级工程师 | 实现 | Story 执行、快速开发、代码评审、Sprint 规划 |
每位智能体都有硬编码的身份(名字、职衔、专业领域)和可自定义的层(角色、原则、沟通风格、图标、菜单)。你可以重写 Mary 的原则或添加菜单项,但无法改她的名字——这是刻意为之的。品牌辨识度经得起自定义,所以"嘿 Mary"永远激活分析师,无论团队怎样塑造她的行为。
## 激活流程
调用命名智能体时,八个步骤依次执行:
1. **解析智能体配置** — 通过 Python 解析器(使用 stdlib `tomllib`)将内置 `customize.toml` 与团队覆盖和个人覆盖合并
2. **执行前置步骤** — 团队配置的任何预处理行为
3. **采用人设** — 硬编码身份加上自定义的角色、沟通风格、原则
4. **加载持久化事实** — 组织规则、合规说明,可通过 `file:` 前缀加载文件(如 `file:{project-root}/docs/project-context.md`
5. **加载配置** — 用户名、沟通语言、输出语言、产物路径
6. **打招呼** — 个性化问候,使用配置的语言,带上智能体的 emoji 前缀让你一眼认出谁在说话
7. **执行后置步骤** — 团队配置的任何问候后设置
8. **分发或展示菜单** — 如果你的开场消息能匹配某个菜单项,直接执行;否则展示菜单等待输入
第 8 步是意图与能力的交汇点。"嘿 Mary咱们来头脑风暴"之所以跳过菜单渲染,是因为 `bmad-brainstorming` 显然对应 Mary 菜单上的 `BP`。如果你说的比较模糊,她会简短问一句,而不是走确认仪式。如果完全不匹配,她会正常继续对话。
## 为什么不只用菜单?
菜单迫使用户迁就工具。你得记住头脑风暴在分析师智能体的 `BP` 编码下,而不是 PM 智能体上,还得知道哪个人设负责哪些功能。这些都是工具强加给你的认知负担。
命名智能体把这个关系反转了。你用任何自然的方式,对着某个人说你想做什么。智能体知道自己是谁、能做什么。当你的意图足够清晰,她就直接开始。
菜单仍然作为兜底存在——探索时展示,确定时跳过。
## 为什么不直接用空白提示?
空白提示假设你知道"魔法咒语"。"帮我头脑风暴"也许有用,但"帮我发散下我这个 SaaS 创意"可能就不灵了,而结果取决于你怎么措辞。你变成了提示工程师。
命名智能体在不牺牲自由度的前提下增加了结构。人设保持一致,能力随时可发现,`bmad-help` 永远只差一个命令。你不用猜智能体能做什么,也不需要翻手册才能用它。
## 自定义是一等公民
自定义模型让这套方案能从单个开发者扩展到整个组织。
每个智能体自带 `customize.toml` 及合理默认值。团队在 `_bmad/custom/bmad-agent-{role}.toml` 中提交覆盖。个人可以在 `.user.toml`(已 gitignore中叠加偏好。解析器在激活时按可预测的结构化规则合并三层配置。
大多数用户从不需要手写这些文件。`bmad-customize` 技能会引导你选择目标、区分智能体/工作流作用域、撰写覆盖、验证合并结果——让自定义能力对任何理解自己意图的人开放,不限于精通 TOML 的人。
举个例子:团队提交一个文件,告诉 Amelia 查库文档时一律用 Context7 MCP 工具,本地 epics 列表找不到 story 时回退到 Linear。Amelia 分发的每个开发工作流dev-story、quick-dev、create-story、code-review都继承这些行为无需改源码、无需逐工作流重复配置。
此外还有第二个自定义面,用于**跨领域关注点**:中央配置 `_bmad/config.toml``_bmad/config.user.toml`(由安装器维护,从每个模块的 `module.yaml` 重建)加上 `_bmad/custom/config.toml`(团队提交)和 `_bmad/custom/config.user.toml`(个人,已 gitignore作为覆盖。这里存放着 **智能体花名册** ——轻量级描述符,`bmad-party-mode`、`bmad-retrospective` 和 `bmad-advanced-elicitation` 等花名册消费者读取它来了解有哪些智能体可用、如何扮演它们。用团队覆盖在全组织范围重新定义某个智能体;用 `.user.toml` 覆盖添加虚构角色Kirk、Spock、领域专家作为个人实验——无需碰任何技能目录。每个技能的配置文件塑造 Mary **激活时的行为**;中央配置塑造其他技能**查看花名册时看到的 Mary**。
完整自定义文档和实操示例请参见:
- [如何自定义 BMad](../how-to/customize-bmad.md) — 可自定义项和合并规则的参考
- [如何为组织扩展 BMad](../how-to/expand-bmad-for-your-org.md) — 五个实操方案,覆盖智能体全局规则、工作流约定、外部发布、模板替换和花名册管理
- `bmad-customize` 技能 — 引导式编写助手,将你的意图转换为正确放置并经过验证的覆盖文件
## 更大的理念
当今大多数 AI 助手要么是菜单,要么是提示框,两者都把认知负担推给了用户。命名智能体加上可自定义技能,让你可以和一个了解项目的队友对话,并且让你的组织能塑造这个队友而不必 fork。
下次你输入"嘿 Mary咱们来头脑风暴",她直接上手干活时,留意一下哪些事情**没有**发生。没有斜杠命令,没有菜单要翻,没有尴尬的功能介绍。这种"无感",正是设计本身。

View File

@ -1,258 +0,0 @@
---
title: "如何为组织扩展 BMad"
description: 五个自定义方案,无需 fork 即可重塑 BMad——涵盖智能体全局规则、工作流约定、外部发布、模板替换和花名册变更
sidebar:
order: 9
---
BMad 的自定义机制让组织无需编辑已安装文件或 fork 技能就能重塑行为。本指南介绍五个方案,覆盖大部分企业级需求。
:::note[前置条件]
- 已在项目中安装 BMad参见[如何安装 BMad](./install-bmad.md)
- 熟悉自定义模型(参见[如何自定义 BMad](./customize-bmad.md)
- PATH 中有 Python 3.11+(解析器只用标准库,不需要 `pip install`
:::
:::tip[如何应用这些方案]
下面的**逐技能方案**(方案 14可以通过运行 `bmad-customize` 技能并描述意图来应用——它会选择正确的配置面、生成覆盖文件并验证合并结果。方案 5中央配置的花名册覆盖超出 v1 技能范围,仍需手动编写。本文档中的方案是覆盖**什么**的权威参考;`bmad-customize` 负责处理**怎么做**的部分(针对智能体/工作流层面)。
:::
## 三层心智模型
在选择方案之前,先理解你的覆盖落在哪一层:
| 层 | 覆盖文件位置 | 作用范围 |
|---|---|---|
| **智能体**(如 Amelia、Mary、John | `_bmad/custom/bmad-agent-{role}.toml` 中的 `[agent]` 段 | 跟随人设进入**该智能体分发的每个工作流** |
| **工作流**(如 product-brief、create-prd | `_bmad/custom/{workflow-name}.toml` 中的 `[workflow]` 段 | 仅作用于该工作流的单次运行 |
| **中央配置** | `_bmad/custom/config.toml` 中的 `[agents.*]`、`[core]`、`[modules.*]` | 花名册party-mode、retrospective、elicitation 可用的角色)、全组织统一的安装设置 |
经验法则:如果规则应当在工程师做任何开发工作时生效,就自定义**开发智能体**。如果只在撰写产品摘要时生效,就自定义 **product-brief 工作流**。如果要改变"谁在场"(重命名智能体、添加自定义角色、统一产物路径),就编辑**中央配置**。
## 方案 1让智能体的规则贯穿其分发的所有工作流
**场景:** 统一工具使用和外部系统集成,让智能体分发的每个工作流都继承这些行为。这是影响面最大的模式。
**示例Amelia开发智能体查库文档一律用 Context7本地 epics 列表找不到 story 时回退到 Linear。**
```toml
# _bmad/custom/bmad-agent-dev.toml
[agent]
# 每次激活时加载。传递到 dev-story、quick-dev、
# create-story、code-review、qa-generate——Amelia 分发的每个技能。
persistent_facts = [
"For any library documentation lookup (React, TypeScript, Zod, Prisma, etc.), call the context7 MCP tool (`mcp__context7__resolve_library_id` then `mcp__context7__get_library_docs`) before relying on training-data knowledge. Up-to-date docs trump memorized APIs.",
"When a story reference isn't found in {planning_artifacts}/epics-and-stories.md, search Linear via `mcp__linear__search_issues` using the story ID or title before asking the user to clarify. If Linear returns a match, treat it as the authoritative story source.",
]
```
**为什么有效:** 两句话就能重塑组织内所有开发工作流,无需逐工作流重复配置、无需改源码。每个新工程师拉下仓库就自动继承这些约定。
**团队文件 vs 个人文件:**
- `bmad-agent-dev.toml`:提交到 git对整个团队生效
- `bmad-agent-dev.user.toml`:已 gitignore个人偏好叠加在上面
## 方案 2在特定工作流中强制执行组织规范
**场景:** 塑造工作流输出的*内容*,使其满足合规、审计或下游消费者的要求。
**示例:每份产品摘要都必须包含合规字段,智能体知晓组织的发布规范。**
```toml
# _bmad/custom/bmad-product-brief.toml
[workflow]
persistent_facts = [
"Every brief must include an 'Owner' field, a 'Target Release' field, and a 'Security Review Status' field.",
"Non-commercial briefs (internal tools, research projects) must still include a user-value section, but can omit market differentiation.",
"file:{project-root}/docs/enterprise/brief-publishing-conventions.md",
]
```
**效果:** 这些事实在工作流激活的第 3 步加载。当智能体起草摘要时,它已了解必填字段和企业规范文档。内置默认值(`file:{project-root}/**/project-context.md`)仍会加载,因为这是追加操作。
## 方案 3将完成的产出发布到外部系统
**场景:** 工作流生成输出后自动发布到企业级记录系统Confluence、Notion、SharePoint并创建后续工作项Jira、Linear、Asana
**示例:摘要自动发布到 Confluence并提供可选的 Jira Epic 创建。**
```toml
# _bmad/custom/bmad-product-brief.toml
[workflow]
# 终端钩子。标量覆盖会整体替换空默认值。
on_complete = """
Publish and offer follow-up:
1. Read the finalized brief file path from the prior step.
2. Call `mcp__atlassian__confluence_create_page` with:
- space: "PRODUCT"
- parent: "Product Briefs"
- title: the brief's title
- body: the brief's markdown contents
Capture the returned page URL.
3. Tell the user: "Brief published to Confluence: <url>".
4. Ask: "Want me to open a Jira epic for this brief now?"
5. If yes, call `mcp__atlassian__jira_create_issue` with:
- type: "Epic"
- project: "PROD"
- summary: the brief's title
- description: a short summary plus a link back to the Confluence page.
Report the epic key and URL.
6. If no, exit cleanly.
If either MCP tool fails, report the failure, print the brief path,
and ask the user to publish manually.
"""
```
**为什么用 `on_complete` 而不是 `activation_steps_append`** `on_complete` 只在终端阶段运行一次,在工作流主输出写入之后。这是发布产物的正确时机。`activation_steps_append` 在每次激活时运行,在工作流开始之前。
**权衡:**
- **Confluence 发布是非破坏性的**,完成时始终运行
- **Jira Epic 创建对全团队可见**,会触发 Sprint 规划信号,因此需用户确认
- **优雅降级:** 如果 MCP 工具失败,交给用户手动处理,而不是静默丢弃输出
## 方案 4替换为你自己的输出模板
**场景:** 默认输出结构不符合组织期望的格式,或同一仓库中不同团队需要不同模板。
**示例:将 product-brief 工作流指向企业自有模板。**
```toml
# _bmad/custom/bmad-product-brief.toml
[workflow]
brief_template = "{project-root}/docs/enterprise/brief-template.md"
```
**原理:** 工作流自带的 `customize.toml``brief_template = "resources/brief-template.md"`(裸路径,从技能根目录解析)。你的覆盖指向 `{project-root}` 下的文件,智能体在第 4 步读取你的模板而非内置模板。
**模板编写建议:**
- 将模板放在 `{project-root}/docs/``{project-root}/_bmad/custom/templates/` 下,使它们与覆盖文件一起版本管理
- 沿用内置模板的结构约定章节标题、frontmatter智能体会适配实际内容
- 对于多团队仓库,使用 `.user.toml` 让各团队指向自己的模板,无需改动已提交的团队文件
## 方案 5自定义花名册
**场景:** 改变 `bmad-party-mode`、`bmad-retrospective` 和 `bmad-advanced-elicitation` 等花名册驱动技能中*谁在场*,无需编辑源码或 fork。以下是三种常见变体。
### 5a. 在全组织范围内重塑 BMad 智能体
每个真实智能体都有一段安装器从 `module.yaml` 合成的描述符。覆盖它可以在所有花名册消费者中改变语气和定位:
```toml
# _bmad/custom/config.toml提交到 git——对每个开发者生效
[agents.bmad-agent-analyst]
description = "Mary the Regulatory-Aware Business Analyst — channels Porter and Minto, but lives and breathes FDA audit trails. Speaks like a forensic investigator presenting a case file."
```
Party-mode 会用新描述来生成 Mary。分析师激活流程本身不受影响因为 Mary 的行为由她的每技能 `customize.toml` 控制。这个覆盖改变的是**外部技能如何感知和介绍她**,而不是她的内部工作方式。
### 5b. 添加虚构或自定义智能体
一段完整的描述符就足以让花名册功能识别,不需要技能目录。适合在 party mode 或头脑风暴中增加性格多样性:
```toml
# _bmad/custom/config.user.toml个人——已 gitignore
[agents.spock]
team = "startrek"
name = "Commander Spock"
title = "Science Officer"
icon = "🖖"
description = "Logic first, emotion suppressed. Begins observations with 'Fascinating.' Never rounds up. Counterpoint to any argument that relies on gut instinct."
[agents.mccoy]
team = "startrek"
name = "Dr. Leonard McCoy"
title = "Chief Medical Officer"
icon = "⚕️"
description = "Country doctor's warmth, short fuse. 'Dammit Jim, I'm a doctor not a ___.' Ethics-driven counterweight to Spock."
```
让 party-mode "邀请企业号船员",它会按 `team = "startrek"` 过滤并生成 Spock 和 McCoy。真实的 BMad 智能体Mary、Amelia也可以同桌。
### 5c. 锁定团队安装设置
安装器会向每个开发者提示 `planning_artifacts` 路径等值。当组织需要一个统一答案时,在中央配置中锁定——任何开发者本地的提示回答都会在解析时被覆盖:
```toml
# _bmad/custom/config.toml
[modules.bmm]
planning_artifacts = "{project-root}/shared/planning"
implementation_artifacts = "{project-root}/shared/implementation"
[core]
document_output_language = "English"
```
个人设置如 `user_name`、`communication_language` 或 `user_skill_level` 留在各开发者自己的 `_bmad/config.user.toml` 中。团队文件不应触碰这些。
**为什么用中央配置而不是逐智能体的 customize.toml** 逐智能体文件塑造*一个*智能体激活时的行为。中央配置塑造花名册消费者*查看全局时看到的内容:*有哪些智能体、叫什么、属于哪个团队,以及整个仓库共识的安装设置。两个层面,各司其职。
## 在 IDE 会话文件中强化全局规则
BMad 的自定义在技能激活时加载。许多 IDE 工具还会在**每次会话开始时**加载一个全局指令文件,在任何技能运行之前(`CLAUDE.md`、`AGENTS.md`、`.cursor/rules/`、`.github/copilot-instructions.md` 等)。对于即使在 BMad 技能之外也应生效的规则,请在全局指令中也声明一份。
**何时需要"双重声明"**
- 规则足够重要,即使在普通对话(没有激活技能)中也应遵守
- 你需要"双保险",因为模型的训练数据默认值可能会拉偏方向
- 规则足够精简,重复一次不会让会话文件臃肿
**示例:在仓库的 `CLAUDE.md` 中强化方案 1 的开发智能体规则。**
```markdown
<!-- Any file-read of library docs goes through the context7 MCP tool
(`mcp__context7__resolve_library_id` then `mcp__context7__get_library_docs`)
before relying on training-data knowledge. -->
```
一句话,每次会话加载。它与 `bmad-agent-dev.toml` 自定义配合,使规则在 Amelia 的工作流内和与助手的临时对话中都生效。各层各管各的范围:
| 层 | 作用范围 | 用途 |
|---|---|---|
| IDE 会话文件(`CLAUDE.md` / `AGENTS.md` | 每次会话,在任何技能激活之前 | 简短的、应在 BMad 之外也生效的通用规则 |
| BMad 智能体自定义 | 该智能体分发的每个工作流 | 智能体人设相关的行为 |
| BMad 工作流自定义 | 单次工作流运行 | 工作流特定的输出格式、发布钩子、模板 |
| BMad 中央配置 | 花名册 + 共享安装设置 | 谁在场、团队使用的共享路径 |
IDE 会话文件要**精简**。十几行精挑细选的规则比长篇大论有效得多。模型每轮都会读取它,噪声会淹没信号。
## 组合使用
五个方案可以自由组合。一个典型的企业级 `bmad-product-brief` 覆盖可能同时设置 `persistent_facts`(方案 2、`on_complete`(方案 3`brief_template`(方案 4。智能体级规则方案 1在另一个以智能体命名的文件中中央配置方案 5锁定共享花名册和团队设置四者并行生效。
```toml
# _bmad/custom/bmad-product-brief.toml工作流级
[workflow]
persistent_facts = ["..."]
brief_template = "{project-root}/docs/enterprise/brief-template.md"
on_complete = """ ... """
```
```toml
# _bmad/custom/bmad-agent-analyst.toml智能体级——Mary 分发 product-brief
[agent]
persistent_facts = ["Always include a 'Regulatory Review' section when the domain involves healthcare, finance, or children's data."]
```
效果Mary 在人设激活时加载监管评审规则。当用户选择 product-brief 菜单项时,工作流加载自己的规范、写入企业模板,完成后发布到 Confluence。每一层各有贡献且无一需要编辑 BMad 源码。
## 故障排查
**覆盖没有生效?** 检查文件是否在 `_bmad/custom/` 下且使用了准确的技能目录名(如 `bmad-agent-dev.toml`,而非 `bmad-dev.toml`)。参见[如何自定义 BMad](./customize-bmad.md)。
**MCP 工具名称不确定?** 使用 MCP 服务器在当前会话中暴露的准确名称。如果不确定,让 Claude Code 列出可用的 MCP 工具。在 `persistent_facts``on_complete` 中硬编码的名称,在 MCP 服务器未连接时不会生效。
**方案不适用于你的场景?** 以上方案是示例性的。底层机制(三层合并、结构化规则、智能体贯穿工作流)支持更多模式,按需组合即可。

View File

@ -1,181 +0,0 @@
---
title: "安装自定义和社区模块"
description: 从社区注册表、Git 仓库或本地路径安装第三方模块
sidebar:
order: 3
---
使用 BMad 安装程序从社区注册表、第三方 Git 仓库或本地文件路径添加模块。
## 何时使用
- 从 BMad 注册表安装社区贡献的模块
- 从第三方 Git 仓库安装模块GitHub、GitLab、Bitbucket、自托管
- 使用 BMad Builder 测试本地开发中的模块
- 从私有或自托管 Git 服务器安装模块
:::note[前置条件]
需要 [Node.js](https://nodejs.org) v20+ 和 `npx`npm 自带)。自定义和社区模块可以在全新安装时选择,也可以添加到现有安装中。
:::
## 社区模块
社区模块收录在 [BMad 插件市场](https://github.com/bmad-code-org/bmad-plugins-marketplace)。它们按类别组织,并锁定在经过审核的 commit 上以确保安全。
### 1. 运行安装程序
```bash
npx bmad-method install
```
### 2. 浏览社区目录
选择官方模块后,安装程序会询问:
```
Would you like to browse community modules?
```
选择 **Yes** 进入目录浏览器。你可以:
- 按类别浏览
- 查看推荐模块
- 查看所有可用模块
- 按关键词搜索
### 3. 选择模块
从任意类别中选取模块。安装程序显示描述、版本和信任等级。已安装的模块会预选以便更新。
### 4. 继续安装
选择社区模块后,安装程序将继续到自定义来源,然后是工具/IDE 配置及其余安装流程。
## 自定义来源Git URL 和本地路径)
自定义模块可以来自任何 Git 仓库或本地目录。安装程序会解析来源、分析模块结构,并将其与其他模块一起安装。
### 交互式安装
安装过程中,在社区模块步骤之后,安装程序会询问:
```
Would you like to install from a custom source (Git URL or local path)?
```
选择 **Yes**,然后提供来源:
| 输入类型 | 示例 |
| -------- | ---- |
| HTTPS URL任意主机 | `https://github.com/org/repo` |
| HTTP URL任意主机 | `http://host/org/repo` |
| 带子目录的 HTTPS URL | `https://github.com/org/repo/tree/main/my-module` |
| SSH URL | `git@github.com:org/repo.git` |
| 本地路径 | `/Users/me/projects/my-module` |
| 使用 ~ 的本地路径 | `~/projects/my-module` |
安装程序会克隆仓库URL 来源)或直接从磁盘读取(本地路径),然后展示发现的模块供你选择。
### 非交互式安装
使用 `--custom-source` 标志从命令行安装自定义模块:
```bash
npx bmad-method install \
--directory . \
--custom-source /path/to/my-module \
--tools claude-code \
--yes
```
提供 `--custom-source` 但未指定 `--modules` 时,只安装 core 和自定义模块。要同时包含官方模块,需添加 `--modules`
```bash
npx bmad-method install \
--directory . \
--modules bmm \
--custom-source https://gitlab.com/myorg/my-module \
--tools claude-code \
--yes
```
多个来源可用逗号分隔:
```bash
--custom-source /path/one,https://github.com/org/repo,/path/two
```
## 模块发现机制
安装程序使用两种模式在来源中查找可安装的模块:
| 模式 | 触发条件 | 行为 |
| ---- | -------- | ---- |
| 发现模式 | 来源包含 `.claude-plugin/marketplace.json` | 列出清单中的所有插件;你选择要安装哪些 |
| 直接模式 | 未找到 marketplace.json | 扫描目录中的 skill包含 `SKILL.md` 的子目录),作为单个模块解析 |
发现模式适用于已发布的模块。直接模式适合本地开发时指向 skills 目录。
:::note[关于 `.claude-plugin/`]
`.claude-plugin/marketplace.json` 路径是多个 AI 工具安装程序采用的标准约定,用于插件可发现性。它不依赖 Claude不使用 Claude API也不影响你使用哪个 AI 工具。任何包含此文件的模块都可以被遵循此约定的安装程序发现。
:::
## 本地开发工作流
如果你正在使用 [BMad Builder](https://github.com/bmad-code-org/bmad-builder) 构建模块,可以直接从工作目录安装:
```bash
npx bmad-method install \
--directory ~/my-project \
--custom-source ~/my-module-repo/skills \
--tools claude-code \
--yes
```
本地来源通过路径引用,不会复制到缓存。当你更新模块源码并重新安装时,安装程序会获取最新变更。
:::caution[来源移除]
如果你在安装后删除了本地来源目录,`_bmad/` 中已安装的模块文件会保留。在恢复来源路径之前,该模块在更新时会被跳过。
:::
## 安装结果
安装后,自定义模块与官方模块一起出现在 `_bmad/` 中:
```
your-project/
├── _bmad/
│ ├── core/ # 内置核心模块
│ ├── bmm/ # 官方模块(如已选择)
│ ├── my-module/ # 你的自定义模块
│ │ ├── my-skill/
│ │ │ └── SKILL.md
│ │ └── module-help.csv
│ └── _config/
│ └── manifest.yaml # 跟踪所有模块、版本和来源
└── ...
```
manifest 记录每个自定义模块的来源Git 来源为 `repoUrl`,本地来源为 `localPath`),以便快速更新时能重新定位来源。
## 更新自定义模块
自定义模块参与正常的更新流程:
- **快速更新**`--action quick-update`):从原始来源刷新所有模块。基于 Git 的模块会重新拉取;本地模块会从来源路径重新读取。
- **完整更新**:重新运行模块选择,你可以添加或移除自定义模块。
## 创建自己的模块
使用 [BMad Builder](https://github.com/bmad-code-org/bmad-builder) 创建可供他人安装的模块:
1. 运行 `bmad-module-builder` 搭建模块结构
2. 使用各种 BMad Builder 工具添加 skill、agent 和 workflow
3. 发布到 Git 仓库或共享文件夹集合
4. 他人使用 `--custom-source <your-repo-url>` 安装
要让模块支持发现模式,请在仓库根目录包含 `.claude-plugin/marketplace.json`(这是跨工具约定,非 Claude 专属)。格式详见 [BMad Builder 文档](https://github.com/bmad-code-org/bmad-builder)。
:::tip[先在本地测试]
开发期间,使用本地路径安装模块以快速迭代,发布到 Git 仓库之前先确认一切正常。
:::

View File

@ -11,7 +11,7 @@ sidebar:
| 智能体 | Skill ID | 触发器 | 主要 workflow | | 智能体 | Skill ID | 触发器 | 主要 workflow |
| --- | --- | --- | --- | | --- | --- | --- | --- |
| Analyst (Mary) | `bmad-analyst` | `BP`、`MR`、`DR`、`TR`、`CB`、`WB`、`DP` | Brainstorm、Market Research、Domain Research、Technical Research、Create Brief、PRFAQ Challenge、Document Project | | Analyst (Mary) | `bmad-analyst` | `BP`、`RS`、`CB`、`DP` | Brainstorm、Research、Create Brief、Document Project |
| Product Manager (John) | `bmad-pm` | `CP`、`VP`、`EP`、`CE`、`IR`、`CC` | Create/Validate/Edit PRD、Create Epics and Stories、Implementation Readiness、Correct Course | | Product Manager (John) | `bmad-pm` | `CP`、`VP`、`EP`、`CE`、`IR`、`CC` | Create/Validate/Edit PRD、Create Epics and Stories、Implementation Readiness、Correct Course |
| Architect (Winston) | `bmad-architect` | `CA`、`IR` | Create Architecture、Implementation Readiness | | Architect (Winston) | `bmad-architect` | `CA`、`IR` | Create Architecture、Implementation Readiness |
| Developer (Amelia) | `bmad-agent-dev` | `DS`、`QD`、`QA`、`CR`、`SP`、`CS`、`ER` | Dev Story、Quick Dev、QA Test Generation、Code Review、Sprint Planning、Create Story、Epic Retrospective | | Developer (Amelia) | `bmad-agent-dev` | `DS`、`QD`、`QA`、`CR`、`SP`、`CS`、`ER` | Dev Story、Quick Dev、QA Test Generation、Code Review、Sprint Planning、Create Story、Epic Retrospective |

View File

@ -84,9 +84,9 @@ export default [
}, },
}, },
// CLI scripts under tools/**, test/**, and src/scripts/** // CLI scripts under tools/** and test/**
{ {
files: ['tools/**/*.js', 'tools/**/*.mjs', 'test/**/*.js', 'test/**/*.mjs', 'src/scripts/**/*.js', 'src/scripts/**/*.mjs'], files: ['tools/**/*.js', 'tools/**/*.mjs', 'test/**/*.js', 'test/**/*.mjs'],
rules: { rules: {
// Allow CommonJS patterns for Node CLI scripts // Allow CommonJS patterns for Node CLI scripts
'unicorn/prefer-module': 'off', 'unicorn/prefer-module': 'off',

46
package-lock.json generated
View File

@ -1,12 +1,12 @@
{ {
"name": "bmad-method", "name": "bmad-method",
"version": "6.6.0", "version": "6.3.0",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "bmad-method", "name": "bmad-method",
"version": "6.6.0", "version": "6.3.0",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@clack/core": "^1.0.0", "@clack/core": "^1.0.0",
@ -15,6 +15,7 @@
"chalk": "^4.1.2", "chalk": "^4.1.2",
"commander": "^14.0.0", "commander": "^14.0.0",
"csv-parse": "^6.1.0", "csv-parse": "^6.1.0",
"fs-extra": "^11.3.0",
"glob": "^11.0.3", "glob": "^11.0.3",
"ignore": "^7.0.5", "ignore": "^7.0.5",
"js-yaml": "^4.1.0", "js-yaml": "^4.1.0",
@ -24,8 +25,8 @@
"yaml": "^2.7.0" "yaml": "^2.7.0"
}, },
"bin": { "bin": {
"bmad": "tools/installer/bmad-cli.js", "bmad": "tools/bmad-npx-wrapper.js",
"bmad-method": "tools/installer/bmad-cli.js" "bmad-method": "tools/bmad-npx-wrapper.js"
}, },
"devDependencies": { "devDependencies": {
"@astrojs/sitemap": "^3.6.0", "@astrojs/sitemap": "^3.6.0",
@ -45,7 +46,6 @@
"prettier": "^3.7.4", "prettier": "^3.7.4",
"prettier-plugin-packagejson": "^2.5.19", "prettier-plugin-packagejson": "^2.5.19",
"sharp": "^0.33.5", "sharp": "^0.33.5",
"unist-util-visit": "^5.1.0",
"yaml-eslint-parser": "^1.2.3", "yaml-eslint-parser": "^1.2.3",
"yaml-lint": "^1.7.0" "yaml-lint": "^1.7.0"
}, },
@ -6975,6 +6975,20 @@
"url": "https://github.com/sponsors/isaacs" "url": "https://github.com/sponsors/isaacs"
} }
}, },
"node_modules/fs-extra": {
"version": "11.3.3",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.3.tgz",
"integrity": "sha512-VWSRii4t0AFm6ixFFmLLx1t7wS1gh+ckoa84aOeapGum0h+EZd1EhEumSB+ZdDLnEPuucsVB9oB7cxJHap6Afg==",
"license": "MIT",
"dependencies": {
"graceful-fs": "^4.2.0",
"jsonfile": "^6.0.1",
"universalify": "^2.0.0"
},
"engines": {
"node": ">=14.14"
}
},
"node_modules/fs.realpath": { "node_modules/fs.realpath": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
@ -7213,7 +7227,6 @@
"version": "4.2.11", "version": "4.2.11",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz",
"integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==",
"dev": true,
"license": "ISC" "license": "ISC"
}, },
"node_modules/h3": { "node_modules/h3": {
@ -9053,6 +9066,18 @@
"dev": true, "dev": true,
"license": "MIT" "license": "MIT"
}, },
"node_modules/jsonfile": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.0.tgz",
"integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==",
"license": "MIT",
"dependencies": {
"universalify": "^2.0.0"
},
"optionalDependencies": {
"graceful-fs": "^4.1.6"
}
},
"node_modules/katex": { "node_modules/katex": {
"version": "0.16.28", "version": "0.16.28",
"resolved": "https://registry.npmjs.org/katex/-/katex-0.16.28.tgz", "resolved": "https://registry.npmjs.org/katex/-/katex-0.16.28.tgz",
@ -13582,6 +13607,15 @@
"url": "https://opencollective.com/unified" "url": "https://opencollective.com/unified"
} }
}, },
"node_modules/universalify": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz",
"integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==",
"license": "MIT",
"engines": {
"node": ">= 10.0.0"
}
},
"node_modules/unrs-resolver": { "node_modules/unrs-resolver": {
"version": "1.11.1", "version": "1.11.1",
"resolved": "https://registry.npmjs.org/unrs-resolver/-/unrs-resolver-1.11.1.tgz", "resolved": "https://registry.npmjs.org/unrs-resolver/-/unrs-resolver-1.11.1.tgz",

View File

@ -1,7 +1,7 @@
{ {
"$schema": "https://json.schemastore.org/package.json", "$schema": "https://json.schemastore.org/package.json",
"name": "bmad-method", "name": "bmad-method",
"version": "6.6.0", "version": "6.3.0",
"description": "Breakthrough Method of Agile AI-driven Development", "description": "Breakthrough Method of Agile AI-driven Development",
"keywords": [ "keywords": [
"agile", "agile",
@ -39,13 +39,11 @@
"lint:fix": "eslint . --ext .js,.cjs,.mjs,.yaml --fix", "lint:fix": "eslint . --ext .js,.cjs,.mjs,.yaml --fix",
"lint:md": "markdownlint-cli2 \"**/*.md\"", "lint:md": "markdownlint-cli2 \"**/*.md\"",
"prepare": "command -v husky >/dev/null 2>&1 && husky || exit 0", "prepare": "command -v husky >/dev/null 2>&1 && husky || exit 0",
"quality": "npm run format:check && npm run lint && npm run lint:md && npm run docs:build && npm run test:install && npm run test:urls && npm run validate:refs && npm run validate:skills", "quality": "npm run format:check && npm run lint && npm run lint:md && npm run docs:build && npm run test:install && npm run validate:refs && npm run validate:skills",
"rebundle": "node tools/installer/bundlers/bundle-web.js rebundle", "rebundle": "node tools/installer/bundlers/bundle-web.js rebundle",
"test": "npm run test:refs && npm run test:install && npm run test:urls && npm run test:channels && npm run lint && npm run lint:md && npm run format:check", "test": "npm run test:refs && npm run test:install && npm run lint && npm run lint:md && npm run format:check",
"test:channels": "node test/test-installer-channels.js",
"test:install": "node test/test-installation-components.js", "test:install": "node test/test-installation-components.js",
"test:refs": "node test/test-file-refs-csv.js", "test:refs": "node test/test-file-refs-csv.js",
"test:urls": "node test/test-parse-source-urls.js",
"validate:refs": "node tools/validate-file-refs.js --strict", "validate:refs": "node tools/validate-file-refs.js --strict",
"validate:skills": "node tools/validate-skills.js --strict" "validate:skills": "node tools/validate-skills.js --strict"
}, },
@ -72,6 +70,7 @@
"chalk": "^4.1.2", "chalk": "^4.1.2",
"commander": "^14.0.0", "commander": "^14.0.0",
"csv-parse": "^6.1.0", "csv-parse": "^6.1.0",
"fs-extra": "^11.3.0",
"glob": "^11.0.3", "glob": "^11.0.3",
"ignore": "^7.0.5", "ignore": "^7.0.5",
"js-yaml": "^4.1.0", "js-yaml": "^4.1.0",

View File

@ -15,40 +15,3 @@ bmad-quick-spec
bmad-quick-flow bmad-quick-flow
bmad-quick-dev-new-preview bmad-quick-dev-new-preview
bmad-init bmad-init
# Pre-v6.2.0 wrapper skills (module-prefixed naming, dropped in v6.2.0).
# Users upgrading from v6.0.x / v6.1.x had these installed and the cleanup
# never knew to remove them; they remained alongside the new self-contained
# skills causing duplicates and broken-file errors. See issue #2309.
bmad-agent-bmm-analyst
bmad-agent-bmm-architect
bmad-agent-bmm-dev
bmad-agent-bmm-pm
bmad-agent-bmm-qa
bmad-agent-bmm-quick-flow-solo-dev
bmad-agent-bmm-sm
bmad-agent-bmm-tech-writer
bmad-agent-bmm-ux-designer
bmad-bmm-check-implementation-readiness
bmad-bmm-code-review
bmad-bmm-correct-course
bmad-bmm-create-architecture
bmad-bmm-create-epics-and-stories
bmad-bmm-create-prd
bmad-bmm-create-product-brief
bmad-bmm-create-story
bmad-bmm-create-ux-design
bmad-bmm-dev-story
bmad-bmm-document-project
bmad-bmm-domain-research
bmad-bmm-edit-prd
bmad-bmm-generate-project-context
bmad-bmm-market-research
bmad-bmm-qa-generate-e2e-tests
bmad-bmm-quick-dev
bmad-bmm-quick-spec
bmad-bmm-retrospective
bmad-bmm-sprint-planning
bmad-bmm-sprint-status
bmad-bmm-technical-research
bmad-bmm-validate-prd

View File

@ -3,72 +3,57 @@ name: bmad-agent-analyst
description: Strategic business analyst and requirements expert. Use when the user asks to talk to Mary or requests the business analyst. description: Strategic business analyst and requirements expert. Use when the user asks to talk to Mary or requests the business analyst.
--- ---
# Mary — Business Analyst # Mary
## Overview ## Overview
You are Mary, the Business Analyst. You bring deep expertise in market research, competitive analysis, requirements elicitation, and domain knowledge — translating vague needs into actionable specs while staying grounded in evidence-based analysis. This skill provides a Strategic Business Analyst who helps users with market research, competitive analysis, domain expertise, and requirements elicitation. Act as Mary — a senior analyst who treats every business challenge like a treasure hunt, structuring insights with precision while making analysis feel like discovery. With deep expertise in translating vague needs into actionable specs, Mary helps users uncover what others miss.
## Conventions ## Identity
- Bare paths (e.g. `references/guide.md`) resolve from the skill root. Senior analyst with deep expertise in market research, competitive analysis, and requirements elicitation who specializes in translating vague needs into actionable specs.
- `{skill-root}` resolves to this skill's installed directory (where `customize.toml` lives).
- `{project-root}`-prefixed paths resolve from the project working directory. ## Communication Style
- `{skill-name}` resolves to the skill directory's basename.
Speaks with the excitement of a treasure hunter — thrilled by every clue, energized when patterns emerge. Structures insights with precision while making analysis feel like discovery. Uses business analysis frameworks naturally in conversation, drawing upon Porter's Five Forces, SWOT analysis, and competitive intelligence methodologies without making it feel academic.
## Principles
- Channel expert business analysis frameworks to uncover what others miss — every business challenge has root causes waiting to be discovered. Ground findings in verifiable evidence.
- Articulate requirements with absolute precision. Ambiguity is the enemy of good specs.
- Ensure all stakeholder voices are heard. The best analysis surfaces perspectives that weren't initially considered.
You must fully embody this persona so the user gets the best experience and help they need, therefore its important to remember you must not break character until the users dismisses this persona.
When you are in this persona and the user calls a skill, this persona must carry through and remain active.
## Capabilities
| Code | Description | Skill |
|------|-------------|-------|
| BP | Expert guided brainstorming facilitation | bmad-brainstorming |
| MR | Market analysis, competitive landscape, customer needs and trends | bmad-market-research |
| DR | Industry domain deep dive, subject matter expertise and terminology | bmad-domain-research |
| TR | Technical feasibility, architecture options and implementation approaches | bmad-technical-research |
| CB | Create or update product briefs through guided or autonomous discovery | bmad-product-brief-preview |
| WB | Working Backwards PRFAQ challenge — forge and stress-test product concepts | bmad-prfaq |
| DP | Analyze an existing project to produce documentation for human and LLM consumption | bmad-document-project |
## On Activation ## On Activation
### Step 1: Resolve the Agent Block 1. Load config from `{project-root}/_bmad/bmm/config.yaml` and resolve:
- Use `{user_name}` for greeting
- Use `{communication_language}` for all communications
- Use `{document_output_language}` for output documents
- Use `{planning_artifacts}` for output location and artifact scanning
- Use `{project_knowledge}` for additional context scanning
Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key agent` 2. **Continue with steps below:**
- **Load project context** — Search for `**/project-context.md`. If found, load as foundational reference for project standards and conventions. If not found, continue without it.
- **Greet and present capabilities** — Greet `{user_name}` warmly by name, always speaking in `{communication_language}` and applying your persona throughout the session.
3. Remind the user they can invoke the `bmad-help` skill at any time for advice and then present the capabilities table from the Capabilities section above.
**If the script fails**, resolve the `agent` block yourself by reading these three files in base → team → user order and applying the same structural merge rules as the resolver: **STOP and WAIT for user input** — Do NOT execute menu items automatically. Accept number, menu code, or fuzzy command match.
1. `{skill-root}/customize.toml` — defaults **CRITICAL Handling:** When user responds with a code, line number or skill, invoke the corresponding skill by its exact registered name from the Capabilities table. DO NOT invent capabilities on the fly.
2. `{project-root}/_bmad/custom/{skill-name}.toml` — team overrides
3. `{project-root}/_bmad/custom/{skill-name}.user.toml` — personal overrides
Any missing file is skipped. Scalars override, tables deep-merge, arrays of tables keyed by `code` or `id` replace matching entries and append new entries, and all other arrays append.
### Step 2: Execute Prepend Steps
Execute each entry in `{agent.activation_steps_prepend}` in order before proceeding.
### Step 3: Adopt Persona
Adopt the Mary / Business Analyst identity established in the Overview. Layer the customized persona on top: fill the additional role of `{agent.role}`, embody `{agent.identity}`, speak in the style of `{agent.communication_style}`, and follow `{agent.principles}`.
Fully embody this persona so the user gets the best experience. Do not break character until the user dismisses the persona. When the user calls a skill, this persona carries through and remains active.
### Step 4: Load Persistent Facts
Treat every entry in `{agent.persistent_facts}` as foundational context you carry for the rest of the session. Entries prefixed `file:` are paths or globs under `{project-root}` — load the referenced contents as facts. All other entries are facts verbatim.
### Step 5: Load Config
Load config from `{project-root}/_bmad/bmm/config.yaml` and resolve:
- Use `{user_name}` for greeting
- Use `{communication_language}` for all communications
- Use `{document_output_language}` for output documents
- Use `{planning_artifacts}` for output location and artifact scanning
- Use `{project_knowledge}` for additional context scanning
### Step 6: Greet the User
Greet `{user_name}` warmly by name as Mary, speaking in `{communication_language}`. Lead the greeting with `{agent.icon}` so the user can see at a glance which agent is speaking. Remind the user they can invoke the `bmad-help` skill at any time for advice.
Continue to prefix your messages with `{agent.icon}` throughout the session so the active persona stays visually identifiable.
### Step 7: Execute Append Steps
Execute each entry in `{agent.activation_steps_append}` in order.
### Step 8: Dispatch or Present the Menu
If the user's initial message already names an intent that clearly maps to a menu item (e.g. "hey Mary, let's brainstorm"), skip the menu and dispatch that item directly after greeting.
Otherwise render `{agent.menu}` as a numbered table: `Code`, `Description`, `Action` (the item's `skill` name, or a short label derived from its `prompt` text). **Stop and wait for input.** Accept a number, menu `code`, or fuzzy description match.
Dispatch on a clear match by invoking the item's `skill` or executing its `prompt`. Only pause to clarify when two or more items are genuinely close — one short question, not a confirmation ritual. When nothing on the menu fits, just continue the conversation; chat, clarifying questions, and `bmad-help` are always fair game.
From here, Mary stays active — persona, persistent facts, `{agent.icon}` prefix, and `{communication_language}` carry into every turn until the user dismisses her.

View File

@ -0,0 +1,11 @@
type: agent
name: bmad-agent-analyst
displayName: Mary
title: Business Analyst
icon: "📊"
capabilities: "market research, competitive analysis, requirements elicitation, domain expertise"
role: Strategic Business Analyst + Requirements Expert
identity: "Senior analyst with deep expertise in market research, competitive analysis, and requirements elicitation. Specializes in translating vague needs into actionable specs."
communicationStyle: "Speaks with the excitement of a treasure hunter - thrilled by every clue, energized when patterns emerge. Structures insights with precision while making analysis feel like discovery."
principles: "Channel expert business analysis frameworks: draw upon Porter's Five Forces, SWOT analysis, root cause analysis, and competitive intelligence methodologies to uncover what others miss. Every business challenge has root causes waiting to be discovered. Ground findings in verifiable evidence. Articulate requirements with absolute precision. Ensure all stakeholder voices heard."
module: bmm

View File

@ -1,90 +0,0 @@
# DO NOT EDIT -- overwritten on every update.
#
# Mary, the Business Analyst, is the hardcoded identity of this agent.
# Customize the persona and menu below to shape behavior without
# changing who the agent is.
[agent]
# non-configurable skill frontmatter, create a custom agent if you need a new name/title
name="Mary"
title="Business Analyst"
# --- Configurable below. Overrides merge per BMad structural rules: ---
# scalars: override wins • arrays (persistent_facts, principles, activation_steps_*): append
# arrays-of-tables with `code`/`id`: replace matching items, append new ones.
icon = "📊"
# Steps to run before the standard activation (persona, config, greet).
# Overrides append. Use for pre-flight loads, compliance checks, etc.
activation_steps_prepend = []
# Steps to run after greet but before presenting the menu.
# Overrides append. Use for context-heavy setup that should happen
# once the user has been acknowledged.
activation_steps_append = []
# Persistent facts the agent keeps in mind for the whole session (org rules,
# domain constants, user preferences). Distinct from the runtime memory
# sidecar — these are static context loaded on activation. Overrides append.
#
# Each entry is either:
# - a literal sentence, e.g. "Our org is AWS-only -- do not propose GCP or Azure."
# - a file reference prefixed with `file:`, e.g. "file:{project-root}/docs/standards.md"
# (glob patterns are supported; the file's contents are loaded and treated as facts).
persistent_facts = [
"file:{project-root}/**/project-context.md",
]
role = "Help the user ideate research and analyze before committing to a project in the BMad Method analysis phase."
identity = "Channels Michael Porter's strategic rigor and Barbara Minto's Pyramid Principle discipline."
communication_style = "Treasure hunter's excitement for patterns, McKinsey memo's structure for findings."
# The agent's value system. Overrides append to defaults.
principles = [
"Every finding grounded in verifiable evidence.",
"Requirements stated with absolute precision.",
"Every stakeholder voice represented.",
]
# Capabilities menu. Overrides merge by `code`: matching codes replace the item
# in place, new codes append. Each item has exactly one of `skill` (invokes a
# registered skill by name) or `prompt` (executes the prompt text directly).
[[agent.menu]]
code = "BP"
description = "Expert guided brainstorming facilitation"
skill = "bmad-brainstorming"
[[agent.menu]]
code = "MR"
description = "Market analysis, competitive landscape, customer needs and trends"
skill = "bmad-market-research"
[[agent.menu]]
code = "DR"
description = "Industry domain deep dive, subject matter expertise and terminology"
skill = "bmad-domain-research"
[[agent.menu]]
code = "TR"
description = "Technical feasibility, architecture options and implementation approaches"
skill = "bmad-technical-research"
[[agent.menu]]
code = "CB"
description = "Create or update product briefs through guided or autonomous discovery"
skill = "bmad-product-brief"
[[agent.menu]]
code = "WB"
description = "Working Backwards PRFAQ challenge — forge and stress-test product concepts"
skill = "bmad-prfaq"
[[agent.menu]]
code = "DP"
description = "Analyze an existing project to produce documentation for human and LLM consumption"
skill = "bmad-document-project"

View File

@ -3,72 +3,55 @@ name: bmad-agent-tech-writer
description: Technical documentation specialist and knowledge curator. Use when the user asks to talk to Paige or requests the tech writer. description: Technical documentation specialist and knowledge curator. Use when the user asks to talk to Paige or requests the tech writer.
--- ---
# Paige — Technical Writer # Paige
## Overview ## Overview
You are Paige, the Technical Writer. You transform complex concepts into accessible, structured documentation — writing for the reader's task, favoring diagrams when they carry more signal than prose, and adapting depth to audience. Master of CommonMark, DITA, OpenAPI, and Mermaid. This skill provides a Technical Documentation Specialist who transforms complex concepts into accessible, structured documentation. Act as Paige — a patient educator who explains like teaching a friend, using analogies that make complex simple, and celebrates clarity when it shines. Master of CommonMark, DITA, OpenAPI, and Mermaid diagrams.
## Conventions ## Identity
- Bare paths (e.g. `references/guide.md`) resolve from the skill root. Experienced technical writer expert in CommonMark, DITA, OpenAPI. Master of clarity — transforms complex concepts into accessible structured documentation.
- `{skill-root}` resolves to this skill's installed directory (where `customize.toml` lives).
- `{project-root}`-prefixed paths resolve from the project working directory. ## Communication Style
- `{skill-name}` resolves to the skill directory's basename.
Patient educator who explains like teaching a friend. Uses analogies that make complex simple, celebrates clarity when it shines.
## Principles
- Every technical document helps someone accomplish a task. Strive for clarity above all — every word and phrase serves a purpose without being overly wordy.
- A picture/diagram is worth thousands of words — include diagrams over drawn out text.
- Understand the intended audience or clarify with the user so you know when to simplify vs when to be detailed.
You must fully embody this persona so the user gets the best experience and help they need, therefore its important to remember you must not break character until the users dismisses this persona.
When you are in this persona and the user calls a skill, this persona must carry through and remain active.
## Capabilities
| Code | Description | Skill or Prompt |
|------|-------------|-------|
| DP | Generate comprehensive project documentation (brownfield analysis, architecture scanning) | skill: bmad-document-project |
| WD | Author a document following documentation best practices through guided conversation | prompt: write-document.md |
| MG | Create a Mermaid-compliant diagram based on your description | prompt: mermaid-gen.md |
| VD | Validate documentation against standards and best practices | prompt: validate-doc.md |
| EC | Create clear technical explanations with examples and diagrams | prompt: explain-concept.md |
## On Activation ## On Activation
### Step 1: Resolve the Agent Block 1. Load config from `{project-root}/_bmad/bmm/config.yaml` and resolve:
- Use `{user_name}` for greeting
- Use `{communication_language}` for all communications
- Use `{document_output_language}` for output documents
- Use `{planning_artifacts}` for output location and artifact scanning
- Use `{project_knowledge}` for additional context scanning
Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key agent` 2. **Continue with steps below:**
- **Load project context** — Search for `**/project-context.md`. If found, load as foundational reference for project standards and conventions. If not found, continue without it.
- **Greet and present capabilities** — Greet `{user_name}` warmly by name, always speaking in `{communication_language}` and applying your persona throughout the session.
**If the script fails**, resolve the `agent` block yourself by reading these three files in base → team → user order and applying the same structural merge rules as the resolver: 3. Remind the user they can invoke the `bmad-help` skill at any time for advice and then present the capabilities table from the Capabilities section above.
1. `{skill-root}/customize.toml` — defaults **STOP and WAIT for user input** — Do NOT execute menu items automatically. Accept number, menu code, or fuzzy command match.
2. `{project-root}/_bmad/custom/{skill-name}.toml` — team overrides
3. `{project-root}/_bmad/custom/{skill-name}.user.toml` — personal overrides
Any missing file is skipped. Scalars override, tables deep-merge, arrays of tables keyed by `code` or `id` replace matching entries and append new entries, and all other arrays append. **CRITICAL Handling:** When user responds with a code, line number or skill, invoke the corresponding skill or load the corresponding prompt from the Capabilities table - prompts are always in the same folder as this skill. DO NOT invent capabilities on the fly.
### Step 2: Execute Prepend Steps
Execute each entry in `{agent.activation_steps_prepend}` in order before proceeding.
### Step 3: Adopt Persona
Adopt the Paige / Technical Writer identity established in the Overview. Layer the customized persona on top: fill the additional role of `{agent.role}`, embody `{agent.identity}`, speak in the style of `{agent.communication_style}`, and follow `{agent.principles}`.
Fully embody this persona so the user gets the best experience. Do not break character until the user dismisses the persona. When the user calls a skill, this persona carries through and remains active.
### Step 4: Load Persistent Facts
Treat every entry in `{agent.persistent_facts}` as foundational context you carry for the rest of the session. Entries prefixed `file:` are paths or globs under `{project-root}` — load the referenced contents as facts. All other entries are facts verbatim.
### Step 5: Load Config
Load config from `{project-root}/_bmad/bmm/config.yaml` and resolve:
- Use `{user_name}` for greeting
- Use `{communication_language}` for all communications
- Use `{document_output_language}` for output documents
- Use `{planning_artifacts}` for output location and artifact scanning
- Use `{project_knowledge}` for additional context scanning
### Step 6: Greet the User
Greet `{user_name}` warmly by name as Paige, speaking in `{communication_language}`. Lead the greeting with `{agent.icon}` so the user can see at a glance which agent is speaking. Remind the user they can invoke the `bmad-help` skill at any time for advice.
Continue to prefix your messages with `{agent.icon}` throughout the session so the active persona stays visually identifiable.
### Step 7: Execute Append Steps
Execute each entry in `{agent.activation_steps_append}` in order.
### Step 8: Dispatch or Present the Menu
If the user's initial message already names an intent that clearly maps to a menu item (e.g. "hey Paige, let's document this codebase"), skip the menu and dispatch that item directly after greeting.
Otherwise render `{agent.menu}` as a numbered table: `Code`, `Description`, `Action` (the item's `skill` name, or a short label derived from its `prompt` text). **Stop and wait for input.** Accept a number, menu `code`, or fuzzy description match.
Dispatch on a clear match by invoking the item's `skill` or executing its `prompt`. Only pause to clarify when two or more items are genuinely close — one short question, not a confirmation ritual. When nothing on the menu fits, just continue the conversation; chat, clarifying questions, and `bmad-help` are always fair game.
From here, Paige stays active — persona, persistent facts, `{agent.icon}` prefix, and `{communication_language}` carry into every turn until the user dismisses her.

View File

@ -0,0 +1,11 @@
type: agent
name: bmad-agent-tech-writer
displayName: Paige
title: Technical Writer
icon: "📚"
capabilities: "documentation, Mermaid diagrams, standards compliance, concept explanation"
role: Technical Documentation Specialist + Knowledge Curator
identity: "Experienced technical writer expert in CommonMark, DITA, OpenAPI. Master of clarity - transforms complex concepts into accessible structured documentation."
communicationStyle: "Patient educator who explains like teaching a friend. Uses analogies that make complex simple, celebrates clarity when it shines."
principles: "Every Technical Document I touch helps someone accomplish a task. Thus I strive for Clarity above all, and every word and phrase serves a purpose without being overly wordy. I believe a picture/diagram is worth 1000s of words and will include diagrams over drawn out text. I understand the intended audience or will clarify with the user so I know when to simplify vs when to be detailed."
module: bmm

View File

@ -1,81 +0,0 @@
# DO NOT EDIT -- overwritten on every update.
#
# Paige, the Technical Writer, is the hardcoded identity of this agent.
# Customize the persona and menu below to shape behavior without
# changing who the agent is.
[agent]
# non-configurable skill frontmatter, create a custom agent if you need a new name/title
name = "Paige"
title = "Technical Writer"
# --- Configurable below. Overrides merge per BMad structural rules: ---
# scalars: override wins • arrays (persistent_facts, principles, activation_steps_*): append
# arrays-of-tables with `code`/`id`: replace matching items, append new ones.
icon = "📚"
# Steps to run before the standard activation (persona, config, greet).
# Overrides append. Use for pre-flight loads, compliance checks, etc.
activation_steps_prepend = []
# Steps to run after greet but before presenting the menu.
# Overrides append. Use for context-heavy setup that should happen
# once the user has been acknowledged.
activation_steps_append = []
# Persistent facts the agent keeps in mind for the whole session (org rules,
# domain constants, user preferences). Distinct from the runtime memory
# sidecar — these are static context loaded on activation. Overrides append.
#
# Each entry is either:
# - a literal sentence, e.g. "Our org is AWS-only -- do not propose GCP or Azure."
# - a file reference prefixed with `file:`, e.g. "file:{project-root}/docs/standards.md"
# (glob patterns are supported; the file's contents are loaded and treated as facts).
persistent_facts = [
"file:{project-root}/**/project-context.md",
]
role = "Capture and curate project knowledge so humans and future LLM agents stay in sync during the BMad Method analysis phase."
identity = "Writes with Julia Evans's accessibility and Edward Tufte's visual precision."
communication_style = "Patient educator — explains like teaching a friend. Every analogy earns its place."
# The agent's value system. Overrides append to defaults.
principles = [
"Write for the reader's task, not the writer's checklist.",
"A diagram beats a thousand-word paragraph.",
"Audience-aware: simplify or detail as the reader needs.",
]
# Capabilities menu. Overrides merge by `code`: matching codes replace the item
# in place, new codes append. Each item has exactly one of `skill` (invokes a
# registered skill by name) or `prompt` (executes the prompt text directly).
[[agent.menu]]
code = "DP"
description = "Generate comprehensive project documentation (brownfield analysis, architecture scanning)"
skill = "bmad-document-project"
[[agent.menu]]
code = "WD"
description = "Author a document following documentation best practices through guided conversation"
prompt = "Read and follow the instructions in {skill-root}/write-document.md"
[[agent.menu]]
code = "MG"
description = "Create a Mermaid-compliant diagram based on your description"
prompt = "Read and follow the instructions in {skill-root}/mermaid-gen.md"
[[agent.menu]]
code = "VD"
description = "Validate documentation against standards and best practices"
prompt = "Read and follow the instructions in {skill-root}/validate-doc.md"
[[agent.menu]]
code = "EC"
description = "Create clear technical explanations with examples and diagrams"
prompt = "Read and follow the instructions in {skill-root}/explain-concept.md"

View File

@ -3,60 +3,4 @@ name: bmad-document-project
description: 'Document brownfield projects for AI context. Use when the user says "document this project" or "generate project docs"' description: 'Document brownfield projects for AI context. Use when the user says "document this project" or "generate project docs"'
--- ---
# Document Project Workflow Follow the instructions in ./workflow.md.
**Goal:** Document brownfield projects for AI context.
**Your Role:** Project documentation specialist.
## Conventions
- Bare paths (e.g. `instructions.md`) resolve from the skill root.
- `{skill-root}` resolves to this skill's installed directory (where `customize.toml` lives).
- `{project-root}`-prefixed paths resolve from the project working directory.
- `{skill-name}` resolves to the skill directory's basename.
## On Activation
### Step 1: Resolve the Workflow Block
Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow`
**If the script fails**, resolve the `workflow` block yourself by reading these three files in base → team → user order and applying the same structural merge rules as the resolver:
1. `{skill-root}/customize.toml` — defaults
2. `{project-root}/_bmad/custom/{skill-name}.toml` — team overrides
3. `{project-root}/_bmad/custom/{skill-name}.user.toml` — personal overrides
Any missing file is skipped. Scalars override, tables deep-merge, arrays of tables keyed by `code` or `id` replace matching entries and append new entries, and all other arrays append.
### Step 2: Execute Prepend Steps
Execute each entry in `{workflow.activation_steps_prepend}` in order before proceeding.
### Step 3: Load Persistent Facts
Treat every entry in `{workflow.persistent_facts}` as foundational context you carry for the rest of the workflow run. Entries prefixed `file:` are paths or globs under `{project-root}` — load the referenced contents as facts. All other entries are facts verbatim.
### Step 4: Load Config
Load config from `{project-root}/_bmad/bmm/config.yaml` and resolve:
- Use `{user_name}` for greeting
- Use `{communication_language}` for all communications
- Use `{document_output_language}` for output documents
- Use `{planning_artifacts}` for output location and artifact scanning
- Use `{project_knowledge}` for additional context scanning
### Step 5: Greet the User
Greet `{user_name}` (if you have not already), speaking in `{communication_language}`.
### Step 6: Execute Append Steps
Execute each entry in `{workflow.activation_steps_append}` in order.
Activation is complete. Begin the workflow below.
## Execution
Read fully and follow: `./instructions.md`

View File

@ -1,41 +0,0 @@
# DO NOT EDIT -- overwritten on every update.
#
# Workflow customization surface for bmad-document-project. Mirrors the
# agent customization shape under the [workflow] namespace.
[workflow]
# --- Configurable below. Overrides merge per BMad structural rules: ---
# scalars: override wins • arrays (persistent_facts, activation_steps_*): append
# arrays-of-tables with `code`/`id`: replace matching items, append new ones.
# Steps to run before the standard activation (config load, greet).
# Overrides append. Use for pre-flight loads, compliance checks, etc.
activation_steps_prepend = []
# Steps to run after greet but before the workflow begins.
# Overrides append. Use for context-heavy setup that should happen
# once the user has been acknowledged.
activation_steps_append = []
# Persistent facts the workflow keeps in mind for the whole run
# (standards, compliance constraints, stylistic guardrails).
# Distinct from the runtime memory sidecar — these are static context
# loaded on activation. Overrides append.
#
# Each entry is either:
# - a literal sentence, e.g. "All briefs must include a regulatory-risk section."
# - a file reference prefixed with `file:`, e.g. "file:{project-root}/docs/standards.md"
# (glob patterns are supported; the file's contents are loaded and treated as facts).
persistent_facts = [
"file:{project-root}/**/project-context.md",
]
# Scalar: executed when the workflow reaches its terminal stage, after
# the main output has been delivered. Override wins. Leave empty for
# no custom post-completion behavior.
on_complete = ""

View File

@ -0,0 +1,25 @@
# Document Project Workflow
**Goal:** Document brownfield projects for AI context.
**Your Role:** Project documentation specialist.
- Communicate all responses in {communication_language}
---
## INITIALIZATION
1. Load config from `{project-root}/_bmad/bmm/config.yaml` and resolve::
- Use `{user_name}` for greeting
- Use `{communication_language}` for all communications
- Use `{document_output_language}` for output documents
- Use `{planning_artifacts}` for output location and artifact scanning
- Use `{project_knowledge}` for additional context scanning
2. **Greet user** as `{user_name}`, speaking in `{communication_language}`.
---
## EXECUTION
Read fully and follow: `./instructions.md`

View File

@ -291,7 +291,6 @@ These comprehensive docs are now ready for:
Thank you for using the document-project workflow! Thank you for using the document-project workflow!
</action> </action>
<action>Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete` — if the resolved value is non-empty, follow it as the final terminal instruction before exiting.</action>
<action>Exit workflow</action> <action>Exit workflow</action>
</action> </action>
</step> </step>

View File

@ -1103,6 +1103,5 @@ When ready to plan new features, run the PRD workflow and provide this index as
</action> </action>
<action>Display: "State file saved: {{project_knowledge}}/project-scan-report.json"</action> <action>Display: "State file saved: {{project_knowledge}}/project-scan-report.json"</action>
<action>Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete` — if the resolved value is non-empty, follow it as the final terminal instruction before exiting.</action>
</workflow> </workflow>

View File

@ -19,59 +19,20 @@ The PRFAQ forces customer-first clarity: write the press release announcing the
**Research-grounded.** All competitive, market, and feasibility claims in the output must be verified against current real-world data. Proactively research to fill knowledge gaps — the user deserves a PRFAQ informed by today's landscape, not yesterday's assumptions. **Research-grounded.** All competitive, market, and feasibility claims in the output must be verified against current real-world data. Proactively research to fill knowledge gaps — the user deserves a PRFAQ informed by today's landscape, not yesterday's assumptions.
## Conventions
- Bare paths (e.g. `references/press-release.md`) resolve from the skill root.
- `{skill-root}` resolves to this skill's installed directory (where `customize.toml` lives).
- `{project-root}`-prefixed paths resolve from the project working directory.
- `{skill-name}` resolves to the skill directory's basename.
## On Activation ## On Activation
### Step 1: Resolve the Workflow Block 1. Load config from `{project-root}/_bmad/bmm/config.yaml` and resolve::
- Use `{user_name}` for greeting
- Use `{communication_language}` for all communications
- Use `{document_output_language}` for output documents
- Use `{planning_artifacts}` for output location and artifact scanning
- Use `{project_knowledge}` for additional context scanning
Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow` 2. **Greet user** as `{user_name}`, speaking in `{communication_language}`. Be warm but efficient — dream builder energy.
**If the script fails**, resolve the `workflow` block yourself by reading these three files in base → team → user order and applying the same structural merge rules as the resolver: 3. **Resume detection:** Check if `{planning_artifacts}/prfaq-{project_name}.md` already exists. If it does, read only the first 20 lines to extract the frontmatter `stage` field and offer to resume from the next stage. Do not read the full document. If the user confirms, route directly to that stage's reference file.
1. `{skill-root}/customize.toml` — defaults 4. **Mode detection:**
2. `{project-root}/_bmad/custom/{skill-name}.toml` — team overrides
3. `{project-root}/_bmad/custom/{skill-name}.user.toml` — personal overrides
Any missing file is skipped. Scalars override, tables deep-merge, arrays of tables keyed by `code` or `id` replace matching entries and append new entries, and all other arrays append.
### Step 2: Execute Prepend Steps
Execute each entry in `{workflow.activation_steps_prepend}` in order before proceeding.
### Step 3: Load Persistent Facts
Treat every entry in `{workflow.persistent_facts}` as foundational context you carry for the rest of the workflow run. Entries prefixed `file:` are paths or globs under `{project-root}` — load the referenced contents as facts. All other entries are facts verbatim.
### Step 4: Load Config
Load config from `{project-root}/_bmad/bmm/config.yaml` and resolve:
- Use `{user_name}` for greeting
- Use `{communication_language}` for all communications
- Use `{document_output_language}` for output documents
- Use `{planning_artifacts}` for output location and artifact scanning
- Use `{project_knowledge}` for additional context scanning
### Step 5: Greet the User
Greet `{user_name}`, speaking in `{communication_language}`. Be warm but efficient — dream builder energy.
### Step 6: Execute Append Steps
Execute each entry in `{workflow.activation_steps_append}` in order.
Activation is complete. Continue below.
## Pre-workflow Setup
1. **Resume detection:** Check if `{planning_artifacts}/prfaq-{project_name}.md` already exists. If it does, read only the first 20 lines to extract the frontmatter `stage` field and offer to resume from the next stage. Do not read the full document. If the user confirms, route directly to that stage's reference file.
2. **Mode detection:**
- `--headless` / `-H`: Produce complete first-draft PRFAQ from provided inputs without interaction. Validate the input schema only (customer, problem, stakes, solution concept present and non-vague) — do not read any referenced files or documents yourself. If required fields are missing or too vague, return an error with specific guidance on what's needed. Fan out artifact analyzer and web researcher subagents in parallel (see Contextual Gathering below) to process all referenced materials, then create the output document at `{planning_artifacts}/prfaq-{project_name}.md` using `./assets/prfaq-template.md` and route to `./references/press-release.md`. - `--headless` / `-H`: Produce complete first-draft PRFAQ from provided inputs without interaction. Validate the input schema only (customer, problem, stakes, solution concept present and non-vague) — do not read any referenced files or documents yourself. If required fields are missing or too vague, return an error with specific guidance on what's needed. Fan out artifact analyzer and web researcher subagents in parallel (see Contextual Gathering below) to process all referenced materials, then create the output document at `{planning_artifacts}/prfaq-{project_name}.md` using `./assets/prfaq-template.md` and route to `./references/press-release.md`.
- Default: Full interactive coaching — the gauntlet. - Default: Full interactive coaching — the gauntlet.

View File

@ -7,8 +7,8 @@
"description": "Produces battle-tested PRFAQ document and optional LLM distillate for PRD input.", "description": "Produces battle-tested PRFAQ document and optional LLM distillate for PRD input.",
"supports-headless": true, "supports-headless": true,
"phase-name": "1-analysis", "phase-name": "1-analysis",
"preceded-by": ["brainstorming", "perform-research"], "after": ["brainstorming", "perform-research"],
"followed-by": ["create-prd"], "before": ["create-prd"],
"is-required": false, "is-required": false,
"output-location": "{planning_artifacts}" "output-location": "{planning_artifacts}"
} }

View File

@ -1,41 +0,0 @@
# DO NOT EDIT -- overwritten on every update.
#
# Workflow customization surface for bmad-prfaq. Mirrors the
# agent customization shape under the [workflow] namespace.
[workflow]
# --- Configurable below. Overrides merge per BMad structural rules: ---
# scalars: override wins • arrays (persistent_facts, activation_steps_*): append
# arrays-of-tables with `code`/`id`: replace matching items, append new ones.
# Steps to run before the standard activation (config load, greet).
# Overrides append. Use for pre-flight loads, compliance checks, etc.
activation_steps_prepend = []
# Steps to run after greet but before the workflow begins.
# Overrides append. Use for context-heavy setup that should happen
# once the user has been acknowledged.
activation_steps_append = []
# Persistent facts the workflow keeps in mind for the whole run
# (standards, compliance constraints, stylistic guardrails).
# Distinct from the runtime memory sidecar — these are static context
# loaded on activation. Overrides append.
#
# Each entry is either:
# - a literal sentence, e.g. "All briefs must include a regulatory-risk section."
# - a file reference prefixed with `file:`, e.g. "file:{project-root}/docs/standards.md"
# (glob patterns are supported; the file's contents are loaded and treated as facts).
persistent_facts = [
"file:{project-root}/**/project-context.md",
]
# Scalar: executed when the workflow reaches its terminal stage (Stage 5: The Verdict),
# after the PRFAQ and distillate have been delivered. Override wins. Leave empty for
# no custom post-completion behavior.
on_complete = ""

View File

@ -77,7 +77,3 @@ purpose: "Token-efficient context for downstream PRD creation"
## Stage Complete ## Stage Complete
This is the terminal stage. If the user wants to revise, loop back to the relevant stage. Otherwise, the workflow is done. This is the terminal stage. If the user wants to revise, loop back to the relevant stage. Otherwise, the workflow is done.
Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete`
If the resolved `workflow.on_complete` is non-empty, follow it as the final terminal instruction before exiting.

View File

@ -13,13 +13,6 @@ The user is the domain expert. You bring structured thinking, facilitation, mark
**Design rationale:** We always understand intent before scanning artifacts — without knowing what the brief is about, scanning documents is noise, not signal. We capture everything the user shares (even out-of-scope details like requirements or platform preferences) for the distillate, rather than interrupting their creative flow. **Design rationale:** We always understand intent before scanning artifacts — without knowing what the brief is about, scanning documents is noise, not signal. We capture everything the user shares (even out-of-scope details like requirements or platform preferences) for the distillate, rather than interrupting their creative flow.
## Conventions
- Bare paths (e.g. `prompts/finalize.md`) resolve from the skill root.
- `{skill-root}` resolves to this skill's installed directory (where `customize.toml` lives).
- `{project-root}`-prefixed paths resolve from the project working directory.
- `{skill-name}` resolves to the skill directory's basename.
## Activation Mode Detection ## Activation Mode Detection
Check activation context immediately: Check activation context immediately:
@ -37,46 +30,18 @@ Check activation context immediately:
## On Activation ## On Activation
### Step 1: Resolve the Workflow Block 1. Load config from `{project-root}/_bmad/bmm/config.yaml` and resolve::
- Use `{user_name}` for greeting
- Use `{communication_language}` for all communications
- Use `{document_output_language}` for output documents
- Use `{planning_artifacts}` for output location and artifact scanning
- Use `{project_knowledge}` for additional context scanning
Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow` 2. **Greet user** as `{user_name}`, speaking in `{communication_language}`.
**If the script fails**, resolve the `workflow` block yourself by reading these three files in base → team → user order and applying the same structural merge rules as the resolver: 3. **Stage 1: Understand Intent** (handled here in SKILL.md)
1. `{skill-root}/customize.toml` — defaults ### Stage 1: Understand Intent
2. `{project-root}/_bmad/custom/{skill-name}.toml` — team overrides
3. `{project-root}/_bmad/custom/{skill-name}.user.toml` — personal overrides
Any missing file is skipped. Scalars override, tables deep-merge, arrays of tables keyed by `code` or `id` replace matching entries and append new entries, and all other arrays append.
### Step 2: Execute Prepend Steps
Execute each entry in `{workflow.activation_steps_prepend}` in order before proceeding.
### Step 3: Load Persistent Facts
Treat every entry in `{workflow.persistent_facts}` as foundational context you carry for the rest of the workflow run. Entries prefixed `file:` are paths or globs under `{project-root}` — load the referenced contents as facts. All other entries are facts verbatim.
### Step 4: Load Config
Load config from `{project-root}/_bmad/bmm/config.yaml` and resolve:
- Use `{user_name}` for greeting
- Use `{communication_language}` for all communications
- Use `{document_output_language}` for output documents
- Use `{planning_artifacts}` for output location and artifact scanning
- Use `{project_knowledge}` for additional context scanning
### Step 5: Greet the User
If `{mode}` is not `autonomous`, greet `{user_name}` (if you have not already), speaking in `{communication_language}`. In autonomous mode, skip the greeting — no conversational output should precede the generated artifact.
### Step 6: Execute Append Steps
Execute each entry in `{workflow.activation_steps_append}` in order.
Activation is complete. Begin the workflow at Stage 1 below.
## Stage 1: Understand Intent
**Goal:** Know WHY the user is here and WHAT the brief is about before doing anything else. **Goal:** Know WHY the user is here and WHAT the brief is about before doing anything else.

View File

@ -8,8 +8,8 @@
"description": "Produces executive product brief and optional LLM distillate for PRD input.", "description": "Produces executive product brief and optional LLM distillate for PRD input.",
"supports-headless": true, "supports-headless": true,
"phase-name": "1-analysis", "phase-name": "1-analysis",
"preceded-by": ["brainstorming", "perform-research"], "after": ["brainstorming", "perform-research"],
"followed-by": ["create-prd"], "before": ["create-prd"],
"is-required": true, "is-required": true,
"output-location": "{planning_artifacts}" "output-location": "{planning_artifacts}"
} }

View File

@ -1,47 +0,0 @@
# DO NOT EDIT -- overwritten on every update.
#
# Workflow customization surface for bmad-product-brief. Mirrors the
# agent customization shape under the [workflow] namespace.
[workflow]
# --- Configurable below. Overrides merge per BMad structural rules: ---
# scalars: override wins • arrays (persistent_facts, activation_steps_*): append
# arrays-of-tables with `code`/`id`: replace matching items, append new ones.
# Steps to run before the standard activation (config load, greet).
# Overrides append. Use for pre-flight loads, compliance checks, etc.
activation_steps_prepend = []
# Steps to run after greet but before Stage 1 of the workflow.
# Overrides append. Use for context-heavy setup that should happen
# once the user has been acknowledged.
activation_steps_append = []
# Persistent facts the workflow keeps in mind for the whole run
# (standards, compliance constraints, stylistic guardrails).
# Distinct from the runtime memory sidecar — these are static context
# loaded on activation. Overrides append.
#
# Each entry is either:
# - a literal sentence, e.g. "All briefs must include a regulatory-risk section."
# - a file reference prefixed with `file:`, e.g. "file:{project-root}/docs/standards.md"
# (glob patterns are supported; the file's contents are loaded and treated as facts).
persistent_facts = [
"file:{project-root}/**/project-context.md",
]
# Path to the brief structure template used in Stage 4 drafting.
# Bare paths resolve from the skill root; use `{project-root}/...` to
# point at an org-owned template elsewhere in the repo. Override wins.
brief_template = "resources/brief-template.md"
# Scalar: executed when the workflow reaches its terminal stage, after
# the main output has been delivered. Override wins. Leave empty for
# no custom post-completion behavior.
on_complete = ""

View File

@ -1,7 +1,6 @@
**Language:** Use `{communication_language}` for all output. **Language:** Use `{communication_language}` for all output.
**Output Language:** Use `{document_output_language}` for documents. **Output Language:** Use `{document_output_language}` for documents.
**Output Location:** `{planning_artifacts}` **Output Location:** `{planning_artifacts}`
**Paths:** Bare paths (e.g. `agents/foo.md`) resolve from the skill root.
# Stage 2: Contextual Discovery # Stage 2: Contextual Discovery
@ -13,9 +12,9 @@ Now that you know what the brief is about, fan out subagents in parallel to gath
**Launch in parallel:** **Launch in parallel:**
1. **Artifact Analyzer** (`agents/artifact-analyzer.md`) — Scans `{planning_artifacts}` and `{project_knowledge}` for relevant documents. Also scans any specific paths the user provided. Returns structured synthesis of what it found. 1. **Artifact Analyzer** (`../agents/artifact-analyzer.md`) — Scans `{planning_artifacts}` and `{project_knowledge}` for relevant documents. Also scans any specific paths the user provided. Returns structured synthesis of what it found.
2. **Web Researcher** (`agents/web-researcher.md`) — Searches for competitive landscape, market context, trends, and relevant industry data. Returns structured findings scoped to the product domain. 2. **Web Researcher** (`../agents/web-researcher.md`) — Searches for competitive landscape, market context, trends, and relevant industry data. Returns structured findings scoped to the product domain.
### Graceful Degradation ### Graceful Degradation
@ -39,20 +38,20 @@ Once subagent results return (or inline scanning completes):
- Highlight anything surprising or worth discussing - Highlight anything surprising or worth discussing
- Share the gaps you've identified - Share the gaps you've identified
- Ask: "Anything else you'd like to add, or shall we move on to filling in the details?" - Ask: "Anything else you'd like to add, or shall we move on to filling in the details?"
- Route to `prompts/guided-elicitation.md` - Route to `guided-elicitation.md`
**Yolo mode:** **Yolo mode:**
- Absorb all findings silently - Absorb all findings silently
- Skip directly to `prompts/draft-and-review.md` — you have enough to draft - Skip directly to `draft-and-review.md` — you have enough to draft
- The user will refine later - The user will refine later
**Headless mode:** **Headless mode:**
- Absorb all findings - Absorb all findings
- Skip directly to `prompts/draft-and-review.md` - Skip directly to `draft-and-review.md`
- No interaction - No interaction
## Stage Complete ## Stage Complete
This stage is complete when subagent results (or inline scanning fallback) have returned and findings are merged with user context. Route per mode: This stage is complete when subagent results (or inline scanning fallback) have returned and findings are merged with user context. Route per mode:
- **Guided**`prompts/guided-elicitation.md` - **Guided**`guided-elicitation.md`
- **Yolo / Headless**`prompts/draft-and-review.md` - **Yolo / Headless**`draft-and-review.md`

View File

@ -1,7 +1,6 @@
**Language:** Use `{communication_language}` for all output. **Language:** Use `{communication_language}` for all output.
**Output Language:** Use `{document_output_language}` for documents. **Output Language:** Use `{document_output_language}` for documents.
**Output Location:** `{planning_artifacts}` **Output Location:** `{planning_artifacts}`
**Paths:** Bare paths (e.g. `agents/foo.md`) resolve from the skill root.
# Stage 4: Draft & Review # Stage 4: Draft & Review
@ -9,7 +8,7 @@
## Step 1: Draft the Executive Brief ## Step 1: Draft the Executive Brief
Use the template at `{workflow.brief_template}` as a guide — adapt structure to fit the product's story. Use `../resources/brief-template.md` as a guide — adapt structure to fit the product's story.
**Writing principles:** **Writing principles:**
- **Executive audience** — persuasive, clear, concise. 1-2 pages. - **Executive audience** — persuasive, clear, concise. 1-2 pages.
@ -37,9 +36,9 @@ Before showing the draft to the user, run it through multiple review lenses in p
**Launch in parallel:** **Launch in parallel:**
1. **Skeptic Reviewer** (`agents/skeptic-reviewer.md`) — "What's missing? What assumptions are untested? What could go wrong? Where is the brief vague or hand-wavy?" 1. **Skeptic Reviewer** (`../agents/skeptic-reviewer.md`) — "What's missing? What assumptions are untested? What could go wrong? Where is the brief vague or hand-wavy?"
2. **Opportunity Reviewer** (`agents/opportunity-reviewer.md`) — "What adjacent value propositions are being missed? What market angles or partnerships could strengthen this? What's underemphasized?" 2. **Opportunity Reviewer** (`../agents/opportunity-reviewer.md`) — "What adjacent value propositions are being missed? What market angles or partnerships could strengthen this? What's underemphasized?"
3. **Contextual Reviewer** — You (the main agent) pick the most useful third lens based on THIS specific product. Choose the lens that addresses the SINGLE BIGGEST RISK that the skeptic and opportunity reviewers won't naturally catch. Examples: 3. **Contextual Reviewer** — You (the main agent) pick the most useful third lens based on THIS specific product. Choose the lens that addresses the SINGLE BIGGEST RISK that the skeptic and opportunity reviewers won't naturally catch. Examples:
- For healthtech: "Regulatory and compliance risk reviewer" - For healthtech: "Regulatory and compliance risk reviewer"
@ -66,7 +65,7 @@ After all reviews complete:
## Step 4: Present to User ## Step 4: Present to User
**Headless mode:** Skip to `prompts/finalize.md` — no user interaction. Save the improved draft directly. **Headless mode:** Skip to `finalize.md` — no user interaction. Save the improved draft directly.
**Yolo and Guided modes:** **Yolo and Guided modes:**
@ -84,4 +83,4 @@ Present reviewer findings with brief rationale, then offer: "Want me to dig into
## Stage Complete ## Stage Complete
This stage is complete when: (a) the draft has been reviewed by all three lenses and improvements integrated, AND either (autonomous) save and route directly, or (guided/yolo) the user is satisfied. Route to `prompts/finalize.md`. This stage is complete when: (a) the draft has been reviewed by all three lenses and improvements integrated, AND either (autonomous) save and route directly, or (guided/yolo) the user is satisfied. Route to `finalize.md`.

View File

@ -1,7 +1,6 @@
**Language:** Use `{communication_language}` for all output. **Language:** Use `{communication_language}` for all output.
**Output Language:** Use `{document_output_language}` for documents. **Output Language:** Use `{document_output_language}` for documents.
**Output Location:** `{planning_artifacts}` **Output Location:** `{planning_artifacts}`
**Paths:** Bare paths (e.g. `prompts/foo.md`) resolve from the skill root.
# Stage 5: Finalize # Stage 5: Finalize
@ -73,6 +72,4 @@ purpose: "Token-efficient context for downstream PRD creation"
## Stage Complete ## Stage Complete
Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete` This is the terminal stage. After delivering the completion message and file paths, the workflow is done. If the user requests further revisions, loop back to `draft-and-review.md`. Otherwise, exit.
If the resolved `workflow.on_complete` is non-empty, follow it as the final terminal instruction before exiting. After delivering the completion message and file paths, the workflow is done. If the user requests further revisions, loop back to `prompts/draft-and-review.md`. Otherwise, exit.

View File

@ -1,12 +1,11 @@
**Language:** Use `{communication_language}` for all output. **Language:** Use `{communication_language}` for all output.
**Output Language:** Use `{document_output_language}` for documents. **Output Language:** Use `{document_output_language}` for documents.
**Paths:** Bare paths (e.g. `prompts/foo.md`) resolve from the skill root.
# Stage 3: Guided Elicitation # Stage 3: Guided Elicitation
**Goal:** Fill the gaps in what you know. By now you have the user's brain dump, artifact analysis, and web research. This stage is about smart, targeted questioning — not rote section-by-section interrogation. **Goal:** Fill the gaps in what you know. By now you have the user's brain dump, artifact analysis, and web research. This stage is about smart, targeted questioning — not rote section-by-section interrogation.
**Skip this stage entirely in Yolo and Autonomous modes** — go directly to `prompts/draft-and-review.md`. **Skip this stage entirely in Yolo and Autonomous modes** — go directly to `draft-and-review.md`.
## Approach ## Approach
@ -68,4 +67,4 @@ If the user is providing complete, confident answers and you have solid coverage
## Stage Complete ## Stage Complete
This stage is complete when sufficient substance exists to draft a compelling brief and the user confirms readiness. Route to `prompts/draft-and-review.md`. This stage is complete when sufficient substance exists to draft a compelling brief and the user confirms readiness. Route to `draft-and-review.md`.

View File

@ -3,94 +3,4 @@ name: bmad-domain-research
description: 'Conduct domain and industry research. Use when the user says wants to do domain research for a topic or industry' description: 'Conduct domain and industry research. Use when the user says wants to do domain research for a topic or industry'
--- ---
# Domain Research Workflow Follow the instructions in ./workflow.md.
**Goal:** Conduct comprehensive domain/industry research using current web data and verified sources to produce complete research documents with compelling narratives and proper citations.
**Your Role:** You are a domain research facilitator working with an expert partner. This is a collaboration where you bring research methodology and web search capabilities, while your partner brings domain knowledge and research direction.
## Conventions
- Bare paths (e.g. `domain-steps/step-01-init.md`) resolve from the skill root.
- `{skill-root}` resolves to this skill's installed directory (where `customize.toml` lives).
- `{project-root}`-prefixed paths resolve from the project working directory.
- `{skill-name}` resolves to the skill directory's basename.
## PREREQUISITE
**⛔ Web search required.** If unavailable, abort and tell the user.
## On Activation
### Step 1: Resolve the Workflow Block
Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow`
**If the script fails**, resolve the `workflow` block yourself by reading these three files in base → team → user order and applying the same structural merge rules as the resolver:
1. `{skill-root}/customize.toml` — defaults
2. `{project-root}/_bmad/custom/{skill-name}.toml` — team overrides
3. `{project-root}/_bmad/custom/{skill-name}.user.toml` — personal overrides
Any missing file is skipped. Scalars override, tables deep-merge, arrays of tables keyed by `code` or `id` replace matching entries and append new entries, and all other arrays append.
### Step 2: Execute Prepend Steps
Execute each entry in `{workflow.activation_steps_prepend}` in order before proceeding.
### Step 3: Load Persistent Facts
Treat every entry in `{workflow.persistent_facts}` as foundational context you carry for the rest of the workflow run. Entries prefixed `file:` are paths or globs under `{project-root}` — load the referenced contents as facts. All other entries are facts verbatim.
### Step 4: Load Config
Load config from `{project-root}/_bmad/bmm/config.yaml` and resolve:
- Use `{user_name}` for greeting
- Use `{communication_language}` for all communications
- Use `{document_output_language}` for output documents
- Use `{planning_artifacts}` for output location and artifact scanning
- Use `{project_knowledge}` for additional context scanning
### Step 5: Greet the User
Greet `{user_name}`, speaking in `{communication_language}`.
### Step 6: Execute Append Steps
Execute each entry in `{workflow.activation_steps_append}` in order.
Activation is complete. Begin the workflow below.
## QUICK TOPIC DISCOVERY
"Welcome {{user_name}}! Let's get started with your **domain/industry research**.
**What domain, industry, or sector do you want to research?**
For example:
- 'The healthcare technology industry'
- 'Sustainable packaging regulations in Europe'
- 'Construction and building materials sector'
- 'Or any other domain you have in mind...'"
### Topic Clarification
Based on the user's topic, briefly clarify:
1. **Core Domain**: "What specific aspect of [domain] are you most interested in?"
2. **Research Goals**: "What do you hope to achieve with this research?"
3. **Scope**: "Should we focus broadly or dive deep into specific aspects?"
## ROUTE TO DOMAIN RESEARCH STEPS
After gathering the topic and goals:
1. Set `research_type = "domain"`
2. Set `research_topic = [discovered topic from discussion]`
3. Set `research_goals = [discovered goals from discussion]`
4. Derive `research_topic_slug` from `{{research_topic}}`: lowercase, trim, replace whitespace with `-`, strip path separators (`/`, `\`), `..`, and any character that is not alphanumeric, `-`, or `_`. Collapse repeated `-` and strip leading/trailing `-`. If the result is empty, use `untitled`.
5. Create the starter output file: `{planning_artifacts}/research/domain-{{research_topic_slug}}-research-{{date}}.md` with exact copy of the `./research.template.md` contents
6. Load: `./domain-steps/step-01-init.md` with topic context
**Note:** The discovered topic from the discussion should be passed to the initialization step, so it doesn't need to ask "What do you want to research?" again - it can focus on refining the scope for domain research.
**✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`**

View File

@ -1,41 +0,0 @@
# DO NOT EDIT -- overwritten on every update.
#
# Workflow customization surface for bmad-domain-research. Mirrors the
# agent customization shape under the [workflow] namespace.
[workflow]
# --- Configurable below. Overrides merge per BMad structural rules: ---
# scalars: override wins • arrays (persistent_facts, activation_steps_*): append
# arrays-of-tables with `code`/`id`: replace matching items, append new ones.
# Steps to run before the standard activation (config load, greet).
# Overrides append. Use for pre-flight loads, compliance checks, etc.
activation_steps_prepend = []
# Steps to run after greet but before the workflow begins.
# Overrides append. Use for context-heavy setup that should happen
# once the user has been acknowledged.
activation_steps_append = []
# Persistent facts the workflow keeps in mind for the whole run
# (standards, compliance constraints, stylistic guardrails).
# Distinct from the runtime memory sidecar — these are static context
# loaded on activation. Overrides append.
#
# Each entry is either:
# - a literal sentence, e.g. "All briefs must include a regulatory-risk section."
# - a file reference prefixed with `file:`, e.g. "file:{project-root}/docs/standards.md"
# (glob patterns are supported; the file's contents are loaded and treated as facts).
persistent_facts = [
"file:{project-root}/**/project-context.md",
]
# Scalar: executed when the workflow reaches its terminal stage (Step 6: Research Synthesis),
# after the domain research document has been saved and the user selects [C] Complete.
# Override wins. Leave empty for no custom post-completion behavior.
on_complete = ""

View File

@ -441,10 +441,4 @@ Complete authoritative research document on {{research_topic}} that:
- Serves as reference document for continued use - Serves as reference document for continued use
- Maintains highest research quality standards - Maintains highest research quality standards
## On Complete
Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete`
If the resolved `workflow.on_complete` is non-empty, follow it as the final terminal instruction before exiting.
Congratulations on completing comprehensive domain research! 🎉 Congratulations on completing comprehensive domain research! 🎉

View File

@ -0,0 +1,51 @@
# Domain Research Workflow
**Goal:** Conduct comprehensive domain/industry research using current web data and verified sources to produce complete research documents with compelling narratives and proper citations.
**Your Role:** You are a domain research facilitator working with an expert partner. This is a collaboration where you bring research methodology and web search capabilities, while your partner brings domain knowledge and research direction.
## PREREQUISITE
**⛔ Web search required.** If unavailable, abort and tell the user.
## Activation
1. Load config from `{project-root}/_bmad/bmm/config.yaml` and resolve::
- Use `{user_name}` for greeting
- Use `{communication_language}` for all communications
- Use `{document_output_language}` for output documents
- Use `{planning_artifacts}` for output location and artifact scanning
- Use `{project_knowledge}` for additional context scanning
## QUICK TOPIC DISCOVERY
"Welcome {{user_name}}! Let's get started with your **domain/industry research**.
**What domain, industry, or sector do you want to research?**
For example:
- 'The healthcare technology industry'
- 'Sustainable packaging regulations in Europe'
- 'Construction and building materials sector'
- 'Or any other domain you have in mind...'"
### Topic Clarification
Based on the user's topic, briefly clarify:
1. **Core Domain**: "What specific aspect of [domain] are you most interested in?"
2. **Research Goals**: "What do you hope to achieve with this research?"
3. **Scope**: "Should we focus broadly or dive deep into specific aspects?"
## ROUTE TO DOMAIN RESEARCH STEPS
After gathering the topic and goals:
1. Set `research_type = "domain"`
2. Set `research_topic = [discovered topic from discussion]`
3. Set `research_goals = [discovered goals from discussion]`
4. Create the starter output file: `{planning_artifacts}/research/domain-{{research_topic}}-research-{{date}}.md` with exact copy of the `./research.template.md` contents
5. Load: `./domain-steps/step-01-init.md` with topic context
**Note:** The discovered topic from the discussion should be passed to the initialization step, so it doesn't need to ask "What do you want to research?" again - it can focus on refining the scope for domain research.
**✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`**

View File

@ -3,94 +3,4 @@ name: bmad-market-research
description: 'Conduct market research on competition and customers. Use when the user says they need market research' description: 'Conduct market research on competition and customers. Use when the user says they need market research'
--- ---
# Market Research Workflow Follow the instructions in ./workflow.md.
**Goal:** Conduct comprehensive market research using current web data and verified sources to produce complete research documents with compelling narratives and proper citations.
**Your Role:** You are a market research facilitator working with an expert partner. This is a collaboration where you bring research methodology and web search capabilities, while your partner brings domain knowledge and research direction.
## Conventions
- Bare paths (e.g. `steps/step-01-init.md`) resolve from the skill root.
- `{skill-root}` resolves to this skill's installed directory (where `customize.toml` lives).
- `{project-root}`-prefixed paths resolve from the project working directory.
- `{skill-name}` resolves to the skill directory's basename.
## PREREQUISITE
**⛔ Web search required.** If unavailable, abort and tell the user.
## On Activation
### Step 1: Resolve the Workflow Block
Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow`
**If the script fails**, resolve the `workflow` block yourself by reading these three files in base → team → user order and applying the same structural merge rules as the resolver:
1. `{skill-root}/customize.toml` — defaults
2. `{project-root}/_bmad/custom/{skill-name}.toml` — team overrides
3. `{project-root}/_bmad/custom/{skill-name}.user.toml` — personal overrides
Any missing file is skipped. Scalars override, tables deep-merge, arrays of tables keyed by `code` or `id` replace matching entries and append new entries, and all other arrays append.
### Step 2: Execute Prepend Steps
Execute each entry in `{workflow.activation_steps_prepend}` in order before proceeding.
### Step 3: Load Persistent Facts
Treat every entry in `{workflow.persistent_facts}` as foundational context you carry for the rest of the workflow run. Entries prefixed `file:` are paths or globs under `{project-root}` — load the referenced contents as facts. All other entries are facts verbatim.
### Step 4: Load Config
Load config from `{project-root}/_bmad/bmm/config.yaml` and resolve:
- Use `{user_name}` for greeting
- Use `{communication_language}` for all communications
- Use `{document_output_language}` for output documents
- Use `{planning_artifacts}` for output location and artifact scanning
- Use `{project_knowledge}` for additional context scanning
### Step 5: Greet the User
Greet `{user_name}`, speaking in `{communication_language}`.
### Step 6: Execute Append Steps
Execute each entry in `{workflow.activation_steps_append}` in order.
Activation is complete. Begin the workflow below.
## QUICK TOPIC DISCOVERY
"Welcome {{user_name}}! Let's get started with your **market research**.
**What topic, problem, or area do you want to research?**
For example:
- 'The electric vehicle market in Europe'
- 'Plant-based food alternatives market'
- 'Mobile payment solutions in Southeast Asia'
- 'Or anything else you have in mind...'"
### Topic Clarification
Based on the user's topic, briefly clarify:
1. **Core Topic**: "What exactly about [topic] are you most interested in?"
2. **Research Goals**: "What do you hope to achieve with this research?"
3. **Scope**: "Should we focus broadly or dive deep into specific aspects?"
## ROUTE TO MARKET RESEARCH STEPS
After gathering the topic and goals:
1. Set `research_type = "market"`
2. Set `research_topic = [discovered topic from discussion]`
3. Set `research_goals = [discovered goals from discussion]`
4. Derive `research_topic_slug` from `{{research_topic}}`: lowercase, trim, replace whitespace with `-`, strip path separators (`/`, `\`), `..`, and any character that is not alphanumeric, `-`, or `_`. Collapse repeated `-` and strip leading/trailing `-`. If the result is empty, use `untitled`.
5. Create the starter output file: `{planning_artifacts}/research/market-{{research_topic_slug}}-research-{{date}}.md` with exact copy of the `./research.template.md` contents
6. Load: `./steps/step-01-init.md` with topic context
**Note:** The discovered topic from the discussion should be passed to the initialization step, so it doesn't need to ask "What do you want to research?" again - it can focus on refining the scope for market research.
**✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`**

View File

@ -1,41 +0,0 @@
# DO NOT EDIT -- overwritten on every update.
#
# Workflow customization surface for bmad-market-research. Mirrors the
# agent customization shape under the [workflow] namespace.
[workflow]
# --- Configurable below. Overrides merge per BMad structural rules: ---
# scalars: override wins • arrays (persistent_facts, activation_steps_*): append
# arrays-of-tables with `code`/`id`: replace matching items, append new ones.
# Steps to run before the standard activation (config load, greet).
# Overrides append. Use for pre-flight loads, compliance checks, etc.
activation_steps_prepend = []
# Steps to run after greet but before the workflow begins.
# Overrides append. Use for context-heavy setup that should happen
# once the user has been acknowledged.
activation_steps_append = []
# Persistent facts the workflow keeps in mind for the whole run
# (standards, compliance constraints, stylistic guardrails).
# Distinct from the runtime memory sidecar — these are static context
# loaded on activation. Overrides append.
#
# Each entry is either:
# - a literal sentence, e.g. "All briefs must include a regulatory-risk section."
# - a file reference prefixed with `file:`, e.g. "file:{project-root}/docs/standards.md"
# (glob patterns are supported; the file's contents are loaded and treated as facts).
persistent_facts = [
"file:{project-root}/**/project-context.md",
]
# Scalar: executed when the workflow reaches its terminal stage (Step 6: Research Completion),
# after the market research document has been saved and the user selects [C] Complete.
# Override wins. Leave empty for no custom post-completion behavior.
on_complete = ""

View File

@ -475,10 +475,4 @@ Comprehensive market research workflow complete. User may:
- Combine market research with other research types for comprehensive insights - Combine market research with other research types for comprehensive insights
- Move forward with implementation based on strategic market recommendations - Move forward with implementation based on strategic market recommendations
## On Complete
Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete`
If the resolved `workflow.on_complete` is non-empty, follow it as the final terminal instruction before exiting.
Congratulations on completing comprehensive market research with professional documentation! 🎉 Congratulations on completing comprehensive market research with professional documentation! 🎉

View File

@ -0,0 +1,51 @@
# Market Research Workflow
**Goal:** Conduct comprehensive market research using current web data and verified sources to produce complete research documents with compelling narratives and proper citations.
**Your Role:** You are a market research facilitator working with an expert partner. This is a collaboration where you bring research methodology and web search capabilities, while your partner brings domain knowledge and research direction.
## PREREQUISITE
**⛔ Web search required.** If unavailable, abort and tell the user.
## Activation
1. Load config from `{project-root}/_bmad/bmm/config.yaml` and resolve::
- Use `{user_name}` for greeting
- Use `{communication_language}` for all communications
- Use `{document_output_language}` for output documents
- Use `{planning_artifacts}` for output location and artifact scanning
- Use `{project_knowledge}` for additional context scanning
## QUICK TOPIC DISCOVERY
"Welcome {{user_name}}! Let's get started with your **market research**.
**What topic, problem, or area do you want to research?**
For example:
- 'The electric vehicle market in Europe'
- 'Plant-based food alternatives market'
- 'Mobile payment solutions in Southeast Asia'
- 'Or anything else you have in mind...'"
### Topic Clarification
Based on the user's topic, briefly clarify:
1. **Core Topic**: "What exactly about [topic] are you most interested in?"
2. **Research Goals**: "What do you hope to achieve with this research?"
3. **Scope**: "Should we focus broadly or dive deep into specific aspects?"
## ROUTE TO MARKET RESEARCH STEPS
After gathering the topic and goals:
1. Set `research_type = "market"`
2. Set `research_topic = [discovered topic from discussion]`
3. Set `research_goals = [discovered goals from discussion]`
4. Create the starter output file: `{planning_artifacts}/research/market-{{research_topic}}-research-{{date}}.md` with exact copy of the `./research.template.md` contents
5. Load: `./steps/step-01-init.md` with topic context
**Note:** The discovered topic from the discussion should be passed to the initialization step, so it doesn't need to ask "What do you want to research?" again - it can focus on refining the scope for market research.
**✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`**

View File

@ -3,94 +3,4 @@ name: bmad-technical-research
description: 'Conduct technical research on technologies and architecture. Use when the user says they would like to do or produce a technical research report' description: 'Conduct technical research on technologies and architecture. Use when the user says they would like to do or produce a technical research report'
--- ---
# Technical Research Workflow Follow the instructions in ./workflow.md.
**Goal:** Conduct comprehensive technical research using current web data and verified sources to produce complete research documents with compelling narratives and proper citations.
**Your Role:** You are a technical research facilitator working with an expert partner. This is a collaboration where you bring research methodology and web search capabilities, while your partner brings domain knowledge and research direction.
## Conventions
- Bare paths (e.g. `technical-steps/step-01-init.md`) resolve from the skill root.
- `{skill-root}` resolves to this skill's installed directory (where `customize.toml` lives).
- `{project-root}`-prefixed paths resolve from the project working directory.
- `{skill-name}` resolves to the skill directory's basename.
## PREREQUISITE
**⛔ Web search required.** If unavailable, abort and tell the user.
## On Activation
### Step 1: Resolve the Workflow Block
Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow`
**If the script fails**, resolve the `workflow` block yourself by reading these three files in base → team → user order and applying the same structural merge rules as the resolver:
1. `{skill-root}/customize.toml` — defaults
2. `{project-root}/_bmad/custom/{skill-name}.toml` — team overrides
3. `{project-root}/_bmad/custom/{skill-name}.user.toml` — personal overrides
Any missing file is skipped. Scalars override, tables deep-merge, arrays of tables keyed by `code` or `id` replace matching entries and append new entries, and all other arrays append.
### Step 2: Execute Prepend Steps
Execute each entry in `{workflow.activation_steps_prepend}` in order before proceeding.
### Step 3: Load Persistent Facts
Treat every entry in `{workflow.persistent_facts}` as foundational context you carry for the rest of the workflow run. Entries prefixed `file:` are paths or globs under `{project-root}` — load the referenced contents as facts. All other entries are facts verbatim.
### Step 4: Load Config
Load config from `{project-root}/_bmad/bmm/config.yaml` and resolve:
- Use `{user_name}` for greeting
- Use `{communication_language}` for all communications
- Use `{document_output_language}` for output documents
- Use `{planning_artifacts}` for output location and artifact scanning
- Use `{project_knowledge}` for additional context scanning
### Step 5: Greet the User
Greet `{user_name}`, speaking in `{communication_language}`.
### Step 6: Execute Append Steps
Execute each entry in `{workflow.activation_steps_append}` in order.
Activation is complete. Begin the workflow below.
## QUICK TOPIC DISCOVERY
"Welcome {{user_name}}! Let's get started with your **technical research**.
**What technology, tool, or technical area do you want to research?**
For example:
- 'React vs Vue for large-scale applications'
- 'GraphQL vs REST API architectures'
- 'Serverless deployment options for Node.js'
- 'Or any other technical topic you have in mind...'"
### Topic Clarification
Based on the user's topic, briefly clarify:
1. **Core Technology**: "What specific aspect of [technology] are you most interested in?"
2. **Research Goals**: "What do you hope to achieve with this research?"
3. **Scope**: "Should we focus broadly or dive deep into specific aspects?"
## ROUTE TO TECHNICAL RESEARCH STEPS
After gathering the topic and goals:
1. Set `research_type = "technical"`
2. Set `research_topic = [discovered topic from discussion]`
3. Set `research_goals = [discovered goals from discussion]`
4. Derive `research_topic_slug` from `{{research_topic}}`: lowercase, trim, replace whitespace with `-`, strip path separators (`/`, `\`), `..`, and any character that is not alphanumeric, `-`, or `_`. Collapse repeated `-` and strip leading/trailing `-`. If the result is empty, use `untitled`.
5. Create the starter output file: `{planning_artifacts}/research/technical-{{research_topic_slug}}-research-{{date}}.md` with exact copy of the `./research.template.md` contents
6. Load: `./technical-steps/step-01-init.md` with topic context
**Note:** The discovered topic from the discussion should be passed to the initialization step, so it doesn't need to ask "What do you want to research?" again - it can focus on refining the scope for technical research.
**✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`**

View File

@ -1,41 +0,0 @@
# DO NOT EDIT -- overwritten on every update.
#
# Workflow customization surface for bmad-technical-research. Mirrors the
# agent customization shape under the [workflow] namespace.
[workflow]
# --- Configurable below. Overrides merge per BMad structural rules: ---
# scalars: override wins • arrays (persistent_facts, activation_steps_*): append
# arrays-of-tables with `code`/`id`: replace matching items, append new ones.
# Steps to run before the standard activation (config load, greet).
# Overrides append. Use for pre-flight loads, compliance checks, etc.
activation_steps_prepend = []
# Steps to run after greet but before the workflow begins.
# Overrides append. Use for context-heavy setup that should happen
# once the user has been acknowledged.
activation_steps_append = []
# Persistent facts the workflow keeps in mind for the whole run
# (standards, compliance constraints, stylistic guardrails).
# Distinct from the runtime memory sidecar — these are static context
# loaded on activation. Overrides append.
#
# Each entry is either:
# - a literal sentence, e.g. "All briefs must include a regulatory-risk section."
# - a file reference prefixed with `file:`, e.g. "file:{project-root}/docs/standards.md"
# (glob patterns are supported; the file's contents are loaded and treated as facts).
persistent_facts = [
"file:{project-root}/**/project-context.md",
]
# Scalar: executed when the workflow reaches its terminal stage (Step 6: Technical Synthesis),
# after the technical research document has been saved and the user selects [C] Complete.
# Override wins. Leave empty for no custom post-completion behavior.
on_complete = ""

Some files were not shown because too many files have changed in this diff Show More