From 0f852a38ac7c0ac30340b3aedc3aba4505b7c14a Mon Sep 17 00:00:00 2001 From: Davor Racic Date: Sun, 17 May 2026 01:30:25 +0200 Subject: [PATCH 1/4] feat(prompts): add directory prompt with updated Clack runtime (#2387) * chore(deps): update @clack/core and @clack/prompts to latest versions and adjust Node.js engine requirement * feat(prompts): add directory prompt with autocomplete and create-directory support * chore(docs): update Node.js version requirement to 20.12+ across multiple documentation files * fix(prompts): code review fixes --- README.md | 6 +- docs/cs/how-to/install-bmad.md | 2 +- .../cs/how-to/non-interactive-installation.md | 2 +- docs/cs/how-to/upgrade-to-v6.md | 2 +- docs/cs/tutorials/getting-started.md | 2 +- docs/fr/how-to/install-bmad.md | 2 +- .../fr/how-to/non-interactive-installation.md | 2 +- docs/fr/how-to/upgrade-to-v6.md | 2 +- docs/fr/tutorials/getting-started.md | 2 +- docs/how-to/install-bmad.md | 2 +- docs/how-to/install-custom-modules.md | 4 +- docs/how-to/upgrade-to-v6.md | 2 +- docs/tutorials/getting-started.md | 71 +++++---- docs/vi-vn/how-to/install-bmad.md | 2 +- docs/vi-vn/how-to/install-custom-modules.md | 2 +- .../how-to/non-interactive-installation.md | 2 +- docs/vi-vn/how-to/upgrade-to-v6.md | 2 +- docs/vi-vn/tutorials/getting-started.md | 2 +- docs/zh-cn/how-to/install-bmad.md | 2 +- docs/zh-cn/how-to/install-custom-modules.md | 2 +- .../how-to/non-interactive-installation.md | 2 +- docs/zh-cn/how-to/upgrade-to-v6.md | 2 +- docs/zh-cn/tutorials/getting-started.md | 2 +- package-lock.json | 55 +++++-- package.json | 6 +- tools/installer/prompts.js | 149 ++++++++++++++++++ tools/installer/ui.js | 2 +- 27 files changed, 262 insertions(+), 71 deletions(-) diff --git a/README.md b/README.md index ea7ba5254..933adef3b 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Version](https://img.shields.io/npm/v/bmad-method?color=blue&label=version)](https://www.npmjs.com/package/bmad-method) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE) -[![Node.js Version](https://img.shields.io/badge/node-%3E%3D20.0.0-brightgreen)](https://nodejs.org) +[![Node.js Version](https://img.shields.io/badge/node-%3E%3D20.12.0-brightgreen)](https://nodejs.org) [![Python Version](https://img.shields.io/badge/python-%3E%3D3.10-blue?logo=python&logoColor=white)](https://www.python.org) [![uv](https://img.shields.io/badge/uv-package%20manager-blueviolet?logo=uv)](https://docs.astral.sh/uv/) [![Discord](https://img.shields.io/badge/Discord-Join%20Community-7289da?logo=discord&logoColor=white)](https://discord.gg/gk8jAdXWmj) @@ -36,7 +36,7 @@ Traditional AI tools do the thinking for you, producing average results. BMad ag ## Quick Start -**Prerequisites**: [Node.js](https://nodejs.org) v20+ · [Python](https://www.python.org) 3.10+ · [uv](https://docs.astral.sh/uv/) +**Prerequisites**: [Node.js](https://nodejs.org) v20.12+ · [Python](https://www.python.org) 3.10+ · [uv](https://docs.astral.sh/uv/) ```bash npx bmad-method install @@ -82,11 +82,11 @@ BMad Method extends with official modules for specialized domains. Available dur [BMad Method Docs Site](https://docs.bmad-method.org) — Tutorials, guides, concepts, and reference **Quick links:** + - [Getting Started Tutorial](https://docs.bmad-method.org/tutorials/getting-started/) - [Upgrading from Previous Versions](https://docs.bmad-method.org/how-to/upgrade-to-v6/) - [Test Architect Documentation](https://bmad-code-org.github.io/bmad-method-test-architecture-enterprise/) - ## Community - [Discord](https://discord.gg/gk8jAdXWmj) — Get help, share ideas, collaborate diff --git a/docs/cs/how-to/install-bmad.md b/docs/cs/how-to/install-bmad.md index 548b99e13..c36135f2c 100644 --- a/docs/cs/how-to/install-bmad.md +++ b/docs/cs/how-to/install-bmad.md @@ -16,7 +16,7 @@ Pokud chcete použít neinteraktivní instalátor a zadat všechny možnosti na - Aktualizujete stávající instalaci BMad :::note[Předpoklady] -- **Node.js** 20+ (vyžadováno pro instalátor) +- **Node.js** 20.12+ (vyžadováno pro instalátor) - **Git** (doporučeno) - **AI nástroj** (Claude Code, Cursor nebo podobný) ::: diff --git a/docs/cs/how-to/non-interactive-installation.md b/docs/cs/how-to/non-interactive-installation.md index 4d784f923..cf268cce9 100644 --- a/docs/cs/how-to/non-interactive-installation.md +++ b/docs/cs/how-to/non-interactive-installation.md @@ -15,7 +15,7 @@ Použijte příznaky příkazové řádky k neinteraktivní instalaci BMad. To j - Rychlé instalace se známými konfiguracemi :::note[Předpoklady] -Vyžaduje [Node.js](https://nodejs.org) v20+ a `npx` (součástí npm). +Vyžaduje [Node.js](https://nodejs.org) v20.12+ a `npx` (součástí npm). ::: ## Dostupné příznaky diff --git a/docs/cs/how-to/upgrade-to-v6.md b/docs/cs/how-to/upgrade-to-v6.md index babe4c1af..9affe9412 100644 --- a/docs/cs/how-to/upgrade-to-v6.md +++ b/docs/cs/how-to/upgrade-to-v6.md @@ -14,7 +14,7 @@ Použijte instalátor BMad pro upgrade z v4 na v6, který zahrnuje automatickou - Máte existující plánovací artefakty k zachování :::note[Předpoklady] -- Node.js 20+ +- Node.js 20.12+ - Existující instalace BMad v4 ::: diff --git a/docs/cs/tutorials/getting-started.md b/docs/cs/tutorials/getting-started.md index 76a7b113b..4aab934b9 100644 --- a/docs/cs/tutorials/getting-started.md +++ b/docs/cs/tutorials/getting-started.md @@ -14,7 +14,7 @@ Vytvářejte software rychleji pomocí pracovních postupů řízených AI se sp - Efektivně používat agenty a pracovní postupy :::note[Předpoklady] -- **Node.js 20+** — Vyžadováno pro instalátor +- **Node.js 20.12+** — Vyžadováno pro instalátor - **Git** — Doporučeno pro správu verzí - **AI-powered IDE** — Claude Code, Cursor nebo podobné - **Nápad na projekt** — I jednoduchý stačí pro učení diff --git a/docs/fr/how-to/install-bmad.md b/docs/fr/how-to/install-bmad.md index c58f00c23..70c5a6c0d 100644 --- a/docs/fr/how-to/install-bmad.md +++ b/docs/fr/how-to/install-bmad.md @@ -16,7 +16,7 @@ Si vous souhaitez utiliser un installateur non interactif et fournir toutes les - Mettre à jour une installation BMad existante :::note[Prérequis] -- **Node.js** 20+ (requis pour l'installateur) +- **Node.js** 20.12+ (requis pour l'installateur) - **Git** (recommandé) - **Outil d'IA** (Claude Code, Cursor, ou similaire) ::: diff --git a/docs/fr/how-to/non-interactive-installation.md b/docs/fr/how-to/non-interactive-installation.md index 87498285b..328b7e9d4 100644 --- a/docs/fr/how-to/non-interactive-installation.md +++ b/docs/fr/how-to/non-interactive-installation.md @@ -15,7 +15,7 @@ Utilisez les options de ligne de commande pour installer BMad de manière non-in - Installations rapides avec des configurations connues :::note[Prérequis] -Nécessite [Node.js](https://nodejs.org) v20+ et `npx` (inclus avec npm). +Nécessite [Node.js](https://nodejs.org) v20.12+ et `npx` (inclus avec npm). ::: ## Options disponibles diff --git a/docs/fr/how-to/upgrade-to-v6.md b/docs/fr/how-to/upgrade-to-v6.md index bd600cbcb..ba19211a1 100644 --- a/docs/fr/how-to/upgrade-to-v6.md +++ b/docs/fr/how-to/upgrade-to-v6.md @@ -14,7 +14,7 @@ Utilisez l'installateur BMad pour passer de la v4 à la v6, qui inclut une déte - Vous avez des artefacts de planification existants à préserver :::note[Prérequis] -- Node.js 20+ +- Node.js 20.12+ - Installation BMad v4 existante ::: diff --git a/docs/fr/tutorials/getting-started.md b/docs/fr/tutorials/getting-started.md index 8d729debf..8d98a5cb6 100644 --- a/docs/fr/tutorials/getting-started.md +++ b/docs/fr/tutorials/getting-started.md @@ -14,7 +14,7 @@ Construisez des logiciels plus rapidement en utilisant des workflows propulsés - Utiliser efficacement les agents et les workflows :::note[Prérequis] -- **Node.js 20+** — Requis pour l'installateur +- **Node.js 20.12+** — Requis pour l'installateur - **Git** — Recommandé pour le contrôle de version - **IDE IA** — Claude Code, Cursor, ou similaire - **Une idée de projet** — Même simple, elle fonctionne pour apprendre diff --git a/docs/how-to/install-bmad.md b/docs/how-to/install-bmad.md index 224704a47..e96b53aa1 100644 --- a/docs/how-to/install-bmad.md +++ b/docs/how-to/install-bmad.md @@ -16,7 +16,7 @@ Use `npx bmad-method install` to set up BMad in your project. One command handle :::note[Prerequisites] -- **Node.js** 20+ (the installer requires it) +- **Node.js** 20.12+ (the installer requires it) - **Git** (for cloning external modules) - **An AI tool** such as Claude Code or Cursor (run `npx bmad-method install --list-tools` to see all supported tools) diff --git a/docs/how-to/install-custom-modules.md b/docs/how-to/install-custom-modules.md index c4a38d41d..aabbf7867 100644 --- a/docs/how-to/install-custom-modules.md +++ b/docs/how-to/install-custom-modules.md @@ -15,7 +15,7 @@ Use the BMad installer to add modules from the community registry, third-party G - 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. +Requires [Node.js](https://nodejs.org) v20.12+ and `npx` (included with npm). Custom and community modules can be selected during a fresh install or added to an existing installation. ::: ## Community Modules @@ -68,7 +68,7 @@ Select **Yes**, then provide a source: | Input Type | Example | | --------------------- | ------------------------------------------------- | | HTTPS URL (any host) | `https://github.com/org/repo` | -| HTTP URL (any host) | `http://host/org/repo` | +| HTTP URL (any host) | `http://host/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` | diff --git a/docs/how-to/upgrade-to-v6.md b/docs/how-to/upgrade-to-v6.md index 567dbe93c..96febd355 100644 --- a/docs/how-to/upgrade-to-v6.md +++ b/docs/how-to/upgrade-to-v6.md @@ -15,7 +15,7 @@ Use the BMad installer to upgrade from v4 to v6, which includes automatic detect :::note[Prerequisites] -- Node.js 20+ +- Node.js 20.12+ - Existing BMad v4 installation ::: diff --git a/docs/tutorials/getting-started.md b/docs/tutorials/getting-started.md index b6b5c6fca..3806d28a6 100644 --- a/docs/tutorials/getting-started.md +++ b/docs/tutorials/getting-started.md @@ -1,5 +1,5 @@ --- -title: "Getting Started" +title: 'Getting Started' description: Install BMad and build your first project --- @@ -14,11 +14,12 @@ Build software faster using AI-powered workflows with specialized agents that gu - Use agents and workflows effectively :::note[Prerequisites] -- **Node.js 20+** — Required for the installer + +- **Node.js 20.12+** — Required for the installer - **Git** — Recommended for version control - **AI-powered IDE** — Claude Code, Cursor, or similar - **A project idea** — Even a simple one works for learning -::: + ::: :::tip[The Easiest Path] **Install** → `npx bmad-method install` @@ -50,6 +51,7 @@ bmad-help I have an idea for a SaaS product, I already know all the features I w ``` BMad-Help will respond with: + - What's recommended for your situation - What the first required task is - What the rest of the process looks like @@ -66,12 +68,12 @@ After installing BMad, invoke the `bmad-help` skill immediately. It will detect BMad helps you build software through guided workflows with specialized AI agents. The process follows four phases: -| Phase | Name | What Happens | -| ----- | -------------- | --------------------------------------------------- | -| 1 | Analysis | Brainstorming, research, product brief or PRFAQ *(optional)* | -| 2 | Planning | Create requirements (PRD or spec) | -| 3 | Solutioning | Design architecture *(BMad Method/Enterprise only)* | -| 4 | Implementation | Build epic by epic, story by story | +| Phase | Name | What Happens | +| ----- | -------------- | ------------------------------------------------------------ | +| 1 | Analysis | Brainstorming, research, product brief or PRFAQ _(optional)_ | +| 2 | Planning | Create requirements (PRD or spec) | +| 3 | Solutioning | Design architecture _(BMad Method/Enterprise only)_ | +| 4 | Implementation | Build epic by epic, story by story | **[Open the Workflow Map](../reference/workflow-map.md)** to explore phases, workflows, and context management. @@ -100,6 +102,7 @@ If you want the newest prerelease build instead of the default release channel, When prompted to select modules, choose **BMad Method**. The installer creates two folders: + - `_bmad/` — agents, workflows, tasks, and configuration - `_bmad-output/` — empty for now, but this is where your artifacts will be saved @@ -134,6 +137,7 @@ Create it manually at `_bmad-output/project-context.md` or generate it after arc ### Phase 1: Analysis (Optional) All workflows in this phase are optional. [**Not sure which to use?**](../explanation/analysis-phase.md) + - **brainstorming** (`bmad-brainstorming`) — Guided ideation - **research** (`bmad-market-research` / `bmad-domain-research` / `bmad-technical-research`) — Market, domain, and technical research - **product-brief** (`bmad-product-brief`) — Recommended foundation document when your concept is clear @@ -142,16 +146,19 @@ All workflows in this phase are optional. [**Not sure which to use?**](../explan ### Phase 2: Planning (Required) **For BMad Method and Enterprise tracks:** + 1. Run `bmad-prd` in a new chat — state your intent (Create / Update / Validate) or let the skill ask 2. Output: `prd.md`, `addendum.md`, `decision-log.md` :::note[`bmad-prd` intents] + - **Create** — coached discovery from scratch; the skill names the workspace folder and guides you to a PRD you're proud of - **Update** — point it at an existing PRD and a change signal; it surfaces conflicts before applying changes - **Validate** — critique a finished PRD against a checklist and produce an HTML findings report -::: + ::: **For Quick Flow track:** + - Run `bmad-quick-dev` — it handles planning and implementation in a single workflow, skip to implementation :::note[UX Design (Optional)] @@ -161,6 +168,7 @@ If your project has a user interface, invoke the **UX-Designer agent** (`bmad-ag ### Phase 3: Solutioning (BMad Method/Enterprise) **Create Architecture** + 1. Invoke the **Architect agent** (`bmad-agent-architect`) in a new chat 2. Run `bmad-create-architecture` (`bmad-create-architecture`) 3. Output: Architecture document with technical decisions @@ -168,14 +176,15 @@ If your project has a user interface, invoke the **UX-Designer agent** (`bmad-ag **Create Epics and Stories** :::tip[V6 Improvement] -Epics and stories are now created *after* architecture. This produces better quality stories because architecture decisions (database, API patterns, tech stack) directly affect how work should be broken down. +Epics and stories are now created _after_ architecture. This produces better quality stories because architecture decisions (database, API patterns, tech stack) directly affect how work should be broken down. ::: 1. Invoke the **PM agent** (`bmad-agent-pm`) in a new chat 2. Run `bmad-create-epics-and-stories` (`bmad-create-epics-and-stories`) 3. The workflow uses both PRD and Architecture to create technically-informed stories -**Implementation Readiness Check** *(Highly Recommended)* +**Implementation Readiness Check** _(Highly Recommended)_ + 1. Invoke the **Architect agent** (`bmad-agent-architect`) in a new chat 2. Run `bmad-check-implementation-readiness` (`bmad-check-implementation-readiness`) 3. Validates cohesion across all planning documents @@ -192,11 +201,11 @@ Invoke the **Developer agent** (`bmad-agent-dev`) and run `bmad-sprint-planning` For each story, repeat this cycle with fresh chats: -| Step | Agent | Workflow | Command | Purpose | -| ---- | ----- | -------------- | -------------------------- | ---------------------------------- | -| 1 | DEV | `bmad-create-story` | `bmad-create-story` | Create story file from epic | -| 2 | DEV | `bmad-dev-story` | `bmad-dev-story` | Implement the story | -| 3 | DEV | `bmad-code-review` | `bmad-code-review` | Quality validation *(recommended)* | +| Step | Agent | Workflow | Command | Purpose | +| ---- | ----- | ------------------- | ------------------- | ---------------------------------- | +| 1 | DEV | `bmad-create-story` | `bmad-create-story` | Create story file from epic | +| 2 | DEV | `bmad-dev-story` | `bmad-dev-story` | Implement the story | +| 3 | DEV | `bmad-code-review` | `bmad-code-review` | Quality validation _(recommended)_ | After completing all stories in an epic, invoke the **Developer agent** (`bmad-agent-dev`) and run `bmad-retrospective` (`bmad-retrospective`). @@ -227,18 +236,18 @@ your-project/ ## Quick Reference -| Workflow | Command | Agent | Purpose | -| ------------------------------------- | ------------------------------------------ | --------- | ----------------------------------------------- | -| **`bmad-help`** ⭐ | `bmad-help` | Any | **Your intelligent guide — ask anything!** | -| `bmad-prd` | `bmad-prd` | Any | Create, update, or validate a PRD | -| `bmad-create-architecture` | `bmad-create-architecture` | Architect | Create architecture document | -| `bmad-generate-project-context` | `bmad-generate-project-context` | Analyst | Create project context file | -| `bmad-create-epics-and-stories` | `bmad-create-epics-and-stories` | PM | Break down PRD into epics | -| `bmad-check-implementation-readiness` | `bmad-check-implementation-readiness` | Architect | Validate planning cohesion | -| `bmad-sprint-planning` | `bmad-sprint-planning` | DEV | Initialize sprint tracking | -| `bmad-create-story` | `bmad-create-story` | DEV | Create a story file | -| `bmad-dev-story` | `bmad-dev-story` | DEV | Implement a story | -| `bmad-code-review` | `bmad-code-review` | DEV | Review implemented code | +| Workflow | Command | Agent | Purpose | +| ------------------------------------- | ------------------------------------- | --------- | ------------------------------------------ | +| **`bmad-help`** ⭐ | `bmad-help` | Any | **Your intelligent guide — ask anything!** | +| `bmad-prd` | `bmad-prd` | Any | Create, update, or validate a PRD | +| `bmad-create-architecture` | `bmad-create-architecture` | Architect | Create architecture document | +| `bmad-generate-project-context` | `bmad-generate-project-context` | Analyst | Create project context file | +| `bmad-create-epics-and-stories` | `bmad-create-epics-and-stories` | PM | Break down PRD into epics | +| `bmad-check-implementation-readiness` | `bmad-check-implementation-readiness` | Architect | Validate planning cohesion | +| `bmad-sprint-planning` | `bmad-sprint-planning` | DEV | Initialize sprint tracking | +| `bmad-create-story` | `bmad-create-story` | DEV | Create a story file | +| `bmad-dev-story` | `bmad-dev-story` | DEV | Implement a story | +| `bmad-code-review` | `bmad-code-review` | DEV | Review implemented code | ## Common Questions @@ -258,6 +267,7 @@ Not strictly. Once you learn the flow, you can run workflows directly using the :::tip[First Stop: BMad-Help] **Invoke `bmad-help` anytime** — it's the fastest way to get unstuck. Ask it anything: + - "What should I do after installing?" - "I'm stuck on workflow X" - "What are my options for Y?" @@ -272,10 +282,11 @@ BMad-Help inspects your project, detects what you've completed, and tells you ex ## Key Takeaways :::tip[Remember These] + - **Start with `bmad-help`** — Your intelligent guide that knows your project and options - **Always use fresh chats** — Start a new chat for each workflow - **Track matters** — Quick Flow uses `bmad-quick-dev`; Method/Enterprise need PRD and architecture - **BMad-Help runs automatically** — Every workflow ends with guidance on what's next -::: + ::: Ready to start? Install BMad, invoke `bmad-help`, and let your intelligent guide lead the way. diff --git a/docs/vi-vn/how-to/install-bmad.md b/docs/vi-vn/how-to/install-bmad.md index c73e89388..4f3248ac9 100644 --- a/docs/vi-vn/how-to/install-bmad.md +++ b/docs/vi-vn/how-to/install-bmad.md @@ -16,7 +16,7 @@ Nếu bạn muốn dùng trình cài đặt không tương tác và cung cấp t - Cập nhật bản cài đặt BMad hiện tại :::note[Điều kiện tiên quyết] -- **Node.js** 20+ (bắt buộc cho trình cài đặt) +- **Node.js** 20.12+ (bắt buộc cho trình cài đặt) - **Git** (khuyến nghị) - **Công cụ AI** (Claude Code, Cursor, hoặc tương tự) ::: diff --git a/docs/vi-vn/how-to/install-custom-modules.md b/docs/vi-vn/how-to/install-custom-modules.md index 0b4064f1c..165348194 100644 --- a/docs/vi-vn/how-to/install-custom-modules.md +++ b/docs/vi-vn/how-to/install-custom-modules.md @@ -15,7 +15,7 @@ Sử dụng trình cài đặt BMad để thêm module từ kho cộng đồng ( - Cài module từ máy chủ Git riêng tư hoặc tự host :::note[Điều kiện tiên quyết] -Yêu cầu [Node.js](https://nodejs.org) v20+ và `npx` đi kèm npm. Bạn có thể chọn module tùy chỉnh và module cộng đồng trong lúc cài mới, hoặc thêm chúng vào một bản cài hiện có. +Yêu cầu [Node.js](https://nodejs.org) v20.12+ và `npx` đi kèm npm. Bạn có thể chọn module tùy chỉnh và module cộng đồng trong lúc cài mới, hoặc thêm chúng vào một bản cài hiện có. ::: ## Module cộng đồng diff --git a/docs/vi-vn/how-to/non-interactive-installation.md b/docs/vi-vn/how-to/non-interactive-installation.md index 1f8856377..237ed39d9 100644 --- a/docs/vi-vn/how-to/non-interactive-installation.md +++ b/docs/vi-vn/how-to/non-interactive-installation.md @@ -15,7 +15,7 @@ Sử dụng các cờ dòng lệnh để cài đặt BMad mà không cần tươ - Cài đặt nhanh với cấu hình đã biết trước :::note[Điều kiện tiên quyết] -Yêu cầu [Node.js](https://nodejs.org) v20+ và `npx` (đi kèm với npm). +Yêu cầu [Node.js](https://nodejs.org) v20.12+ và `npx` (đi kèm với npm). ::: ## Các cờ khả dụng diff --git a/docs/vi-vn/how-to/upgrade-to-v6.md b/docs/vi-vn/how-to/upgrade-to-v6.md index bab3fe5a2..d72e71911 100644 --- a/docs/vi-vn/how-to/upgrade-to-v6.md +++ b/docs/vi-vn/how-to/upgrade-to-v6.md @@ -14,7 +14,7 @@ Sử dụng trình cài đặt BMad để nâng cấp từ v4 lên v6, bao gồm - Bạn có các planning artifact hiện có cần giữ lại :::note[Điều kiện tiên quyết] -- Node.js 20+ +- Node.js 20.12+ - Bản cài đặt BMad v4 hiện có ::: diff --git a/docs/vi-vn/tutorials/getting-started.md b/docs/vi-vn/tutorials/getting-started.md index cfd06a5d5..6a33a6e0a 100644 --- a/docs/vi-vn/tutorials/getting-started.md +++ b/docs/vi-vn/tutorials/getting-started.md @@ -14,7 +14,7 @@ Xây dựng phần mềm nhanh hơn bằng các workflow vận hành bởi AI, v - Sử dụng agent và workflow hiệu quả :::note[Điều kiện tiên quyết] -- **Node.js 20+** — Bắt buộc cho trình cài đặt +- **Node.js 20.12+** — Bắt buộc cho trình cài đặt - **Git** — Khuyến nghị để quản lý phiên bản - **IDE có AI** — Claude Code, Cursor hoặc công cụ tương tự - **Một ý tưởng dự án** — Chỉ cần đơn giản cũng đủ để học diff --git a/docs/zh-cn/how-to/install-bmad.md b/docs/zh-cn/how-to/install-bmad.md index 3c5ceff44..f179fb8a5 100644 --- a/docs/zh-cn/how-to/install-bmad.md +++ b/docs/zh-cn/how-to/install-bmad.md @@ -16,7 +16,7 @@ sidebar: - 更新现有的 BMad 安装 :::note[前置条件] -- **Node.js** 20+(安装程序必需) +- **Node.js** 20.12+(安装程序必需) - **Git**(推荐) - **AI 工具**(Claude Code、Cursor 或类似工具) ::: diff --git a/docs/zh-cn/how-to/install-custom-modules.md b/docs/zh-cn/how-to/install-custom-modules.md index 00193a3ed..4cd7f719b 100644 --- a/docs/zh-cn/how-to/install-custom-modules.md +++ b/docs/zh-cn/how-to/install-custom-modules.md @@ -15,7 +15,7 @@ sidebar: - 从私有或自托管 Git 服务器安装模块 :::note[前置条件] -需要 [Node.js](https://nodejs.org) v20+ 和 `npx`(npm 自带)。自定义和社区模块可以在全新安装时选择,也可以添加到现有安装中。 +需要 [Node.js](https://nodejs.org) v20.12+ 和 `npx`(npm 自带)。自定义和社区模块可以在全新安装时选择,也可以添加到现有安装中。 ::: ## 社区模块 diff --git a/docs/zh-cn/how-to/non-interactive-installation.md b/docs/zh-cn/how-to/non-interactive-installation.md index 788c18d52..024bf7613 100644 --- a/docs/zh-cn/how-to/non-interactive-installation.md +++ b/docs/zh-cn/how-to/non-interactive-installation.md @@ -15,7 +15,7 @@ sidebar: - 使用已知配置的快速安装 :::note[前置条件] -需要 [Node.js](https://nodejs.org) v20+ 和 `npx`(随 npm 附带)。 +需要 [Node.js](https://nodejs.org) v20.12+ 和 `npx`(随 npm 附带)。 ::: ## 可用参数(Flags) diff --git a/docs/zh-cn/how-to/upgrade-to-v6.md b/docs/zh-cn/how-to/upgrade-to-v6.md index 8a3ed4a46..4b9565c78 100644 --- a/docs/zh-cn/how-to/upgrade-to-v6.md +++ b/docs/zh-cn/how-to/upgrade-to-v6.md @@ -14,7 +14,7 @@ sidebar: - 你有要保留的规划产物或进行中的开发工作 :::note[前置条件] -- Node.js 20+ +- Node.js 20.12+ - 现有 BMad v4 安装 ::: diff --git a/docs/zh-cn/tutorials/getting-started.md b/docs/zh-cn/tutorials/getting-started.md index aa1e5b610..2b37408cf 100644 --- a/docs/zh-cn/tutorials/getting-started.md +++ b/docs/zh-cn/tutorials/getting-started.md @@ -14,7 +14,7 @@ description: 安装 BMad 并构建你的第一个项目 - 有效使用智能体和工作流 :::note[前置条件] -- **Node.js 20+** — 安装程序必需 +- **Node.js 20.12+** — 安装程序必需 - **Git** — 推荐用于版本控制 - **AI 驱动的 IDE** — Claude Code、Cursor 或类似工具 - **一个项目想法** — 即使是简单的想法也可以用于学习 diff --git a/package-lock.json b/package-lock.json index 1e8eaaad6..9ae8c111b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,8 +9,8 @@ "version": "6.6.0", "license": "MIT", "dependencies": { - "@clack/core": "^1.0.0", - "@clack/prompts": "^1.0.0", + "@clack/core": "^1.3.1", + "@clack/prompts": "^1.4.0", "@kayvan/markdown-tree-parser": "^1.6.1", "chalk": "^4.1.2", "commander": "^14.0.0", @@ -50,7 +50,7 @@ "yaml-lint": "^1.7.0" }, "engines": { - "node": ">=20.0.0" + "node": ">=20.12.0" } }, "node_modules/@astrojs/compiler": { @@ -752,24 +752,31 @@ } }, "node_modules/@clack/core": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@clack/core/-/core-1.0.0.tgz", - "integrity": "sha512-Orf9Ltr5NeiEuVJS8Rk2XTw3IxNC2Bic3ash7GgYeA8LJ/zmSNpSQ/m5UAhe03lA6KFgklzZ5KTHs4OAMA/SAQ==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@clack/core/-/core-1.3.1.tgz", + "integrity": "sha512-fT1qHVGAag4IEkrupZ6lRRbNCs1vS9P01KB/sG8zKgvUztbYtFBtQpjSITNwooDZ83tpsPzP0mRNs1/KVszCRA==", "license": "MIT", "dependencies": { - "picocolors": "^1.0.0", + "fast-wrap-ansi": "^0.2.0", "sisteransi": "^1.0.5" + }, + "engines": { + "node": ">= 20.12.0" } }, "node_modules/@clack/prompts": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@clack/prompts/-/prompts-1.0.0.tgz", - "integrity": "sha512-rWPXg9UaCFqErJVQ+MecOaWsozjaxol4yjnmYcGNipAWzdaWa2x+VJmKfGq7L0APwBohQOYdHC+9RO4qRXej+A==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@clack/prompts/-/prompts-1.4.0.tgz", + "integrity": "sha512-S0My7XPGIgpRWMDG8uRqalbgT+a6FmCUdOW+HaIOVVpUPHOb7RrpvjTjiODadKp06fsrVDJZlIzc6yCTp4AnxA==", "license": "MIT", "dependencies": { - "@clack/core": "1.0.0", - "picocolors": "^1.0.0", + "@clack/core": "1.3.1", + "fast-string-width": "^3.0.2", + "fast-wrap-ansi": "^0.2.0", "sisteransi": "^1.0.5" + }, + "engines": { + "node": ">= 20.12.0" } }, "node_modules/@ctrl/tinycolor": { @@ -7332,6 +7339,30 @@ "dev": true, "license": "MIT" }, + "node_modules/fast-string-truncated-width": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/fast-string-truncated-width/-/fast-string-truncated-width-3.0.3.tgz", + "integrity": "sha512-0jjjIEL6+0jag3l2XWWizO64/aZVtpiGE3t0Zgqxv0DPuxiMjvB3M24fCyhZUO4KomJQPj3LTSUnDP3GpdwC0g==", + "license": "MIT" + }, + "node_modules/fast-string-width": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/fast-string-width/-/fast-string-width-3.0.2.tgz", + "integrity": "sha512-gX8LrtNEI5hq8DVUfRQMbr5lpaS4nMIWV+7XEbXk2b8kiQIizgnlr12B4dA3ZEx3308ze0O4Q1R+cHts8kyUJg==", + "license": "MIT", + "dependencies": { + "fast-string-truncated-width": "^3.0.2" + } + }, + "node_modules/fast-wrap-ansi": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/fast-wrap-ansi/-/fast-wrap-ansi-0.2.0.tgz", + "integrity": "sha512-rLV8JHxTyhVmFYhBJuMujcrHqOT2cnO5Zxj37qROj23CP39GXubJRBUFF0z8KFK77Uc0SukZUf7JZhsVEQ6n8w==", + "license": "MIT", + "dependencies": { + "fast-string-width": "^3.0.2" + } + }, "node_modules/fastq": { "version": "1.20.1", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.20.1.tgz", diff --git a/package.json b/package.json index b52bf2970..0f37ff5be 100644 --- a/package.json +++ b/package.json @@ -66,8 +66,8 @@ ] }, "dependencies": { - "@clack/core": "^1.0.0", - "@clack/prompts": "^1.0.0", + "@clack/core": "^1.3.1", + "@clack/prompts": "^1.4.0", "@kayvan/markdown-tree-parser": "^1.6.1", "chalk": "^4.1.2", "commander": "^14.0.0", @@ -103,7 +103,7 @@ "yaml-lint": "^1.7.0" }, "engines": { - "node": ">=20.0.0" + "node": ">=20.12.0" }, "publishConfig": { "access": "public" diff --git a/tools/installer/prompts.js b/tools/installer/prompts.js index 4f46e69b1..1fbaded52 100644 --- a/tools/installer/prompts.js +++ b/tools/installer/prompts.js @@ -10,6 +10,9 @@ let _clack = null; let _clackCore = null; let _picocolors = null; +const fs = require('node:fs'); +const os = require('node:os'); +const path = require('node:path'); /** * Lazy-load @clack/prompts (ESM module) @@ -575,6 +578,151 @@ async function autocomplete(options) { return result; } +function hasPathSeparator(value) { + return value.endsWith('/') || value.endsWith('\\'); +} + +function expandHome(input) { + if (!input) return input; + if (input === '~') return os.homedir(); + if (input.startsWith('~/') || input.startsWith('~\\')) { + return path.join(os.homedir(), input.slice(2)); + } + return input; +} + +function toDirectoryOption(value, label = value, synthetic = false) { + return { value, label, synthetic }; +} + +function isExistingDirectory(value) { + try { + return fs.existsSync(value) && fs.statSync(value).isDirectory(); + } catch { + return false; + } +} + +function listDirectoryOptions(input, options) { + const cwd = options.cwd || process.cwd(); + const rawInput = input.trim(); + const expandedInput = expandHome(rawInput); + const trailingSep = hasPathSeparator(rawInput) || hasPathSeparator(expandedInput); + const resolvedInput = expandedInput ? path.resolve(cwd, expandedInput) : cwd; + const browseDir = expandedInput && !trailingSep && !isExistingDirectory(resolvedInput) ? path.dirname(resolvedInput) : resolvedInput; + const prefix = expandedInput && browseDir !== resolvedInput ? path.basename(resolvedInput).toLowerCase() : ''; + const results = []; + + if (!trailingSep && isExistingDirectory(resolvedInput)) { + results.push(toDirectoryOption(resolvedInput, `. (use this directory)`)); + } + + if (isExistingDirectory(browseDir)) { + try { + for (const entry of fs.readdirSync(browseDir, { withFileTypes: true })) { + if (!entry.isDirectory()) continue; + if (prefix && !entry.name.toLowerCase().startsWith(prefix)) continue; + const fullPath = path.join(browseDir, entry.name); + if (!results.some((option) => option.value === fullPath)) { + results.push(toDirectoryOption(fullPath)); + } + } + } catch { + // Skip unreadable directories; validation still reports path issues. + } + } + + const validation = options.validate?.(rawInput); + const hasMatchingOption = results.some((option) => option.value === resolvedInput); + if (expandedInput && !validation && !hasMatchingOption) { + results.unshift(toDirectoryOption(resolvedInput, `Create/use: ${resolvedInput}`, true)); + } + + return results; +} + +/** + * Directory prompt with autocomplete candidates and create-directory support. + * Uses @clack/core directly so typed paths that do not exist yet can still be + * submitted when validation allows creating them. + * @param {Object} options - Prompt options + * @param {string} options.message - Prompt message + * @param {string} [options.default] - Default directory + * @param {string} [options.placeholder] - Placeholder text + * @param {Function} [options.validate] - Sync validation function + * @returns {Promise} Selected or typed directory path + */ +async function directory(options) { + const core = await getClackCore(); + const color = await getPicocolors(); + const tabCompletion = { + prefix: '', + index: -1, + options: [], + lastValue: '', + }; + + let prompt; + prompt = new core.AutocompletePrompt({ + initialValue: options.default, + options: () => listDirectoryOptions(prompt?.userInput || '', options), + filter: () => true, + validate: (value) => options.validate?.(value ?? prompt.userInput), + render() { + const title = `${color.gray('◆')} ${options.message}`; + const bar = color.gray('│'); + const barEnd = color.gray('└'); + const userInput = this.userInput; + const placeholder = options.placeholder || options.default; + const inputDisplay = userInput ? this.userInputWithCursor : `${color.inverse(color.hidden('_'))}${color.dim(placeholder || '')}`; + const errorLine = this.state === 'error' ? [`${color.yellow('│')} ${color.yellow(this.error)}`] : []; + + switch (this.state) { + case 'submit': { + return `${color.gray('◇')} ${options.message}\n${bar} ${color.dim(this.value || '')}`; + } + case 'cancel': { + return `${color.gray('◇')} ${options.message}\n${bar} ${color.strikethrough(color.dim(userInput || ''))}`; + } + default: { + return [title, `${bar} ${inputDisplay}`, ...errorLine, barEnd].join('\n'); + } + } + }, + }); + + const hasSetUserInput = typeof prompt._setUserInput === 'function'; + const hasClearUserInput = typeof prompt._clearUserInput === 'function'; + + prompt.on('key', (_, key) => { + if (key?.name !== 'tab') return; + if (!hasSetUserInput) return; // @clack/core API surface changed — skip Tab silently. + const currentInput = prompt.userInput; + const isContinuingCycle = tabCompletion.lastValue && currentInput === tabCompletion.lastValue; + const completionOptions = isContinuingCycle ? tabCompletion.options : prompt.filteredOptions.filter((option) => !option.synthetic); + if (completionOptions.length === 0) return; + + if (isContinuingCycle) { + tabCompletion.index = (tabCompletion.index + 1) % completionOptions.length; + } else { + tabCompletion.prefix = currentInput; + tabCompletion.options = completionOptions; + tabCompletion.index = 0; + } + + const focusedOption = completionOptions[tabCompletion.index]; + if (!focusedOption) return; + const completedValue = focusedOption.value; + tabCompletion.lastValue = completedValue; + if (hasClearUserInput) prompt._clearUserInput(); + prompt._setUserInput(completedValue, true); + }); + + const result = await prompt.prompt(); + await handleCancel(result); + return result; +} + /** * Get the color utility (picocolors instance from @clack/prompts) * @returns {Promise} The color utility (picocolors) @@ -694,6 +842,7 @@ module.exports = { multiselect, autocompleteMultiselect, autocomplete, + directory, confirm, text, password, diff --git a/tools/installer/ui.js b/tools/installer/ui.js index 5770206ef..0e67d201d 100644 --- a/tools/installer/ui.js +++ b/tools/installer/ui.js @@ -1436,7 +1436,7 @@ class UI { */ async promptForDirectory() { // Use sync validation because @clack/prompts doesn't support async validate - const directory = await prompts.text({ + const directory = await prompts.directory({ message: 'Installation directory:', default: process.cwd(), placeholder: process.cwd(), From 71136bc6af77cbf507d3768494311d5b6ca95cc5 Mon Sep 17 00:00:00 2001 From: Brian Date: Sat, 16 May 2026 19:16:45 -0500 Subject: [PATCH 2/4] feat(bmad-prd): overhaul facilitation, discipline, and validation (#2385) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(bmad-prd): voice rules, probing reference, and operational hardening - Session Posture section (voice prohibitions, record-as-you-go, anti-caving, register-matching) - New references/probing.md: seven probing categories, six critical assumptions, PRD/solution-design boundary - Intent detection signals (create/update/validate) on activation step 6 - Update intent: inline conflict-detection procedure against decision-log.md - Activation step 1 falls back to customize.toml instead of halting on resolver failure - Restructure Discovery into five sub-sections (Posture, Brain dump, Four-dimension read, Right-skill check, Working mode) - Regroup PRD Discipline into three clusters (Artifact shape, Substance, Honesty about scope) - Define phase-blockers in Finalize step 4 - Em-dash strip in prose; preserve [v2 — out of MVP] callout convention - Move bmad-party-mode / bmad-advanced-elicitation mention into the greeting step * feat(bmad-prd): funnel discipline, UJ depth, and UX reframing Template discipline for downstream AI extraction: - §3 Glossary: exact-use enforcement (FRs, UJs, SMs use Glossary terms verbatim) - §4 Features: FRs now use "#### FR-N: Name" heading with Realizes UJ-X cross-reference, testable consequences, and optional per-FR Out of Scope - §7 Success Metrics: SM-N / SM-CN numbering with Validates FR-X cross-reference User journeys: - §2.4 UJ format expanded from one-liner to named-persona mini-flow (persona, 3-5 steps, edge cases, optional capability surfacing); hobby can collapse to one-liners - Strip "job of UX" / "not this PRD" gatekeeping from template; depth is the team's call - Strengthen UX-as-input / UX-as-output patterns for bidirectional PRD <-> UX flow - SKILL.md Discovery Posture: push for two to three named-persona UJs in non-trivial scope Validation checklist: - Q-3 Traceability tightened to require Realizes UJ-X on FRs and Validates FR-X on SMs - Q-7 (new): FR testability — every FR has at least one testable consequence - S-1 Glossary integrity: now covers FR descriptions, consequences, UJ flows, SM definitions - S-2: SM added to ID continuity scope - S-5 (new): UJ persona linkage — every UJ names a persona by exact §2 label - STK-2 (new): UJ density gate — non-hobby scope needs at least two UJs * docs(bmad-prd): anonymize validation-findings JSON example Replace project-specific values (Plantsona prd_name, frozen timestamp, §16 location, premium-conversion finding) with generic placeholder content. Swap the example finding to demonstrate Q-7 FR testability so it doubles as a primer on the new checklist item. * feat(bmad-prd): reviewer pass redesign and consolidate facilitation - finalize_reviewers TOML field replaces inline review lenses; entries follow the skill:/file:/plain-text prefix convention, resolved on-demand so reviewer data has zero context cost on runs that skip the pass. - Subagent contract: reviewers write to {doc_workspace}/review-{slug}.md and return summary-only (verdict, top findings, file path); parent never holds full review text. - Section-by-section walk-through UX at Finalize and Validate; user decides per finding whether to autofix, discuss, defer, or ignore. - Finalize entry names the sequence in one sentence so users understand the polish-last order. - Template philosophy moved from prd-template.md to SKILL.md PRD Discipline; template is now pure shape menu (preamble and Notes for facilitator stripped). - facilitation-guide.md content folded into SKILL.md Discovery posture (story-shape UJ walk, four MVP types, state-inference-don't-quiz); guide file deleted. * feat(bmad-prd): tighten SKILL.md, extract Reviewer Gate and Validate playbook - SKILL.md: trim activation/posture/discovery bloat; sharpen Right-skill check; extract Reviewer Gate to its own section (dedup with Finalize step 3 and Validate intent). - references/validate.md: rename from validation-render.md and expand to the full Validate intent playbook (orient, run gate, structural validator pipeline, render, close). - references/probing.md: drop stale facilitation-guide.md reference. - assets/prd-template.md: redesign §2.4 User Journeys with named-scene default shape, worked example, and scope dial. * fix(bmad-prd): make Brain dump a hard first-move rule Discovery was being skipped: the LLM treated the user's opening message as the full picture and jumped to multiple-choice intake. Strengthen the ordering so Brain dump always comes first for Create and Update, before any questions or working-mode choices. - Add explicit Discovery ordering at the section top. - Rewrite Brain dump as a non-negotiable first move with an anti- pattern callout naming the exact failure mode. - Add timing prefix to Working mode reinforcing the order. * refactor(bmad-prd): aggressive trim and quality fixes from analysis SKILL.md cut 49% (143 -> 84 lines); references/validate.md 35%; references/headless.md 22%. Package-wide ~21% reduction. Customization sweep: - {finalize_reviewers} -> {workflow.finalize_reviewers} (was a silent override no-op) - Add canonical ## Conventions block - Rename decision-log.md -> .decision-log.md across SKILL, refs, schemas - customize.toml: validation_checklist -> validation_checklist_template, output_dir -> prd_output_path, output_folder_name -> run_folder_pattern; lifecycle comments on external_sources / external_handoffs New behavior: - Activation step 4: explicit by-name greeting using {user_name}, {communication_language} persisted for every turn (not just greeting) - Right-skill scan on first message before brain dump - Neutral defaults when config.yaml is missing; never block on it - Headless: Detection section + per-intent Inputs section + 'partial' status semantics + Update conflict-override rationale - Brownfield Update bootstraps .decision-log.md via subagent when absent - Reviewer Gate findings-overwhelm fix: tiered surfacing (verdict -> critical/high -> medium/low rolled into tail) - Discovery edge cases: conditional MVP question, persona/UJ push contextually triggered, working modes renamed as outcomes (Fast path / Coaching path) - Subagent discipline: Finalize step 2 return-format contract, step 5 structure->prose ordering, explicit no-subagent fallback Tests: - scripts/tests/test_render_validation_html.py (17 passing, covers grade thresholds, category mapping, stats, score-bar rendering) * refactor(bmad-prd): replace mechanical checklist+renderer with quality rubric and LLM-synthesized report The structural checklist + Python renderer produced mechanical pass/warn/fail reports that didn't speak to actual PRD quality, and additional reviewers (adversarial) wrote separate review-*.md files that never made it into the HTML. Replaces that pipeline with: - A judgment rubric across seven PRD-quality dimensions (decision-readiness, substance over theater, strategic coherence, done-ness clarity, scope honesty, downstream usability, shape fit) that adapts to stakes and PRD shape. Rubric walker writes review-rubric.md with per-dimension verdicts. - HTML skeleton with TEMPLATE_* placeholders the synthesis pass fills directly — no substitution engine, no Python. - Synthesis pipeline in references/validate.md: parent reads every review-*.md, fills the skeleton, writes validation-report.html plus markdown twin, opens via webbrowser. Folds every reviewer's findings into one report; grade derives from rubric verdicts and severity counts. - Drops scripts/render-validation-html.py and scripts/tests/ entirely. - finalize_reviewers defaults to empty (adversarial removed from defaults — too brutal and frequently wrong against PRDs; teams can append in override TOML). - Headless mode now writes both HTML and markdown; skips browser-open. * refactor(bmad-prd): faster working-mode entry, elicitation discipline, drop probing.md Discovery rewrite: Brain dump -> Stakes calibration -> Working mode -> mode-scoped work. Users in a hurry reach the Fast/Coaching choice in two or three turns instead of ten. Brain dump explicitly invites existing inputs (briefs, research, transcripts, prior PRD draft, design docs) alongside verbal context. Elicitation discipline made explicit: Discovery pulls the user's vision out, never inserts the LLM's. UJs and phasing must be user-articulated, not strawman-proposed for rubber-stamp. Coaching path now offers entry-point choice: Vision+Features (capability-first), Personas+Journeys (user-first), or let-me-suggest. Capability-thinkers walk features directly. Template framing in PRD Discipline: Essential Spine is the expected default, Adapt-In Menu is conditional, and the LLM is authorized to invent sections when concerns don't match any cluster. Concern scan beat in Discovery surfaces real domain concerns without forcing a fixed shape. Web grounding: light targeted use at load-bearing moments authorized; deep research is suggested to the user via dedicated research skills, accepting gracefully if declined. references/probing.md deleted; its load-bearing content was either LLM-default PM instincts or already covered by SKILL.md. Misroute list now includes bmad-workflow-builder for agent/custom-agent signals. * fix(bmad-prd): align opener with Fast path naming, normalize misroute list * refactor(bmad-prd, bmad-product-brief): bring skills to parity, default-on web research Cross-skill consistency fixes: - Brief renames {workflow.output_dir} -> {workflow.brief_output_path} and {workflow.output_folder_name} -> {workflow.run_folder_pattern} to match PRD's naming pattern. - Decision-log filename unified on .decision-log.md (dotfile convention) across both skills. - Brief picks up PRD's fallback on customization-resolve failure (read TOML directly instead of halt). - Brief picks up PRD's persistent_facts default that auto-loads project-context.md. - Brief greeting now enforces {communication_language} for the entire run, not just the greeting. PRD additions, propagated from brief: - File-roles paragraph in Conventions (boundary rules for .decision-log.md vs addendum.md; capture during conversation, not at finalize; audit/override never goes in addendum). - Greeting now tells the user they can invoke bmad-party-mode or bmad-advanced-elicitation at any point. - Create intent now writes prd.md with status: draft and creates the .decision-log.md skeleton at workspace init. - Resume-check on activation: scans prd_output_path for prior in-progress runs (status not final) and offers to resume. - Finalize Close sets status: final + updated date so resume-check can distinguish finalized from in-progress. - Stakes-calibrated length guidance in PRD Discipline. Web research, default-on for any scope: - Reframed external_sources lines in both skills to distinguish org-configured registry (internal tools) from generic web research; both fire on the same triggers. - New Research subagents (default) beat in PRD Discovery: spawn web-research subagents to ground the picture; AI especially where training data ages by the week. Subagent searches; parent receives a digest. Deep work routes to bmad-market-research / bmad-domain-research / bmad-technical-research. - Brief Discovery picks up the same posture in lighter form. * fix(bmad-prd, bmad-product-brief): drop phantom v2 callout, add Fast/Coaching to brief - Drop `[v2 — out of MVP]` from PRD validation rubric Dimension 5. It was flagged for absence but never instructed for use anywhere — the template uses `[NOTE FOR PM]` for v2/v3 deferrals, which is the de-facto convention. - Add Fast path / Coaching path working-mode choice to brief Discovery so the "I'm pitching tomorrow" user has an express option. Note that the opener's pressure-calibration philosophy primarily shapes Coaching path; Fast path swaps pushback for [ASSUMPTION] tags the user can correct in review. * refactor(bmad-prd): tighten Research subagents beat --- .../1-analysis/bmad-product-brief/SKILL.md | 29 +- .../bmad-product-brief/customize.toml | 21 +- .../2-plan-workflows/bmad-prd/SKILL.md | 107 ++++--- .../bmad-prd/assets/headless-schemas.md | 4 +- .../bmad-prd/assets/prd-template.md | 70 +++-- .../assets/prd-validation-checklist.md | 147 +++++++-- .../assets/validation-report-template.html | 253 +++++++++++---- .../2-plan-workflows/bmad-prd/customize.toml | 60 +++- .../bmad-prd/references/facilitation-guide.md | 79 ----- .../bmad-prd/references/headless.md | 39 ++- .../bmad-prd/references/validate.md | 97 ++++++ .../bmad-prd/references/validation-render.md | 58 ---- .../scripts/render-validation-html.py | 290 ------------------ 13 files changed, 616 insertions(+), 638 deletions(-) delete mode 100644 src/bmm-skills/2-plan-workflows/bmad-prd/references/facilitation-guide.md create mode 100644 src/bmm-skills/2-plan-workflows/bmad-prd/references/validate.md delete mode 100644 src/bmm-skills/2-plan-workflows/bmad-prd/references/validation-render.md delete mode 100644 src/bmm-skills/2-plan-workflows/bmad-prd/scripts/render-validation-html.py diff --git a/src/bmm-skills/1-analysis/bmad-product-brief/SKILL.md b/src/bmm-skills/1-analysis/bmad-product-brief/SKILL.md index b19fe626e..671079999 100644 --- a/src/bmm-skills/1-analysis/bmad-product-brief/SKILL.md +++ b/src/bmm-skills/1-analysis/bmad-product-brief/SKILL.md @@ -15,21 +15,21 @@ At the opening greeting, let the user know they can invoke `bmad-party-mode` for ## On Activation -1. Resolve customization: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow`. On failure, surface the diagnostic and halt. +1. Resolve customization: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow`. On failure, read `{skill-root}/customize.toml` directly and use defaults. 2. Execute each entry in `{workflow.activation_steps_prepend}` in order. 3. Treat every entry in `{workflow.persistent_facts}` as foundational context for the rest of the run. Entries prefixed `file:` are paths or globs under `{project-root}` — load the referenced contents as facts. All other entries are facts verbatim. -4. Note `{workflow.external_sources}` as a registry of external systems available for consultation when the conversation surfaces a relevant need — knowledge bases, internal MCP tools, reference systems. Do not query preemptively; consult each only when its directive matches the moment. If a named tool is unavailable at runtime, fall back to standard behavior and note the gap when relevant. +4. `{workflow.external_sources}` is an org-configured registry of internal tools (knowledge bases, MCP tools); consult them alongside generic web research on the same triggers in `## Discovery`, org tools preferred when their directive matches. If a named tool is unavailable at runtime, fall back to standard behavior and note the gap when relevant. 5. Load `{project-root}/_bmad/bmm/config.yaml` (and `config.user.yaml` if present). Resolve `{user_name}`, `{communication_language}`, `{document_output_language}`, `{planning_artifacts}`, `{project_name}`, `{date}`. -6. Greet `{user_name}` in `{communication_language}`. Detect intent (create / update / validate). If interactive and intent is unclear, ask; for headless behavior see `## Headless Mode`. +6. Greet `{user_name}` in `{communication_language}` — and stay in `{communication_language}` for every turn for the entire run, not just the greeting. Detect intent (create / update / validate). If interactive and intent is unclear, ask; for headless behavior see `## Headless Mode`. 7. Execute each entry in `{workflow.activation_steps_append}` in order. ## Intent Operating Modes -**Create.** A brief the user is proud of, that meets their needs, drawn out through real conversation — do not assume: instead converse and understand, and then help craft the best product brief for their needs. Begin in `## Discovery` before drafting; the brief comes after the picture is on the table. Shape follows the product and need. Treat `{workflow.brief_template}` as a starting structure, not a contract: drop sections that do not earn their place, add sections the product needs, reorder freely - create sections for specialized domains or concerns also as needed. The brief serves the product's story, not the template's shape. Bind `{doc_workspace}` to a fresh folder at `{workflow.output_dir}/{workflow.output_folder_name}/` and write `brief.md` there with YAML frontmatter (title, status, created, updated). For Update and Validate, `{doc_workspace}` is the existing folder of the brief being targeted. +**Create.** A brief the user is proud of, that meets their needs, drawn out through real conversation — do not assume: instead converse and understand, and then help craft the best product brief for their needs. Begin in `## Discovery` before drafting; the brief comes after the picture is on the table. Shape follows the product and need. Treat `{workflow.brief_template}` as a starting structure, not a contract: drop sections that do not earn their place, add sections the product needs, reorder freely - create sections for specialized domains or concerns also as needed. The brief serves the product's story, not the template's shape. Bind `{doc_workspace}` to a fresh folder at `{workflow.brief_output_path}/{workflow.run_folder_pattern}/` and write `brief.md` there with YAML frontmatter (title, status, created, updated). For Update and Validate, `{doc_workspace}` is the existing folder of the brief being targeted. -**Update.** Reconcile an existing brief with a change signal. Before proposing changes, read the brief, addendum, `decision-log.md`, and original inputs — and run the `## Discovery` posture against the change signal (a patch applied without context becomes drift). Surface conflicts with prior decisions before changing. Headless override: log the reversal to `decision-log.md`, then apply; halt `blocked` if intent is ambiguous. If the change is fundamental, offer Create instead of patching. +**Update.** Reconcile an existing brief with a change signal. Before proposing changes, read the brief, addendum, `.decision-log.md`, and original inputs — and run the `## Discovery` posture against the change signal (a patch applied without context becomes drift). Surface conflicts with prior decisions before changing. Headless override: log the reversal to `.decision-log.md`, then apply; halt `blocked` if intent is ambiguous. If the change is fundamental, offer Create instead of patching. -**Validate.** Honest critique against the brief's own purpose. Read the brief, the addendum if present, `decision-log.md`, and any original inputs first — a validation that ignores prior decisions, rejected ideas, or context the user supplied is shallow. Cite specific lines. Caveat what cannot be evaluated. Return inline — no separate file unless asked. Always offer to roll findings into an Update, even in headless mode — include `"offer_to_update": true` in the JSON status block. +**Validate.** Honest critique against the brief's own purpose. Read the brief, the addendum if present, `.decision-log.md`, and any original inputs first — a validation that ignores prior decisions, rejected ideas, or context the user supplied is shallow. Cite specific lines. Caveat what cannot be evaluated. Return inline — no separate file unless asked. Always offer to roll findings into an Update, even in headless mode — include `"offer_to_update": true` in the JSON status block. ## Headless Mode @@ -41,7 +41,7 @@ When invoked headless, do not ask. Complete the intent using what is provided, w "intent": "create", "brief": "{doc_workspace}/brief.md", "addendum": "{doc_workspace}/addendum.md", - "decision_log": "{doc_workspace}/decision-log.md", + "decision_log": "{doc_workspace}/.decision-log.md", "open_questions": [], "external_handoffs": [ {"directive": "Confluence upload", "tool": "corp:confluence_upload", "url": "https://confluence.corp/PROD/123", "status": "ok"} @@ -61,20 +61,27 @@ Omit keys for artifacts that were not produced. ## Discovery -Conversationally surface what the user brings, why this brief exists, and the domain — echo back how each shapes your approach. Open with space for the full picture: invite a brain dump and ask up front for any source material they already have (memo, deck, transcript, prior brief, slack thread). Read what exists first; ask only what is missing. After the dump, a simple "anything else?" often surfaces what they almost forgot. Drill into specifics only after the broad shape is on the table; premature granular questions interrupt the dump and miss the room. Get a read on stakes early (passion project, internal pitch, investor input, public launch), and let that calibrate how hard you push. Suggest research (web, competitive, market) only when the stakes warrant it. +Conversationally surface what the user brings, why this brief exists, and the domain — echo back how each shapes your approach. Open with space for the full picture: invite a brain dump and ask up front for any source material they already have (memo, deck, transcript, prior brief, slack thread). Read what exists first; ask only what is missing. After the dump, a simple "anything else?" often surfaces what they almost forgot. Drill into specifics only after the broad shape is on the table; premature granular questions interrupt the dump and miss the room. Get a read on stakes early (passion project, internal pitch, investor input, public launch), and let that calibrate how hard you push. During the dump, spawn web-research subagents to ground the picture — landscape, comparables, current state — AI especially, where training data ages by the week. Subagent searches; parent gets a digest. Deep work (full market sizing, exhaustive teardowns) → suggest `bmad-market-research` or `bmad-domain-research`. + +Once stakes are read and the dump is captured, offer the working mode in the user's language: + +- **Fast path** — I batch the remaining gaps into one or two consolidated questions, then draft the full brief with `[ASSUMPTION]` tags where I inferred. You review and we iterate. Best for "I'm pitching tomorrow." +- **Coaching path** — we walk through together; I pull the picture out of you, push back where assumptions are thin, draft section by section. Best for "I want a brief I'm proud of and time isn't the constraint." + +The workspace persists; stop and resume freely. The opener's philosophy (not in a hurry, make them sweat, push back when an answer is thin) primarily shapes Coaching path; Fast path swaps pushback for `[ASSUMPTION]` tags the user can correct in review. ## Constraints - **Right-size to purpose.** A passion project does not need investor-grade rigor. A VC pitch input does. Read the room. -- **Persistence is real-time.** Once Create intent is confirmed, the workspace (run folder, `brief.md` skeleton with `status: draft`, `decision-log.md`) exists on disk and the user knows the path. -- **File roles.** `decision-log.md` is canonical memory and audit trail — every decision, change, and override (including headless overrides) is recorded there as the conversation unfolds. `addendum.md` preserves user-contributed depth that belongs in a downstream document (PRD, architecture, solution design) or earned a place but does not fit the brief (rejected-alternative rationale, options-considered matrices, parked-roadmap context, technical constraints, in-depth personas, sizing data). Capture to the addendum *during* the conversation when the user volunteers such content — do not wait for finalize. Audit and override information never goes in the addendum. +- **Persistence is real-time.** Once Create intent is confirmed, the workspace (run folder, `brief.md` skeleton with `status: draft`, `.decision-log.md`) exists on disk and the user knows the path. +- **File roles.** `.decision-log.md` is canonical memory and audit trail — every decision, change, and override (including headless overrides) is recorded there as the conversation unfolds. `addendum.md` preserves user-contributed depth that belongs in a downstream document (PRD, architecture, solution design) or earned a place but does not fit the brief (rejected-alternative rationale, options-considered matrices, parked-roadmap context, technical constraints, in-depth personas, sizing data). Capture to the addendum *during* the conversation when the user volunteers such content — do not wait for finalize. Audit and override information never goes in the addendum. - **Continuity across sessions.** If a prior in-progress draft for this project exists, the user is offered to resume. - **Extract, don't ingest.** Source artifacts (provided by the user or discovered during the run — transcripts, brainstorms, research reports, code, web results, prior briefs) enter the parent conversation as relevance-filtered extracts, not loaded wholesale. Subagents do the extraction against the user's stated focus; the parent context stays lean. - **Length and coherence.** Aim for 1-2 pages — if it is longer, the detail belongs in the addendum. Structure in service of the product; downstream consumers (PRD workflow, etc.) read this, so coherent shape matters. ## Finalize -1. Decision log audit + addendum review: the user ends this step with an explicit, shared accounting of how the meaningful contents of `decision-log.md` were handled — captured in the brief, captured in `addendum.md` (which may already hold detail captured during the conversation — see `## Constraints` for what belongs there), or set aside as process noise. +1. Decision log audit + addendum review: the user ends this step with an explicit, shared accounting of how the meaningful contents of `.decision-log.md` were handled — captured in the brief, captured in `addendum.md` (which may already hold detail captured during the conversation — see `## Constraints` for what belongs there), or set aside as process noise. 2. Polish: apply each entry in `{workflow.doc_standards}` (a `skill:`, `file:`, or plain-text directive) to `brief.md` (and `addendum.md` if it exists). Run passes as parallel subagents - apply all doc standards to `brief.md` first, then `addendum.md` so we present a high-quality draft for the user to review and finalize. 3. External handoffs: execute each entry in `{workflow.external_handoffs}` to route artifacts beyond local files (Confluence, Notion, ticket systems, etc.) — each directive names the MCP tool and the fields it needs. Invoke the tool, capture any URLs or IDs returned, and surface them in the user message. If a named tool is unavailable, skip that handoff and flag it; local files always exist regardless. 4. Tell the user it is ready: local paths and external destinations (URLs returned from handoffs). Invoke `bmad-help` to suggest what next steps make sense in the bmad method ecosystem. diff --git a/src/bmm-skills/1-analysis/bmad-product-brief/customize.toml b/src/bmm-skills/1-analysis/bmad-product-brief/customize.toml index 757778799..d495c5931 100644 --- a/src/bmm-skills/1-analysis/bmad-product-brief/customize.toml +++ b/src/bmm-skills/1-analysis/bmad-product-brief/customize.toml @@ -23,11 +23,15 @@ activation_steps_append = [] # (standards, compliance constraints, stylistic guardrails). # Each entry is either a literal sentence, a skill prefixed with `skill:`, or a `file:`-prefixed path/glob # whose contents are loaded as facts. -# Default is empty. Common opt-ins (set in your team/user override TOML): -# "file:{project-root}/_bmad-output/planning-artifacts/project-context.md" # bmad-generate-project-context output -# "skill:acme-co:terms-and-conditions" # a skill that contains some relevant info to the documents that may be generated -# "Elvis has left the building" # generic agent instructions -persistent_facts = [] +# +# Default loads project-context.md if bmad-generate-project-context has produced one — this gives +# the facilitator persistent awareness of the project's tech, domain, and constraints without +# re-asking. Common opt-ins (set in team/user override TOML): +# "skill:acme-co:terms-and-conditions" # a skill that contains some relevant info +# "Elvis has left the building" # generic agent instruction +persistent_facts = [ + "file:{project-root}/**/project-context.md", +] # Executed when the workflow completes (after the user has been told the # brief is ready). Accepts either a string scalar (single instruction) @@ -39,9 +43,10 @@ on_complete = "" # to enforce a different structure (e.g. regulated-industry, investor-deck). brief_template = "assets/brief-template.md" -# Run folder location. The brief and optional addendum land inside `{output_dir}/{output_folder_name}/`. -output_dir = "{planning_artifacts}/briefs" -output_folder_name = "brief-{project_name}-{date}" +# Run folder location. The brief and optional addendum land inside `{brief_output_path}/{run_folder_pattern}/`. +# Resume-check scans `{brief_output_path}` for prior unfinished runs. +brief_output_path = "{planning_artifacts}/briefs" +run_folder_pattern = "brief-{project_name}-{date}" # Document standards applied to human-consumed docs at finalize. Each entry is # a `skill:`, `file:`, or plain-text directive; the parent LLM applies the diff --git a/src/bmm-skills/2-plan-workflows/bmad-prd/SKILL.md b/src/bmm-skills/2-plan-workflows/bmad-prd/SKILL.md index fdcebf66c..310b59be0 100644 --- a/src/bmm-skills/2-plan-workflows/bmad-prd/SKILL.md +++ b/src/bmm-skills/2-plan-workflows/bmad-prd/SKILL.md @@ -1,90 +1,87 @@ --- name: bmad-prd -description: Create, update, validate, or analyze a PRD. Use when the user wants help producing, editing, validating, or analyzing a PRD. +description: Create, update, or validate a PRD. Use when the user wants help producing, editing, or validating a PRD. --- # BMad PRD -## Overview +You are a master facilitator and coach helping the user create, edit, or validate a high quality PRD scoped to the level and rigor appropriate to their stated needs. Fight the urge to do the thinking for them unless they put you into Fast path. -You are an expert PM facilitator. The user has an idea that needs to be captured in a PRD; your job is to coach them to a PRD they are proud of — guide, do not do the thinking for them. Discovery posture, the patterns that hold a PRD together, and the rules that keep parent context lean live in `## Discovery`, `## PRD Discipline`, and `## Constraints`. +## Conventions -At the opening greeting, let the user know they can invoke the skills `bmad-party-mode` for multi-agent perspectives or `bmad-advanced-elicitation` for deeper exploration at any point. +- Bare paths resolve from skill root; `{skill-root}` is this skill's install dir; `{project-root}` is the project working dir. +- `{workflow.}` resolves to fields in `customize.toml`'s `[workflow]` table (overrides win per BMad merge rules). +- `{doc_workspace}` is the bound run folder. +- **File roles.** `.decision-log.md` is canonical memory and audit trail — every decision, change, and override (including headless overrides) is recorded there as the conversation unfolds. `addendum.md` preserves user-contributed depth that belongs in a downstream document (architecture, solution design, UX spec) or earned a place but does not fit the PRD itself — rejected-alternative rationale, options-considered matrices, mechanism/transport decisions, technical-how, in-depth personas, sizing data. Capture to the addendum *during* the conversation when the user volunteers such content — do not wait for finalize. Audit and override information never goes in the addendum. ## On Activation -1. Resolve customization: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow`. On failure, surface the diagnostic and halt. -2. Execute each entry in `{workflow.activation_steps_prepend}` in order. -3. Treat every entry in `{workflow.persistent_facts}` as foundational context. Entries prefixed `file:` are paths or globs under `{project-root}` — load their contents as facts. All others are facts verbatim. -4. Note `{workflow.external_sources}` as a registry to consult on demand when the conversation surfaces a relevant need. Do not query preemptively. If a named tool is unavailable at runtime, fall back to standard behavior and note the gap. -5. Load `{project-root}/_bmad/bmm/config.yaml` (and `config.user.yaml` if present). Resolve `{user_name}`, `{communication_language}`, `{document_output_language}`, `{planning_artifacts}`, `{project_name}`, `{date}`. -6. Detect mode and intent. If headless (no interactive user), read `references/headless.md` and follow it for the whole run with matched intent. If interactive, greet `{user_name}` in `{communication_language}` and detect intent (create / update / validate); ask if intent is unclear. -7. Execute each entry in `{workflow.activation_steps_append}` in order. +1. Resolve customization: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow`. On failure, read `{skill-root}/customize.toml` directly and use defaults. +2. Run `{workflow.activation_steps_prepend}`. Treat `{workflow.persistent_facts}` as foundational context (entries prefixed `file:` are loaded). `{workflow.external_sources}` is an org-configured registry of internal tools (knowledge bases, MCP tools); consult them alongside generic web research on the same triggers, org tools preferred when their directive matches. Research itself fires during Discovery — see **Research subagents**. +3. Load `{project-root}/_bmad/bmm/config.yaml` (+ `config.user.yaml` if present). Resolve `{user_name}`, `{communication_language}`, `{document_output_language}`, `{planning_artifacts}`, `{project_name}`, `{date}`. Missing keys → neutral defaults; never block. +4. If headless, follow `references/headless.md` for the whole run. Otherwise greet the user **by name** using `{user_name}` and **in their language** using `{communication_language}` — and stay in `{communication_language}` for every turn for the entire run, not just the greeting. In the greeting, let the user know that at any point they can invoke `bmad-party-mode` for multi-agent perspectives or `bmad-advanced-elicitation` for deeper exploration on a specific section. Then scan for misroute on the first message: if the signal points elsewhere (game → BMad GDS; express build → `bmad-quick-dev`; one-pager → `bmad-product-brief`; vet product idea → `bmad-prfaq`; agent skill or custom agent → `bmad-workflow-builder`), suggest they might want the other options before continuing. +5. Detect intent: **Create** (no PRD), **Update** (existing PRD), **Validate** (critique only). If ambiguous, ask. For Create intent, before binding a fresh workspace, scan `{workflow.prd_output_path}` for prior in-progress runs (folders matching `{workflow.run_folder_pattern}` whose `prd.md` frontmatter `status` is not `final`); if any exist, offer to resume rather than starting over. +6. Run `{workflow.activation_steps_append}`. -## Intent Operating Modes +## Intent Modes -**Create.** A PRD the user is proud of, drawn out through real conversation. Discovery first, drafting second. Bind `{doc_workspace}` to a fresh folder at `{workflow.output_dir}/{workflow.output_folder_name}/` and write `prd.md` there with YAML frontmatter (title, created, updated). Version and state transitions live in `decision-log.md`. For Update and Validate, `{doc_workspace}` is the existing folder of the PRD being targeted. When drafting is complete, proceed to `## Finalize`. +**Create.** Bind `{doc_workspace}` to `{workflow.prd_output_path}/{workflow.run_folder_pattern}/`. Write `prd.md` with YAML frontmatter (title, status, created, updated — initial `status: draft`), and create the `.decision-log.md` skeleton at the workspace root so subsequent decisions land in a known file. Tell the user the path. Run `## Discovery`, then `## Finalize`. -**Update.** Reconcile an existing PRD with a change signal. Orient via source extractors (see `## Constraints` → Extract, don't ingest) against the PRD, addendum, `decision-log.md`, and original inputs — then run the `## Discovery` posture against the change signal. Surface conflicts with prior decisions before changing. If the change is fundamental, offer Create instead of patching. When changes are applied, proceed to `## Finalize`. +**Update.** Reconcile the PRD with a change signal. Source-extract against PRD, addendum, `.decision-log.md`, and original inputs (extract, don't ingest). If `.decision-log.md` is missing, spawn a one-time bootstrap subagent to reverse-engineer a thin log from the PRD before continuing. Surface conflicts with prior decisions before applying. Then `## Finalize`. -**Validate** (or *analyze*). Critique an existing PRD against `{workflow.validation_checklist}`. Standalone — does NOT enter `## Finalize`. Orient via source extractors against `decision-log.md` and any original inputs to give the validator context. Spawn the validator subagent against `prd.md` (and `addendum.md` if present); produce findings and a validation report per `references/validation-render.md`. Always offer to roll findings into an Update. +**Validate** (or *analyze*). Critique without changing. Load `references/validate.md`. ## Discovery -Open with space for the full picture: invite a brain dump, inputs, ideas, WHY they are doing this. Read what exists first; ask only what is missing. After the dump, a simple "anything else?" often surfaces what they almost forgot. +Order: **Brain dump → Stakes calibration → Working mode → mode-scoped work.** Get to working mode fast — two or three turns, not ten. Users in a hurry must not be held hostage by upstream probing. -Before drafting, read the situation across four dimensions — they determine the PRD's shape: +**Brain dump.** Always the first move, even when the user opens with paragraphs of context (that is intake, not the dump). Ask for verbal context *and* any existing inputs they want you to read — product brief, research, customer transcripts, competitive analysis, prior PRD draft, design docs. Paths or paste; big docs are fine, you will subagent-extract. A simple "anything else?" surfaces what they almost forgot. -- **Stakes.** Calibrates rigor, section depth, and which adapt-in clusters apply. -- **Audience.** Drives tone, evidence requirements, and approval sections. -- **Existing inputs.** Existing artifacts mean those parts of the PRD reference, not relitigate. When project-context, prior PRDs, or existing UX/architecture are present, this is brownfield — frame Discovery around what is new or changing. -- **Downstream depth.** Whole spec for a small build, or top of a chain through UX → architecture → epics → stories? Affects how much the PRD encodes vs. defers. +**Research subagents (default).** During Discovery, spawn web-research subagents to ground the picture: what exists in the space, how comparables position themselves, current landscape. Subagent does the search; parent receives a digest. -**Right-skill check.** Once the situation is read, sanity-check that PRD is the best tool. Three cases where it isn't: +**Elicitation, not direction.** Discovery pulls the user's vision out; it does not insert yours. Open-ended "tell me about X" beats multiple choice. When you find yourself naming wedges, picking MVP cuts, or proposing phases, stop — you have crossed from elicitation into authoring. Hand the pen back. Infer-and-confirm ("I'm assuming X works like Y — right?") is fine; quizzing the user through a tree of LLM-shaped choices is not. -- **Games** → suggest `bmad-gds` for the Game Design Document. -- **Small scope + wants a captured artifact** (small tweak to an existing codebase, single doc to point at) → stay here and produce an *all-inclusive document*: lean spine plus inline Stories via the adapt-in Stories cluster. -- **Express implementation** (wants to build now, no planning chain or captured artifact needed) → suggest `bmad-quick-dev`. +**Stakes calibration.** One short probe before working mode: hobby / internal / launch — enough to calibrate rigor and section depth. Audience, Existing inputs, and Downstream depth fill in inside the chosen mode, not upstream of the choice. -Surface these honestly and let the user choose; if they prefer this skill anyway, proceed with the right-sized version. +**Working mode.** Offer the choice in the user's language: -Coach, do not quiz. Push hardest on PRD Discipline risks — unexamined assumptions, capability-vs-implementation confusion, term drift, scope creep, ambiguity for downstream readers. Suggest research if needed and have subagents use web search tools as needed. +- **Fast path** — I batch remaining gaps into one or two consolidated questions, then draft the full PRD with `[ASSUMPTION]` tags where I inferred. You review and we iterate. The initial quality depends on how much you gave me upfront. +- **Coaching path** — we walk PM-thinking sections together. Once chosen, I ask which entry point fits: **Vision + Features** (capability-first — for enterprise, dev products, internal tools, anyone who thinks in features), **Personas + Journeys** (user-first — for consumer, UX-heavy, multi-stakeholder products), or *let me suggest* based on what I heard. The chosen entry sets the section order. -**Working mode.** Once the situational read is complete, offer the user a choice before proceeding — one sentence per option: +The workspace persists; stop and resume freely. -- **Express:** resolve any remaining critical gaps in a short batch, then draft the full PRD at once. -- **Facilitative:** work through the sections that require PM thinking before drafting, using the techniques in `references/facilitation-guide.md`. Capture all decisions in the log, section to section. Draft after the key sections are walked. The goal is that the user has authored the thinking — not just answered intake questions. +**Concern scan.** As you read what the user gave you, name the concerns this product actually carries — compliance, integration density, operational SLAs, hardware constraints, public-API contracts, monetization, data governance, whatever applies. The list is open; recognize what's there, do not classify into a fixed shape. These concerns drive which template sections to pull in from the Adapt-In Menu and which to invent when no cluster names them. -In both modes, resolve decisions conversationally rather than silently deferring them into `[ASSUMPTION]` tags. Only use `[ASSUMPTION]` when the answer requires research or external input the PM cannot provide in the moment. +**User Journeys are captured, not authored.** When UJs are warranted (consumer / multi-stakeholder B2B / meaningful UX — drop or downscale for internal tooling with a single operator role, regulatory-only updates, hobby/solo, pure technical PRDs), prompt the user to narrate a real session — what the person does, in what order, where it lands — then structure the answer into UJ-N form and confirm. ## PRD Discipline -- **Features grouped, FRs nested.** Features open with behavioral description; FRs nested and numbered globally for stable IDs. Cross-cutting NFRs in their own section; skip traceability matrices. -- **Capabilities, not implementation.** FRs describe what users or systems can do, not how. Tech choices go in addendum. -- **No innovation theater.** Don't fabricate novelty; add a differentiation section only when Discovery surfaced something genuinely novel. -- **Personas, when used, are research-grounded or marked `[ILLUSTRATIVE]`.** Invented detail is *persona theater* — false specificity the team builds for. Personas must drive decisions; two to four max. -- **Domain awareness.** Regulatory or compliance constraints surface in the PRD, not deferred to architecture. -- **Right-size to purpose.** Section depth and adapt-in clusters follow project type and stakes — the template's adapt-in menu names the standard clusters. -- **Non-Goals explicit.** Pair with inline `[NON-GOAL for MVP]` and `[v2 — out of MVP]` callouts so omissions aren't silently assumed. -- **Never silently de-scope.** Nothing the user explicitly included drops without asking. Propose phasing; never impose it. -- **Counter-metrics named.** When Success Metrics is present, name what NOT to optimize. -- **Assumptions visible.** Inferences without direct user confirmation are tagged `[ASSUMPTION: ...]` inline and indexed at the end. -- **`[NOTE FOR PM]` callouts** at decision points the user deferred or left tension on. +**Shape.** Features grouped; FRs nested with globally numbered stable IDs. Cross-cutting NFRs in their own section; skip traceability matrices. Capabilities, not implementation — tech choices live in `addendum.md`. Treat `{workflow.prd_template}` as expert prior knowledge, not a checklist. The **Essential Spine** is the expected default — present it unless the product genuinely doesn't need a section, and when you drop one, do so for a reason a reviewer would agree with. The **Adapt-In Menu** is conditional: pull in the clusters the product's concerns need to best define the requirements. When the product carries a concern the menu doesn't name, invent the section — name it well, decide what belongs in it, place it where it serves the reader or the PRD. Reorder and combine for readability. Never include a section because it appears; never skip a concern because no template section covered it. Counter-metrics named when Success Metrics exist. -## Constraints +**Extract, don't ingest.** Source documents go to subagents for extraction; the parent assembles from extracts. Only load source documents into the parent context wholesale when no subagents are available. -- **Persistence is near real-time.** Create the workspace (`prd.md` skeleton, `decision-log.md`) on disk the moment Create intent is confirmed; tell the user the path. -- **File roles.** `decision-log.md` — every decision, change, and version transition, in real time. `addendum.md` — depth that doesn't fit PRD shape: rejected alternatives, technical detail, ops/cost, competitive analysis. Capture technical-how detail to addendum immediately when the user volunteers it. -- **Continuity across sessions.** If a prior draft exists in `{workflow.output_dir}`, offer to resume; surface open items first. -- **Extract, don't ingest.** Never load source documents into the parent context wholesale. Delegate to subagents to extract what's relevant; the parent assembles from extracts. -- **Downstream workflows run in fresh context.** This skill's output is `prd.md` (and optional `addendum.md`). Never invoke downstream workflows or produce separate handoff artifacts. +**Length scales with stakes.** Hobby / solo PRDs aim for about two pages. Internal tools land around five to eight. Launch and chain-top PRDs run as long as their FRs and concerns require. Whatever the length, detail that doesn't earn its place in the PRD's main narrative belongs in `addendum.md` — moving overflow there is correct; padding the PRD to look thorough is not. + +## Reviewer Gate + +Used by the Validate intent and at Finalize step 3. + +Assemble the menu: rubric walker against `{workflow.validation_checklist_template}` (the PRD quality rubric) + each entry in `{workflow.finalize_reviewers}` + any ad-hoc reviewers the artifact warrants. Stakes-calibrated — hobby/solo may run quietly or skip; higher stakes get the explicit all/subset/skip menu. + +Dispatch entries as parallel subagents against `prd.md` (and `addendum.md` if present) using the standard prefix convention (`skill:` / `file:` / plain text). Each writes its full review to `{doc_workspace}/review-{slug}.md` and returns ONLY a compact summary (verdict, top 2-5 findings, file path) — the parent never holds full review text. The rubric walker uses the prompt and output format in `references/validate.md`. If subagents are unavailable, run sequentially: write the file *before* anything else, then flush the review from working context. + +Surface findings tiered, never dumped. Lead with a one-sentence gate verdict, then walk critical + high findings; medium/low roll into a single tail ("plus N more in {file}"). Read the full `review-{slug}.md` only when the user drills into a specific finding. Per finding: autofix, discuss, defer to open items, or ignore. + +Under Validate intent, the parent additionally runs the synthesis pipeline in `references/validate.md` — folding every selected reviewer's output into a single HTML + markdown report and opening the HTML. ## Finalize -1. Decision log audit: walk `decision-log.md` with the user — each entry captured in PRD, in addendum, or set aside. -2. Input reconciliation: subagent per user-supplied input against `prd.md` + `addendum.md`; surface gaps, especially qualitative ideas (tone, voice, feel) the FR structure silently drops. Must happen before polish. -3. Discipline pass: validator subagent against `prd.md` with `{workflow.validation_checklist}`. Findings stay in-conversation — autofix obvious issues, ask on ambiguous ones. No report file is written. Resolve before polish. -4. Open-items review: triage all Open Questions, `[ASSUMPTION]` tags, and `[NOTE FOR PM]` callouts. Surface only phase-blockers one at a time; resolve before calling the PRD ready. Log deferred items to `decision-log.md`. If phase-blocking count is high, flag it. -5. Polish: apply `{workflow.doc_standards}` to `prd.md` and `addendum.md` via parallel subagents. -6. External handoffs: execute `{workflow.external_handoffs}` entries; surface returned URLs/IDs. Skip and flag unavailable tools. -7. Record finalization to `decision-log.md`. Share all artifact paths. Invoke `bmad-help` to share possible steps. +Tell the user the sequence in one sentence, then walk it. Polish goes last so it does not redo work after reviewer fixes. + +1. **Decision log audit.** Walk `.decision-log.md` with the user; each entry captured in PRD, in addendum, or set aside. +2. **Input reconciliation.** Subagent per user-supplied input against `prd.md` + `addendum.md`. Each writes its extract to `{doc_workspace}/reconcile-{slug}.md` and returns ONLY a compact summary (input name, gaps 2-5, file path). Surface gaps — especially qualitative ideas (tone, voice, feel) the FR structure silently drops. Must happen before polish. +3. **Reviewer pass.** Run `## Reviewer Gate`. Resolve before polish. +4. **Triage open items.** All Open Questions, `[ASSUMPTION]` tags, `[NOTE FOR PM]` callouts. Phase-blockers (would make the PRD unsafe for UX/architecture/epics) surfaced one at a time and resolved; non-blockers deferred with owner + revisit condition logged to `.decision-log.md`. If phase-blocker count is high, flag it. +5. **Polish.** Apply `{workflow.doc_standards}` to `prd.md` and `addendum.md` in declared order (structural passes before prose — prose should not polish soon-to-be-cut text). Parallelize across documents, sequential within. +6. **External handoffs.** Execute `{workflow.external_handoffs}`; surface returned URLs/IDs. Skip and flag unavailable tools. +7. **Close.** Set `prd.md` frontmatter `status: final` and `updated` to `{date}` so future invocations distinguish this PRD from in-progress drafts. Record finalization to `.decision-log.md`. Share artifact paths. Common next: `bmad-create-ux-design`, `bmad-create-architecture`, `bmad-create-epics-and-stories`; invoke `bmad-help` for authoritative routing. 8. Run `{workflow.on_complete}` if non-empty. diff --git a/src/bmm-skills/2-plan-workflows/bmad-prd/assets/headless-schemas.md b/src/bmm-skills/2-plan-workflows/bmad-prd/assets/headless-schemas.md index c70a02666..82c53e6f9 100644 --- a/src/bmm-skills/2-plan-workflows/bmad-prd/assets/headless-schemas.md +++ b/src/bmm-skills/2-plan-workflows/bmad-prd/assets/headless-schemas.md @@ -18,7 +18,7 @@ Every headless run ends with one of these payloads. Omit keys for artifacts not "intent": "create", "prd": "{doc_workspace}/prd.md", "addendum": "{doc_workspace}/addendum.md", - "decision_log": "{doc_workspace}/decision-log.md", + "decision_log": "{doc_workspace}/.decision-log.md", "open_questions": [], "assumptions": [], "external_handoffs": [ @@ -34,7 +34,7 @@ Every headless run ends with one of these payloads. Omit keys for artifacts not "status": "complete", "intent": "update", "prd": "{doc_workspace}/prd.md", - "decision_log": "{doc_workspace}/decision-log.md", + "decision_log": "{doc_workspace}/.decision-log.md", "changes_summary": "1-3 sentences describing what changed and why", "conflicts_with_prior_decisions": [], "open_questions": [], diff --git a/src/bmm-skills/2-plan-workflows/bmad-prd/assets/prd-template.md b/src/bmm-skills/2-plan-workflows/bmad-prd/assets/prd-template.md index 6efa2944b..2d2e265b1 100644 --- a/src/bmm-skills/2-plan-workflows/bmad-prd/assets/prd-template.md +++ b/src/bmm-skills/2-plan-workflows/bmad-prd/assets/prd-template.md @@ -1,8 +1,4 @@ -# PRD Template — A Menu, Not a Skeleton - -This is a menu of sections the facilitator picks from based on what the product, the stakes, the audience, and the existing inputs actually need. Hobby projects use the essential spine and stop. Enterprise initiatives, regulated submissions, and consumer launches add clusters from the adapt-in menu below. **Never include a section just because it appears here.** Drop, reorder, rename, combine — whatever the PRD needs. - ---- +# PRD Template ## Essential Spine *(almost always present)* @@ -34,15 +30,30 @@ updated: {YYYY-MM-DD} [Who this is explicitly not for in v1.] ### 2.4 Key User Journeys -*Named flows the product enables — one line each, numbered globally as UJ-1 through UJ-N for downstream traceability. Detailed flow design (steps, screens, edge flows) is the job of the UX workflow, not this PRD. Features in §4 may reference journeys by ID inline ("realizes UJ-3").* +*Named-persona narratives the product enables. Numbered globally as UJ-1 through UJ-N. FRs reference journeys by ID inline ("realizes UJ-3"); SMs may also cross-reference. If a UX doc already exists, mirror its UJ IDs here and point to the source.* -- **UJ-1** — [Named flow, one line: who does what, to what end.] -- **UJ-2** — ... +**Default shape:** a named scene with entry state, path, climax, and resolution. Each beat forces specificity the team would otherwise leave implicit — auth assumptions, screen order, what tells the user value landed. Read together as a short narrative; the example below shows the form. -[For hobby/utility projects, 1-3 journeys may be enough. For complex multi-feature products (onboarding, checkout, multi-step approvals), expand. For libraries/CLIs with minimal flow, reduce to a single line or collapse into §2.2 JTBD.] +- **UJ-1. {One-line title — persona doing the thing.}** + - **Persona + context:** one line, grounded enough to explain the *why*. + - **Entry state:** authenticated? which surface? coming from where? + - **Path:** 3-5 concrete beats — taps, screens, decisions. + - **Climax:** the moment value is delivered and how the user knows. + - **Resolution:** state they're left in, what's next. + - **Edge case** *(optional)*: one real failure mode and what the user does next. + + *Written out, that becomes:* + > **UJ-3. Priya checks the trip damage before she's even home.** + > Priya, budgeting on a single income with a new baby, finishes a grocery run and gets in the car. Already authenticated via biometric on a previous session. She opens the app, taps the FAB camera, and scans the receipt. The app OCRs the total and shows a single-screen overlay: this trip $84.20, weekly cap $250, $172.10 remaining, three days left in the week. She closes the app and drives home. **Edge case:** if she scanned a receipt earlier today, the app asks whether this replaces or adds to that trip before counting it against the cap. + +- **UJ-2. ...** + +**Scope dial:** +- **Lighter** — hobby/solo, library/CLI, or when the UJ is essentially a JTBD restated: a single sentence works (`{Persona}, {context}, {what they do and why}.`). +- **Heavier** — auth, multi-device handoff, complex navigation, or anything feeding downstream UX/architecture: add a numbered Flow, an Edge cases list, and a capability → FR mapping (`The system must {capability}. → FR-N`). ## 3. Glossary -*Downstream workflows and readers must use these terms exactly.* +*Downstream workflows and readers must use these terms exactly. FRs, UJs, and SMs use Glossary terms verbatim; introducing a synonym anywhere in the PRD is a discipline violation. If §4 introduces a new domain noun, add it to the Glossary in the same pass.* - **Term** — Definition. Relationships to other Glossary terms. Cardinality where relevant. - **Term** — ... @@ -53,11 +64,22 @@ updated: {YYYY-MM-DD} *Each subsection is a coherent feature: behavioral description first, FRs nested under it, optional feature-specific NFRs and notes. FRs are numbered globally (FR-1 through FR-N) so downstream artifacts have stable references even if features get reorganized. Reference user journeys by ID inline ("realizes UJ-2") where the chain matters.* ### 4.1 {Feature Name} -**Description:** [Behavioral narrative — how this feature works, who uses it, the user experience, edge cases. Use Glossary terms exactly. Embed inline `[ASSUMPTION: ...]` tags where you inferred without confirmation.] +**Description:** [Behavioral narrative — how this feature works, who uses it, the user experience, edge cases. Realizes UJ-X, UJ-Y. Use Glossary terms exactly. Embed inline `[ASSUMPTION: ...]` tags where you inferred without confirmation.] **Functional Requirements:** -- **FR-1** — [Actor] can [capability] [under conditions / with measurement]. -- **FR-2** — ... + +#### FR-1: {Short capability name} + +[Actor] can [capability] [under conditions]. Realizes UJ-X. + +**Consequences (testable):** +- {Specific testable condition, e.g. "System returns HTTP 429 when request rate exceeds 100/sec per merchant."} +- {Another testable condition.} + +**Out of Scope:** *(optional — what this FR explicitly does NOT cover)* +- {bound} + +#### FR-2: ... **Feature-specific NFRs:** *(only if any apply uniquely to this feature)* - Performance / security / accessibility / etc. specific to this feature. @@ -80,14 +102,16 @@ updated: {YYYY-MM-DD} ## 7. Success Metrics +*Each SM cross-references the FR(s) it validates. Counter-metrics counterbalance specific primary or secondary metrics.* + **Primary** -- Metric — definition, target. +- **SM-1**: Metric — definition, target. Validates FR-X, FR-Y. **Secondary** -- Metric — definition, target. +- **SM-2**: Metric — definition, target. Validates FR-Z. **Counter-metrics (do not optimize)** -- Metric — why this should *not* be optimized. +- **SM-C1**: Metric — why this should *not* be optimized. Counterbalances SM-1. [Length scales with stakes. Hobby/utility PRD: a single sentence may be enough ("Success: I use this weekly and don't abandon it after a month"). Public launch / enterprise: full quantitative breakdown with measurement methods. Counter-metrics are as load-bearing as primary metrics — they prevent the architect from optimizing the wrong thing and the dev from gaming the wrong target.] @@ -142,17 +166,3 @@ updated: {YYYY-MM-DD} ### Small-scope all-inclusive *(use when scope is 1-2 stories' worth and the user wants a single captured artifact — chosen during the Right-skill check in Discovery)* - **Stories** — story-level specs listed inline at the end of the doc. Each story: *"As a [persona], I can [action] [under conditions]. Acceptance: [testable criteria]."* Numbered Story-1, Story-2, ... for reference. Pair with very lean §1 Vision, §2 Target User (often just JTBD + one UJ), §3 Glossary (handful of terms), §4 Features (often a single feature), §6 MVP Scope (in/out very tight). The whole doc fits on a page or two and captures intent + implementable stories in one place. If the user doesn't want the captured artifact at all, `bmad-quick-dev` is the better path — this cluster is only for "I want a doc *and* the stories." ---- - -## Notes for the facilitator - -- **The essential spine is the floor, not the ceiling.** A hobby PRD might keep all ten sections short. An enterprise PRD layers many clusters from the adapt-in menu. -- **§3 Glossary before §4 Features.** Mechanics never introduce a new domain noun without adding it to the Glossary in the same pass. Persona, JTBD, and Journeys may use Glossary terms before §3 formally defines them — context is inferable; the Glossary is for downstream anchoring. -- **§2.4 Key User Journeys are brief.** One line each. Numbered globally (UJ-1 through UJ-N) so architecture, epics, stories, and tickets can reference them by stable ID. Detailed flow design happens in the UX workflow — not here. -- **§4 Features pattern at every scale.** Description → FRs nested → optional NFRs → optional notes. Hobby PRD: one short paragraph and three FRs per feature. Enterprise feature: multi-paragraph description, fifteen FRs, several feature-specific NFRs, open questions. Same shape, different depth. -- **`[ASSUMPTION]`, `[NON-GOAL]`, `[v2 — out of MVP]`, `[NOTE FOR PM]` callouts are first-class.** They signal to downstream readers and the next session of work. Every `[ASSUMPTION]` lands in §9 Assumptions Index. -- **When UX is *input* to the PRD** (journeys already designed elsewhere): §2.4 names the journeys by ID and points to the existing UX doc. Reference, do not duplicate. -- **When UX is *output* of the PRD** (no UX work yet — downstream `bmad-create-ux-design` will produce it): §2.4 captures the PM's intent on which journeys exist; UX elaborates them into detailed flows downstream. -- **§7 Success Metrics scales with stakes** but is always present. Counter-metrics matter as much as primary metrics — they shape what NOT to optimize. -- **Small-scope all-inclusive option.** When scope is genuinely 1-2 stories and the user wants a single artifact instead of running a separate `bmad-create-story` workflow, add the adapt-in *Stories* cluster: lean §1-§6 plus inline §Stories at the end. The whole doc fits on a page or two. This is a valid PRD shape for tiny work — don't apologize for it. -- **Adapt the section numbering.** The spine uses 0-9; adapt-in additions slot in wherever they read best (e.g., Aesthetic & Tone before §3 if branding is foundational, Compliance after §5 Non-Goals, Constraints & Guardrails between Features and Non-Goals, Stories at the very end after Assumptions Index). diff --git a/src/bmm-skills/2-plan-workflows/bmad-prd/assets/prd-validation-checklist.md b/src/bmm-skills/2-plan-workflows/bmad-prd/assets/prd-validation-checklist.md index a6b3cbef9..616c581d8 100644 --- a/src/bmm-skills/2-plan-workflows/bmad-prd/assets/prd-validation-checklist.md +++ b/src/bmm-skills/2-plan-workflows/bmad-prd/assets/prd-validation-checklist.md @@ -1,30 +1,135 @@ -# PRD Validation Checklist +# PRD Quality Rubric -Loaded by the PRD validator subagent. For each item, return `{id, status: pass|fail|warn|n/a, severity: low|medium|high|critical, location, note}`. Skip items not applicable to the agreed stakes. Cite specific PRD locations — never abstract criticism. +A judgment rubric for the validator subagent. Walk the PRD with these dimensions in mind and write substantive findings — not box-ticking. The goal is a review that tells the user whether this PRD is *good*, not whether it has the right section headers. -## Quality +Most PRDs do not need every dimension scrutinized equally. Calibrate to the agreed stakes, the PRD's shape (consumer product, internal tool, regulatory update, technical capability spec), and what the PRD itself is trying to do. Be specific — cite locations, quote phrases, name what's missing. Abstract criticism is failure of nerve. -- **Q-1. Information density.** Sentences carry weight. Flag filler, hedging, and conversational padding. -- **Q-2. Measurability.** Where measurement matters, FRs and Success Metrics are measurable; subjective adjectives flagged. Counter-metrics named when Success Metrics exist. -- **Q-3. Traceability.** Where the chain matters, FRs name their link to a user journey or success criterion inline. -- **Q-4. Vision and JTBDs concrete.** Vision is specific and stands alone — not a generic feature list. JTBDs are audience-grounded, not abstract. -- **Q-5. Non-Goals explicit.** A Non-Goals section is present where it would do real work; inline `[NON-GOAL]` and `[v2]` callouts where omissions would otherwise be silently assumed. -- **Q-6. Dual-audience and self-contained.** Each section makes sense pulled out alone (cross-references via Glossary terms, not "see above"); the PRD is readable by humans and structured cleanly for downstream source-extraction by UX, architecture, and story-creation workflows. +## How to use this rubric -## Discipline +1. Read the full PRD (and addendum.md if present) before writing anything. +2. For each of the seven dimensions below, form a judgment — *strong / adequate / thin / broken* — backed by specifics from the PRD. +3. Write findings only where they add information. A `strong` dimension may need no findings; a `broken` one needs concrete, fixable ones. +4. Severity ranks impact on the PRD's usefulness, not how easy the fix is. A vague Vision statement is *critical* even though it's a one-paragraph fix; a glossary drift might be *low* even though it appears in many places. +5. The overall verdict is your synthesis — 2–3 sentences that name what holds up and what's at risk. Earn it with the dimension judgments. -- **D-1. Capabilities, not implementation.** FRs describe what users/systems can do, not how. Flag technology names, library choices, architecture decisions. -- **D-2. Input fidelity.** Requirements from input documents (brief, research, prior PRD) are still in scope or explicitly handled via Non-Goals or `[ASSUMPTION]`. -- **D-3. Personas grounded.** If personas exist, they are research-grounded or marked `[ILLUSTRATIVE]`. Each persona drives at least one decision. -- **D-4. No innovation theater.** Novelty claims are real, not invented. +## Output format -## Structural integrity +Write findings to `{doc_workspace}/review-rubric.md`: -- **S-1. Glossary integrity.** Every domain noun is defined in the Glossary and used identically throughout. Flag drift (case, plural, synonyms) and candidate missing-term entries. -- **S-2. ID continuity.** FR / UJ / Story IDs are contiguous, unique, and cross-references resolve. -- **S-3. Assumptions Index.** Every inline `[ASSUMPTION: ...]` appears in the Assumptions Index and vice versa. -- **S-4. Open-items density.** Count Open Questions + `[ASSUMPTION]` + `[NOTE FOR PM]`. Red flag if density is high relative to the agreed stakes. +```markdown +# PRD Quality Review — {prd_name} -## Stakes-gated +## Overall verdict +[2–3 sentences. What holds up, what's at risk. Earned by the dimension judgments below.] -- **STK-1. Required sections.** The PRD includes the sections the agreed stakes and product type warrant. +## Decision-readiness — [strong | adequate | thin | broken] +[1–3 paragraphs of judgment with specific PRD locations.] + +### Findings +- **[critical|high|medium|low]** [Title] (§ location) — [Note]. *Fix:* [suggested fix]. + +## Substance over theater — [verdict] +... + +(repeat for each dimension) + +## Mechanical notes +[Glossary drift, ID continuity, broken cross-refs, Assumptions Index roundtrip. Lighter weight — these matter for downstream but don't drive the overall verdict.] +``` + +## The seven dimensions + +### 1. Decision-readiness + +Can a decision-maker act on this PRD? Are the trade-offs surfaced honestly, or has the PRD smoothed everything to neutral? Would someone pushing back find their objection acknowledged or dodged? + +Look for: +- Decisions that are stated as decisions, not buried as "considerations." +- Trade-offs named with what was given up, not just what was chosen. +- Open Questions that are actually open — not rhetorical questions with an answer in the next sentence. +- `[NOTE FOR PM]` callouts at real tensions, not at safe checkpoints. + +Red flag: a PRD where every choice "balances" everything, every NFR is "important," every persona "values" the product. + +### 2. Substance over theater + +Is the content earned, or is it furniture? Distinguish: + +- **Persona theater** — Personas that don't drive a single decision in the PRD. More than four personas. Personas whose only function is to make the PRD look thorough. +- **Innovation theater** — claimed novelty that isn't novel. Differentiation sections written because the template had one, not because Discovery surfaced something. +- **NFR theater** — copied boilerplate ("system must be scalable / secure / reliable") without product-specific thresholds. +- **Vision theater** — a Vision statement that could swap into any PRD in this category without change. + +Flag what reads like furniture, even if it's well-written furniture. + +### 3. Strategic coherence + +Does the PRD have a thesis? Do the features serve a unified arc, or is it a list of capabilities someone wanted? + +Look for: +- A stated thesis the PRD bets on (problem framing, user insight, market move). +- Feature prioritization that follows from the thesis — not from "what's easy first." +- Success Metrics that validate the thesis, not metrics that just measure activity (DAU/MAU when the thesis is about engagement quality is a tell). +- Counter-metrics named when SMs exist. +- Coherent MVP scope kind — problem-solving, experience, platform, or revenue — with scope logic that matches. + +Red flag: a PRD that reads as a backlog with section headings. + +### 4. Done-ness clarity + +Would an engineer reading this PRD know what "done" looks like for each FR? + +Look for: +- FRs with at least one testable consequence per FR — verifiable condition, measurable outcome. +- "System handles X gracefully," "reasonable performance," "user-friendly" — flag every one. +- Acceptance criteria implied or explicit. Sometimes the FR's consequences carry this; sometimes the PRD genuinely needs an Acceptance section. +- For non-functional sections (UX, performance, security): bounds, not adjectives. + +This is the dimension downstream story creation will lean on hardest. Be unforgiving here. + +### 5. Scope honesty + +Are omissions explicit, or is the reader meant to infer them? + +Look for: +- A Non-Goals section where it would do real work — and `[NON-GOAL for MVP]` callouts where omissions could be silently assumed. +- `[ASSUMPTION: …]` tags on inferences the user didn't directly confirm, indexed at the end. +- `[NOTE FOR PM]` callouts at deferred decisions and unresolved tensions. +- De-scoping proposed honestly, not done silently. + +Open-items density: count Open Questions + `[ASSUMPTION]` + `[NOTE FOR PM]` callouts relative to stakes. High counts on a low-stakes PRD is fine; high counts on a green-light-to-build PRD is a blocker. + +### 6. Downstream usability + +If this PRD feeds UX, architecture, or story creation, can those workflows source-extract from it cleanly? + +Look for: +- Glossary present; every domain noun used identically across FRs, UJs, SM definitions. +- FR / UJ / SM IDs contiguous, unique, and cross-references that resolve. +- Each section makes sense pulled out alone — cross-references via Glossary terms, not "see above." +- UJs each name a persona from §2 by exact label; no floating UJs. + +For standalone PRDs (no downstream), this dimension matters less — say so. + +### 7. Shape fit + +Has the PRD been forced into a shape that doesn't match the product? + +- Consumer product / multi-stakeholder B2B / meaningful UX → UJs and personas are load-bearing. +- Internal tool, single-operator role → capability spec shape; UJs may be overhead; SMs may be operational rather than user-facing. +- Regulatory or compliance update → constraint traceability is non-negotiable; UJs may be irrelevant. +- Hobby / solo → rigor light, substance bar still applies. +- Brownfield → existing-code references must be accurate; new UJs and existing UJs must be distinguished. +- Chain-top (feeds UX → architecture → stories) → downstream usability matters more; standalone PRDs can be lighter on traceability. + +Flag PRDs that are over-formalized (UJ density for a single-operator tool) or under-formalized (consumer product with no personas or UJs). + +## Mechanical notes + +Cover these as a tail section, not a primary dimension. They matter for downstream but don't drive the verdict on whether the PRD is good. + +- Glossary drift (case, plural, synonyms across the PRD). +- ID continuity (gaps, duplicates, unresolved cross-references). +- Assumptions Index roundtrip (every inline `[ASSUMPTION]` indexed; index entries all appear inline). +- UJ persona linkage (each UJ names a defined persona by exact label). +- Required sections present for the agreed stakes and product type. diff --git a/src/bmm-skills/2-plan-workflows/bmad-prd/assets/validation-report-template.html b/src/bmm-skills/2-plan-workflows/bmad-prd/assets/validation-report-template.html index 1e3136607..72e727162 100644 --- a/src/bmm-skills/2-plan-workflows/bmad-prd/assets/validation-report-template.html +++ b/src/bmm-skills/2-plan-workflows/bmad-prd/assets/validation-report-template.html @@ -1,8 +1,30 @@ + -PRD Validation: $prd_name +PRD Validation: TEMPLATE_PRD_NAME