Compare commits
1 Commits
be74c52889
...
4065737327
| Author | SHA1 | Date |
|---|---|---|
|
|
4065737327 |
51
CHANGELOG.md
51
CHANGELOG.md
|
|
@ -1,56 +1,5 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
## v6.3.0 - 2026-04-09
|
|
||||||
|
|
||||||
### 💥 Breaking Changes
|
|
||||||
|
|
||||||
* Remove custom content installation feature; use marketplace-based plugin installation instead (#2227)
|
|
||||||
* Remove bmad-init skill; all agents and skills now load config directly from `{project-root}/_bmad/bmm/config.yaml` (#2159)
|
|
||||||
* Remove spec-wip.md singleton; quick-dev now writes directly to `spec-{slug}.md` with status field, enabling parallel sessions (#2214)
|
|
||||||
* Consolidate three agent personas into Developer agent (Amelia): remove Barry quick-flow-solo-dev (#2177), Quinn QA agent (#2179), and Bob Scrum Master agent (#2186)
|
|
||||||
|
|
||||||
### 🎁 Features
|
|
||||||
|
|
||||||
* Universal source support for custom module installs with 5-strategy PluginResolver cascade supporting any Git host (GitHub, GitLab, Bitbucket, self-hosted) and local file paths (#2233)
|
|
||||||
* Community module browser with three-tier selection: official, community (category drill-down from marketplace index), and custom URL with unverified source warning (#2229)
|
|
||||||
* Switch module source of truth from bundled config to remote marketplace registry with network-failure fallback (#2228)
|
|
||||||
* Add bmad-prfaq skill implementing Amazon's Working Backwards methodology as alternative Phase 1 analysis path with 5-stage coached workflow and subagent architecture (#2157)
|
|
||||||
* Add bmad-checkpoint-preview skill for guided, concern-ordered human review of commits, branches, or PRs (#2145)
|
|
||||||
* Epic context compilation for quick-dev step-01: sub-agent compiles planning docs into cached `epic-{N}-context.md` for story implementation (#2218)
|
|
||||||
* Previous story continuity in quick-dev: load completed spec from same epic as implementation context (#2201)
|
|
||||||
* Planning artifact awareness in quick-dev: selectively load PRD, architecture, UX, and epics docs for context-informed specs (#2185)
|
|
||||||
* One-shot route now generates lightweight spec trace file for consistent artifact tracking (#2121)
|
|
||||||
* Improve checkpoint-preview UX with clickable spec paths, external edit detection, and missing-file halt (#2217)
|
|
||||||
* Add Junie (JetBrains AI) platform support (#2142)
|
|
||||||
* Restore KiloCoder support with native-skills installation (#2151)
|
|
||||||
* Add bmad-help support for llms.txt general questions (#2230)
|
|
||||||
|
|
||||||
### ♻️ Refactoring
|
|
||||||
|
|
||||||
* Consolidate party-mode into single SKILL.md with real subagent spawning via Agent tool, replacing multi-file workflow architecture (#2160)
|
|
||||||
|
|
||||||
### 🐛 Bug Fixes
|
|
||||||
|
|
||||||
* Fix version display bug where marketplace.json walk-up reported wrong version (#2233)
|
|
||||||
* Fix checkpoint-preview step-05 advancing without user confirmation by adding explicit HALT (#2184)
|
|
||||||
* Address adversarial triage findings: clarify review_mode transitions, label walkthrough branches, fix terse commit handling (#2180)
|
|
||||||
* Preserve local custom module sources during quick update (#2172)
|
|
||||||
* Support skills/ folder as fallback module source location for bmb compatibility (#2149)
|
|
||||||
|
|
||||||
### 🔧 Maintenance
|
|
||||||
|
|
||||||
* Overhaul installer branding with responsive BMAD METHOD logo, blue color scheme, unified version sourcing from marketplace.json, and surgical manifest-based skill cleanup (#2223)
|
|
||||||
* Stop copying skill prompts to _bmad by default (#2182)
|
|
||||||
* Add Python 3.10+ and uv as documented prerequisites (#2221)
|
|
||||||
|
|
||||||
### 📚 Documentation
|
|
||||||
|
|
||||||
* Complete Czech (cs-CZ) documentation translation (#2134)
|
|
||||||
* Complete Vietnamese (vi-VN) documentation translation (#2110, #2192)
|
|
||||||
* Rewrite get-answers-about-bmad as 1-2-3 escalation flow, remove deprecated references (#2213)
|
|
||||||
* Add checkpoint-preview explainer page and workflow diagram (#2183)
|
|
||||||
* Update docs theme to match bmadcode.com with responsive logo and blue color scheme (#2176)
|
|
||||||
|
|
||||||
## v6.2.2 - 2026-03-25
|
## v6.2.2 - 2026-03-25
|
||||||
|
|
||||||
### ♻️ Refactoring
|
### ♻️ Refactoring
|
||||||
|
|
|
||||||
15
README_VN.md
15
README_VN.md
|
|
@ -3,8 +3,6 @@
|
||||||
[](https://www.npmjs.com/package/bmad-method)
|
[](https://www.npmjs.com/package/bmad-method)
|
||||||
[](LICENSE)
|
[](LICENSE)
|
||||||
[](https://nodejs.org)
|
[](https://nodejs.org)
|
||||||
[](https://www.python.org)
|
|
||||||
[](https://docs.astral.sh/uv/)
|
|
||||||
[](https://discord.gg/gk8jAdXWmj)
|
[](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
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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ě promyslet váš produkt, než se zavážete k jeho budování. Každý nástroj v této fázi je volitelný, ale pokud analýzu úplně vynecháte, váš PRD bude postavený na domněnkách místo na poznatcích.
|
|
||||||
|
|
||||||
## Proč analýza před plánováním?
|
|
||||||
|
|
||||||
PRD odpovídá na otázku „co bychom měli vybudovat a proč?“. Když do něj vložíte vágní úvahy, dostanete vágní PRD — a každý následující dokument tu vágnost zdědí. Architektura postavená na slabém PRD udělá špatné technické sázky. Stories odvozené ze slabé architektury minou hraniční případy. Náklady se vrší.
|
|
||||||
|
|
||||||
Analytické nástroje existují proto, aby váš PRD byl ostrý. Útočí na problém z různých úhlů — kreativní průzkum, realita trhu, jasnost ohledně zákazníka, proveditelnost — takže když si sednete s PM agentem, víte, co stavíte a pro koho.
|
|
||||||
|
|
||||||
## Nástroje
|
|
||||||
|
|
||||||
### Brainstorming
|
|
||||||
|
|
||||||
**Co to je.** Facilitované kreativní sezení využívající osvědčené techniky ideace. AI působí jako kouč, který z vás tahá nápady prostřednictvím strukturovaných cvičení — negeneruje nápady za vás.
|
|
||||||
|
|
||||||
**Proč je tu.** Surové nápady potřebují prostor k rozvoji, než se uzamknou do požadavků. Brainstorming ten prostor vytváří. Je obzvlášť cenný, když máte problémovou doménu, ale žádné jasné řešení, nebo když chcete prozkoumat více směrů, než se zavážete.
|
|
||||||
|
|
||||||
**Kdy ho použít.** Máte mlhavou představu o tom, co chcete vybudovat, ale ještě jste ji nevykrystalizovali do konkrétního konceptu. Nebo máte koncept, ale chcete ho otestovat proti alternativám.
|
|
||||||
|
|
||||||
Viz [Brainstorming](./brainstorming.md) pro podrobnější pohled na průběh sezení.
|
|
||||||
|
|
||||||
### Výzkum (tržní, doménový, technický)
|
|
||||||
|
|
||||||
**Co to je.** Tři cílené výzkumné workflow zkoumající různé dimenze vašeho nápadu. Tržní výzkum prozkoumá konkurenci, trendy a nálady uživatelů. Doménový výzkum buduje odborné znalosti a terminologii. Technický výzkum hodnotí proveditelnost, architektonické možnosti a přístupy k implementaci.
|
|
||||||
|
|
||||||
**Proč je tu.** Budovat na domněnkách je nejrychlejší cesta k vytvoření něčeho, co nikdo nepotřebuje. Výzkum uzemní váš koncept v realitě — jací konkurenti už existují, s čím uživatelé skutečně bojují, co je technicky proveditelné a jaká specifická odvětvová omezení vás čekají.
|
|
||||||
|
|
||||||
**Kdy ho použít.** Vstupujete do neznámé domény, tušíte, že existují konkurenti, ale ještě jste je nezmapovali, nebo váš koncept závisí na technických schopnostech, které jste dosud neověřili. Spusťte jeden, dva nebo všechny tři — každý stojí samostatně.
|
|
||||||
|
|
||||||
### Product Brief
|
|
||||||
|
|
||||||
**Co to je.** Řízená discovery session, která vytvoří 1–2stránkový executive summary vašeho produktového konceptu. AI působí jako kolaborativní Business Analyst a pomáhá vám formulovat vizi, cílovou skupinu, hodnotovou nabídku a rozsah.
|
|
||||||
|
|
||||||
**Proč je tu.** Product brief je mírnější cesta do plánování. Zachytí vaši strategickou vizi ve strukturovaném formátu, který přímo vstupuje do tvorby PRD. Funguje nejlépe, když už jste si svým konceptem poměrně jistí — víte, kdo je zákazník, jaký je problém a přibližně co chcete vybudovat. Brief toto myšlení organizuje a zaostří.
|
|
||||||
|
|
||||||
**Kdy ho použít.** Váš koncept je poměrně jasný a chcete ho efektivně zdokumentovat před vytvořením PRD. Jste si jistí směrem a nepotřebujete, aby vaše předpoklady byly agresivně zpochybňovány.
|
|
||||||
|
|
||||||
### PRFAQ (Working Backwards)
|
|
||||||
|
|
||||||
**Co to je.** Metodologie Working Backwards od Amazonu adaptovaná 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 zákazníci a stakeholdeři položili. AI působí jako neúnavný, ale konstruktivní produktový kouč.
|
|
||||||
|
|
||||||
**Proč je tu.** PRFAQ je náročnější cesta do plánování. Vynucuje si jasnost zaměřenou na 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 FAQ odhalí mezery, jsou to mezery, které byste jinak objevili mnohem později — a mnohem dráž — během implementace. Tato výzva odhalí slabé myšlení brzy, když je oprava nejlevnější.
|
|
||||||
|
|
||||||
**Kdy ho použít.** Chcete svůj koncept podrobit zátěžovému testu, než vynaložíte zdroje. Nejste si jistí, zda to uživatele skutečně bude zajímat. Chcete ověřit, že dokážete formulovat jasnou, obhajitelnou hodnotovou nabídku. Nebo prostě chcete disciplínu Working Backwards k zaostření svého myšlení.
|
|
||||||
|
|
||||||
## Který nástroj bych měl použít?
|
|
||||||
|
|
||||||
| Situace | Doporučený nástroj |
|
|
||||||
| --------- | ------------------ |
|
|
||||||
| „Mám vágní nápad, nevím kde začít“ | Brainstorming |
|
|
||||||
| „Potřebuji pochopit trh, než se rozhodnu“ | Výzkum |
|
|
||||||
| „Vím, co chci vybudovat, jen to potřebuji zdokumentovat“ | Product Brief |
|
|
||||||
| „Chci se ujistit, že tento nápad skutečně stojí za budování“ | PRFAQ |
|
|
||||||
| „Chci prozkoumat, pak ověřit, pak zdokumentovat“ | Brainstorming → Výzkum → PRFAQ nebo Brief |
|
|
||||||
|
|
||||||
Product Brief a PRFAQ oba vytvářejí vstup pro PRD — vyberte si podle toho, jak velkou výzvu chcete. Brief je kolaborativní discovery. PRFAQ je náročný zátěžový test. Oba vás dovedou ke stejnému cíli; PRFAQ testuje, zda si váš koncept zaslouží tam dojít.
|
|
||||||
|
|
||||||
:::tip[Nejste si jistí?]
|
|
||||||
Spusťte `bmad-help` a popište svou situaci. Doporučí vám správný výchozí bod na základě toho, co jste už udělali a čeho chcete dosáhnout.
|
|
||||||
:::
|
|
||||||
|
|
||||||
## Co následuje po analýze?
|
|
||||||
|
|
||||||
Výstupy analýzy přímo vstupují do fáze 2 (plánování). Workflow tvorby PRD přijímá product briefy, PRFAQ dokumenty, výzkumná zjištění a záznamy z brainstormingu jako vstupy — syntetizuje vše, co jste vytvořili, do strukturovaných požadavků. Čím důkladnější analýzu provedete, tím ostřejší bude váš PRD.
|
|
||||||
|
|
@ -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 |
|
||||||
|
|
|
||||||
|
|
@ -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 |
|
||||||
|
|
|
||||||
|
|
@ -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 d’implé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](...).
|
||||||
```
|
```
|
||||||
|
|
|
||||||
|
|
@ -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.
|
||||||
|
|
|
||||||
|
|
@ -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.
|
||||||
|
|
|
||||||
|
|
@ -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é.
|
|
||||||
|
|
@ -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 jusqu’aux 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.
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
## 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 l’impact 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.
|
|
||||||
|
|
@ -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.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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.
|
||||||
|
|
|
||||||
|
|
@ -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.
|
||||||
|
|
|
||||||
|
|
@ -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.
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
title: "Quick Dev"
|
title: "Quick Dev"
|
||||||
description: Réduire la friction de l’interaction humaine sans renoncer aux points de contrôle qui protègent la qualité des résultats
|
description: Réduire la friction de l’interaction 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é.
|
||||||
|
|
|
||||||
|
|
@ -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.
|
||||||
|
|
|
||||||
|
|
@ -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**
|
||||||
|
|
|
||||||
|
|
@ -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—*
|
||||||
|
|
|
||||||
|
|
@ -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 à l’agent 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
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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 l’installateur. L’identifiant de skill (par exemple, `bmad-dev`) est utilisé pour invoquer l’agent.
|
- Chaque agent est disponible en tant que skill, généré par l’installateur. L’identifiant de skill (par exemple, `bmad-analyst`) est utilisé pour invoquer l’agent.
|
||||||
- Les déclencheurs sont les codes courts de menu (par exemple, `BP`) et les correspondances approximatives affichés dans chaque menu d’agent.
|
- Les déclencheurs sont les codes courts de menu (par exemple, `BP`) et les correspondances approximatives affichés dans chaque menu d’agent.
|
||||||
- La génération de tests QA est gérée par le skill de workflow `bmad-qa-generate-e2e-tests`, disponible par l’agent Développeur. L’architecte 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`. L’architecte 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 à l’Implémentation, Corriger le Cours |
|
| Architecte (Winston) | `bmad-architect` | `CA`, `IR` | Créer l’architecture, Préparation à l’implémentation |
|
||||||
| Architecte (Winston) | `bmad-architect` | `CA`, `IR` | Créer l’architecture, Préparation à l’implé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 d’Epic |
|
| 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)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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 d’aligner 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 d’aligner 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é.
|
|
||||||
|
|
|
||||||
|
|
@ -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.
|
||||||
|
|
|
||||||
|
|
@ -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).
|
||||||
|
|
|
||||||
|
|
@ -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.
|
||||||
|
|
|
||||||
|
|
@ -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 l’espace problème et validez les idées avant de vous engager dans la planification. [**Découvrez ce que fait chaque outil et quand l’utiliser**](../explanation/analysis-phase.md).
|
Explorez l’espace 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 l’accompagnement guidé d’un 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
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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 **l’agent 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 **l’agent 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 d’implé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.
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
---
|
---
|
||||||
title: 'How to Customize BMad'
|
title: "How to Customize BMad"
|
||||||
description: Customize agents, workflows, and modules while preserving update compatibility
|
description: Customize agents, workflows, and modules while preserving update compatibility
|
||||||
sidebar:
|
sidebar:
|
||||||
order: 8
|
order: 7
|
||||||
---
|
---
|
||||||
|
|
||||||
Use the `.customize.yaml` files to tailor agent behavior, personas, and menus while preserving your changes across updates.
|
Use the `.customize.yaml` files to tailor agent behavior, personas, and menus while preserving your changes across updates.
|
||||||
|
|
@ -15,10 +15,9 @@ Use the `.customize.yaml` files to tailor agent behavior, personas, and menus wh
|
||||||
- You want agents to perform specific actions every time they start up
|
- You want agents to perform specific actions every time they start up
|
||||||
|
|
||||||
:::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))
|
||||||
- A text editor for YAML files
|
- A text editor for YAML files
|
||||||
:::
|
:::
|
||||||
|
|
||||||
:::caution[Keep Your Customizations Safe]
|
:::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.
|
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.
|
||||||
|
|
@ -137,10 +136,10 @@ npx bmad-method install
|
||||||
|
|
||||||
The installer detects the existing installation and offers these options:
|
The installer detects the existing installation and offers these options:
|
||||||
|
|
||||||
| Option | What It Does |
|
| Option | What It Does |
|
||||||
| ---------------------------- | -------------------------------------------------------------------- |
|
| ---------------------------- | ------------------------------------------------------------------- |
|
||||||
| **Quick Update** | Updates all modules to the latest version and applies customizations |
|
| **Quick Update** | Updates all modules to the latest version and applies customizations |
|
||||||
| **Modify BMad Installation** | Full installation flow for adding or removing modules |
|
| **Modify BMad Installation** | Full installation flow for adding or removing modules |
|
||||||
|
|
||||||
For customization-only changes, **Quick Update** is the fastest option.
|
For customization-only changes, **Quick Update** is the fastest option.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
---
|
---
|
||||||
title: 'Established Projects'
|
title: "Established Projects"
|
||||||
description: How to use BMad Method on existing codebases
|
description: How to use BMad Method on existing codebases
|
||||||
sidebar:
|
sidebar:
|
||||||
order: 7
|
order: 6
|
||||||
---
|
---
|
||||||
|
|
||||||
Use BMad Method effectively when working on existing projects and legacy codebases.
|
Use BMad Method effectively when working on existing projects and legacy codebases.
|
||||||
|
|
@ -10,11 +10,10 @@ Use BMad Method effectively when working on existing projects and legacy codebas
|
||||||
This guide covers the essential workflow for onboarding to existing projects with BMad Method.
|
This guide covers the essential workflow for onboarding to existing projects with BMad Method.
|
||||||
|
|
||||||
:::note[Prerequisites]
|
:::note[Prerequisites]
|
||||||
|
|
||||||
- BMad Method installed (`npx bmad-method install`)
|
- BMad Method installed (`npx bmad-method install`)
|
||||||
- An existing codebase you want to work on
|
- An existing codebase you want to work on
|
||||||
- Access to an AI-powered IDE (Claude Code or Cursor)
|
- Access to an AI-powered IDE (Claude Code or Cursor)
|
||||||
:::
|
:::
|
||||||
|
|
||||||
## Step 1: Clean Up Completed Planning Artifacts
|
## Step 1: Clean Up Completed Planning Artifacts
|
||||||
|
|
||||||
|
|
@ -37,7 +36,6 @@ bmad-generate-project-context
|
||||||
```
|
```
|
||||||
|
|
||||||
This scans your codebase to identify:
|
This scans your codebase to identify:
|
||||||
|
|
||||||
- Technology stack and versions
|
- Technology stack and versions
|
||||||
- Code organization patterns
|
- Code organization patterns
|
||||||
- Naming conventions
|
- Naming conventions
|
||||||
|
|
@ -81,10 +79,10 @@ BMad-Help also **automatically runs at the end of every workflow**, providing cl
|
||||||
|
|
||||||
You have two primary options depending on the scope of changes:
|
You have two primary options depending on the scope of changes:
|
||||||
|
|
||||||
| Scope | Recommended Approach |
|
| Scope | Recommended Approach |
|
||||||
| ------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------- |
|
| ------------------------------ | ----------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| **Small updates or additions** | Run `bmad-quick-dev` to clarify intent, plan, implement, and review in a single workflow. The full four-phase BMad Method is likely overkill. |
|
| **Small updates or additions** | Run `bmad-quick-dev` to clarify intent, plan, implement, and review in a single workflow. The full four-phase BMad Method is likely overkill. |
|
||||||
| **Major changes or additions** | Start with the BMad Method, applying as much or as little rigor as needed. |
|
| **Major changes or additions** | Start with the BMad Method, applying as much or as little rigor as needed. |
|
||||||
|
|
||||||
### During PRD Creation
|
### During PRD Creation
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
---
|
---
|
||||||
title: 'How to Get Answers About BMad'
|
title: "How to Get Answers About BMad"
|
||||||
description: Use an LLM to quickly answer your own BMad questions
|
description: Use an LLM to quickly answer your own BMad questions
|
||||||
sidebar:
|
sidebar:
|
||||||
order: 5
|
order: 4
|
||||||
---
|
---
|
||||||
|
|
||||||
Use BMad's built-in help, source docs, or the community to get answers — from quickest to most thorough.
|
Use BMad's built-in help, source docs, or the community to get answers — from quickest to most thorough.
|
||||||
|
|
@ -46,35 +46,35 @@ If your AI can't read local files (ChatGPT, Claude.ai, etc.), fetch [llms-full.t
|
||||||
|
|
||||||
If neither BMad-Help nor the source answered your question, you now have a much better question to ask.
|
If neither BMad-Help nor the source answered your question, you now have a much better question to ask.
|
||||||
|
|
||||||
| Channel | Use For |
|
| Channel | Use For |
|
||||||
| ----------------------- | -------------------------- |
|
| ------------------------- | ------------------------------------------- |
|
||||||
| `help-requests` forum | Questions |
|
| `help-requests` forum | Questions |
|
||||||
| `#suggestions-feedback` | Ideas and feature requests |
|
| `#suggestions-feedback` | Ideas and feature requests |
|
||||||
|
|
||||||
**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)
|
||||||
_You!_
|
*You!*
|
||||||
_Stuck_
|
*Stuck*
|
||||||
_in the queue—_
|
*in the queue—*
|
||||||
_waiting_
|
*waiting*
|
||||||
_for who?_
|
*for who?*
|
||||||
|
|
||||||
_The source_
|
*The source*
|
||||||
_is there,_
|
*is there,*
|
||||||
_plain to see!_
|
*plain to see!*
|
||||||
|
|
||||||
_Point_
|
*Point*
|
||||||
_your machine._
|
*your machine.*
|
||||||
_Set it free._
|
*Set it free.*
|
||||||
|
|
||||||
_It reads._
|
*It reads.*
|
||||||
_It speaks._
|
*It speaks.*
|
||||||
_Ask away—_
|
*Ask away—*
|
||||||
|
|
||||||
_Why wait_
|
*Why wait*
|
||||||
_for tomorrow_
|
*for tomorrow*
|
||||||
_when you have_
|
*when you have*
|
||||||
_today?_
|
*today?*
|
||||||
|
|
||||||
_—Claude_
|
*—Claude*
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
title: 'How to Install BMad'
|
title: "How to Install BMad"
|
||||||
description: Step-by-step guide to installing BMad in your project
|
description: Step-by-step guide to installing BMad in your project
|
||||||
sidebar:
|
sidebar:
|
||||||
order: 1
|
order: 1
|
||||||
|
|
@ -16,11 +16,10 @@ If you want to use a non interactive installer and provide all install options o
|
||||||
- Update the existing BMad Installation
|
- Update the existing BMad Installation
|
||||||
|
|
||||||
:::note[Prerequisites]
|
:::note[Prerequisites]
|
||||||
|
|
||||||
- **Node.js** 20+ (required for the installer)
|
- **Node.js** 20+ (required for the installer)
|
||||||
- **Git** (recommended)
|
- **Git** (recommended)
|
||||||
- **AI tool** (Claude Code, Cursor, or similar)
|
- **AI tool** (Claude Code, Cursor, or similar)
|
||||||
:::
|
:::
|
||||||
|
|
||||||
## Steps
|
## Steps
|
||||||
|
|
||||||
|
|
@ -32,7 +31,6 @@ npx bmad-method install
|
||||||
|
|
||||||
:::tip[Want the newest prerelease build?]
|
:::tip[Want the newest prerelease build?]
|
||||||
Use the `next` dist-tag:
|
Use the `next` dist-tag:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
npx bmad-method@next install
|
npx bmad-method@next install
|
||||||
```
|
```
|
||||||
|
|
@ -42,11 +40,9 @@ This gets you newer changes earlier, with a higher chance of churn than the defa
|
||||||
|
|
||||||
:::tip[Bleeding edge]
|
:::tip[Bleeding edge]
|
||||||
To install the latest from the main branch (may be unstable):
|
To install the latest from the main branch (may be unstable):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
npx github:bmad-code-org/BMAD-METHOD install
|
npx github:bmad-code-org/BMAD-METHOD install
|
||||||
```
|
```
|
||||||
|
|
||||||
:::
|
:::
|
||||||
|
|
||||||
### 2. Choose Installation Location
|
### 2. Choose Installation Location
|
||||||
|
|
@ -103,13 +99,11 @@ your-project/
|
||||||
Run `bmad-help` to verify everything works and see what to do next.
|
Run `bmad-help` to verify everything works and see what to do next.
|
||||||
|
|
||||||
**BMad-Help is your intelligent guide** that will:
|
**BMad-Help is your intelligent guide** that will:
|
||||||
|
|
||||||
- Confirm your installation is working
|
- Confirm your installation is working
|
||||||
- Show what's available based on your installed modules
|
- Show what's available based on your installed modules
|
||||||
- Recommend your first step
|
- Recommend your first step
|
||||||
|
|
||||||
You can also ask it questions:
|
You can also ask it questions:
|
||||||
|
|
||||||
```
|
```
|
||||||
bmad-help I just installed, what should I do first?
|
bmad-help I just installed, what should I do first?
|
||||||
bmad-help What are my options for a SaaS project?
|
bmad-help What are my options for a SaaS project?
|
||||||
|
|
|
||||||
|
|
@ -1,180 +0,0 @@
|
||||||
---
|
|
||||||
title: 'Install Custom and Community Modules'
|
|
||||||
description: Install third-party modules from the community registry, Git repositories, or local paths
|
|
||||||
sidebar:
|
|
||||||
order: 3
|
|
||||||
---
|
|
||||||
|
|
||||||
Use the BMad installer to add modules from the community registry, third-party Git repositories, or local file paths.
|
|
||||||
|
|
||||||
## When to Use This
|
|
||||||
|
|
||||||
- Installing a community-contributed module from the BMad registry
|
|
||||||
- Installing a module from a third-party Git repository (GitHub, GitLab, Bitbucket, self-hosted)
|
|
||||||
- Testing a module you are developing locally with BMad Builder
|
|
||||||
- Installing modules from a private or self-hosted Git server
|
|
||||||
|
|
||||||
:::note[Prerequisites]
|
|
||||||
Requires [Node.js](https://nodejs.org) v20+ and `npx` (included with npm). Custom and community modules can be selected during a fresh install or added to an existing installation.
|
|
||||||
:::
|
|
||||||
|
|
||||||
## Community Modules
|
|
||||||
|
|
||||||
Community modules are curated in the [BMad plugins marketplace](https://github.com/bmad-code-org/bmad-plugins-marketplace). They are organized by category and are pinned to an approved commit for safety.
|
|
||||||
|
|
||||||
### 1. Run the Installer
|
|
||||||
|
|
||||||
```bash
|
|
||||||
npx bmad-method install
|
|
||||||
```
|
|
||||||
|
|
||||||
### 2. Browse the Community Catalog
|
|
||||||
|
|
||||||
After selecting official modules, the installer asks:
|
|
||||||
|
|
||||||
```
|
|
||||||
Would you like to browse community modules?
|
|
||||||
```
|
|
||||||
|
|
||||||
Select **Yes** to enter the catalog browser. You can:
|
|
||||||
|
|
||||||
- Browse by category
|
|
||||||
- View featured modules
|
|
||||||
- View all available modules
|
|
||||||
- Search by keyword
|
|
||||||
|
|
||||||
### 3. Select Modules
|
|
||||||
|
|
||||||
Pick modules from any category. The installer shows descriptions, versions, and trust tiers. Already-installed modules are pre-checked for update.
|
|
||||||
|
|
||||||
### 4. Continue with Installation
|
|
||||||
|
|
||||||
After selecting community modules, the installer proceeds to custom sources, then tool/IDE configuration and the rest of the install flow.
|
|
||||||
|
|
||||||
## Custom Sources (Git URLs and Local Paths)
|
|
||||||
|
|
||||||
Custom modules can come from any Git repository or a local directory on your machine. The installer resolves the source, analyzes the module structure, and installs it alongside your other modules.
|
|
||||||
|
|
||||||
### Interactive Installation
|
|
||||||
|
|
||||||
During installation, after the community module step, the installer asks:
|
|
||||||
|
|
||||||
```
|
|
||||||
Would you like to install from a custom source (Git URL or local path)?
|
|
||||||
```
|
|
||||||
|
|
||||||
Select **Yes**, then provide a source:
|
|
||||||
|
|
||||||
| Input Type | Example |
|
|
||||||
| --------------------- | ------------------------------------------------- |
|
|
||||||
| HTTPS URL (any host) | `https://github.com/org/repo` |
|
|
||||||
| HTTPS URL with subdir | `https://github.com/org/repo/tree/main/my-module` |
|
|
||||||
| SSH URL | `git@github.com:org/repo.git` |
|
|
||||||
| Local path | `/Users/me/projects/my-module` |
|
|
||||||
| Local path with tilde | `~/projects/my-module` |
|
|
||||||
|
|
||||||
The installer clones the repository (for URLs) or reads directly from disk (for local paths), then presents the discovered modules for selection.
|
|
||||||
|
|
||||||
### Non-Interactive Installation
|
|
||||||
|
|
||||||
Use the `--custom-source` flag to install custom modules from the command line:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
npx bmad-method install \
|
|
||||||
--directory . \
|
|
||||||
--custom-source /path/to/my-module \
|
|
||||||
--tools claude-code \
|
|
||||||
--yes
|
|
||||||
```
|
|
||||||
|
|
||||||
When `--custom-source` is provided without `--modules`, only core and the custom modules are installed. To include official modules as well, add `--modules`:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
npx bmad-method install \
|
|
||||||
--directory . \
|
|
||||||
--modules bmm \
|
|
||||||
--custom-source https://gitlab.com/myorg/my-module \
|
|
||||||
--tools claude-code \
|
|
||||||
--yes
|
|
||||||
```
|
|
||||||
|
|
||||||
Multiple sources can be comma-separated:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
--custom-source /path/one,https://github.com/org/repo,/path/two
|
|
||||||
```
|
|
||||||
|
|
||||||
## How Module Discovery Works
|
|
||||||
|
|
||||||
The installer uses two modes to find installable modules in a source:
|
|
||||||
|
|
||||||
| Mode | Trigger | Behavior |
|
|
||||||
| --------- | ------------------------------------------------- | -------------------------------------------------------------------------------------------- |
|
|
||||||
| Discovery | Source contains `.claude-plugin/marketplace.json` | Lists all plugins from the manifest; you pick which to install |
|
|
||||||
| Direct | No marketplace.json found | Scans the directory for skills (subdirectories with `SKILL.md`), resolves as a single module |
|
|
||||||
|
|
||||||
Discovery mode is typical for published modules. Direct mode is convenient when pointing at a skills directory during local development.
|
|
||||||
|
|
||||||
:::note[About `.claude-plugin/`]
|
|
||||||
The `.claude-plugin/marketplace.json` path is a standard convention adopted across multiple AI tool installers for plugin discoverability. It does not require Claude, does not use Claude APIs, and has no effect on which AI tool you use. Any module with this file can be discovered by any installer that follows the convention.
|
|
||||||
:::
|
|
||||||
|
|
||||||
## Local Development Workflow
|
|
||||||
|
|
||||||
If you are building a module with [BMad Builder](https://github.com/bmad-code-org/bmad-builder), you can install it directly from your working directory:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
npx bmad-method install \
|
|
||||||
--directory ~/my-project \
|
|
||||||
--custom-source ~/my-module-repo/skills \
|
|
||||||
--tools claude-code \
|
|
||||||
--yes
|
|
||||||
```
|
|
||||||
|
|
||||||
Local sources are referenced by path, not copied to a cache. When you update your module source and reinstall, the installer picks up the latest changes.
|
|
||||||
|
|
||||||
:::caution[Source Removal]
|
|
||||||
If you delete the local source directory after installation, the installed module files in `_bmad/` are preserved. The module will be skipped during updates until the source path is restored.
|
|
||||||
:::
|
|
||||||
|
|
||||||
## What You Get
|
|
||||||
|
|
||||||
After installation, custom modules appear in `_bmad/` alongside official modules:
|
|
||||||
|
|
||||||
```
|
|
||||||
your-project/
|
|
||||||
├── _bmad/
|
|
||||||
│ ├── core/ # Built-in core module
|
|
||||||
│ ├── bmm/ # Official module (if selected)
|
|
||||||
│ ├── my-module/ # Your custom module
|
|
||||||
│ │ ├── my-skill/
|
|
||||||
│ │ │ └── SKILL.md
|
|
||||||
│ │ └── module-help.csv
|
|
||||||
│ └── _config/
|
|
||||||
│ └── manifest.yaml # Tracks all modules, versions, and sources
|
|
||||||
└── ...
|
|
||||||
```
|
|
||||||
|
|
||||||
The manifest records the source of each custom module (`repoUrl` for Git sources, `localPath` for local sources) so that quick updates can locate the source again.
|
|
||||||
|
|
||||||
## Updating Custom Modules
|
|
||||||
|
|
||||||
Custom modules participate in the normal update flow:
|
|
||||||
|
|
||||||
- **Quick update** (`--action quick-update`): Refreshes all modules from their original sources. Git-based modules are re-fetched; local modules are re-read from their source path.
|
|
||||||
- **Full update**: Re-runs module selection so you can add or remove custom modules.
|
|
||||||
|
|
||||||
## Creating Your Own Modules
|
|
||||||
|
|
||||||
Use [BMad Builder](https://github.com/bmad-code-org/bmad-builder) to create modules that others can install:
|
|
||||||
|
|
||||||
1. Run `bmad-module-builder` to scaffold your module structure
|
|
||||||
2. Add skills, agents, and workflows with the various bmad builder tools
|
|
||||||
3. Publish to a Git repository or share the folder collection
|
|
||||||
4. Others install with `--custom-source <your-repo-url>`
|
|
||||||
|
|
||||||
For modules to support discovery mode, include a `.claude-plugin/marketplace.json` in your repository root (this is a cross-tool convention, not Claude-specific). See the [BMad Builder documentation](https://github.com/bmad-code-org/bmad-builder) for the marketplace.json format.
|
|
||||||
|
|
||||||
:::tip[Testing Locally First]
|
|
||||||
During development, install your module with a local path to iterate quickly before publishing to a Git repository.
|
|
||||||
:::
|
|
||||||
|
|
@ -22,40 +22,39 @@ Requires [Node.js](https://nodejs.org) v20+ and `npx` (included with npm).
|
||||||
|
|
||||||
### Installation Options
|
### Installation Options
|
||||||
|
|
||||||
| Flag | Description | Example |
|
| Flag | Description | Example |
|
||||||
| --------------------------- | ----------------------------------------------------------------------------------- | ---------------------------------------------- |
|
|------|-------------|---------|
|
||||||
| `--directory <path>` | Installation directory | `--directory ~/projects/myapp` |
|
| `--directory <path>` | Installation directory | `--directory ~/projects/myapp` |
|
||||||
| `--modules <modules>` | Comma-separated module IDs | `--modules bmm,bmb` |
|
| `--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` |
|
| `--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` |
|
| `--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
|
### Core Configuration
|
||||||
|
|
||||||
| Flag | Description | Default |
|
| Flag | Description | Default |
|
||||||
| ----------------------------------- | ----------------------------------------------- | --------------- |
|
|------|-------------|---------|
|
||||||
| `--user-name <name>` | Name for agents to use | System username |
|
| `--user-name <name>` | Name for agents to use | System username |
|
||||||
| `--communication-language <lang>` | Agent communication language | English |
|
| `--communication-language <lang>` | Agent communication language | English |
|
||||||
| `--document-output-language <lang>` | Document output 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>` | Output folder path (see resolution rules below) | `_bmad-output` |
|
||||||
|
|
||||||
#### Output Folder Path Resolution
|
#### Output Folder Path Resolution
|
||||||
|
|
||||||
The value passed to `--output-folder` (or entered interactively) is resolved according to these rules:
|
The value passed to `--output-folder` (or entered interactively) is resolved according to these rules:
|
||||||
|
|
||||||
| Input type | Example | Resolved as |
|
| Input type | Example | Resolved as |
|
||||||
| ---------------------------- | -------------------------- | ---------------------------------------------------------- |
|
|------------|---------|-------------|
|
||||||
| Relative path (default) | `_bmad-output` | `<project-root>/_bmad-output` |
|
| Relative path (default) | `_bmad-output` | `<project-root>/_bmad-output` |
|
||||||
| Relative path with traversal | `../../shared-outputs` | Normalized absolute path — e.g. `/Users/me/shared-outputs` |
|
| 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 |
|
| 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.
|
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
|
### Other Options
|
||||||
|
|
||||||
| Flag | Description |
|
| Flag | Description |
|
||||||
| ------------- | ------------------------------------------- |
|
|------|-------------|
|
||||||
| `-y, --yes` | Accept all defaults and skip prompts |
|
| `-y, --yes` | Accept all defaults and skip prompts |
|
||||||
| `-d, --debug` | Enable debug output for manifest generation |
|
| `-d, --debug` | Enable debug output for manifest generation |
|
||||||
|
|
||||||
## Module IDs
|
## Module IDs
|
||||||
|
|
@ -77,13 +76,12 @@ Run `npx bmad-method install` interactively once to see the full current list of
|
||||||
|
|
||||||
## Installation Modes
|
## Installation Modes
|
||||||
|
|
||||||
| Mode | Description | Example |
|
| Mode | Description | Example |
|
||||||
| --------------------- | --------------------------------------------- | ------------------------------------------------------------------------------------------------- |
|
|------|-------------|---------|
|
||||||
| Fully non-interactive | Provide all flags to skip all prompts | `npx bmad-method install --directory . --modules bmm --tools claude-code --yes` |
|
| 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` |
|
| 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` |
|
| 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` |
|
||||||
| Without tools | Skip tool/IDE configuration | `npx bmad-method install --modules bmm --tools none` |
|
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
|
|
@ -121,33 +119,6 @@ npx bmad-method install \
|
||||||
--action quick-update
|
--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
|
## What You Get
|
||||||
|
|
||||||
- A fully configured `_bmad/` directory in your project
|
- A fully configured `_bmad/` directory in your project
|
||||||
|
|
@ -164,19 +135,17 @@ BMad validates all provided flags:
|
||||||
- **Action** — Must be one of: `install`, `update`, `quick-update`
|
- **Action** — Must be one of: `install`, `update`, `quick-update`
|
||||||
|
|
||||||
Invalid values will either:
|
Invalid values will either:
|
||||||
|
|
||||||
1. Show an error and exit (for critical options like directory)
|
1. Show an error and exit (for critical options like directory)
|
||||||
2. Show a warning and skip (for optional items)
|
2. Show a warning and skip (for optional items)
|
||||||
3. Fall back to interactive prompts (for missing required values)
|
3. Fall back to interactive prompts (for missing required values)
|
||||||
|
|
||||||
:::tip[Best Practices]
|
:::tip[Best Practices]
|
||||||
|
|
||||||
- Use absolute paths for `--directory` to avoid ambiguity
|
- 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)
|
- 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
|
- Test flags locally before using in CI/CD pipelines
|
||||||
- Combine with `-y` for truly unattended installations
|
- Combine with `-y` for truly unattended installations
|
||||||
- Use `--debug` if you encounter issues during installation
|
- Use `--debug` if you encounter issues during installation
|
||||||
:::
|
:::
|
||||||
|
|
||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,16 @@
|
||||||
---
|
---
|
||||||
title: 'Manage Project Context'
|
title: "Manage Project Context"
|
||||||
description: Create and maintain project-context.md to guide AI agents
|
description: Create and maintain project-context.md to guide AI agents
|
||||||
sidebar:
|
sidebar:
|
||||||
order: 9
|
order: 8
|
||||||
---
|
---
|
||||||
|
|
||||||
Use the `project-context.md` file to ensure AI agents follow your project's technical preferences and implementation rules throughout all workflows. To make sure this is always available, you can also add the line `Important project context and conventions are located in [path to project context]/project-context.md` to your tools context or always rules file (such as `AGENTS.md`)
|
Use the `project-context.md` file to ensure AI agents follow your project's technical preferences and implementation rules throughout all workflows. To make sure this is always available, you can also add the line `Important project context and conventions are located in [path to project context]/project-context.md` to your tools context or always rules file (such as `AGENTS.md`)
|
||||||
|
|
||||||
:::note[Prerequisites]
|
:::note[Prerequisites]
|
||||||
|
|
||||||
- BMad Method installed
|
- BMad Method installed
|
||||||
- Understanding of your project's technology stack and conventions
|
- Understanding of your project's technology stack and conventions
|
||||||
:::
|
:::
|
||||||
|
|
||||||
## When to Use This
|
## When to Use This
|
||||||
|
|
||||||
|
|
@ -61,17 +60,14 @@ sections_completed: ['technology_stack', 'critical_rules']
|
||||||
## Critical Implementation Rules
|
## Critical Implementation Rules
|
||||||
|
|
||||||
**TypeScript:**
|
**TypeScript:**
|
||||||
|
|
||||||
- Strict mode enabled, no `any` types
|
- Strict mode enabled, no `any` types
|
||||||
- Use `interface` for public APIs, `type` for unions
|
- Use `interface` for public APIs, `type` for unions
|
||||||
|
|
||||||
**Code Organization:**
|
**Code Organization:**
|
||||||
|
|
||||||
- Components in `/src/components/` with co-located tests
|
- Components in `/src/components/` with co-located tests
|
||||||
- API calls use `apiClient` singleton — never fetch directly
|
- API calls use `apiClient` singleton — never fetch directly
|
||||||
|
|
||||||
**Testing:**
|
**Testing:**
|
||||||
|
|
||||||
- Unit tests focus on business logic
|
- Unit tests focus on business logic
|
||||||
- Integration tests use MSW for API mocking
|
- Integration tests use MSW for API mocking
|
||||||
```
|
```
|
||||||
|
|
@ -119,12 +115,11 @@ A `project-context.md` file that:
|
||||||
## Tips
|
## Tips
|
||||||
|
|
||||||
:::tip[Best Practices]
|
:::tip[Best Practices]
|
||||||
|
|
||||||
- **Focus on the unobvious** — Document patterns agents might miss (e.g., "Use JSDoc on every public class"), not universal practices like "use meaningful variable names."
|
- **Focus on the unobvious** — Document patterns agents might miss (e.g., "Use JSDoc on every public class"), not universal practices like "use meaningful variable names."
|
||||||
- **Keep it lean** — This file is loaded by every implementation workflow. Long files waste context. Exclude content that only applies to narrow scope or specific stories.
|
- **Keep it lean** — This file is loaded by every implementation workflow. Long files waste context. Exclude content that only applies to narrow scope or specific stories.
|
||||||
- **Update as needed** — Edit manually when patterns change, or re-generate after significant architecture changes.
|
- **Update as needed** — Edit manually when patterns change, or re-generate after significant architecture changes.
|
||||||
- Works for Quick Flow and full BMad Method projects alike.
|
- Works for Quick Flow and full BMad Method projects alike.
|
||||||
:::
|
:::
|
||||||
|
|
||||||
## Next Steps
|
## Next Steps
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
---
|
---
|
||||||
title: 'Quick Fixes'
|
title: "Quick Fixes"
|
||||||
description: How to make quick fixes and ad-hoc changes
|
description: How to make quick fixes and ad-hoc changes
|
||||||
sidebar:
|
sidebar:
|
||||||
order: 6
|
order: 5
|
||||||
---
|
---
|
||||||
|
|
||||||
Use **Quick Dev** for bug fixes, refactorings, or small targeted changes that don't require the full BMad Method.
|
Use **Quick Dev** for bug fixes, refactorings, or small targeted changes that don't require the full BMad Method.
|
||||||
|
|
@ -15,10 +15,9 @@ Use **Quick Dev** for bug fixes, refactorings, or small targeted changes that do
|
||||||
- Dependency updates
|
- Dependency updates
|
||||||
|
|
||||||
:::note[Prerequisites]
|
:::note[Prerequisites]
|
||||||
|
|
||||||
- BMad Method installed (`npx bmad-method install`)
|
- BMad Method installed (`npx bmad-method install`)
|
||||||
- An AI-powered IDE (Claude Code, Cursor, or similar)
|
- An AI-powered IDE (Claude Code, Cursor, or similar)
|
||||||
:::
|
:::
|
||||||
|
|
||||||
## Steps
|
## Steps
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
---
|
---
|
||||||
title: 'Document Sharding Guide'
|
title: "Document Sharding Guide"
|
||||||
description: Split large markdown files into smaller organized files for better context management
|
description: Split large markdown files into smaller organized files for better context management
|
||||||
sidebar:
|
sidebar:
|
||||||
order: 10
|
order: 9
|
||||||
---
|
---
|
||||||
|
|
||||||
Use the `bmad-shard-doc` tool if you need to split large markdown files into smaller, organized files for better context management.
|
Use the `bmad-shard-doc` tool if you need to split large markdown files into smaller, organized files for better context management.
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
---
|
---
|
||||||
title: 'How to Upgrade to v6'
|
title: "How to Upgrade to v6"
|
||||||
description: Migrate from BMad v4 to v6
|
description: Migrate from BMad v4 to v6
|
||||||
sidebar:
|
sidebar:
|
||||||
order: 4
|
order: 3
|
||||||
---
|
---
|
||||||
|
|
||||||
Use the BMad installer to upgrade from v4 to v6, which includes automatic detection of legacy installations and migration assistance.
|
Use the BMad installer to upgrade from v4 to v6, which includes automatic detection of legacy installations and migration assistance.
|
||||||
|
|
@ -14,10 +14,9 @@ Use the BMad installer to upgrade from v4 to v6, which includes automatic detect
|
||||||
- You have existing planning artifacts to preserve
|
- You have existing planning artifacts to preserve
|
||||||
|
|
||||||
:::note[Prerequisites]
|
:::note[Prerequisites]
|
||||||
|
|
||||||
- Node.js 20+
|
- Node.js 20+
|
||||||
- Existing BMad v4 installation
|
- Existing BMad v4 installation
|
||||||
:::
|
:::
|
||||||
|
|
||||||
## Steps
|
## Steps
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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 |
|
||||||
|
|
|
||||||
|
|
@ -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 |
|
||||||
|
|
|
||||||
|
|
@ -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.
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
## 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.
|
||||||
|
|
|
||||||
|
|
@ -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*
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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 |
|
||||||
|
|
|
||||||
|
|
@ -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 |
|
||||||
|
|
|
||||||
|
|
@ -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:**
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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:**
|
||||||
|
|
|
||||||
|
|
@ -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 |
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "bmad-method",
|
"name": "bmad-method",
|
||||||
"version": "6.3.0",
|
"version": "6.2.2",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "bmad-method",
|
"name": "bmad-method",
|
||||||
"version": "6.3.0",
|
"version": "6.2.2",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@clack/core": "^1.0.0",
|
"@clack/core": "^1.0.0",
|
||||||
|
|
|
||||||
|
|
@ -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.3.0",
|
"version": "6.2.2",
|
||||||
"description": "Breakthrough Method of Agile AI-driven Development",
|
"description": "Breakthrough Method of Agile AI-driven Development",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"agile",
|
"agile",
|
||||||
|
|
|
||||||
|
|
@ -46,32 +46,35 @@ If `decision_needed` findings exist, present each one with its detail and the op
|
||||||
|
|
||||||
If the user chooses to defer, ask: Quick one-line reason for deferring this item? (helps future reviews): — then append that reason to both the story file bullet and the `{deferred_work_file}` entry.
|
If the user chooses to defer, ask: Quick one-line reason for deferring this item? (helps future reviews): — then append that reason to both the story file bullet and the `{deferred_work_file}` entry.
|
||||||
|
|
||||||
**HALT** — I am waiting for your numbered choice. Reply with only the number. Do not proceed until you select an option.
|
**HALT** — I am waiting for your numbered choice. Reply with only the number (or "0" for batch). Do not proceed until you select an option.
|
||||||
|
|
||||||
### 5. Handle `patch` findings
|
### 5. Handle `patch` findings
|
||||||
|
|
||||||
If `patch` findings exist (including any resolved from step 4), HALT. Ask the user:
|
If `patch` findings exist (including any resolved from step 4), HALT. Ask the user:
|
||||||
|
|
||||||
If `{spec_file}` is set, present all three options:
|
If `{spec_file}` is set, present all three options (if >3 `patch` findings exist, also show option 0):
|
||||||
|
|
||||||
> **How would you like to handle the `<P>` `patch` findings?**
|
> **How would you like to handle the <Z> `patch` findings?**
|
||||||
> 1. **Apply every patch** — fix all of them now, no per-finding confirmation. Defer and decision-needed items are not touched.
|
> 0. **Batch-apply all** — automatically fix every non-controversial patch (recommended when there are many)
|
||||||
|
> 1. **Fix them automatically** — I will apply fixes now
|
||||||
> 2. **Leave as action items** — they are already in the story file
|
> 2. **Leave as action items** — they are already in the story file
|
||||||
> 3. **Walk through each patch** — show details for each before deciding
|
> 3. **Walk through each** — let me show details before deciding
|
||||||
|
|
||||||
If `{spec_file}` is **not** set, present only options 1 and 2 (omit "Leave as action items" — findings were not written to a file):
|
If `{spec_file}` is **not** set, present only options 1 and 3 (omit option 2 — findings were not written to a file). If >3 `patch` findings exist, also show option 0:
|
||||||
|
|
||||||
> **How would you like to handle the `<P>` `patch` findings?**
|
> **How would you like to handle the <Z> `patch` findings?**
|
||||||
> 1. **Apply every patch** — fix all of them now, no per-finding confirmation. Defer and decision-needed items are not touched.
|
> 0. **Batch-apply all** — automatically fix every non-controversial patch (recommended when there are many)
|
||||||
> 2. **Walk through each patch** — show details for each before deciding
|
> 1. **Fix them automatically** — I will apply fixes now
|
||||||
|
> 2. **Walk through each** — let me show details before deciding
|
||||||
|
|
||||||
**HALT** — I am waiting for your numbered choice. Reply with only the number. Do not proceed until you select an option.
|
**HALT** — I am waiting for your numbered choice. Reply with only the number (or "0" for batch). Do not proceed until you select an option.
|
||||||
|
|
||||||
- **Apply every patch**: Apply every patch finding without per-finding confirmation. Do not modify defer or decision-needed items. After all patches are applied, present a summary of changes made. If `{spec_file}` is set, check off the patch items in the story file (leave defer items as-is).
|
- **Option 0** (only when >3 findings): Apply all non-controversial patches without per-finding confirmation. Skip any finding that requires judgment. Present a summary of changes made and any skipped findings.
|
||||||
- **Leave as action items** (only when `{spec_file}` is set): Done — findings are already written to the story.
|
- **Option 1**: Apply each fix. After all patches are applied, present a summary of changes made. If `{spec_file}` is set, check off the items in the story file.
|
||||||
- **Walk through each patch**: Present each finding with full detail, diff context, and suggested fix. After walkthrough, re-offer the applicable options above.
|
- **Option 2** (only when `{spec_file}` is set): Done — findings are already written to the story.
|
||||||
|
- **Walk through each**: Present each finding with full detail, diff context, and suggested fix. After walkthrough, re-offer the applicable options above.
|
||||||
|
|
||||||
**HALT** — I am waiting for your numbered choice. Do not proceed until you select an option.
|
**HALT** — I am waiting for your numbered choice. Reply with only the number (or "0" for batch). Do not proceed until you select an option.
|
||||||
|
|
||||||
**✅ Code review actions complete**
|
**✅ Code review actions complete**
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,6 @@ module.exports = {
|
||||||
['--communication-language <lang>', 'Language for agent communication (default: English)'],
|
['--communication-language <lang>', 'Language for agent communication (default: English)'],
|
||||||
['--document-output-language <lang>', 'Language for document output (default: English)'],
|
['--document-output-language <lang>', 'Language for document output (default: English)'],
|
||||||
['--output-folder <path>', 'Output folder path relative to project root (default: _bmad-output)'],
|
['--output-folder <path>', 'Output folder path relative to project root (default: _bmad-output)'],
|
||||||
['--custom-source <sources>', 'Comma-separated Git URLs or local paths to install custom modules from'],
|
|
||||||
['-y, --yes', 'Accept all defaults and skip prompts where possible'],
|
['-y, --yes', 'Accept all defaults and skip prompts where possible'],
|
||||||
],
|
],
|
||||||
action: async (options) => {
|
action: async (options) => {
|
||||||
|
|
|
||||||
|
|
@ -569,7 +569,6 @@ class Installer {
|
||||||
*/
|
*/
|
||||||
async _installOfficialModules(config, paths, officialModuleIds, addResult, isQuickUpdate, officialModules, ctx) {
|
async _installOfficialModules(config, paths, officialModuleIds, addResult, isQuickUpdate, officialModules, ctx) {
|
||||||
const { message, installedModuleNames } = ctx;
|
const { message, installedModuleNames } = ctx;
|
||||||
const { CustomModuleManager } = require('../modules/custom-module-manager');
|
|
||||||
|
|
||||||
for (const moduleName of officialModuleIds) {
|
for (const moduleName of officialModuleIds) {
|
||||||
if (installedModuleNames.has(moduleName)) continue;
|
if (installedModuleNames.has(moduleName)) continue;
|
||||||
|
|
@ -592,15 +591,11 @@ class Installer {
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
// Get display name from source module.yaml; version from resolution cache or marketplace.json
|
// Get display name from source module.yaml; version from marketplace.json
|
||||||
const sourcePath = await officialModules.findModuleSource(moduleName, { silent: true });
|
const sourcePath = await officialModules.findModuleSource(moduleName, { silent: true });
|
||||||
const moduleInfo = sourcePath ? await officialModules.getModuleInfo(sourcePath, moduleName, '') : null;
|
const moduleInfo = sourcePath ? await officialModules.getModuleInfo(sourcePath, moduleName, '') : null;
|
||||||
const displayName = moduleInfo?.name || moduleName;
|
const displayName = moduleInfo?.name || moduleName;
|
||||||
|
const version = sourcePath ? await this._getMarketplaceVersion(sourcePath) : '';
|
||||||
// Prefer version from resolution cache (accurate for custom/local modules),
|
|
||||||
// fall back to marketplace.json walk-up for official modules
|
|
||||||
const cachedResolution = CustomModuleManager._resolutionCache.get(moduleName);
|
|
||||||
const version = cachedResolution?.version || (sourcePath ? await this._getMarketplaceVersion(sourcePath) : '');
|
|
||||||
addResult(displayName, 'ok', '', { moduleCode: moduleName, newVersion: version });
|
addResult(displayName, 'ok', '', { moduleCode: moduleName, newVersion: version });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1194,7 +1189,7 @@ class Installer {
|
||||||
const customMgr = new CustomModuleManager();
|
const customMgr = new CustomModuleManager();
|
||||||
for (const moduleId of installedModules) {
|
for (const moduleId of installedModules) {
|
||||||
if (!availableModules.some((m) => m.id === moduleId)) {
|
if (!availableModules.some((m) => m.id === moduleId)) {
|
||||||
const customSource = await customMgr.findModuleSourceByCode(moduleId, { bmadDir });
|
const customSource = await customMgr.findModuleSourceByCode(moduleId);
|
||||||
if (customSource) {
|
if (customSource) {
|
||||||
availableModules.push({
|
availableModules.push({
|
||||||
id: moduleId,
|
id: moduleId,
|
||||||
|
|
|
||||||
|
|
@ -412,7 +412,7 @@ class ManifestGenerator {
|
||||||
// Get existing install date if available
|
// Get existing install date if available
|
||||||
const existing = existingModulesMap.get(moduleName);
|
const existing = existingModulesMap.get(moduleName);
|
||||||
|
|
||||||
const moduleEntry = {
|
updatedModules.push({
|
||||||
name: moduleName,
|
name: moduleName,
|
||||||
version: versionInfo.version,
|
version: versionInfo.version,
|
||||||
installDate: existing?.installDate || new Date().toISOString(),
|
installDate: existing?.installDate || new Date().toISOString(),
|
||||||
|
|
@ -420,9 +420,7 @@ class ManifestGenerator {
|
||||||
source: versionInfo.source,
|
source: versionInfo.source,
|
||||||
npmPackage: versionInfo.npmPackage,
|
npmPackage: versionInfo.npmPackage,
|
||||||
repoUrl: versionInfo.repoUrl,
|
repoUrl: versionInfo.repoUrl,
|
||||||
};
|
});
|
||||||
if (versionInfo.localPath) moduleEntry.localPath = versionInfo.localPath;
|
|
||||||
updatedModules.push(moduleEntry);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const manifest = {
|
const manifest = {
|
||||||
|
|
|
||||||
|
|
@ -181,10 +181,10 @@ class Manifest {
|
||||||
|
|
||||||
// Handle adding a new module with version info
|
// Handle adding a new module with version info
|
||||||
if (updates.addModule) {
|
if (updates.addModule) {
|
||||||
const { name, version, source, npmPackage, repoUrl, localPath } = updates.addModule;
|
const { name, version, source, npmPackage, repoUrl } = updates.addModule;
|
||||||
const existing = manifest.modules.find((m) => m.name === name);
|
const existing = manifest.modules.find((m) => m.name === name);
|
||||||
if (!existing) {
|
if (!existing) {
|
||||||
const entry = {
|
manifest.modules.push({
|
||||||
name,
|
name,
|
||||||
version: version || null,
|
version: version || null,
|
||||||
installDate: new Date().toISOString(),
|
installDate: new Date().toISOString(),
|
||||||
|
|
@ -192,9 +192,7 @@ class Manifest {
|
||||||
source: source || 'external',
|
source: source || 'external',
|
||||||
npmPackage: npmPackage || null,
|
npmPackage: npmPackage || null,
|
||||||
repoUrl: repoUrl || null,
|
repoUrl: repoUrl || null,
|
||||||
};
|
});
|
||||||
if (localPath) entry.localPath = localPath;
|
|
||||||
manifest.modules.push(entry);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -282,7 +280,7 @@ class Manifest {
|
||||||
|
|
||||||
if (existingIndex === -1) {
|
if (existingIndex === -1) {
|
||||||
// Module doesn't exist, add it
|
// Module doesn't exist, add it
|
||||||
const entry = {
|
manifest.modules.push({
|
||||||
name: moduleName,
|
name: moduleName,
|
||||||
version: options.version || null,
|
version: options.version || null,
|
||||||
installDate: new Date().toISOString(),
|
installDate: new Date().toISOString(),
|
||||||
|
|
@ -290,9 +288,7 @@ class Manifest {
|
||||||
source: options.source || 'unknown',
|
source: options.source || 'unknown',
|
||||||
npmPackage: options.npmPackage || null,
|
npmPackage: options.npmPackage || null,
|
||||||
repoUrl: options.repoUrl || null,
|
repoUrl: options.repoUrl || null,
|
||||||
};
|
});
|
||||||
if (options.localPath) entry.localPath = options.localPath;
|
|
||||||
manifest.modules.push(entry);
|
|
||||||
} else {
|
} else {
|
||||||
// Module exists, update its version info
|
// Module exists, update its version info
|
||||||
const existing = manifest.modules[existingIndex];
|
const existing = manifest.modules[existingIndex];
|
||||||
|
|
@ -302,7 +298,6 @@ class Manifest {
|
||||||
source: options.source || existing.source,
|
source: options.source || existing.source,
|
||||||
npmPackage: options.npmPackage === undefined ? existing.npmPackage : options.npmPackage,
|
npmPackage: options.npmPackage === undefined ? existing.npmPackage : options.npmPackage,
|
||||||
repoUrl: options.repoUrl === undefined ? existing.repoUrl : options.repoUrl,
|
repoUrl: options.repoUrl === undefined ? existing.repoUrl : options.repoUrl,
|
||||||
localPath: options.localPath === undefined ? existing.localPath : options.localPath,
|
|
||||||
lastUpdated: new Date().toISOString(),
|
lastUpdated: new Date().toISOString(),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -837,19 +832,17 @@ class Manifest {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if this is a custom module (from user-provided URL or local path)
|
// Check if this is a custom module (from user-provided URL)
|
||||||
const { CustomModuleManager } = require('../modules/custom-module-manager');
|
const { CustomModuleManager } = require('../modules/custom-module-manager');
|
||||||
const customMgr = new CustomModuleManager();
|
const customMgr = new CustomModuleManager();
|
||||||
const resolved = customMgr.getResolution(moduleName);
|
const customSource = await customMgr.findModuleSourceByCode(moduleName);
|
||||||
const customSource = await customMgr.findModuleSourceByCode(moduleName, { bmadDir });
|
if (customSource) {
|
||||||
if (customSource || resolved) {
|
const customVersion = await this._readMarketplaceVersion(moduleName, moduleSourcePath);
|
||||||
const customVersion = resolved?.version || (await this._readMarketplaceVersion(moduleName, moduleSourcePath));
|
|
||||||
return {
|
return {
|
||||||
version: customVersion,
|
version: customVersion,
|
||||||
source: 'custom',
|
source: 'custom',
|
||||||
npmPackage: null,
|
npmPackage: null,
|
||||||
repoUrl: resolved?.repoUrl || null,
|
repoUrl: null,
|
||||||
localPath: resolved?.localPath || null,
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,161 +3,22 @@ const os = require('node:os');
|
||||||
const path = require('node:path');
|
const path = require('node:path');
|
||||||
const { execSync } = require('node:child_process');
|
const { execSync } = require('node:child_process');
|
||||||
const prompts = require('../prompts');
|
const prompts = require('../prompts');
|
||||||
|
const { RegistryClient } = require('./registry-client');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Manages custom modules installed from user-provided sources.
|
* Manages custom modules installed from user-provided GitHub URLs.
|
||||||
* Supports any Git host (GitHub, GitLab, Bitbucket, self-hosted) and local file paths.
|
* Validates URLs, fetches .claude-plugin/marketplace.json, clones repos.
|
||||||
* Validates input, clones repos, reads .claude-plugin/marketplace.json, resolves plugins.
|
|
||||||
*/
|
*/
|
||||||
class CustomModuleManager {
|
class CustomModuleManager {
|
||||||
/** @type {Map<string, Object>} Shared across all instances: module code -> ResolvedModule */
|
constructor() {
|
||||||
static _resolutionCache = new Map();
|
this._client = new RegistryClient();
|
||||||
|
|
||||||
// ─── Source Parsing ───────────────────────────────────────────────────────
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Parse a user-provided source input into a structured descriptor.
|
|
||||||
* Accepts local file paths, HTTPS Git URLs, and SSH Git URLs.
|
|
||||||
* For HTTPS URLs with deep paths (e.g., /tree/main/subdir), extracts the subdir.
|
|
||||||
*
|
|
||||||
* @param {string} input - URL or local file path
|
|
||||||
* @returns {Object} Parsed source descriptor:
|
|
||||||
* { type: 'url'|'local', cloneUrl, subdir, localPath, cacheKey, displayName, isValid, error }
|
|
||||||
*/
|
|
||||||
parseSource(input) {
|
|
||||||
if (!input || typeof input !== 'string') {
|
|
||||||
return {
|
|
||||||
type: null,
|
|
||||||
cloneUrl: null,
|
|
||||||
subdir: null,
|
|
||||||
localPath: null,
|
|
||||||
cacheKey: null,
|
|
||||||
displayName: null,
|
|
||||||
isValid: false,
|
|
||||||
error: 'Source is required',
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
const trimmed = input.trim();
|
|
||||||
if (!trimmed) {
|
|
||||||
return {
|
|
||||||
type: null,
|
|
||||||
cloneUrl: null,
|
|
||||||
subdir: null,
|
|
||||||
localPath: null,
|
|
||||||
cacheKey: null,
|
|
||||||
displayName: null,
|
|
||||||
isValid: false,
|
|
||||||
error: 'Source is required',
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
// Local path detection: starts with /, ./, ../, or ~
|
|
||||||
if (trimmed.startsWith('/') || trimmed.startsWith('./') || trimmed.startsWith('../') || trimmed.startsWith('~')) {
|
|
||||||
return this._parseLocalPath(trimmed);
|
|
||||||
}
|
|
||||||
|
|
||||||
// SSH URL: git@host:owner/repo.git
|
|
||||||
const sshMatch = trimmed.match(/^git@([^:]+):([^/]+)\/([^/.]+?)(?:\.git)?$/);
|
|
||||||
if (sshMatch) {
|
|
||||||
const [, host, owner, repo] = sshMatch;
|
|
||||||
return {
|
|
||||||
type: 'url',
|
|
||||||
cloneUrl: trimmed,
|
|
||||||
subdir: null,
|
|
||||||
localPath: null,
|
|
||||||
cacheKey: `${host}/${owner}/${repo}`,
|
|
||||||
displayName: `${owner}/${repo}`,
|
|
||||||
isValid: true,
|
|
||||||
error: null,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
// HTTPS URL: https://host/owner/repo[/tree/branch/subdir][.git]
|
|
||||||
const httpsMatch = trimmed.match(/^https?:\/\/([^/]+)\/([^/]+)\/([^/.]+?)(?:\.git)?(\/.*)?$/);
|
|
||||||
if (httpsMatch) {
|
|
||||||
const [, host, owner, repo, remainder] = httpsMatch;
|
|
||||||
const cloneUrl = `https://${host}/${owner}/${repo}`;
|
|
||||||
let subdir = null;
|
|
||||||
|
|
||||||
if (remainder) {
|
|
||||||
// Extract subdir from deep path patterns used by various Git hosts
|
|
||||||
const deepPathPatterns = [
|
|
||||||
/^\/(?:-\/)?tree\/[^/]+\/(.+)$/, // GitHub /tree/branch/path, GitLab /-/tree/branch/path
|
|
||||||
/^\/(?:-\/)?blob\/[^/]+\/(.+)$/, // /blob/branch/path (treat same as tree)
|
|
||||||
/^\/src\/[^/]+\/(.+)$/, // Gitea/Forgejo /src/branch/path
|
|
||||||
];
|
|
||||||
|
|
||||||
for (const pattern of deepPathPatterns) {
|
|
||||||
const match = remainder.match(pattern);
|
|
||||||
if (match) {
|
|
||||||
subdir = match[1].replace(/\/$/, ''); // strip trailing slash
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
|
||||||
type: 'url',
|
|
||||||
cloneUrl,
|
|
||||||
subdir,
|
|
||||||
localPath: null,
|
|
||||||
cacheKey: `${host}/${owner}/${repo}`,
|
|
||||||
displayName: `${owner}/${repo}`,
|
|
||||||
isValid: true,
|
|
||||||
error: null,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
|
||||||
type: null,
|
|
||||||
cloneUrl: null,
|
|
||||||
subdir: null,
|
|
||||||
localPath: null,
|
|
||||||
cacheKey: null,
|
|
||||||
displayName: null,
|
|
||||||
isValid: false,
|
|
||||||
error: 'Not a valid Git URL or local path',
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
// ─── URL Validation ───────────────────────────────────────────────────────
|
||||||
* Parse a local filesystem path.
|
|
||||||
* @param {string} rawPath - Path string (may contain ~ for home)
|
|
||||||
* @returns {Object} Parsed source descriptor
|
|
||||||
*/
|
|
||||||
_parseLocalPath(rawPath) {
|
|
||||||
const expanded = rawPath.startsWith('~') ? path.join(os.homedir(), rawPath.slice(1)) : rawPath;
|
|
||||||
const resolved = path.resolve(expanded);
|
|
||||||
|
|
||||||
if (!fs.pathExistsSync(resolved)) {
|
|
||||||
return {
|
|
||||||
type: 'local',
|
|
||||||
cloneUrl: null,
|
|
||||||
subdir: null,
|
|
||||||
localPath: resolved,
|
|
||||||
cacheKey: null,
|
|
||||||
displayName: path.basename(resolved),
|
|
||||||
isValid: false,
|
|
||||||
error: `Path does not exist: ${resolved}`,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
|
||||||
type: 'local',
|
|
||||||
cloneUrl: null,
|
|
||||||
subdir: null,
|
|
||||||
localPath: resolved,
|
|
||||||
cacheKey: null,
|
|
||||||
displayName: path.basename(resolved),
|
|
||||||
isValid: true,
|
|
||||||
error: null,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated Use parseSource() instead. Kept for backward compatibility.
|
|
||||||
* Parse and validate a GitHub repository URL.
|
* Parse and validate a GitHub repository URL.
|
||||||
|
* Supports HTTPS and SSH formats.
|
||||||
* @param {string} url - GitHub URL to validate
|
* @param {string} url - GitHub URL to validate
|
||||||
* @returns {Object} { owner, repo, isValid, error }
|
* @returns {Object} { owner, repo, isValid, error }
|
||||||
*/
|
*/
|
||||||
|
|
@ -165,15 +26,16 @@ class CustomModuleManager {
|
||||||
if (!url || typeof url !== 'string') {
|
if (!url || typeof url !== 'string') {
|
||||||
return { owner: null, repo: null, isValid: false, error: 'URL is required' };
|
return { owner: null, repo: null, isValid: false, error: 'URL is required' };
|
||||||
}
|
}
|
||||||
|
|
||||||
const trimmed = url.trim();
|
const trimmed = url.trim();
|
||||||
|
|
||||||
// HTTPS format: https://github.com/owner/repo[.git] (strict, no trailing path)
|
// HTTPS format: https://github.com/owner/repo[.git]
|
||||||
const httpsMatch = trimmed.match(/^https?:\/\/github\.com\/([^/]+)\/([^/.]+?)(?:\.git)?$/);
|
const httpsMatch = trimmed.match(/^https?:\/\/github\.com\/([^/]+)\/([^/.]+?)(?:\.git)?$/);
|
||||||
if (httpsMatch) {
|
if (httpsMatch) {
|
||||||
return { owner: httpsMatch[1], repo: httpsMatch[2], isValid: true, error: null };
|
return { owner: httpsMatch[1], repo: httpsMatch[2], isValid: true, error: null };
|
||||||
}
|
}
|
||||||
|
|
||||||
// SSH format: git@github.com:owner/repo[.git]
|
// SSH format: git@github.com:owner/repo.git
|
||||||
const sshMatch = trimmed.match(/^git@github\.com:([^/]+)\/([^/.]+?)(?:\.git)?$/);
|
const sshMatch = trimmed.match(/^git@github\.com:([^/]+)\/([^/.]+?)(?:\.git)?$/);
|
||||||
if (sshMatch) {
|
if (sshMatch) {
|
||||||
return { owner: sshMatch[1], repo: sshMatch[2], isValid: true, error: null };
|
return { owner: sshMatch[1], repo: sshMatch[2], isValid: true, error: null };
|
||||||
|
|
@ -182,75 +44,46 @@ class CustomModuleManager {
|
||||||
return { owner: null, repo: null, isValid: false, error: 'Not a valid GitHub URL (expected https://github.com/owner/repo)' };
|
return { owner: null, repo: null, isValid: false, error: 'Not a valid GitHub URL (expected https://github.com/owner/repo)' };
|
||||||
}
|
}
|
||||||
|
|
||||||
// ─── Marketplace JSON ─────────────────────────────────────────────────────
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Read .claude-plugin/marketplace.json from a local directory.
|
|
||||||
* @param {string} dirPath - Directory to read from
|
|
||||||
* @returns {Object|null} Parsed marketplace.json or null if not found
|
|
||||||
*/
|
|
||||||
async readMarketplaceJsonFromDisk(dirPath) {
|
|
||||||
const marketplacePath = path.join(dirPath, '.claude-plugin', 'marketplace.json');
|
|
||||||
if (!(await fs.pathExists(marketplacePath))) return null;
|
|
||||||
try {
|
|
||||||
return JSON.parse(await fs.readFile(marketplacePath, 'utf8'));
|
|
||||||
} catch {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ─── Discovery ────────────────────────────────────────────────────────────
|
// ─── Discovery ────────────────────────────────────────────────────────────
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Discover modules from pre-read marketplace.json data.
|
* Fetch .claude-plugin/marketplace.json from a GitHub repository.
|
||||||
* @param {Object} marketplaceData - Parsed marketplace.json content
|
* @param {string} repoUrl - GitHub repository URL
|
||||||
* @param {string|null} sourceUrl - Source URL for tracking (null for local paths)
|
* @returns {Object} Parsed marketplace.json content
|
||||||
|
*/
|
||||||
|
async fetchMarketplaceJson(repoUrl) {
|
||||||
|
const { owner, repo, isValid, error } = this.validateGitHubUrl(repoUrl);
|
||||||
|
if (!isValid) throw new Error(error);
|
||||||
|
|
||||||
|
const rawUrl = `https://raw.githubusercontent.com/${owner}/${repo}/HEAD/.claude-plugin/marketplace.json`;
|
||||||
|
|
||||||
|
try {
|
||||||
|
return await this._client.fetchJson(rawUrl);
|
||||||
|
} catch (error_) {
|
||||||
|
if (error_.message.includes('404')) {
|
||||||
|
throw new Error(`No .claude-plugin/marketplace.json found in ${owner}/${repo}. This repository may not be a BMad module.`);
|
||||||
|
}
|
||||||
|
if (error_.message.includes('403')) {
|
||||||
|
throw new Error(`Repository ${owner}/${repo} is not accessible. Make sure it is public.`);
|
||||||
|
}
|
||||||
|
throw new Error(`Failed to fetch marketplace.json from ${owner}/${repo}: ${error_.message}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Discover modules from a GitHub repository's marketplace.json.
|
||||||
|
* @param {string} repoUrl - GitHub repository URL
|
||||||
* @returns {Array<Object>} Normalized plugin list
|
* @returns {Array<Object>} Normalized plugin list
|
||||||
*/
|
*/
|
||||||
async discoverModules(marketplaceData, sourceUrl) {
|
async discoverModules(repoUrl) {
|
||||||
const plugins = marketplaceData?.plugins;
|
const data = await this.fetchMarketplaceJson(repoUrl);
|
||||||
|
const plugins = data?.plugins;
|
||||||
|
|
||||||
if (!Array.isArray(plugins) || plugins.length === 0) {
|
if (!Array.isArray(plugins) || plugins.length === 0) {
|
||||||
throw new Error('marketplace.json contains no plugins');
|
throw new Error('marketplace.json contains no plugins');
|
||||||
}
|
}
|
||||||
|
|
||||||
return plugins.map((plugin) => this._normalizeCustomModule(plugin, sourceUrl, marketplaceData));
|
return plugins.map((plugin) => this._normalizeCustomModule(plugin, repoUrl, data));
|
||||||
}
|
|
||||||
|
|
||||||
// ─── Source Resolution ────────────────────────────────────────────────────
|
|
||||||
|
|
||||||
/**
|
|
||||||
* High-level coordinator: parse input, clone if URL, determine discovery vs direct mode.
|
|
||||||
* @param {string} input - URL or local path
|
|
||||||
* @param {Object} [options] - Options passed to cloneRepo
|
|
||||||
* @returns {Object} { parsed, rootDir, repoPath, sourceUrl, marketplace, mode: 'discovery'|'direct' }
|
|
||||||
*/
|
|
||||||
async resolveSource(input, options = {}) {
|
|
||||||
const parsed = this.parseSource(input);
|
|
||||||
if (!parsed.isValid) throw new Error(parsed.error);
|
|
||||||
|
|
||||||
let rootDir;
|
|
||||||
let repoPath;
|
|
||||||
let sourceUrl;
|
|
||||||
|
|
||||||
if (parsed.type === 'local') {
|
|
||||||
rootDir = parsed.localPath;
|
|
||||||
repoPath = null;
|
|
||||||
sourceUrl = null;
|
|
||||||
} else {
|
|
||||||
repoPath = await this.cloneRepo(input, options);
|
|
||||||
sourceUrl = parsed.cloneUrl;
|
|
||||||
rootDir = parsed.subdir ? path.join(repoPath, parsed.subdir) : repoPath;
|
|
||||||
|
|
||||||
if (parsed.subdir && !(await fs.pathExists(rootDir))) {
|
|
||||||
throw new Error(`Subdirectory '${parsed.subdir}' not found in cloned repository`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const marketplace = await this.readMarketplaceJsonFromDisk(rootDir);
|
|
||||||
const mode = marketplace ? 'discovery' : 'direct';
|
|
||||||
|
|
||||||
return { parsed, rootDir, repoPath, sourceUrl, marketplace, mode };
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ─── Clone ────────────────────────────────────────────────────────────────
|
// ─── Clone ────────────────────────────────────────────────────────────────
|
||||||
|
|
@ -265,24 +98,20 @@ class CustomModuleManager {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clone a custom module repository to cache.
|
* Clone a custom module repository to cache.
|
||||||
* Supports any Git host (GitHub, GitLab, Bitbucket, self-hosted, etc.).
|
* @param {string} repoUrl - GitHub repository URL
|
||||||
* @param {string} sourceInput - Git URL (HTTPS or SSH)
|
|
||||||
* @param {Object} [options] - Clone options
|
* @param {Object} [options] - Clone options
|
||||||
* @param {boolean} [options.silent] - Suppress spinner output
|
* @param {boolean} [options.silent] - Suppress spinner output
|
||||||
* @param {boolean} [options.skipInstall] - Skip npm install (for browsing before user confirms)
|
|
||||||
* @returns {string} Path to the cloned repository
|
* @returns {string} Path to the cloned repository
|
||||||
*/
|
*/
|
||||||
async cloneRepo(sourceInput, options = {}) {
|
async cloneRepo(repoUrl, options = {}) {
|
||||||
const parsed = this.parseSource(sourceInput);
|
const { owner, repo, isValid, error } = this.validateGitHubUrl(repoUrl);
|
||||||
if (!parsed.isValid) throw new Error(parsed.error);
|
if (!isValid) throw new Error(error);
|
||||||
if (parsed.type === 'local') throw new Error('cloneRepo does not accept local paths');
|
|
||||||
|
|
||||||
const cacheDir = this.getCacheDir();
|
const cacheDir = this.getCacheDir();
|
||||||
const repoCacheDir = path.join(cacheDir, ...parsed.cacheKey.split('/'));
|
const repoCacheDir = path.join(cacheDir, owner, repo);
|
||||||
const silent = options.silent || false;
|
const silent = options.silent || false;
|
||||||
const displayName = parsed.displayName;
|
|
||||||
|
|
||||||
await fs.ensureDir(path.dirname(repoCacheDir));
|
await fs.ensureDir(path.join(cacheDir, owner));
|
||||||
|
|
||||||
const createSpinner = async () => {
|
const createSpinner = async () => {
|
||||||
if (silent) {
|
if (silent) {
|
||||||
|
|
@ -294,7 +123,7 @@ class CustomModuleManager {
|
||||||
if (await fs.pathExists(repoCacheDir)) {
|
if (await fs.pathExists(repoCacheDir)) {
|
||||||
// Update existing clone
|
// Update existing clone
|
||||||
const fetchSpinner = await createSpinner();
|
const fetchSpinner = await createSpinner();
|
||||||
fetchSpinner.start(`Updating ${displayName}...`);
|
fetchSpinner.start(`Updating ${owner}/${repo}...`);
|
||||||
try {
|
try {
|
||||||
execSync('git fetch origin --depth 1', {
|
execSync('git fetch origin --depth 1', {
|
||||||
cwd: repoCacheDir,
|
cwd: repoCacheDir,
|
||||||
|
|
@ -305,51 +134,42 @@ class CustomModuleManager {
|
||||||
cwd: repoCacheDir,
|
cwd: repoCacheDir,
|
||||||
stdio: ['ignore', 'pipe', 'pipe'],
|
stdio: ['ignore', 'pipe', 'pipe'],
|
||||||
});
|
});
|
||||||
fetchSpinner.stop(`Updated ${displayName}`);
|
fetchSpinner.stop(`Updated ${owner}/${repo}`);
|
||||||
} catch {
|
} catch {
|
||||||
fetchSpinner.error(`Update failed, re-downloading ${displayName}`);
|
fetchSpinner.error(`Update failed, re-downloading ${owner}/${repo}`);
|
||||||
await fs.remove(repoCacheDir);
|
await fs.remove(repoCacheDir);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(await fs.pathExists(repoCacheDir))) {
|
if (!(await fs.pathExists(repoCacheDir))) {
|
||||||
const fetchSpinner = await createSpinner();
|
const fetchSpinner = await createSpinner();
|
||||||
fetchSpinner.start(`Cloning ${displayName}...`);
|
fetchSpinner.start(`Cloning ${owner}/${repo}...`);
|
||||||
try {
|
try {
|
||||||
execSync(`git clone --depth 1 "${parsed.cloneUrl}" "${repoCacheDir}"`, {
|
execSync(`git clone --depth 1 "${repoUrl}" "${repoCacheDir}"`, {
|
||||||
stdio: ['ignore', 'pipe', 'pipe'],
|
stdio: ['ignore', 'pipe', 'pipe'],
|
||||||
env: { ...process.env, GIT_TERMINAL_PROMPT: '0' },
|
env: { ...process.env, GIT_TERMINAL_PROMPT: '0' },
|
||||||
});
|
});
|
||||||
fetchSpinner.stop(`Cloned ${displayName}`);
|
fetchSpinner.stop(`Cloned ${owner}/${repo}`);
|
||||||
} catch (error_) {
|
} catch (error_) {
|
||||||
fetchSpinner.error(`Failed to clone ${displayName}`);
|
fetchSpinner.error(`Failed to clone ${owner}/${repo}`);
|
||||||
throw new Error(`Failed to clone ${parsed.cloneUrl}: ${error_.message}`);
|
throw new Error(`Failed to clone ${repoUrl}: ${error_.message}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Write source metadata for later URL reconstruction
|
// Install dependencies if package.json exists
|
||||||
const metadataPath = path.join(repoCacheDir, '.bmad-source.json');
|
|
||||||
await fs.writeJson(metadataPath, {
|
|
||||||
cloneUrl: parsed.cloneUrl,
|
|
||||||
cacheKey: parsed.cacheKey,
|
|
||||||
displayName: parsed.displayName,
|
|
||||||
clonedAt: new Date().toISOString(),
|
|
||||||
});
|
|
||||||
|
|
||||||
// Install dependencies if package.json exists (skip during browsing/analysis)
|
|
||||||
const packageJsonPath = path.join(repoCacheDir, 'package.json');
|
const packageJsonPath = path.join(repoCacheDir, 'package.json');
|
||||||
if (!options.skipInstall && (await fs.pathExists(packageJsonPath))) {
|
if (await fs.pathExists(packageJsonPath)) {
|
||||||
const installSpinner = await createSpinner();
|
const installSpinner = await createSpinner();
|
||||||
installSpinner.start(`Installing dependencies for ${displayName}...`);
|
installSpinner.start(`Installing dependencies for ${owner}/${repo}...`);
|
||||||
try {
|
try {
|
||||||
execSync('npm install --omit=dev --no-audit --no-fund --no-progress --legacy-peer-deps', {
|
execSync('npm install --omit=dev --no-audit --no-fund --no-progress --legacy-peer-deps', {
|
||||||
cwd: repoCacheDir,
|
cwd: repoCacheDir,
|
||||||
stdio: ['ignore', 'pipe', 'pipe'],
|
stdio: ['ignore', 'pipe', 'pipe'],
|
||||||
timeout: 120_000,
|
timeout: 120_000,
|
||||||
});
|
});
|
||||||
installSpinner.stop(`Installed dependencies for ${displayName}`);
|
installSpinner.stop(`Installed dependencies for ${owner}/${repo}`);
|
||||||
} catch (error_) {
|
} catch (error_) {
|
||||||
installSpinner.error(`Failed to install dependencies for ${displayName}`);
|
installSpinner.error(`Failed to install dependencies for ${owner}/${repo}`);
|
||||||
if (!silent) await prompts.log.warn(` ${error_.message}`);
|
if (!silent) await prompts.log.warn(` ${error_.message}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -357,65 +177,23 @@ class CustomModuleManager {
|
||||||
return repoCacheDir;
|
return repoCacheDir;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ─── Plugin Resolution ────────────────────────────────────────────────────
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Resolve a plugin to determine installation strategy and module registration files.
|
|
||||||
* Results are cached in _resolutionCache keyed by module code.
|
|
||||||
* @param {string} repoPath - Absolute path to the cloned repository or local directory
|
|
||||||
* @param {Object} plugin - Raw plugin object from marketplace.json
|
|
||||||
* @param {string} [sourceUrl] - Original URL for manifest tracking (null for local)
|
|
||||||
* @param {string} [localPath] - Local source path for manifest tracking (null for URLs)
|
|
||||||
* @returns {Promise<Array<Object>>} Array of ResolvedModule objects
|
|
||||||
*/
|
|
||||||
async resolvePlugin(repoPath, plugin, sourceUrl, localPath) {
|
|
||||||
const { PluginResolver } = require('./plugin-resolver');
|
|
||||||
const resolver = new PluginResolver();
|
|
||||||
const resolved = await resolver.resolve(repoPath, plugin);
|
|
||||||
|
|
||||||
// Stamp source info onto each resolved module for manifest tracking
|
|
||||||
for (const mod of resolved) {
|
|
||||||
if (sourceUrl) mod.repoUrl = sourceUrl;
|
|
||||||
if (localPath) mod.localPath = localPath;
|
|
||||||
CustomModuleManager._resolutionCache.set(mod.code, mod);
|
|
||||||
}
|
|
||||||
|
|
||||||
return resolved;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get a cached resolution result by module code.
|
|
||||||
* @param {string} moduleCode - Module code to look up
|
|
||||||
* @returns {Object|null} ResolvedModule or null if not cached
|
|
||||||
*/
|
|
||||||
getResolution(moduleCode) {
|
|
||||||
return CustomModuleManager._resolutionCache.get(moduleCode) || null;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ─── Source Finding ───────────────────────────────────────────────────────
|
// ─── Source Finding ───────────────────────────────────────────────────────
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Find the module source path within a cached or local source directory.
|
* Find the module source path within a cloned custom repo.
|
||||||
* @param {string} sourceInput - Git URL or local path (used to locate cached clone)
|
* @param {string} repoUrl - GitHub repository URL (for cache location)
|
||||||
* @param {string} [pluginSource] - Plugin source path from marketplace.json
|
* @param {string} [pluginSource] - Plugin source path from marketplace.json
|
||||||
* @returns {string|null} Path to directory containing module.yaml
|
* @returns {string|null} Path to directory containing module.yaml
|
||||||
*/
|
*/
|
||||||
async findModuleSource(sourceInput, pluginSource) {
|
async findModuleSource(repoUrl, pluginSource) {
|
||||||
const parsed = this.parseSource(sourceInput);
|
const { owner, repo } = this.validateGitHubUrl(repoUrl);
|
||||||
if (!parsed.isValid) return null;
|
const repoCacheDir = path.join(this.getCacheDir(), owner, repo);
|
||||||
|
|
||||||
let baseDir;
|
if (!(await fs.pathExists(repoCacheDir))) return null;
|
||||||
if (parsed.type === 'local') {
|
|
||||||
baseDir = parsed.localPath;
|
|
||||||
} else {
|
|
||||||
baseDir = path.join(this.getCacheDir(), ...parsed.cacheKey.split('/'));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!(await fs.pathExists(baseDir))) return null;
|
|
||||||
|
|
||||||
// Try plugin source path first (e.g., "./src/pro-skills")
|
// Try plugin source path first (e.g., "./src/pro-skills")
|
||||||
if (pluginSource) {
|
if (pluginSource) {
|
||||||
const sourcePath = path.join(baseDir, pluginSource);
|
const sourcePath = path.join(repoCacheDir, pluginSource);
|
||||||
const moduleYaml = path.join(sourcePath, 'module.yaml');
|
const moduleYaml = path.join(sourcePath, 'module.yaml');
|
||||||
if (await fs.pathExists(moduleYaml)) {
|
if (await fs.pathExists(moduleYaml)) {
|
||||||
return sourcePath;
|
return sourcePath;
|
||||||
|
|
@ -424,11 +202,11 @@ class CustomModuleManager {
|
||||||
|
|
||||||
// Fallback: search skills/ and src/ directories
|
// Fallback: search skills/ and src/ directories
|
||||||
for (const dir of ['skills', 'src']) {
|
for (const dir of ['skills', 'src']) {
|
||||||
const rootCandidate = path.join(baseDir, dir, 'module.yaml');
|
const rootCandidate = path.join(repoCacheDir, dir, 'module.yaml');
|
||||||
if (await fs.pathExists(rootCandidate)) {
|
if (await fs.pathExists(rootCandidate)) {
|
||||||
return path.dirname(rootCandidate);
|
return path.dirname(rootCandidate);
|
||||||
}
|
}
|
||||||
const dirPath = path.join(baseDir, dir);
|
const dirPath = path.join(repoCacheDir, dir);
|
||||||
if (await fs.pathExists(dirPath)) {
|
if (await fs.pathExists(dirPath)) {
|
||||||
const entries = await fs.readdir(dirPath, { withFileTypes: true });
|
const entries = await fs.readdir(dirPath, { withFileTypes: true });
|
||||||
for (const entry of entries) {
|
for (const entry of entries) {
|
||||||
|
|
@ -442,10 +220,10 @@ class CustomModuleManager {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check base directory root
|
// Check repo root
|
||||||
const rootCandidate = path.join(baseDir, 'module.yaml');
|
const rootCandidate = path.join(repoCacheDir, 'module.yaml');
|
||||||
if (await fs.pathExists(rootCandidate)) {
|
if (await fs.pathExists(rootCandidate)) {
|
||||||
return baseDir;
|
return repoCacheDir;
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
|
@ -453,163 +231,51 @@ class CustomModuleManager {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Find module source by module code, searching the custom cache.
|
* Find module source by module code, searching the custom cache.
|
||||||
* Handles both new 3-level cache structure (host/owner/repo) and
|
|
||||||
* legacy 2-level structure (owner/repo).
|
|
||||||
* @param {string} moduleCode - Module code to search for
|
* @param {string} moduleCode - Module code to search for
|
||||||
* @param {Object} [options] - Options
|
* @param {Object} [options] - Options
|
||||||
* @returns {string|null} Path to the module source or null
|
* @returns {string|null} Path to the module source or null
|
||||||
*/
|
*/
|
||||||
async findModuleSourceByCode(moduleCode, options = {}) {
|
async findModuleSourceByCode(moduleCode, options = {}) {
|
||||||
// Check resolution cache first (populated by resolvePlugin)
|
|
||||||
const resolved = CustomModuleManager._resolutionCache.get(moduleCode);
|
|
||||||
if (resolved) {
|
|
||||||
// For strategies 1-2: the common parent or setup skill's parent has the module files
|
|
||||||
if (resolved.moduleYamlPath) {
|
|
||||||
return path.dirname(resolved.moduleYamlPath);
|
|
||||||
}
|
|
||||||
// For strategy 5 (synthesized): return the first skill's parent as a reference path
|
|
||||||
if (resolved.skillPaths && resolved.skillPaths.length > 0) {
|
|
||||||
return path.dirname(resolved.skillPaths[0]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const cacheDir = this.getCacheDir();
|
const cacheDir = this.getCacheDir();
|
||||||
if (!(await fs.pathExists(cacheDir))) return null;
|
if (!(await fs.pathExists(cacheDir))) return null;
|
||||||
|
|
||||||
// Search through all cached repo roots
|
// Search through all custom repo caches
|
||||||
try {
|
try {
|
||||||
const { PluginResolver } = require('./plugin-resolver');
|
const owners = await fs.readdir(cacheDir, { withFileTypes: true });
|
||||||
const resolver = new PluginResolver();
|
for (const ownerEntry of owners) {
|
||||||
const repoRoots = await this._findCacheRepoRoots(cacheDir);
|
if (!ownerEntry.isDirectory()) continue;
|
||||||
|
const ownerPath = path.join(cacheDir, ownerEntry.name);
|
||||||
|
const repos = await fs.readdir(ownerPath, { withFileTypes: true });
|
||||||
|
for (const repoEntry of repos) {
|
||||||
|
if (!repoEntry.isDirectory()) continue;
|
||||||
|
const repoPath = path.join(ownerPath, repoEntry.name);
|
||||||
|
|
||||||
for (const { repoPath, metadata } of repoRoots) {
|
// Check marketplace.json for matching module code
|
||||||
// Check marketplace.json for matching module code
|
const marketplacePath = path.join(repoPath, '.claude-plugin', 'marketplace.json');
|
||||||
const marketplacePath = path.join(repoPath, '.claude-plugin', 'marketplace.json');
|
if (await fs.pathExists(marketplacePath)) {
|
||||||
if (!(await fs.pathExists(marketplacePath))) continue;
|
try {
|
||||||
|
const data = JSON.parse(await fs.readFile(marketplacePath, 'utf8'));
|
||||||
try {
|
for (const plugin of data.plugins || []) {
|
||||||
const data = JSON.parse(await fs.readFile(marketplacePath, 'utf8'));
|
if (plugin.name === moduleCode) {
|
||||||
for (const plugin of data.plugins || []) {
|
// Found the module - find its source
|
||||||
// Direct name match (legacy behavior)
|
const sourcePath = plugin.source ? path.join(repoPath, plugin.source) : repoPath;
|
||||||
if (plugin.name === moduleCode) {
|
const moduleYaml = path.join(sourcePath, 'module.yaml');
|
||||||
const sourcePath = plugin.source ? path.join(repoPath, plugin.source) : repoPath;
|
if (await fs.pathExists(moduleYaml)) {
|
||||||
const moduleYaml = path.join(sourcePath, 'module.yaml');
|
return sourcePath;
|
||||||
if (await fs.pathExists(moduleYaml)) {
|
|
||||||
return sourcePath;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Resolve plugin to check if any module.yaml code matches
|
|
||||||
if (plugin.skills && plugin.skills.length > 0) {
|
|
||||||
try {
|
|
||||||
const resolvedMods = await resolver.resolve(repoPath, plugin);
|
|
||||||
for (const mod of resolvedMods) {
|
|
||||||
if (mod.code === moduleCode) {
|
|
||||||
// Use metadata for URL reconstruction instead of deriving from path
|
|
||||||
mod.repoUrl = metadata?.cloneUrl || null;
|
|
||||||
CustomModuleManager._resolutionCache.set(mod.code, mod);
|
|
||||||
if (mod.moduleYamlPath) {
|
|
||||||
return path.dirname(mod.moduleYamlPath);
|
|
||||||
}
|
|
||||||
if (mod.skillPaths && mod.skillPaths.length > 0) {
|
|
||||||
return path.dirname(mod.skillPaths[0]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch {
|
|
||||||
// Skip unresolvable plugins
|
|
||||||
}
|
}
|
||||||
|
} catch {
|
||||||
|
// Skip malformed marketplace.json
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch {
|
|
||||||
// Skip malformed marketplace.json
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch {
|
} catch {
|
||||||
// Cache doesn't exist or is inaccessible
|
// Cache doesn't exist or is inaccessible
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fallback: check manifest for localPath (local-source modules not in cache)
|
return null;
|
||||||
return this._findLocalSourceFromManifest(moduleCode, options);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check the installation manifest for a localPath entry for this module.
|
|
||||||
* Used as fallback when the module was installed from a local source (no cache entry).
|
|
||||||
* Returns the path only if it still exists on disk; never removes installed files.
|
|
||||||
* @param {string} moduleCode - Module code to search for
|
|
||||||
* @param {Object} [options] - Options (must include bmadDir or will search common locations)
|
|
||||||
* @returns {string|null} Path to the local module source or null
|
|
||||||
*/
|
|
||||||
async _findLocalSourceFromManifest(moduleCode, options = {}) {
|
|
||||||
try {
|
|
||||||
const { Manifest } = require('../core/manifest');
|
|
||||||
const manifestObj = new Manifest();
|
|
||||||
|
|
||||||
// Try to find bmadDir from options or common locations
|
|
||||||
const bmadDir = options.bmadDir;
|
|
||||||
if (!bmadDir) return null;
|
|
||||||
|
|
||||||
const manifestData = await manifestObj.read(bmadDir);
|
|
||||||
if (!manifestData?.modulesDetailed) return null;
|
|
||||||
|
|
||||||
const moduleEntry = manifestData.modulesDetailed.find((m) => m.name === moduleCode);
|
|
||||||
if (!moduleEntry?.localPath) return null;
|
|
||||||
|
|
||||||
// Only return the path if it still exists (source not removed)
|
|
||||||
if (await fs.pathExists(moduleEntry.localPath)) {
|
|
||||||
return moduleEntry.localPath;
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
} catch {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Recursively find repo root directories within the cache.
|
|
||||||
* A repo root is identified by containing .bmad-source.json (new) or .claude-plugin/ (legacy).
|
|
||||||
* Handles both 3-level (host/owner/repo) and legacy 2-level (owner/repo) cache layouts.
|
|
||||||
* @param {string} dir - Directory to search
|
|
||||||
* @param {number} [depth=0] - Current recursion depth
|
|
||||||
* @param {number} [maxDepth=4] - Maximum recursion depth
|
|
||||||
* @returns {Promise<Array<{repoPath: string, metadata: Object|null}>>}
|
|
||||||
*/
|
|
||||||
async _findCacheRepoRoots(dir, depth = 0, maxDepth = 4) {
|
|
||||||
const results = [];
|
|
||||||
|
|
||||||
// Check if this directory is a repo root
|
|
||||||
const metadataPath = path.join(dir, '.bmad-source.json');
|
|
||||||
const claudePluginDir = path.join(dir, '.claude-plugin');
|
|
||||||
|
|
||||||
if (await fs.pathExists(metadataPath)) {
|
|
||||||
try {
|
|
||||||
const metadata = JSON.parse(await fs.readFile(metadataPath, 'utf8'));
|
|
||||||
results.push({ repoPath: dir, metadata });
|
|
||||||
} catch {
|
|
||||||
results.push({ repoPath: dir, metadata: null });
|
|
||||||
}
|
|
||||||
return results; // Don't recurse into repo contents
|
|
||||||
}
|
|
||||||
if (await fs.pathExists(claudePluginDir)) {
|
|
||||||
results.push({ repoPath: dir, metadata: null });
|
|
||||||
return results;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Recurse into subdirectories
|
|
||||||
if (depth >= maxDepth) return results;
|
|
||||||
try {
|
|
||||||
const entries = await fs.readdir(dir, { withFileTypes: true });
|
|
||||||
for (const entry of entries) {
|
|
||||||
if (!entry.isDirectory() || entry.name.startsWith('.')) continue;
|
|
||||||
const subResults = await this._findCacheRepoRoots(path.join(dir, entry.name), depth + 1, maxDepth);
|
|
||||||
results.push(...subResults);
|
|
||||||
}
|
|
||||||
} catch {
|
|
||||||
// Directory not readable
|
|
||||||
}
|
|
||||||
return results;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ─── Normalization ────────────────────────────────────────────────────────
|
// ─── Normalization ────────────────────────────────────────────────────────
|
||||||
|
|
@ -617,11 +283,11 @@ class CustomModuleManager {
|
||||||
/**
|
/**
|
||||||
* Normalize a plugin from marketplace.json to a consistent shape.
|
* Normalize a plugin from marketplace.json to a consistent shape.
|
||||||
* @param {Object} plugin - Plugin object from marketplace.json
|
* @param {Object} plugin - Plugin object from marketplace.json
|
||||||
* @param {string|null} sourceUrl - Source URL (null for local paths)
|
* @param {string} repoUrl - Source repository URL
|
||||||
* @param {Object} data - Full marketplace.json data
|
* @param {Object} data - Full marketplace.json data
|
||||||
* @returns {Object} Normalized module info
|
* @returns {Object} Normalized module info
|
||||||
*/
|
*/
|
||||||
_normalizeCustomModule(plugin, sourceUrl, data) {
|
_normalizeCustomModule(plugin, repoUrl, data) {
|
||||||
return {
|
return {
|
||||||
code: plugin.name,
|
code: plugin.name,
|
||||||
name: plugin.name,
|
name: plugin.name,
|
||||||
|
|
@ -629,10 +295,8 @@ class CustomModuleManager {
|
||||||
description: plugin.description || '',
|
description: plugin.description || '',
|
||||||
version: plugin.version || null,
|
version: plugin.version || null,
|
||||||
author: plugin.author || data.owner || '',
|
author: plugin.author || data.owner || '',
|
||||||
url: sourceUrl || null,
|
url: repoUrl,
|
||||||
source: plugin.source || null,
|
source: plugin.source || null,
|
||||||
skills: plugin.skills || [],
|
|
||||||
rawPlugin: plugin,
|
|
||||||
type: 'custom',
|
type: 'custom',
|
||||||
trustTier: 'unverified',
|
trustTier: 'unverified',
|
||||||
builtIn: false,
|
builtIn: false,
|
||||||
|
|
|
||||||
|
|
@ -135,22 +135,6 @@ class OfficialModules {
|
||||||
const moduleConfigPath = path.join(modulePath, 'module.yaml');
|
const moduleConfigPath = path.join(modulePath, 'module.yaml');
|
||||||
|
|
||||||
if (!(await fs.pathExists(moduleConfigPath))) {
|
if (!(await fs.pathExists(moduleConfigPath))) {
|
||||||
// Check resolution cache for strategy 5 modules (no module.yaml on disk)
|
|
||||||
const { CustomModuleManager } = require('./custom-module-manager');
|
|
||||||
const customMgr = new CustomModuleManager();
|
|
||||||
const resolved = customMgr.getResolution(defaultName);
|
|
||||||
if (resolved && resolved.synthesizedModuleYaml) {
|
|
||||||
return {
|
|
||||||
id: resolved.code,
|
|
||||||
path: modulePath,
|
|
||||||
name: resolved.name,
|
|
||||||
description: resolved.description,
|
|
||||||
version: resolved.version || '1.0.0',
|
|
||||||
source: sourceDescription,
|
|
||||||
dependencies: [],
|
|
||||||
defaultSelected: false,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -248,14 +232,6 @@ class OfficialModules {
|
||||||
* @param {Object} options.logger - Logger instance for output
|
* @param {Object} options.logger - Logger instance for output
|
||||||
*/
|
*/
|
||||||
async install(moduleName, bmadDir, fileTrackingCallback = null, options = {}) {
|
async install(moduleName, bmadDir, fileTrackingCallback = null, options = {}) {
|
||||||
// Check if this module has a plugin resolution (custom marketplace install)
|
|
||||||
const { CustomModuleManager } = require('./custom-module-manager');
|
|
||||||
const customMgr = new CustomModuleManager();
|
|
||||||
const resolved = customMgr.getResolution(moduleName);
|
|
||||||
if (resolved) {
|
|
||||||
return this.installFromResolution(resolved, bmadDir, fileTrackingCallback, options);
|
|
||||||
}
|
|
||||||
|
|
||||||
const sourcePath = await this.findModuleSource(moduleName, { silent: options.silent });
|
const sourcePath = await this.findModuleSource(moduleName, { silent: options.silent });
|
||||||
const targetPath = path.join(bmadDir, moduleName);
|
const targetPath = path.join(bmadDir, moduleName);
|
||||||
|
|
||||||
|
|
@ -289,62 +265,6 @@ class OfficialModules {
|
||||||
return { success: true, module: moduleName, path: targetPath, versionInfo };
|
return { success: true, module: moduleName, path: targetPath, versionInfo };
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Install a module from a PluginResolver resolution result.
|
|
||||||
* Copies specific skill directories and places module-help.csv at the target root.
|
|
||||||
* @param {Object} resolved - ResolvedModule from PluginResolver
|
|
||||||
* @param {string} bmadDir - Target bmad directory
|
|
||||||
* @param {Function} fileTrackingCallback - Optional callback to track installed files
|
|
||||||
* @param {Object} options - Installation options
|
|
||||||
*/
|
|
||||||
async installFromResolution(resolved, bmadDir, fileTrackingCallback = null, options = {}) {
|
|
||||||
const targetPath = path.join(bmadDir, resolved.code);
|
|
||||||
|
|
||||||
if (await fs.pathExists(targetPath)) {
|
|
||||||
await fs.remove(targetPath);
|
|
||||||
}
|
|
||||||
|
|
||||||
await fs.ensureDir(targetPath);
|
|
||||||
|
|
||||||
// Copy each skill directory, flattened by leaf name
|
|
||||||
for (const skillPath of resolved.skillPaths) {
|
|
||||||
const skillDirName = path.basename(skillPath);
|
|
||||||
const skillTarget = path.join(targetPath, skillDirName);
|
|
||||||
await this.copyModuleWithFiltering(skillPath, skillTarget, fileTrackingCallback, options.moduleConfig);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Place module-help.csv at the module root
|
|
||||||
if (resolved.moduleHelpCsvPath) {
|
|
||||||
// Strategies 1-4: copy the existing file
|
|
||||||
const helpTarget = path.join(targetPath, 'module-help.csv');
|
|
||||||
await fs.copy(resolved.moduleHelpCsvPath, helpTarget, { overwrite: true });
|
|
||||||
if (fileTrackingCallback) fileTrackingCallback(helpTarget);
|
|
||||||
} else if (resolved.synthesizedHelpCsv) {
|
|
||||||
// Strategy 5: write synthesized content
|
|
||||||
const helpTarget = path.join(targetPath, 'module-help.csv');
|
|
||||||
await fs.writeFile(helpTarget, resolved.synthesizedHelpCsv, 'utf8');
|
|
||||||
if (fileTrackingCallback) fileTrackingCallback(helpTarget);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create directories declared in module.yaml (strategies 1-4 may have these)
|
|
||||||
if (!options.skipModuleInstaller) {
|
|
||||||
await this.createModuleDirectories(resolved.code, bmadDir, options);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update manifest
|
|
||||||
const { Manifest } = require('../core/manifest');
|
|
||||||
const manifestObj = new Manifest();
|
|
||||||
|
|
||||||
await manifestObj.addModule(bmadDir, resolved.code, {
|
|
||||||
version: resolved.version || null,
|
|
||||||
source: 'custom',
|
|
||||||
npmPackage: null,
|
|
||||||
repoUrl: resolved.repoUrl || null,
|
|
||||||
});
|
|
||||||
|
|
||||||
return { success: true, module: resolved.code, path: targetPath, versionInfo: { version: resolved.version || '' } };
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Update an existing module
|
* Update an existing module
|
||||||
* @param {string} moduleName - Name of the module to update
|
* @param {string} moduleName - Name of the module to update
|
||||||
|
|
|
||||||
|
|
@ -1,398 +0,0 @@
|
||||||
const fs = require('fs-extra');
|
|
||||||
const path = require('node:path');
|
|
||||||
const yaml = require('yaml');
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Resolves how to install a plugin from marketplace.json by analyzing
|
|
||||||
* where module.yaml and module-help.csv live relative to the listed skills.
|
|
||||||
*
|
|
||||||
* Five strategies, tried in order:
|
|
||||||
* 1. Root module files at the common parent of all skills
|
|
||||||
* 2. A -setup skill with assets/module.yaml + assets/module-help.csv
|
|
||||||
* 3. Single standalone skill with both files in its assets/
|
|
||||||
* 4. Multiple standalone skills, each with both files in assets/
|
|
||||||
* 5. Fallback: synthesize from marketplace.json + SKILL.md frontmatter
|
|
||||||
*/
|
|
||||||
class PluginResolver {
|
|
||||||
/**
|
|
||||||
* Resolve a plugin to one or more installable module definitions.
|
|
||||||
* @param {string} repoPath - Absolute path to the cloned repository root
|
|
||||||
* @param {Object} plugin - Plugin object from marketplace.json
|
|
||||||
* @param {string} plugin.name - Plugin identifier
|
|
||||||
* @param {string} [plugin.source] - Relative path from repo root
|
|
||||||
* @param {string} [plugin.version] - Semantic version
|
|
||||||
* @param {string} [plugin.description] - Plugin description
|
|
||||||
* @param {string[]} [plugin.skills] - Relative paths to skill directories
|
|
||||||
* @returns {Promise<ResolvedModule[]>} Array of resolved module definitions
|
|
||||||
*/
|
|
||||||
async resolve(repoPath, plugin) {
|
|
||||||
const skillRelPaths = plugin.skills || [];
|
|
||||||
|
|
||||||
// No skills array: legacy behavior - caller should use existing findModuleSource
|
|
||||||
if (skillRelPaths.length === 0) {
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
|
|
||||||
// Resolve skill paths to absolute, constrain to repo root, filter non-existent
|
|
||||||
const repoRoot = path.resolve(repoPath);
|
|
||||||
const skillPaths = [];
|
|
||||||
for (const rel of skillRelPaths) {
|
|
||||||
const normalized = rel.replace(/^\.\//, '');
|
|
||||||
const abs = path.resolve(repoPath, normalized);
|
|
||||||
// Guard against path traversal (.. segments, absolute paths in marketplace.json)
|
|
||||||
if (!abs.startsWith(repoRoot + path.sep) && abs !== repoRoot) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (await fs.pathExists(abs)) {
|
|
||||||
skillPaths.push(abs);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (skillPaths.length === 0) {
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
|
|
||||||
// Try each strategy in order
|
|
||||||
const result =
|
|
||||||
(await this._tryRootModuleFiles(repoPath, plugin, skillPaths)) ||
|
|
||||||
(await this._trySetupSkill(repoPath, plugin, skillPaths)) ||
|
|
||||||
(await this._trySingleStandalone(repoPath, plugin, skillPaths)) ||
|
|
||||||
(await this._tryMultipleStandalone(repoPath, plugin, skillPaths)) ||
|
|
||||||
(await this._synthesizeFallback(repoPath, plugin, skillPaths));
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ─── Strategy 1: Root Module Files ──────────────────────────────────────────
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if module.yaml + module-help.csv exist at the common parent of all skills.
|
|
||||||
*/
|
|
||||||
async _tryRootModuleFiles(repoPath, plugin, skillPaths) {
|
|
||||||
const commonParent = this._computeCommonParent(skillPaths);
|
|
||||||
const moduleYamlPath = path.join(commonParent, 'module.yaml');
|
|
||||||
const moduleHelpPath = path.join(commonParent, 'module-help.csv');
|
|
||||||
|
|
||||||
if (!(await fs.pathExists(moduleYamlPath)) || !(await fs.pathExists(moduleHelpPath))) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
const moduleData = await this._readModuleYaml(moduleYamlPath);
|
|
||||||
if (!moduleData) return null;
|
|
||||||
|
|
||||||
return [
|
|
||||||
{
|
|
||||||
code: moduleData.code || plugin.name,
|
|
||||||
name: moduleData.name || plugin.name,
|
|
||||||
version: plugin.version || moduleData.module_version || null,
|
|
||||||
description: moduleData.description || plugin.description || '',
|
|
||||||
strategy: 1,
|
|
||||||
pluginName: plugin.name,
|
|
||||||
moduleYamlPath,
|
|
||||||
moduleHelpCsvPath: moduleHelpPath,
|
|
||||||
skillPaths,
|
|
||||||
synthesizedModuleYaml: null,
|
|
||||||
synthesizedHelpCsv: null,
|
|
||||||
},
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
// ─── Strategy 2: Setup Skill ────────────────────────────────────────────────
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Search for a skill ending in -setup with assets/module.yaml + assets/module-help.csv.
|
|
||||||
*/
|
|
||||||
async _trySetupSkill(repoPath, plugin, skillPaths) {
|
|
||||||
for (const skillPath of skillPaths) {
|
|
||||||
const dirName = path.basename(skillPath);
|
|
||||||
if (!dirName.endsWith('-setup')) continue;
|
|
||||||
|
|
||||||
const moduleYamlPath = path.join(skillPath, 'assets', 'module.yaml');
|
|
||||||
const moduleHelpPath = path.join(skillPath, 'assets', 'module-help.csv');
|
|
||||||
|
|
||||||
if (!(await fs.pathExists(moduleYamlPath)) || !(await fs.pathExists(moduleHelpPath))) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
const moduleData = await this._readModuleYaml(moduleYamlPath);
|
|
||||||
if (!moduleData) continue;
|
|
||||||
|
|
||||||
return [
|
|
||||||
{
|
|
||||||
code: moduleData.code || plugin.name,
|
|
||||||
name: moduleData.name || plugin.name,
|
|
||||||
version: plugin.version || moduleData.module_version || null,
|
|
||||||
description: moduleData.description || plugin.description || '',
|
|
||||||
strategy: 2,
|
|
||||||
pluginName: plugin.name,
|
|
||||||
moduleYamlPath,
|
|
||||||
moduleHelpCsvPath: moduleHelpPath,
|
|
||||||
skillPaths,
|
|
||||||
synthesizedModuleYaml: null,
|
|
||||||
synthesizedHelpCsv: null,
|
|
||||||
},
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ─── Strategy 3: Single Standalone Skill ────────────────────────────────────
|
|
||||||
|
|
||||||
/**
|
|
||||||
* One skill listed, with assets/module.yaml + assets/module-help.csv.
|
|
||||||
*/
|
|
||||||
async _trySingleStandalone(repoPath, plugin, skillPaths) {
|
|
||||||
if (skillPaths.length !== 1) return null;
|
|
||||||
|
|
||||||
const skillPath = skillPaths[0];
|
|
||||||
const moduleYamlPath = path.join(skillPath, 'assets', 'module.yaml');
|
|
||||||
const moduleHelpPath = path.join(skillPath, 'assets', 'module-help.csv');
|
|
||||||
|
|
||||||
if (!(await fs.pathExists(moduleYamlPath)) || !(await fs.pathExists(moduleHelpPath))) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
const moduleData = await this._readModuleYaml(moduleYamlPath);
|
|
||||||
if (!moduleData) return null;
|
|
||||||
|
|
||||||
return [
|
|
||||||
{
|
|
||||||
code: moduleData.code || plugin.name,
|
|
||||||
name: moduleData.name || plugin.name,
|
|
||||||
version: plugin.version || moduleData.module_version || null,
|
|
||||||
description: moduleData.description || plugin.description || '',
|
|
||||||
strategy: 3,
|
|
||||||
pluginName: plugin.name,
|
|
||||||
moduleYamlPath,
|
|
||||||
moduleHelpCsvPath: moduleHelpPath,
|
|
||||||
skillPaths,
|
|
||||||
synthesizedModuleYaml: null,
|
|
||||||
synthesizedHelpCsv: null,
|
|
||||||
},
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
// ─── Strategy 4: Multiple Standalone Skills ─────────────────────────────────
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Multiple skills, each with assets/module.yaml + assets/module-help.csv.
|
|
||||||
* Each becomes its own installable module.
|
|
||||||
*/
|
|
||||||
async _tryMultipleStandalone(repoPath, plugin, skillPaths) {
|
|
||||||
if (skillPaths.length < 2) return null;
|
|
||||||
|
|
||||||
const resolved = [];
|
|
||||||
|
|
||||||
for (const skillPath of skillPaths) {
|
|
||||||
const moduleYamlPath = path.join(skillPath, 'assets', 'module.yaml');
|
|
||||||
const moduleHelpPath = path.join(skillPath, 'assets', 'module-help.csv');
|
|
||||||
|
|
||||||
if (!(await fs.pathExists(moduleYamlPath)) || !(await fs.pathExists(moduleHelpPath))) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
const moduleData = await this._readModuleYaml(moduleYamlPath);
|
|
||||||
if (!moduleData) continue;
|
|
||||||
|
|
||||||
resolved.push({
|
|
||||||
code: moduleData.code || path.basename(skillPath),
|
|
||||||
name: moduleData.name || path.basename(skillPath),
|
|
||||||
version: plugin.version || moduleData.module_version || null,
|
|
||||||
description: moduleData.description || '',
|
|
||||||
strategy: 4,
|
|
||||||
pluginName: plugin.name,
|
|
||||||
moduleYamlPath,
|
|
||||||
moduleHelpCsvPath: moduleHelpPath,
|
|
||||||
skillPaths: [skillPath],
|
|
||||||
synthesizedModuleYaml: null,
|
|
||||||
synthesizedHelpCsv: null,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// Only use strategy 4 if ALL skills have module files
|
|
||||||
if (resolved.length === skillPaths.length) {
|
|
||||||
return resolved;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Partial match: fall through to strategy 5
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ─── Strategy 5: Fallback (Synthesized) ─────────────────────────────────────
|
|
||||||
|
|
||||||
/**
|
|
||||||
* No module files found anywhere. Synthesize from marketplace.json metadata
|
|
||||||
* and SKILL.md frontmatter.
|
|
||||||
*/
|
|
||||||
async _synthesizeFallback(repoPath, plugin, skillPaths) {
|
|
||||||
const skillInfos = [];
|
|
||||||
|
|
||||||
for (const skillPath of skillPaths) {
|
|
||||||
const frontmatter = await this._parseSkillFrontmatter(skillPath);
|
|
||||||
skillInfos.push({
|
|
||||||
dirName: path.basename(skillPath),
|
|
||||||
name: frontmatter.name || path.basename(skillPath),
|
|
||||||
description: frontmatter.description || '',
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
const moduleName = this._formatDisplayName(plugin.name);
|
|
||||||
const code = plugin.name;
|
|
||||||
|
|
||||||
const synthesizedYaml = {
|
|
||||||
code,
|
|
||||||
name: moduleName,
|
|
||||||
description: plugin.description || '',
|
|
||||||
module_version: plugin.version || '1.0.0',
|
|
||||||
default_selected: false,
|
|
||||||
};
|
|
||||||
|
|
||||||
const synthesizedCsv = this._buildSynthesizedHelpCsv(moduleName, skillInfos);
|
|
||||||
|
|
||||||
return [
|
|
||||||
{
|
|
||||||
code,
|
|
||||||
name: moduleName,
|
|
||||||
version: plugin.version || null,
|
|
||||||
description: plugin.description || '',
|
|
||||||
strategy: 5,
|
|
||||||
pluginName: plugin.name,
|
|
||||||
moduleYamlPath: null,
|
|
||||||
moduleHelpCsvPath: null,
|
|
||||||
skillPaths,
|
|
||||||
synthesizedModuleYaml: synthesizedYaml,
|
|
||||||
synthesizedHelpCsv: synthesizedCsv,
|
|
||||||
},
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
// ─── Helpers ────────────────────────────────────────────────────────────────
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Compute the deepest common ancestor directory of an array of absolute paths.
|
|
||||||
* @param {string[]} absPaths - Absolute directory paths
|
|
||||||
* @returns {string} Common parent directory
|
|
||||||
*/
|
|
||||||
_computeCommonParent(absPaths) {
|
|
||||||
if (absPaths.length === 0) return '/';
|
|
||||||
if (absPaths.length === 1) return path.dirname(absPaths[0]);
|
|
||||||
|
|
||||||
const segments = absPaths.map((p) => p.split(path.sep));
|
|
||||||
const minLen = Math.min(...segments.map((s) => s.length));
|
|
||||||
const common = [];
|
|
||||||
|
|
||||||
for (let i = 0; i < minLen; i++) {
|
|
||||||
const segment = segments[0][i];
|
|
||||||
if (segments.every((s) => s[i] === segment)) {
|
|
||||||
common.push(segment);
|
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return common.join(path.sep) || '/';
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Read and parse a module.yaml file.
|
|
||||||
* @param {string} yamlPath - Absolute path to module.yaml
|
|
||||||
* @returns {Object|null} Parsed content or null on failure
|
|
||||||
*/
|
|
||||||
async _readModuleYaml(yamlPath) {
|
|
||||||
try {
|
|
||||||
const content = await fs.readFile(yamlPath, 'utf8');
|
|
||||||
return yaml.parse(content);
|
|
||||||
} catch {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Extract name and description from a SKILL.md YAML frontmatter block.
|
|
||||||
* @param {string} skillDirPath - Absolute path to the skill directory
|
|
||||||
* @returns {Object} { name, description } or empty strings
|
|
||||||
*/
|
|
||||||
async _parseSkillFrontmatter(skillDirPath) {
|
|
||||||
const skillMdPath = path.join(skillDirPath, 'SKILL.md');
|
|
||||||
try {
|
|
||||||
const content = await fs.readFile(skillMdPath, 'utf8');
|
|
||||||
const match = content.match(/^---\s*\n([\s\S]*?)\n---/);
|
|
||||||
if (!match) return { name: '', description: '' };
|
|
||||||
|
|
||||||
const parsed = yaml.parse(match[1]);
|
|
||||||
return {
|
|
||||||
name: parsed.name || '',
|
|
||||||
description: parsed.description || '',
|
|
||||||
};
|
|
||||||
} catch {
|
|
||||||
return { name: '', description: '' };
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Build a synthesized module-help.csv from plugin metadata and skill frontmatter.
|
|
||||||
* Uses the standard 13-column format.
|
|
||||||
* @param {string} moduleName - Display name for the module column
|
|
||||||
* @param {Array<{dirName: string, name: string, description: string}>} skillInfos
|
|
||||||
* @returns {string} CSV content
|
|
||||||
*/
|
|
||||||
_buildSynthesizedHelpCsv(moduleName, skillInfos) {
|
|
||||||
const header = 'module,skill,display-name,menu-code,description,action,args,phase,after,before,required,output-location,outputs';
|
|
||||||
const rows = [header];
|
|
||||||
|
|
||||||
for (const info of skillInfos) {
|
|
||||||
const displayName = this._formatDisplayName(info.name || info.dirName);
|
|
||||||
const menuCode = this._generateMenuCode(info.name || info.dirName);
|
|
||||||
const description = this._escapeCSVField(info.description);
|
|
||||||
|
|
||||||
rows.push(`${moduleName},${info.dirName},${displayName},${menuCode},${description},activate,,anytime,,,false,,`);
|
|
||||||
}
|
|
||||||
|
|
||||||
return rows.join('\n') + '\n';
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Format a kebab-case or snake_case name into a display name.
|
|
||||||
* Strips common prefixes like "bmad-" or "bmad-agent-".
|
|
||||||
* @param {string} name - Raw name
|
|
||||||
* @returns {string} Formatted display name
|
|
||||||
*/
|
|
||||||
_formatDisplayName(name) {
|
|
||||||
let cleaned = name.replace(/^bmad-agent-/, '').replace(/^bmad-/, '');
|
|
||||||
return cleaned
|
|
||||||
.split(/[-_]/)
|
|
||||||
.map((word) => word.charAt(0).toUpperCase() + word.slice(1))
|
|
||||||
.join(' ');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Generate a short menu code from a skill name.
|
|
||||||
* Takes first letter of each significant word, uppercased, max 3 chars.
|
|
||||||
* @param {string} name - Skill name (kebab-case)
|
|
||||||
* @returns {string} Menu code (e.g., "CC" for "code-coach")
|
|
||||||
*/
|
|
||||||
_generateMenuCode(name) {
|
|
||||||
const cleaned = name.replace(/^bmad-agent-/, '').replace(/^bmad-/, '');
|
|
||||||
const words = cleaned.split(/[-_]/).filter((w) => w.length > 0);
|
|
||||||
return words
|
|
||||||
.map((w) => w.charAt(0).toUpperCase())
|
|
||||||
.join('')
|
|
||||||
.slice(0, 3);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Escape a value for CSV output (wrap in quotes if it contains commas, quotes, or newlines).
|
|
||||||
* @param {string} value
|
|
||||||
* @returns {string}
|
|
||||||
*/
|
|
||||||
_escapeCSVField(value) {
|
|
||||||
if (!value) return '';
|
|
||||||
if (value.includes(',') || value.includes('"') || value.includes('\n')) {
|
|
||||||
return `"${value.replaceAll('"', '""')}"`;
|
|
||||||
}
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = { PluginResolver };
|
|
||||||
|
|
@ -158,9 +158,6 @@ class UI {
|
||||||
.map((m) => m.trim())
|
.map((m) => m.trim())
|
||||||
.filter(Boolean);
|
.filter(Boolean);
|
||||||
await prompts.log.info(`Using modules from command-line: ${selectedModules.join(', ')}`);
|
await prompts.log.info(`Using modules from command-line: ${selectedModules.join(', ')}`);
|
||||||
} else if (options.customSource) {
|
|
||||||
// Custom source without --modules: start with empty list (core added below)
|
|
||||||
selectedModules = [];
|
|
||||||
} else if (options.yes) {
|
} else if (options.yes) {
|
||||||
selectedModules = await this.getDefaultModules(installedModuleIds);
|
selectedModules = await this.getDefaultModules(installedModuleIds);
|
||||||
await prompts.log.info(
|
await prompts.log.info(
|
||||||
|
|
@ -170,14 +167,6 @@ class UI {
|
||||||
selectedModules = await this.selectAllModules(installedModuleIds);
|
selectedModules = await this.selectAllModules(installedModuleIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Resolve custom sources from --custom-source flag
|
|
||||||
if (options.customSource) {
|
|
||||||
const customCodes = await this._resolveCustomSourcesCli(options.customSource);
|
|
||||||
for (const code of customCodes) {
|
|
||||||
if (!selectedModules.includes(code)) selectedModules.push(code);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Ensure core is in the modules list
|
// Ensure core is in the modules list
|
||||||
if (!selectedModules.includes('core')) {
|
if (!selectedModules.includes('core')) {
|
||||||
selectedModules.unshift('core');
|
selectedModules.unshift('core');
|
||||||
|
|
@ -213,9 +202,6 @@ class UI {
|
||||||
.map((m) => m.trim())
|
.map((m) => m.trim())
|
||||||
.filter(Boolean);
|
.filter(Boolean);
|
||||||
await prompts.log.info(`Using modules from command-line: ${selectedModules.join(', ')}`);
|
await prompts.log.info(`Using modules from command-line: ${selectedModules.join(', ')}`);
|
||||||
} else if (options.customSource) {
|
|
||||||
// Custom source without --modules: start with empty list (core added below)
|
|
||||||
selectedModules = [];
|
|
||||||
} else if (options.yes) {
|
} else if (options.yes) {
|
||||||
// Use default modules when --yes flag is set
|
// Use default modules when --yes flag is set
|
||||||
selectedModules = await this.getDefaultModules(installedModuleIds);
|
selectedModules = await this.getDefaultModules(installedModuleIds);
|
||||||
|
|
@ -224,14 +210,6 @@ class UI {
|
||||||
selectedModules = await this.selectAllModules(installedModuleIds);
|
selectedModules = await this.selectAllModules(installedModuleIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Resolve custom sources from --custom-source flag
|
|
||||||
if (options.customSource) {
|
|
||||||
const customCodes = await this._resolveCustomSourcesCli(options.customSource);
|
|
||||||
for (const code of customCodes) {
|
|
||||||
if (!selectedModules.includes(code)) selectedModules.push(code);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Ensure core is in the modules list
|
// Ensure core is in the modules list
|
||||||
if (!selectedModules.includes('core')) {
|
if (!selectedModules.includes('core')) {
|
||||||
selectedModules.unshift('core');
|
selectedModules.unshift('core');
|
||||||
|
|
@ -840,13 +818,13 @@ class UI {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Prompt user to install modules from custom sources (Git URLs or local paths).
|
* Prompt user to install modules from custom GitHub URLs.
|
||||||
* @param {Set} installedModuleIds - Currently installed module IDs
|
* @param {Set} installedModuleIds - Currently installed module IDs
|
||||||
* @returns {Array} Selected custom module code strings
|
* @returns {Array} Selected custom module code strings
|
||||||
*/
|
*/
|
||||||
async _addCustomUrlModules(installedModuleIds = new Set()) {
|
async _addCustomUrlModules(installedModuleIds = new Set()) {
|
||||||
const addCustom = await prompts.confirm({
|
const addCustom = await prompts.confirm({
|
||||||
message: 'Would you like to install from a custom source (Git URL or local path)?',
|
message: 'Would you like to install from a custom GitHub URL?',
|
||||||
default: false,
|
default: false,
|
||||||
});
|
});
|
||||||
if (!addCustom) return [];
|
if (!addCustom) return [];
|
||||||
|
|
@ -857,158 +835,61 @@ class UI {
|
||||||
|
|
||||||
let addMore = true;
|
let addMore = true;
|
||||||
while (addMore) {
|
while (addMore) {
|
||||||
const sourceInput = await prompts.text({
|
const url = await prompts.text({
|
||||||
message: 'Git URL or local path:',
|
message: 'GitHub repository URL:',
|
||||||
placeholder: 'https://github.com/owner/repo or /path/to/module',
|
placeholder: 'https://github.com/owner/repo',
|
||||||
validate: (input) => {
|
validate: (input) => {
|
||||||
if (!input || input.trim() === '') return 'Source is required';
|
if (!input || input.trim() === '') return 'URL is required';
|
||||||
const result = customMgr.parseSource(input.trim());
|
const result = customMgr.validateGitHubUrl(input.trim());
|
||||||
return result.isValid ? undefined : result.error;
|
return result.isValid ? undefined : result.error;
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const s = await prompts.spinner();
|
const s = await prompts.spinner();
|
||||||
s.start('Resolving source...');
|
s.start('Fetching module info...');
|
||||||
|
|
||||||
let sourceResult;
|
|
||||||
try {
|
try {
|
||||||
sourceResult = await customMgr.resolveSource(sourceInput.trim(), { skipInstall: true, silent: true });
|
const plugins = await customMgr.discoverModules(url.trim());
|
||||||
s.stop(sourceResult.parsed.type === 'local' ? 'Local source resolved' : 'Repository cloned');
|
s.stop('Module info loaded');
|
||||||
} catch (error) {
|
|
||||||
s.error('Failed to resolve source');
|
|
||||||
await prompts.log.error(` ${error.message}`);
|
|
||||||
addMore = await prompts.confirm({ message: 'Try another source?', default: false });
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (sourceResult.parsed.type === 'local') {
|
|
||||||
await prompts.log.info('LOCAL MODULE: Pointing directly at local source (changes take effect on reinstall).');
|
|
||||||
} else {
|
|
||||||
await prompts.log.warn(
|
await prompts.log.warn(
|
||||||
'UNVERIFIED MODULE: This module has not been reviewed by the BMad team.\n' + ' Only install modules from sources you trust.',
|
'UNVERIFIED MODULE: This module has not been reviewed by the BMad team.\n' + ' Only install modules from sources you trust.',
|
||||||
);
|
);
|
||||||
}
|
|
||||||
|
|
||||||
// Resolve plugins based on discovery mode vs direct mode
|
|
||||||
s.start('Analyzing plugin structure...');
|
|
||||||
const allResolved = [];
|
|
||||||
const localPath = sourceResult.parsed.type === 'local' ? sourceResult.rootDir : null;
|
|
||||||
|
|
||||||
if (sourceResult.mode === 'discovery') {
|
|
||||||
// Discovery mode: marketplace.json found, list available plugins
|
|
||||||
let plugins;
|
|
||||||
try {
|
|
||||||
plugins = await customMgr.discoverModules(sourceResult.marketplace, sourceResult.sourceUrl);
|
|
||||||
} catch (discoverError) {
|
|
||||||
s.error('Failed to discover modules');
|
|
||||||
await prompts.log.error(` ${discoverError.message}`);
|
|
||||||
addMore = await prompts.confirm({ message: 'Try another source?', default: false });
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
const effectiveRepoPath = sourceResult.repoPath || sourceResult.rootDir;
|
|
||||||
for (const plugin of plugins) {
|
for (const plugin of plugins) {
|
||||||
|
const versionStr = plugin.version ? ` v${plugin.version}` : '';
|
||||||
|
await prompts.log.info(` ${plugin.name}${versionStr}\n ${plugin.description}\n Author: ${plugin.author}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
const confirmInstall = await prompts.confirm({
|
||||||
|
message: `Install ${plugins.length} plugin${plugins.length === 1 ? '' : 's'} from ${url.trim()}?`,
|
||||||
|
default: false,
|
||||||
|
});
|
||||||
|
|
||||||
|
if (confirmInstall) {
|
||||||
|
// Pre-clone the repo so it's cached for the install pipeline
|
||||||
|
s.start('Cloning repository...');
|
||||||
try {
|
try {
|
||||||
const resolved = await customMgr.resolvePlugin(effectiveRepoPath, plugin.rawPlugin, sourceResult.sourceUrl, localPath);
|
await customMgr.cloneRepo(url.trim());
|
||||||
if (resolved.length > 0) {
|
s.stop('Repository cloned');
|
||||||
allResolved.push(...resolved);
|
} catch (cloneError) {
|
||||||
} else {
|
s.error('Failed to clone repository');
|
||||||
// No skills array or empty - use plugin metadata as-is (legacy)
|
await prompts.log.error(` ${cloneError.message}`);
|
||||||
allResolved.push({
|
addMore = await prompts.confirm({ message: 'Try another URL?', default: false });
|
||||||
code: plugin.code,
|
continue;
|
||||||
name: plugin.displayName || plugin.name,
|
}
|
||||||
version: plugin.version,
|
|
||||||
description: plugin.description,
|
for (const plugin of plugins) {
|
||||||
strategy: 0,
|
selectedModules.push(plugin.code);
|
||||||
pluginName: plugin.name,
|
|
||||||
skillPaths: [],
|
|
||||||
});
|
|
||||||
}
|
|
||||||
} catch (resolveError) {
|
|
||||||
await prompts.log.warn(` Could not resolve ${plugin.name}: ${resolveError.message}`);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} catch (error) {
|
||||||
// Direct mode: no marketplace.json, scan directory for skills and resolve
|
s.error('Failed to load module info');
|
||||||
const directPlugin = {
|
await prompts.log.error(` ${error.message}`);
|
||||||
name: sourceResult.parsed.displayName || path.basename(sourceResult.rootDir),
|
|
||||||
source: '.',
|
|
||||||
skills: [],
|
|
||||||
};
|
|
||||||
|
|
||||||
// Scan for SKILL.md directories to populate skills array
|
|
||||||
try {
|
|
||||||
const entries = await fs.readdir(sourceResult.rootDir, { withFileTypes: true });
|
|
||||||
for (const entry of entries) {
|
|
||||||
if (entry.isDirectory()) {
|
|
||||||
const skillMd = path.join(sourceResult.rootDir, entry.name, 'SKILL.md');
|
|
||||||
if (await fs.pathExists(skillMd)) {
|
|
||||||
directPlugin.skills.push(entry.name);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (scanError) {
|
|
||||||
s.error('Failed to scan directory');
|
|
||||||
await prompts.log.error(` ${scanError.message}`);
|
|
||||||
addMore = await prompts.confirm({ message: 'Try another source?', default: false });
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (directPlugin.skills.length > 0) {
|
|
||||||
try {
|
|
||||||
const resolved = await customMgr.resolvePlugin(sourceResult.rootDir, directPlugin, sourceResult.sourceUrl, localPath);
|
|
||||||
allResolved.push(...resolved);
|
|
||||||
} catch (resolveError) {
|
|
||||||
await prompts.log.warn(` Could not resolve: ${resolveError.message}`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
s.stop(`Found ${allResolved.length} installable module${allResolved.length === 1 ? '' : 's'}`);
|
|
||||||
|
|
||||||
if (allResolved.length === 0) {
|
|
||||||
await prompts.log.warn('No installable modules found in this source.');
|
|
||||||
addMore = await prompts.confirm({ message: 'Try another source?', default: false });
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Build multiselect choices
|
|
||||||
// Already-installed modules are pre-checked (update). New modules are unchecked (opt-in).
|
|
||||||
// Unchecking an installed module means "skip update" - removal is handled elsewhere.
|
|
||||||
const choices = allResolved.map((mod) => {
|
|
||||||
const versionStr = mod.version ? ` v${mod.version}` : '';
|
|
||||||
const skillCount = mod.skillPaths ? mod.skillPaths.length : 0;
|
|
||||||
const skillStr = skillCount > 0 ? ` (${skillCount} skill${skillCount === 1 ? '' : 's'})` : '';
|
|
||||||
const alreadyInstalled = installedModuleIds.has(mod.code);
|
|
||||||
const hint = alreadyInstalled ? 'update' : undefined;
|
|
||||||
|
|
||||||
return {
|
|
||||||
name: `${mod.name}${versionStr}${skillStr}`,
|
|
||||||
value: mod.code,
|
|
||||||
hint,
|
|
||||||
checked: alreadyInstalled,
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
// Show descriptions before the multiselect
|
|
||||||
for (const mod of allResolved) {
|
|
||||||
const versionStr = mod.version ? ` v${mod.version}` : '';
|
|
||||||
await prompts.log.info(` ${mod.name}${versionStr}\n ${mod.description}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
const selected = await prompts.multiselect({
|
|
||||||
message: 'Select modules to install:',
|
|
||||||
choices,
|
|
||||||
required: false,
|
|
||||||
});
|
|
||||||
|
|
||||||
if (selected && selected.length > 0) {
|
|
||||||
for (const code of selected) {
|
|
||||||
selectedModules.push(code);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
addMore = await prompts.confirm({
|
addMore = await prompts.confirm({
|
||||||
message: 'Add another custom source?',
|
message: 'Add another custom module?',
|
||||||
default: false,
|
default: false,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -1020,102 +901,6 @@ class UI {
|
||||||
return selectedModules;
|
return selectedModules;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Resolve custom sources from --custom-source CLI flag (non-interactive).
|
|
||||||
* Auto-selects all discovered modules from each source.
|
|
||||||
* @param {string} sourcesArg - Comma-separated Git URLs or local paths
|
|
||||||
* @returns {Array} Module codes from all resolved sources
|
|
||||||
*/
|
|
||||||
async _resolveCustomSourcesCli(sourcesArg) {
|
|
||||||
const { CustomModuleManager } = require('./modules/custom-module-manager');
|
|
||||||
const customMgr = new CustomModuleManager();
|
|
||||||
const allCodes = [];
|
|
||||||
|
|
||||||
const sources = sourcesArg
|
|
||||||
.split(',')
|
|
||||||
.map((s) => s.trim())
|
|
||||||
.filter(Boolean);
|
|
||||||
|
|
||||||
for (const source of sources) {
|
|
||||||
const s = await prompts.spinner();
|
|
||||||
s.start(`Resolving ${source}...`);
|
|
||||||
|
|
||||||
let sourceResult;
|
|
||||||
try {
|
|
||||||
sourceResult = await customMgr.resolveSource(source, { skipInstall: true, silent: true });
|
|
||||||
s.stop(sourceResult.parsed.type === 'local' ? 'Local source resolved' : 'Repository cloned');
|
|
||||||
} catch (error) {
|
|
||||||
s.error(`Failed to resolve ${source}`);
|
|
||||||
await prompts.log.error(` ${error.message}`);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
const s2 = await prompts.spinner();
|
|
||||||
s2.start('Analyzing plugin structure...');
|
|
||||||
const allResolved = [];
|
|
||||||
const localPath = sourceResult.parsed.type === 'local' ? sourceResult.rootDir : null;
|
|
||||||
|
|
||||||
if (sourceResult.mode === 'discovery') {
|
|
||||||
try {
|
|
||||||
const plugins = await customMgr.discoverModules(sourceResult.marketplace, sourceResult.sourceUrl);
|
|
||||||
const effectiveRepoPath = sourceResult.repoPath || sourceResult.rootDir;
|
|
||||||
for (const plugin of plugins) {
|
|
||||||
try {
|
|
||||||
const resolved = await customMgr.resolvePlugin(effectiveRepoPath, plugin.rawPlugin, sourceResult.sourceUrl, localPath);
|
|
||||||
if (resolved.length > 0) {
|
|
||||||
allResolved.push(...resolved);
|
|
||||||
}
|
|
||||||
} catch {
|
|
||||||
// Skip unresolvable plugins
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (discoverError) {
|
|
||||||
s2.error('Failed to discover modules');
|
|
||||||
await prompts.log.error(` ${discoverError.message}`);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// Direct mode: scan for SKILL.md directories
|
|
||||||
const directPlugin = {
|
|
||||||
name: sourceResult.parsed.displayName || path.basename(sourceResult.rootDir),
|
|
||||||
source: '.',
|
|
||||||
skills: [],
|
|
||||||
};
|
|
||||||
try {
|
|
||||||
const entries = await fs.readdir(sourceResult.rootDir, { withFileTypes: true });
|
|
||||||
for (const entry of entries) {
|
|
||||||
if (entry.isDirectory()) {
|
|
||||||
const skillMd = path.join(sourceResult.rootDir, entry.name, 'SKILL.md');
|
|
||||||
if (await fs.pathExists(skillMd)) {
|
|
||||||
directPlugin.skills.push(entry.name);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch {
|
|
||||||
// Skip unreadable directories
|
|
||||||
}
|
|
||||||
|
|
||||||
if (directPlugin.skills.length > 0) {
|
|
||||||
try {
|
|
||||||
const resolved = await customMgr.resolvePlugin(sourceResult.rootDir, directPlugin, sourceResult.sourceUrl, localPath);
|
|
||||||
allResolved.push(...resolved);
|
|
||||||
} catch {
|
|
||||||
// Skip unresolvable
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
s2.stop(`Found ${allResolved.length} module${allResolved.length === 1 ? '' : 's'}`);
|
|
||||||
|
|
||||||
for (const mod of allResolved) {
|
|
||||||
allCodes.push(mod.code);
|
|
||||||
const versionStr = mod.version ? ` v${mod.version}` : '';
|
|
||||||
await prompts.log.info(` Custom module: ${mod.name}${versionStr}`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return allCodes;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get default modules for non-interactive mode
|
* Get default modules for non-interactive mode
|
||||||
* @param {Set} installedModuleIds - Already installed module IDs
|
* @param {Set} installedModuleIds - Already installed module IDs
|
||||||
|
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 70 KiB |
Loading…
Reference in New Issue